开始做登录
This commit is contained in:
44
components/select/index.js
Normal file
44
components/select/index.js
Normal file
@@ -0,0 +1,44 @@
|
||||
// components/select/index.js
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
list: [],
|
||||
visible: false
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
onInput(e) {
|
||||
console.log('e', e)
|
||||
this.setData({
|
||||
visible: true,
|
||||
list: [e.detail, e.detail, e.detail]
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.setData({
|
||||
visible: false,
|
||||
list: []
|
||||
})
|
||||
},
|
||||
onChoose(e) {
|
||||
console.log('e', e)
|
||||
const { data = {} } = e.currentTarget.dataset;
|
||||
this.setData({
|
||||
visible
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user