You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.0 KiB
86 lines
2.0 KiB
2 years ago
|
"use strict";
|
||
|
Component({
|
||
|
data: {
|
||
|
visible: false,
|
||
|
textareaValue: ""
|
||
|
},
|
||
|
properties: {
|
||
|
cancelSignupVisible: {
|
||
|
type: Boolean,
|
||
|
value: false,
|
||
|
observer: function () {
|
||
|
this.setData({
|
||
|
visible: !this.data.visible
|
||
|
});
|
||
|
}
|
||
|
},
|
||
|
title: {
|
||
|
type: String,
|
||
|
value: ""
|
||
|
},
|
||
|
cancelText: {
|
||
|
type: String,
|
||
|
value: ""
|
||
|
},
|
||
|
confirmText: {
|
||
|
type: String,
|
||
|
value: ""
|
||
|
},
|
||
|
tipVisible: {
|
||
|
type: Boolean,
|
||
|
value: false
|
||
|
},
|
||
|
tipValue: {
|
||
|
type: String,
|
||
|
value: "*通过后直接入群,不通过无法入群"
|
||
|
}
|
||
|
},
|
||
|
lifetimes: {
|
||
|
attached: function () {
|
||
|
},
|
||
|
deattached: function () {
|
||
|
}
|
||
|
},
|
||
|
pageLifetimes: {
|
||
|
show: function () {
|
||
|
},
|
||
|
hide: function () {
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
close: function () {
|
||
|
this.triggerEvent("close", { data: this.data.textareaValue });
|
||
|
this.setData({
|
||
|
visible: !this.data.visible
|
||
|
});
|
||
|
},
|
||
|
confirm: function () {
|
||
|
if (this.data.textareaValue === "") {
|
||
|
wx.showToast({
|
||
|
title: "原因不能为空",
|
||
|
icon: "none",
|
||
|
duration: 2000
|
||
|
});
|
||
|
return false;
|
||
|
}
|
||
|
this.triggerEvent("confirm", { data: this.data.textareaValue });
|
||
|
this.setData({
|
||
|
visible: !this.data.visible
|
||
|
});
|
||
|
},
|
||
|
textareaInput: function (e) {
|
||
|
this.setData({
|
||
|
textareaValue: e.detail.value
|
||
|
});
|
||
|
console.log(this.data.textareaValue);
|
||
|
},
|
||
|
closeDialog: function () {
|
||
|
this.setData({
|
||
|
visible: !this.data.visible
|
||
|
});
|
||
|
},
|
||
|
move: function () {
|
||
|
}
|
||
|
}
|
||
|
});
|