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 () { }, deattached () { } }, pageLifetimes: { show () { }, hide () { } }, methods: { close () { this.triggerEvent("close", {data: this.data.textareaValue}) this.setData({ visible: !this.data.visible, textareaValue: '' }) }, confirm () { if (this.data.textareaValue.trim() === "") { wx.showToast({ title: "原因不能为空", icon: "none", duration: 2000 }) return false } this.triggerEvent("confirm", {data: this.data.textareaValue}) this.setData({ visible: !this.data.visible, textareaValue: '' }) }, textareaInput (e) { if (this.data.visible) { this.setData({ textareaValue: e.detail.value }) } else { this.setData({ textareaValue: '' }) } }, closeDialog () { this.setData({ visible: !this.data.visible }) }, move () { } } })