sard-uniapp 1.24.5 → 1.24.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/components/accordion-item/index.scss +2 -2
- package/components/action-sheet/index.scss +4 -4
- package/components/avatar/index.scss +2 -2
- package/components/back-top/index.scss +1 -1
- package/components/badge/index.scss +1 -1
- package/components/button/index.scss +2 -2
- package/components/calendar-month/index.scss +3 -3
- package/components/card/index.scss +2 -2
- package/components/cascader/index.scss +1 -1
- package/components/check-icon/index.scss +1 -1
- package/components/checkbox-input/checkbox-input.vue +6 -2
- package/components/crop-image/index.scss +1 -1
- package/components/dialog/index.scss +1 -1
- package/components/dropdown/index.scss +1 -1
- package/components/fab/index.scss +1 -0
- package/components/fab-item/index.scss +1 -1
- package/components/floating-bubble/index.scss +1 -1
- package/components/form/index.scss +1 -1
- package/components/grid-item/index.scss +2 -2
- package/components/indexes-anchor/index.scss +1 -1
- package/components/indexes-nav/index.scss +2 -2
- package/components/input/index.scss +2 -2
- package/components/keyboard/index.scss +5 -5
- package/components/list-item/index.scss +2 -2
- package/components/menu-item/index.scss +2 -2
- package/components/notice-bar/index.scss +3 -2
- package/components/overlay/index.scss +1 -1
- package/components/pagination/index.scss +2 -2
- package/components/password-input/index.scss +6 -7
- package/components/picker/common.js +2 -1
- package/components/picker/picker.vue +11 -14
- package/components/picker-input/README.md +4 -0
- package/components/picker-input/picker-input.vue +2 -2
- package/components/picker-popout/README.md +4 -0
- package/components/picker-popout/picker-popout.vue +7 -7
- package/components/popout/index.scss +1 -1
- package/components/popover/index.scss +3 -3
- package/components/progress-bar/index.scss +5 -5
- package/components/progress-circle/index.scss +1 -1
- package/components/scroll-list/index.scss +2 -2
- package/components/search/index.scss +3 -3
- package/components/segmented/index.scss +2 -2
- package/components/segmented-item/index.scss +1 -1
- package/components/share-sheet/index.scss +4 -4
- package/components/sidebar-item/index.scss +1 -1
- package/components/signature/index.scss +2 -2
- package/components/skeleton/index.scss +1 -1
- package/components/skeleton-block/index.scss +1 -1
- package/components/slider/index.scss +7 -7
- package/components/step/index.scss +3 -3
- package/components/stepper/index.scss +4 -4
- package/components/swiper-dot/index.scss +4 -4
- package/components/switch/index.scss +3 -3
- package/components/tab/index.scss +3 -2
- package/components/tabbar/index.scss +1 -1
- package/components/table/index.scss +1 -1
- package/components/table-cell/index.scss +1 -1
- package/components/table-row/index.scss +1 -1
- package/components/tabs/index.scss +1 -1
- package/components/timeline-item/index.scss +2 -2
- package/components/toast/index.scss +1 -1
- package/components/tree/index.scss +1 -1
- package/components/tree-node/index.scss +3 -3
- package/components/upload/index.scss +2 -2
- package/components/upload-preview/index.scss +5 -5
- package/package.json +1 -1
- package/utils/dom.js +20 -15
- package/dev/mp-alipay/mini.project.json +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [1.24.6](https://github.com/sutras/sard-uniapp/compare/v1.24.5...v1.24.6) (2025-09-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **picker:** 将空数组视为空值, 修复级联选择初始选择问题 ([2fd8d18](https://github.com/sutras/sard-uniapp/commit/2fd8d18e411a526dc65cb1c99826162bae3ba4c6))
|
|
7
|
+
* 修复getWindowInfo在支付宝端缺少safeAreaInsets的问题 ([cbd26d7](https://github.com/sutras/sard-uniapp/commit/cbd26d74074d9afe9299db92b9245de7cc46177a))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
## [1.24.5](https://github.com/sutras/sard-uniapp/compare/v1.24.4...v1.24.5) (2025-09-20)
|
|
2
12
|
|
|
3
13
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@include bem(accordion-item) {
|
|
4
4
|
@include b() {
|
|
5
5
|
@include universal;
|
|
6
|
-
background
|
|
6
|
+
background: var(--sar-accordion-bg);
|
|
7
7
|
|
|
8
8
|
&::before {
|
|
9
9
|
@include border-top(var(--sar-accordion-border-color));
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
@include m-not(disabled) {
|
|
65
65
|
@include e(header) {
|
|
66
66
|
&:active {
|
|
67
|
-
background
|
|
67
|
+
background: var(--sar-accordion-active-bg);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
padding-bottom: env(safe-area-inset-bottom);
|
|
6
6
|
border-top-left-radius: var(--sar-action-sheet-border-radius);
|
|
7
7
|
border-top-right-radius: var(--sar-action-sheet-border-radius);
|
|
8
|
-
background
|
|
8
|
+
background: var(--sar-action-sheet-bg);
|
|
9
9
|
touch-action: none;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
@include e(gap) {
|
|
25
25
|
@include universal;
|
|
26
26
|
height: var(--sar-action-sheet-gap-height);
|
|
27
|
-
background
|
|
27
|
+
background: var(--sar-action-sheet-gap-bg);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
@include e(content) {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
@include m-not(disabled, loading) {
|
|
57
57
|
&:active {
|
|
58
|
-
background
|
|
58
|
+
background: var(--sar-action-sheet-active-bg);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
cursor: pointer;
|
|
89
89
|
|
|
90
90
|
&:active {
|
|
91
|
-
background
|
|
91
|
+
background: var(--sar-action-sheet-active-bg);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
width: var(--sar-avatar-width);
|
|
11
11
|
height: var(--sar-avatar-height);
|
|
12
12
|
font-size: var(--sar-avatar-font-size);
|
|
13
|
-
background
|
|
13
|
+
background: var(--sar-avatar-bg);
|
|
14
14
|
border: 1px solid transparent;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
height: 100%;
|
|
44
44
|
font-size: var(--sar-avatar-remain-font-size);
|
|
45
45
|
color: var(--sar-avatar-remain-color);
|
|
46
|
-
background
|
|
46
|
+
background: var(--sar-avatar-remain-bg);
|
|
47
47
|
border-radius: inherit;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
border-radius: var(--sar-back-top-border-radius);
|
|
16
16
|
font-size: var(--sar-back-top-font-size);
|
|
17
17
|
color: var(--sar-back-top-color);
|
|
18
|
-
background
|
|
18
|
+
background: var(--sar-back-top-bg);
|
|
19
19
|
box-shadow: var(--sar-back-top-box-shadow);
|
|
20
20
|
cursor: pointer;
|
|
21
21
|
pointer-events: none;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
height: 100%;
|
|
44
44
|
border-radius: inherit;
|
|
45
45
|
opacity: 0;
|
|
46
|
-
background
|
|
46
|
+
background: var(--sar-button-active-bg);
|
|
47
47
|
pointer-events: none;
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
@include m(mild-#{$theme}) {
|
|
153
153
|
@include button-set-theme {
|
|
154
154
|
color: $color;
|
|
155
|
-
background
|
|
155
|
+
background: var(--sar-button-mild-bg);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
@include m(selected, same) {
|
|
67
67
|
border-radius: var(--sar-calendar-day-border-radius);
|
|
68
68
|
color: var(--sar-calendar-day-selected-color);
|
|
69
|
-
background
|
|
69
|
+
background: var(--sar-calendar-day-selected-bg);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
@include m(start, end) {
|
|
73
73
|
color: var(--sar-calendar-day-selected-color);
|
|
74
|
-
background
|
|
74
|
+
background: var(--sar-calendar-day-selected-bg);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
@include m(start) {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
|
|
87
87
|
@include m(middle) {
|
|
88
88
|
color: var(--sar-calendar-day-middle-color);
|
|
89
|
-
background
|
|
89
|
+
background: var(--sar-calendar-day-middle-bg);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
@include bem(card) {
|
|
4
4
|
@include b() {
|
|
5
5
|
@include universal;
|
|
6
|
-
background
|
|
6
|
+
background: var(--sar-card-bg);
|
|
7
7
|
border-radius: var(--sar-card-border-radius);
|
|
8
8
|
|
|
9
9
|
@include m(hover) {
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
|
|
12
12
|
&:active {
|
|
13
|
-
background
|
|
13
|
+
background: var(--sar-card-active-bg);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -53,7 +53,11 @@ import {
|
|
|
53
53
|
import {
|
|
54
54
|
defaultCheckboxInputProps
|
|
55
55
|
} from "./common";
|
|
56
|
-
import {
|
|
56
|
+
import {
|
|
57
|
+
getMayPrimitiveOption,
|
|
58
|
+
isEmptyArray,
|
|
59
|
+
isEmptyBinding
|
|
60
|
+
} from "../../utils";
|
|
57
61
|
import { usePopoutInput } from "../../use";
|
|
58
62
|
/**
|
|
59
63
|
* @property {string} rootClass 弹出式输入框根元素类名,默认值:-。
|
|
@@ -162,7 +166,7 @@ export default _defineComponent({
|
|
|
162
166
|
).map((option) => getMayPrimitiveOption(option, optionKeys.label)).join(", ");
|
|
163
167
|
}
|
|
164
168
|
function getInputValue() {
|
|
165
|
-
if (isEmptyBinding(innerValue.value) ||
|
|
169
|
+
if (isEmptyBinding(innerValue.value) || isEmptyArray(innerValue.value)) {
|
|
166
170
|
return "";
|
|
167
171
|
}
|
|
168
172
|
return getOutletText(props.options, fieldKeys.value, innerValue.value);
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
border-radius: var(--sar-rounded-full);
|
|
39
39
|
font-size: var(--sar-fab-item-btn-font-size);
|
|
40
40
|
color: var(--sar-fab-item-btn-color);
|
|
41
|
-
background
|
|
41
|
+
background: var(--sar-fab-item-btn-bg);
|
|
42
42
|
box-shadow: var(--sar-fab-item-btn-box-shadow);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
height: var(--sar-floating-bubble-size);
|
|
14
14
|
border-radius: var(--sar-rounded-full);
|
|
15
15
|
color: var(--sar-floating-bubble-color);
|
|
16
|
-
background
|
|
16
|
+
background: var(--sar-floating-bubble-bg);
|
|
17
17
|
box-shadow: var(--sar-floating-bubble-box-shadow);
|
|
18
18
|
opacity: 0;
|
|
19
19
|
cursor: pointer;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
padding-right: var(--sar-grid-item-padding-x);
|
|
21
21
|
padding-bottom: var(--sar-grid-item-padding-y);
|
|
22
22
|
padding-left: var(--sar-grid-item-padding-x);
|
|
23
|
-
background
|
|
23
|
+
background: var(--sar-grid-bg);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
@include e(main) {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
@include e(content) {
|
|
121
121
|
cursor: pointer;
|
|
122
122
|
&:active {
|
|
123
|
-
background
|
|
123
|
+
background: var(--sar-grid-active-bg);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
@include m(active) {
|
|
27
27
|
color: var(--sar-indexes-nav-item-active-color);
|
|
28
|
-
background
|
|
28
|
+
background: var(--sar-indexes-nav-item-active-bg);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
justify-content: center;
|
|
41
41
|
margin-right: var(--sar-indexes-hint-margin-right);
|
|
42
42
|
border-radius: 50% 0 50% 50%;
|
|
43
|
-
background
|
|
43
|
+
background: var(--sar-indexes-hint-bg);
|
|
44
44
|
transform-origin: top right;
|
|
45
45
|
transform: rotate(45deg);
|
|
46
46
|
pointer-events: none;
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
@include m(disabled) {
|
|
37
|
-
background
|
|
37
|
+
background: var(--sar-disabled-shallow-bg);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
border-width: 0;
|
|
59
59
|
font-size: var(--sar-input-control-font-size);
|
|
60
60
|
line-height: var(--sar-input-control-line-height);
|
|
61
|
-
background
|
|
61
|
+
background: var(--sar-input-bg);
|
|
62
62
|
|
|
63
63
|
@include m(input) {
|
|
64
64
|
height: var(--sar-input-control-input-height);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@include b() {
|
|
5
5
|
@include universal;
|
|
6
6
|
padding: var(--sar-keyboard-padding);
|
|
7
|
-
background
|
|
7
|
+
background: var(--sar-keyboard-bg);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
@include e(content) {
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
border-radius: var(--sar-keyboard-key-border-radius);
|
|
32
32
|
font-size: var(--sar-keyboard-key-font-size);
|
|
33
33
|
color: var(--sar-keyboard-key-color);
|
|
34
|
-
background
|
|
34
|
+
background: var(--sar-keyboard-key-bg);
|
|
35
35
|
cursor: pointer;
|
|
36
36
|
|
|
37
37
|
&:active {
|
|
38
|
-
background
|
|
38
|
+
background: var(--sar-keyboard-key-active-bg);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
max-width: 20%;
|
|
58
58
|
|
|
59
59
|
@include e(key) {
|
|
60
|
-
background
|
|
60
|
+
background: var(--sar-keyboard-key-plate-bg);
|
|
61
61
|
|
|
62
62
|
&:active {
|
|
63
|
-
background
|
|
63
|
+
background: var(--sar-keyboard-key-plate-active-bg);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
overflow: hidden;
|
|
9
9
|
min-height: var(--sar-list-item-min-height);
|
|
10
10
|
padding: var(--sar-list-item-padding-y) var(--sar-list-item-padding-x);
|
|
11
|
-
background
|
|
11
|
+
background: var(--sar-list-item-bg);
|
|
12
12
|
|
|
13
13
|
&:first-child {
|
|
14
14
|
border-top-left-radius: inherit;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
cursor: pointer;
|
|
41
41
|
|
|
42
42
|
&:active {
|
|
43
|
-
background
|
|
43
|
+
background: var(--sar-list-item-active-bg);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
@include e(item) {
|
|
82
82
|
@include m-not(disabled) {
|
|
83
83
|
&:active {
|
|
84
|
-
background
|
|
84
|
+
background: var(--sar-menu-item-active-bg);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
@include e(item) {
|
|
98
98
|
@include m-not(disabled) {
|
|
99
99
|
&:active {
|
|
100
|
-
background
|
|
100
|
+
background: var(--sar-menu-item-dark-active-bg);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
align-items: center;
|
|
9
9
|
min-height: var(--sar-notice-bar-min-height);
|
|
10
10
|
padding: 0 var(--sar-notice-bar-padding-x);
|
|
11
|
-
background
|
|
11
|
+
background: var(--sar-notice-bar-bg);
|
|
12
12
|
color: var(--sar-notice-bar-color);
|
|
13
13
|
|
|
14
14
|
@include m(wrap) {
|
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
|
|
65
65
|
@include m(infinite) {
|
|
66
66
|
@include e(wrapper) {
|
|
67
|
-
animation: #{bem-ns(notice-bar-scroll-infinite)} linear both running
|
|
67
|
+
animation: #{bem-ns(notice-bar-scroll-infinite)} linear both running
|
|
68
|
+
infinite;
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
@include m(current) {
|
|
29
29
|
z-index: 3;
|
|
30
30
|
color: var(--sar-pagination-item-current-color);
|
|
31
|
-
background
|
|
31
|
+
background: var(--sar-pagination-item-current-bg);
|
|
32
32
|
border-color: var(--sar-pagination-item-current-border-color);
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
@include m-not(disabled, current) {
|
|
40
40
|
&:active {
|
|
41
|
-
background
|
|
41
|
+
background: var(--sar-pagination-item-active-bg);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -28,17 +28,16 @@
|
|
|
28
28
|
width: var(--sar-password-input-ciphertext-size);
|
|
29
29
|
height: var(--sar-password-input-ciphertext-size);
|
|
30
30
|
border-radius: var(--sar-rounded-full);
|
|
31
|
-
background
|
|
31
|
+
background: var(--sar-password-input-ciphertext-bg);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
@include e(cursor) {
|
|
35
35
|
@include universal;
|
|
36
36
|
width: var(--sar-password-input-cursor-width);
|
|
37
37
|
height: var(--sar-password-input-cursor-height);
|
|
38
|
-
background
|
|
39
|
-
animation: var(--sar-password-input-cursor-animation-duration)
|
|
40
|
-
|
|
41
|
-
)} infinite;
|
|
38
|
+
background: var(--sar-password-input-cursor-color);
|
|
39
|
+
animation: var(--sar-password-input-cursor-animation-duration)
|
|
40
|
+
#{bem-ns(password-input-cursor-flicker)} infinite;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
@keyframes #{bem-ns(password-input-cursor-flicker)} {
|
|
@@ -128,11 +127,11 @@
|
|
|
128
127
|
color: var(--sar-disabled-color);
|
|
129
128
|
|
|
130
129
|
@include e(item) {
|
|
131
|
-
background
|
|
130
|
+
background: var(--sar-disabled-shallow-bg);
|
|
132
131
|
}
|
|
133
132
|
|
|
134
133
|
@include e(ciphertext) {
|
|
135
|
-
background
|
|
134
|
+
background: var(--sar-disabled-color);
|
|
136
135
|
}
|
|
137
136
|
}
|
|
138
137
|
}
|
|
@@ -113,8 +113,9 @@ export function getInitialValue(columns, optionKeys) {
|
|
|
113
113
|
];
|
|
114
114
|
case 'cascader': {
|
|
115
115
|
const options = [];
|
|
116
|
+
recurse(columns, options);
|
|
116
117
|
return [
|
|
117
|
-
|
|
118
|
+
options.map((option) => getValueOrLabelByOption(option, optionKeys.value)),
|
|
118
119
|
options,
|
|
119
120
|
];
|
|
120
121
|
}
|
|
@@ -39,7 +39,8 @@ import {
|
|
|
39
39
|
toArray,
|
|
40
40
|
arrayEqual,
|
|
41
41
|
isNumber,
|
|
42
|
-
isEmptyBinding
|
|
42
|
+
isEmptyBinding,
|
|
43
|
+
isEmptyArray
|
|
43
44
|
} from "../../utils";
|
|
44
45
|
import {
|
|
45
46
|
defaultOptionKeys,
|
|
@@ -112,17 +113,12 @@ export default _defineComponent({
|
|
|
112
113
|
columnIndexes.value = indexes;
|
|
113
114
|
}
|
|
114
115
|
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
()
|
|
118
|
-
|
|
119
|
-
updateColumnIndexes();
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
immediate: true
|
|
116
|
+
updateColumnIndexes();
|
|
117
|
+
watch([innerValue, () => props.columns, fieldKeys], () => {
|
|
118
|
+
if (!isEmptyBinding(innerValue.value) && !isEmptyArray(innerValue.value)) {
|
|
119
|
+
updateColumnIndexes();
|
|
124
120
|
}
|
|
125
|
-
);
|
|
121
|
+
});
|
|
126
122
|
const onChange = (event) => {
|
|
127
123
|
if (!props.columns || props.columns.length === 0) {
|
|
128
124
|
return;
|
|
@@ -130,10 +126,11 @@ export default _defineComponent({
|
|
|
130
126
|
let indexes = event.detail.value;
|
|
131
127
|
if (indexes.some((index) => index === Infinity)) {
|
|
132
128
|
nextTick(() => {
|
|
133
|
-
columnIndexes.value = isEmptyBinding(innerValue.value) ? columnIndexes.value.map(() => 0) : [...columnIndexes.value];
|
|
129
|
+
columnIndexes.value = isEmptyBinding(innerValue.value) || isEmptyArray(innerValue.value) ? columnIndexes.value.map(() => 0) : [...columnIndexes.value];
|
|
134
130
|
});
|
|
135
131
|
return;
|
|
136
132
|
}
|
|
133
|
+
indexes = renderedColumns.value.map((_, index) => indexes[index] || 0);
|
|
137
134
|
if (columnsType.value === "cascader") {
|
|
138
135
|
let startIndex = -1;
|
|
139
136
|
const nextIndexes = [];
|
|
@@ -195,7 +192,7 @@ export default _defineComponent({
|
|
|
195
192
|
watch(
|
|
196
193
|
[() => props.columns, innerValue],
|
|
197
194
|
([newColumns, newValue], [oldColumns, oldValue]) => {
|
|
198
|
-
if (newColumns !== oldColumns || newValue !== oldValue && columnsType.value === "cascader" && !isEmptyBinding(newValue) &&
|
|
195
|
+
if (newColumns !== oldColumns || newValue !== oldValue && columnsType.value === "cascader" && !isEmptyBinding(newValue) && !isEmptyArray(newValue)) {
|
|
199
196
|
updateRenderedColumns();
|
|
200
197
|
}
|
|
201
198
|
}
|
|
@@ -203,7 +200,7 @@ export default _defineComponent({
|
|
|
203
200
|
watch(
|
|
204
201
|
() => props.modelValue,
|
|
205
202
|
() => {
|
|
206
|
-
if (isEmptyBinding(props.modelValue)) {
|
|
203
|
+
if (isEmptyBinding(props.modelValue) || isEmptyArray(props.modelValue)) {
|
|
207
204
|
updateColumnIndexes();
|
|
208
205
|
updateRenderedColumns();
|
|
209
206
|
}
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
getOptionsByIndexes,
|
|
72
72
|
getValueOrLabelByOption
|
|
73
73
|
} from "../picker/common";
|
|
74
|
-
import { isEmptyBinding, toArray } from "../../utils";
|
|
74
|
+
import { isEmptyArray, isEmptyBinding, toArray } from "../../utils";
|
|
75
75
|
import { usePopoutInput } from "../../use";
|
|
76
76
|
import {
|
|
77
77
|
defaultPickerInputProps
|
|
@@ -180,7 +180,7 @@ export default _defineComponent({
|
|
|
180
180
|
return labels.join("/");
|
|
181
181
|
}
|
|
182
182
|
function getInputValue() {
|
|
183
|
-
if (isEmptyBinding(innerValue.value)) {
|
|
183
|
+
if (isEmptyBinding(innerValue.value) || isEmptyArray(innerValue.value)) {
|
|
184
184
|
return "";
|
|
185
185
|
}
|
|
186
186
|
return getOutletText(props.columns, fieldKeys.value, innerValue.value);
|