美文网首页
微信小程序-自定义弹出层和仿微信密码输入框

微信小程序-自定义弹出层和仿微信密码输入框

作者: 秋秋秋web | 来源:发表于2018-02-06 16:21 被阅读682次
html

js:

hideFlag: function () { this.setData({ flag: false }) }

toSetPasswprd: function (e) {

    var that = this;

    this.setData({

      password: e.detail.value,

      passwordLength: e.detail.cursor

    })

    if (e.detail.cursor == 6) {//do something }

  }

css:

.password-box { margin: 0 auto; border: 1px solid #ddd; border-right: 0; width: 240px; height: 40px;} .password-sigle { width: 40px; height: 40px; text-align: center; font-size: 24px; box-sizing: border-box; float: left; padding: 0px; border-right: 1px solid #ddd;} .password-sigle i { width: 10px; height: 10px; background-color: #000; border-radius: 20px; display: block; margin: 15px auto;} .password-title { text-align: center; display: block; padding-top: 20px;} .password-text-warn { font-size: 12px; margin-bottom: 10px; display: block; text-align: center;} .cash-password-main { padding: 30px 0; position: relative;} .password-input { position: absolute; left: 50%; right: 50%; border: 1px solid #ddd; width: 240px; height: 40px; margin-left: -120px; font-size: 24px; top: 30px; opacity: 0;} .cash-pop-notice { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: rgba(0, 0, 0, 0.5);} .cash-pop-main { background-color: #fff; width: 270px; height: 150px; text-align: center; position: absolute; top: 20%; left: 50%; right: 50%; margin-left: -135px;} .pop-main-icon { position: absolute; right: 10px; top: 10px;} .cash-pop-title { padding-top: 25px;}

相关文章

网友评论

      本文标题:微信小程序-自定义弹出层和仿微信密码输入框

      本文链接:https://www.haomeiwen.com/subject/vxuckttx.html