53 lines
867 B
JavaScript
53 lines
867 B
JavaScript
var app = getApp();
|
|
Component({
|
|
//对外声明属性
|
|
properties: {
|
|
//标题
|
|
title: {
|
|
type: String,
|
|
value: ''
|
|
},
|
|
//否定按钮显示
|
|
toastCancel: {
|
|
type: String,
|
|
value: ''
|
|
},
|
|
//确定按钮显示
|
|
toastConfirm: {
|
|
type: String,
|
|
value: ''
|
|
},
|
|
//是否隐藏
|
|
hidden: {
|
|
type: Boolean,
|
|
value: true
|
|
},
|
|
//标题
|
|
value: {
|
|
type: String,
|
|
value: ''
|
|
},
|
|
|
|
},
|
|
//内部属性
|
|
data: {
|
|
windowHeight: app.globalData.systemInfo.windowHeight
|
|
},
|
|
|
|
//方法
|
|
methods: {
|
|
//取消
|
|
toastCancel: function(e) {
|
|
this.triggerEvent("toastCancel");
|
|
},
|
|
//确定
|
|
toastConfirm: function(e) {
|
|
this.triggerEvent("toastConfirm");
|
|
},
|
|
//输入内容
|
|
setValue: function(e) {
|
|
this.triggerEvent("setValue", e);
|
|
}
|
|
}
|
|
|
|
}) |