|
@@ -1,23 +1,25 @@
|
|
|
Component({
|
|
|
- properties: {
|
|
|
- list: Array,
|
|
|
- showAll: {//是否显示全部(包含值为空项)
|
|
|
- type: Boolean,
|
|
|
- value: true
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- /* 单击项目 */
|
|
|
- clickItem(e) {
|
|
|
- const {
|
|
|
- item
|
|
|
- } = e.currentTarget.dataset;
|
|
|
+ properties: {
|
|
|
+ list: Array,
|
|
|
+ showAll: { //是否显示全部(包含值为空项)
|
|
|
+ type: Boolean,
|
|
|
+ value: true
|
|
|
+ },
|
|
|
+ clickItem: Function
|
|
|
},
|
|
|
- /* 单击补充区域 */
|
|
|
- clickRep(e) {
|
|
|
- const {
|
|
|
- item
|
|
|
- } = e.currentTarget.dataset;
|
|
|
+ methods: {
|
|
|
+ /* 单击项目 */
|
|
|
+ clickItem(e) {
|
|
|
+ const {
|
|
|
+ item
|
|
|
+ } = e.currentTarget.dataset;
|
|
|
+ this.triggerEvent("clickItem", item)
|
|
|
+ },
|
|
|
+ /* 单击补充区域 */
|
|
|
+ clickRep(e) {
|
|
|
+ const {
|
|
|
+ item
|
|
|
+ } = e.currentTarget.dataset;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
})
|