12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- Component({
- options: {
- multipleSlots: true // 在组件定义时的选项中启用多slot支持
- },
- /**
- * 组件的属性列表
- */
- properties: {
- confirmText: {
- type: String,
- value: '确定'
- }
- },
- /**
- * 组件内私有数据
- */
- data: {
- // 弹窗显示控制
- isShow: false,
- errMsg: '',
- cashCode: ''
- },
- /**
- * 组件的公有方法列表
- */
- methods: {
- //隐藏弹框
- hideDialog() {
- this.setData({
- isShow: !this.data.isShow
- })
- },
- //展示弹框
- showDialog() {
- this.setData({
- isShow: !this.data.isShow,
- cashCode: ''
- })
- },
- cashCodeInput(e){
- this.setData({
- cashCode: e.detail.value
- })
- },
- getCashCode(){
- return this.data.cashCode;
- },
- setErrMsg(_errMsg){
- this.setData({
- errMsg: _errMsg
- })
- },
- confirmEvent() {
- this.triggerEvent('customevent');
- }
- }
- })
|