Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
showPicker() {
this.calculateDepth()
weui.picker(this.formatDistricts(), {
depth: this.depth,
defaultValue: this.defaultValue,
onChange: (result) => {
this.$emit('change', result)
},
onConfirm: (result) => {
this.$emit('confirm', result)
},
className: this.className,
id: this.id,
})
let picker = document.querySelector('.' + this.className)
picker.querySelector('.weui-mask').addEventListener('click', () => {
this.$emit('cancel')