行业知识
微信小程序简单输入框界面(实现选择标签功能)
2026-11-17 13:04:57
来源:互联网转载
微信小程序简单输入框界面,实现选择标签功能、输入框字数计数的简单界面功能。
1、js代���:
Page({ /** * 页面的初始数据 */ data: { count: 500, labelList: [{ text: '开心', checked: true }, { text: '难受想哭', checked: true }, { text: '快乐', checked: false }, { text: '囧', checked: false }, { text: '悲伤', checked: false }, { text: '悲哀', checked: true }, { text: 'emeo', checked: false }, { text: '流汗', checked: false }, { text: '悲痛欲绝', checked: false }, { text: '加油', checked: true }, { text: '沮丧', checked: true }, { text: '努力', checked: true }, ] }, inputArea: function (e) { let num = 500 - e.detail.value.length; this.setData({ count: num 2、wxml代码:
标题 说点儿什么呢? 还可输入 {{count}} 字数 选择标签
上一篇:服务器云端签章怎么弄?
下一篇:腾讯云服务器怎么绑定多个ip