vue购物结算清单

所属分类:输入-自动完成

 21994  167  查看评论 (1)
分享到微信朋友圈
X
vue购物结算清单 ie兼容9

更新时间:2020-07-24 00:37:54

更新说明:修复输入框的值验证,对于非正整数,值清空,并在失焦时,值设为0。

代码修改地方:

<input type="text" class="num-input" v-model="item.pro_num">

处新增两个判断

@input="search($event,index)" @blur="check($event,index)",

<input type="text" class="num-input" v-model="item.pro_num" @input="search($event,index)" @blur="check($event,index)">

对应methods加两个函数:

search: function(event, index) {
        search: function(event, index) {
            let flag = new RegExp("^[1-9]([0-9])*$").test(event.target.value);
            if (!flag) {
                this.productList[index].pro_num = '';
            }
        },
        check: function(event, index) {
            if (event.target.value == '') {
                this.productList[index].pro_num = 0;
            }
        },

更新时间:2020-07-15 22:47:06


相关插件-自动完成

angular.js购物车

基于angularjs实现的购物车,搜索、删除、购物结算功能全
  自动完成
 28993  306

jquery的联想词回填插件 根据接口实时调用(原创)

基于jquery的联想词回填插件 根据接口实时调用
  自动完成
 21640  279

jq汉字转拼音

汉字转拼音
  自动完成
 32614  378

输入框自动提示,字母小写转大写

输入框输入车牌号,根据首字母自动提示车牌所属省份信息,并能自动字母小写转大写,限制输入长度
  自动完成
 29362  315

讨论这个项目(1)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    爷爷我想对您说 0
    2020/7/17 10:36:39
    数量可以为负数这个你没限制哦 回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复