feat(member): 身份证查询已存在时弹框确认,表单锁定只读
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e2b44b4d63
commit
30d62a9bd0
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* 用户信息确认弹框组件
|
||||
* Properties: show(控制显示), userInfo(用户信息)
|
||||
* Events: confirm(确认), cancel(取消)
|
||||
*/
|
||||
Component({
|
||||
properties: {
|
||||
/** 是否显示弹框 */
|
||||
show: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
/** 用户信息数据 */
|
||||
userInfo: {
|
||||
type: Object,
|
||||
value: {}
|
||||
}
|
||||
},
|
||||
|
||||
data: {
|
||||
/** 控制 wx:if,DOM 是否存在 */
|
||||
innerShow: false,
|
||||
/** 控制 --visible 类,触发 CSS transition */
|
||||
animVisible: false
|
||||
},
|
||||
|
||||
observers: {
|
||||
/**
|
||||
* 监听外部 show 变化:
|
||||
* 打开时先展示弹框再执行动画;关闭时移除动画类后移除 DOM
|
||||
*/
|
||||
show(val: boolean) {
|
||||
if (val) {
|
||||
this.setData({ innerShow: true })
|
||||
setTimeout(() => {
|
||||
this.setData({ animVisible: true })
|
||||
}, 20)
|
||||
} else {
|
||||
this.setData({ animVisible: false })
|
||||
setTimeout(() => {
|
||||
this.setData({ innerShow: false })
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/** 点击遮罩关闭 */
|
||||
onTapMask() {
|
||||
this.triggerEvent('cancel')
|
||||
},
|
||||
|
||||
/** 点击取消按钮 */
|
||||
onTapCancel() {
|
||||
this.triggerEvent('cancel')
|
||||
},
|
||||
|
||||
/** 点击确认按钮 */
|
||||
onTapConfirm() {
|
||||
this.triggerEvent('confirm')
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user