File tree 4 files changed +2924
-2885
lines changed
4 files changed +2924
-2885
lines changed Original file line number Diff line number Diff line change 19
19
@change =" handleChange"
20
20
@cancel =" handleCancel"
21
21
/>
22
-
23
22
```
24
23
25
24
:::
26
25
27
-
28
26
:::demo 层叠式选择器 StackSelect
29
27
30
28
``` html
44
42
45
43
:::
46
44
47
-
48
-
49
45
### Vue Script
50
46
51
47
``` javascript
@@ -68,6 +64,38 @@ const District = [{
68
64
" value" : " 340882" ,
69
65
" label" : " 其它区" ,
70
66
" children" : []
67
+ }, {
68
+ " value" : " 340883" ,
69
+ " label" : " 其它区" ,
70
+ " children" : []
71
+ }, {
72
+ " value" : " 340884" ,
73
+ " label" : " 其它区" ,
74
+ " children" : []
75
+ }, {
76
+ " value" : " 340885" ,
77
+ " label" : " 其它区" ,
78
+ " children" : []
79
+ }, {
80
+ " value" : " 340886" ,
81
+ " label" : " 其它区" ,
82
+ " children" : []
83
+ }, {
84
+ " value" : " 340887" ,
85
+ " label" : " 其它区" ,
86
+ " children" : []
87
+ }, {
88
+ " value" : " 340888" ,
89
+ " label" : " 其它区" ,
90
+ " children" : []
91
+ }, {
92
+ " value" : " 340889" ,
93
+ " label" : " 其它区" ,
94
+ " children" : []
95
+ }, {
96
+ " value" : " 340890" ,
97
+ " label" : " 其它区" ,
98
+ " children" : []
71
99
}]
72
100
}]
73
101
},{
@@ -146,8 +174,8 @@ export default {
146
174
147
175
#### StackPicker & StackSelect Events
148
176
149
- | 事件名称 | 说明 | 回调参数 |
150
- | :--------- | :--------------------------- | :--------------- |
151
- | ok | 点击确定时触发的回调函数 | 选中值的对象列表 |
152
- | cancel | 点击取消时触发的回调函数 | event 对象 |
153
- | change | 滚动时值变化时触发的回调函数 | 选中值的对象列表 |
177
+ | 事件名称 | 说明 | 回调参数 |
178
+ | :------- | :--------------------------- | :--------------- |
179
+ | ok | 点击确定时触发的回调函数 | 选中值的对象列表 |
180
+ | cancel | 点击取消时触发的回调函数 | event 对象 |
181
+ | change | 滚动时值变化时触发的回调函数 | 选中值的对象列表 |
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " zarm-vue" ,
3
- "version" : " 2.0.0-beta.2 " ,
3
+ "version" : " 2.0.0-beta.3 " ,
4
4
"description" : " zarm in vue" ,
5
5
"tags" : [
6
6
" zarm" ,
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export default {
118
118
},
119
119
validate: {
120
120
type: Function ,
121
- default : () => {},
121
+ default : () => { },
122
122
},
123
123
cancelText: {
124
124
type: String ,
@@ -206,13 +206,14 @@ export default {
206
206
207
207
if (index < cols && valIndex >= 0 ) {
208
208
const target = this .$refs .columns [index];
209
- const position = target .scrollTop ;
210
- const viewTopIndex = valIndex - displayItems;
209
+ if (target) {
210
+ const position = target .scrollTop ;
211
+ const viewTopIndex = valIndex - displayItems;
211
212
212
- if (position < ((viewTopIndex + 1 ) * itemHeight) || position > (valIndex * itemHeight)) {
213
- target .scrollTop = valIndex * itemHeight;
213
+ if (position < ((viewTopIndex + 1 ) * itemHeight) || position > (valIndex * itemHeight)) {
214
+ target .scrollTop = valIndex * itemHeight;
215
+ }
214
216
}
215
-
216
217
return data[valIndex].children || [];
217
218
}
218
219
@@ -303,11 +304,11 @@ export default {
303
304
}
304
305
},
305
306
},
306
- // mounted() {
307
- // this.reposition();
308
- // },
309
- // updated() {
310
- // this.reposition();
311
- // },
307
+ mounted () {
308
+ this .reposition ();
309
+ },
310
+ updated () {
311
+ this .reposition ();
312
+ },
312
313
};
313
314
</script >
You can’t perform that action at this time.
0 commit comments