12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- // components/My_showModel/index.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- isShow: {
- type: Boolean,
- value: false
- },
- /* 标题 */
- title: {
- type: String,
- value: "提示"
- },
- /* 内容 */
- content: {
- type: String
- },
- /* 确定按钮 */
- confirm: {
- type: String,
- value: "确定"
- },
- /* 取消按钮 */
- cancel: {
- type: String,
- value: "取消"
- },
- /* 隐藏取消按钮 */
- hideCancel: {
- type: Boolean,
- value: false
- },
- /* 按钮回调 */
- callBack: {
- type: Function
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- },
- /**
- * 组件的方法列表
- */
- methods: {
- catchtouchmove() {},
- butClick(e) {
- const {
- value
- } = e.target.dataset;
- if (value == undefined) return;
- this.setData({
- isShow: false
- });
- this.triggerEvent('callBack', value);
- },
- }
- })
|