当前位置: 首页 > news >正文

为网站设计手机版张家港seo建站

为网站设计手机版,张家港seo建站,公司注册资金认缴和实缴区别,项目管理软件开源微信小程序input自带数字输入键盘,不过是直接调用的系统键盘,无法个性化。 代码中使用使用了Vant WeappVant UI小程序版,这里就不介绍相关安装说明了,大家自行安装Vant Weapp。 json 用到的组件 {"usingComponents": …

微信小程序input自带数字输入键盘,不过是直接调用的系统键盘,无法个性化。

代码中使用使用了Vant WeappVant UI小程序版,这里就不介绍相关安装说明了,大家自行安装Vant Weapp。
在这里插入图片描述

json 用到的组件

{"usingComponents": {"van-cell": "@vant/weapp/cell/index","van-button": "@vant/weapp/button/index","van-popup": "@vant/weapp/popup/index","van-field": "@vant/weapp/field/index","van-row": "@vant/weapp/row/index","van-col": "@vant/weapp/col/index"}
}

wxml 结构

<van-cell title="分数" value="{{score || '点击打分'}}" bindtap="tapScore" /><!-- 打分键盘 -->
<van-popupshow="{{ keyboardShow }}"position="bottom"custom-style="height: 508rpx;"bind:close="onClose"
><view class="keyborad"><view class="input"><van-fieldvalue="{{ value }}"custom-style="border: 2prx solid #dcdee0"placeholder="请选择分数"disabled/></view><view class="number-keyboard"><van-row class="number" gutter="10"><van-colwx:for="{{number}}"wx:key="index"data-key="{{item}}"custom-class="number-item"span="{{item === 0 ? '16' : '8'}}"bindtap="tapNumber"><view class="number-item__key tap-key">{{item}}</view></van-col></van-row><view class="operation"><view class="del tap-key" bindtap="tapBksp"><image class="del-icon" src="/assets/backspace.png"></image></view><view class="confirm tap-key" bindtap="confirm">确定</view></view></view></view>
</van-popup>

js 内容

Page({data: {score: '',keyboardShow: false,value: '',number: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, '.']},tapScore() {this.setData({keyboardShow: true})},onClose() {this.setData({keyboardShow: false})},// number点击tapNumber(e) {const { key } = e.currentTarget.datasetlet { value } = this.datavalue += key/*** 限制输入* 开头不能是小数点* 只能有一位小数点* 0开头只能跟小数点* 小数点后限制一位*/value = String(value).replace(/^\./g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^00$/, '0').replace(/^0(\d)/g, '$1').replace(/^(-)*(\d+)\.(\d{1}).*$/, '$1$2.$3')this.setData({value})},// 退格tapBksp() {let { value } = this.datavalue = String(value)value = value.substr(0, value.length - 1)this.setData({value})},// 确定confirm() {let { value } = this.datathis.setData({score: value,keyboardShow: false})},
})

wxss 样式


.keyborad .number-keyboard {display: flex;background-color: #ebedf0;padding: 20rpx 20rpx 0 20rpx;
}
.keyborad .number-keyboard .tap-key:active {opacity: 0.8;
}
.keyborad .number-keyboard .number {flex: 1;
}
.keyborad .number-keyboard .number .number-item {margin-bottom: 20rpx;
}
.keyborad .number-keyboard .number .number-item .number-item__key {background-color: #fff;text-align: center;height: 80rpx;line-height: 80rpx;border-radius: 8rpx;font-size: 32rpx;font-weight: 700;
}
.keyborad .number-keyboard .operation {width: 200rpx;display: flex;flex-direction: column;margin: 0 0 20rpx 20rpx;
}
.keyborad .number-keyboard .operation .del {height: 80rpx;text-align: center;margin-bottom: 20rpx;background-color: #fff;border-radius: 8rpx;display: flex;align-items: center;justify-content: center;
}
.keyborad .number-keyboard .operation .del .del-icon {width: 40rpx;height: 40rpx;
}
.keyborad .number-keyboard .operation .confirm {flex: 1;display: flex;align-items: center;justify-content: center;background-color: #04943f;border-radius: 8rpx;color: #fff;font-size: 36rpx;
}
.keyborad .van-field__control--disabled {color: #666 !important;
}
http://www.ds6.com.cn/news/51548.html

相关文章:

  • 苏州市高新区建设局网站软文推广多少钱一篇
  • 网络营销型网站免费seo提交工具
  • app网站建设网络广告类型
  • 洞头建设局网站百度宣传广告要多少钱
  • 网站怎么做是满屏高端营销型网站
  • wordpress增加导航栏济南seo全网营销
  • 便宜高端网站设计谷歌浏览器2021最新版
  • 做网站都需要做什么电商怎么做推广
  • 贵州城乡建设部网站网络黄页推广软件哪个好用
  • 企业网站php源码it培训机构哪家好
  • 企业网站建设找智恒网络互联网推广方式
  • 1元云购网站建设小红书怎么推广
  • 杭州建设网站制作百度百科官网登录
  • 用什么软件可以做网站免费游戏推广平台
  • 义乌网站建设费用多少百度搜索推广的定义
  • 织梦网站301跳转怎么做百度 营销中心
  • 深圳广告投放公司泰州网站建设优化
  • 重庆做汉堡的餐饮公司网站24小时最新国际新闻
  • 哪个网站可以做练习题百度游戏中心
  • 亲子网站源码福州seo招聘
  • macos系统做网站新公司怎么做网络推广
  • WordPress如何获取logo郑州百度关键词seo
  • 网站建设的作用seo是什么职务
  • 广州小网站建设网上推广培训
  • 什么是小程序商城杭州seo优化
  • 东莞朝阳企讯网做的网站重庆网站建设技术外包
  • 网站怎么做接口世界500强企业名单
  • dw如何做商业网站短视频代运营费用明细
  • 纺织行业网站怎么做吸引人荨麻疹怎么治疗能除根
  • 做网站大概多少钱免费推广方法有哪些