Skip to content

Commit 1b326bd

Browse files
committed
build: build 2.0.0-beta.3
1 parent 6cfaa2f commit 1b326bd

File tree

4 files changed

+2924
-2885
lines changed

4 files changed

+2924
-2885
lines changed

docs/2.0.0/stackPicker.md

+37-9
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@
1919
@change="handleChange"
2020
@cancel="handleCancel"
2121
/>
22-
2322
```
2423

2524
:::
2625

27-
2826
:::demo 层叠式选择器 StackSelect
2927

3028
```html
@@ -44,8 +42,6 @@
4442

4543
:::
4644

47-
48-
4945
### Vue Script
5046

5147
```javascript
@@ -68,6 +64,38 @@ const District = [{
6864
"value": "340882",
6965
"label": "其它区",
7066
"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": []
7199
}]
72100
}]
73101
},{
@@ -146,8 +174,8 @@ export default {
146174

147175
#### StackPicker & StackSelect Events
148176

149-
| 事件名称 | 说明 | 回调参数 |
150-
| :--------- | :--------------------------- | :--------------- |
151-
| ok | 点击确定时触发的回调函数 | 选中值的对象列表 |
152-
| cancel | 点击取消时触发的回调函数 | event 对象 |
153-
| change | 滚动时值变化时触发的回调函数 | 选中值的对象列表 |
177+
| 事件名称 | 说明 | 回调参数 |
178+
| :------- | :--------------------------- | :--------------- |
179+
| ok | 点击确定时触发的回调函数 | 选中值的对象列表 |
180+
| cancel | 点击取消时触发的回调函数 | event 对象 |
181+
| change | 滚动时值变化时触发的回调函数 | 选中值的对象列表 |

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zarm-vue",
3-
"version": "2.0.0-beta.2",
3+
"version": "2.0.0-beta.3",
44
"description": "zarm in vue",
55
"tags": [
66
"zarm",

src/stack-picker/src/stack-picker.vue

+13-12
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default {
118118
},
119119
validate: {
120120
type: Function,
121-
default: () => {},
121+
default: () => { },
122122
},
123123
cancelText: {
124124
type: String,
@@ -206,13 +206,14 @@ export default {
206206
207207
if (index < cols && valIndex >= 0) {
208208
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;
211212
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+
}
214216
}
215-
216217
return data[valIndex].children || [];
217218
}
218219
@@ -303,11 +304,11 @@ export default {
303304
}
304305
},
305306
},
306-
// mounted() {
307-
// this.reposition();
308-
// },
309-
// updated() {
310-
// this.reposition();
311-
// },
307+
mounted() {
308+
this.reposition();
309+
},
310+
updated() {
311+
this.reposition();
312+
},
312313
};
313314
</script>

0 commit comments

Comments
 (0)