kui-vue 3.6.5 → 3.6.8
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/components/alert/alert.jsx +26 -7
- package/components/alert/demo/basic.md +4 -4
- package/components/alert/demo/icon.md +15 -6
- package/components/alert/styles/index.less +42 -14
- package/components/avatar/styles/index.less +5 -5
- package/components/backtop/styles/index.less +10 -14
- package/components/badge/styles/index.less +7 -13
- package/components/breadcrumb/index.md +7 -6
- package/components/breadcrumb/styles/index.less +7 -21
- package/components/button/demo/color.md +0 -1
- package/components/button/demo/disabled.md +6 -0
- package/components/button/demo/light.md +1 -1
- package/components/button/styles/index.less +165 -111
- package/components/card/card.jsx +1 -1
- package/components/card/demo/basic.md +1 -1
- package/components/card/demo/border.md +1 -1
- package/components/card/demo/notitle.md +1 -1
- package/components/card/styles/index.less +5 -4
- package/components/carousel/carousel.jsx +186 -175
- package/components/carousel/styles/index.less +11 -16
- package/components/checkbox/checkbox.jsx +2 -2
- package/components/checkbox/styles/index.less +21 -29
- package/components/collapse/styles/index.less +7 -11
- package/components/colorPicker/styles/index.less +83 -71
- package/components/config/context.js +21 -0
- package/components/config/index.js +10 -2
- package/components/datePicker/datepicker.jsx +6 -7
- package/components/datePicker/styles/index.less +54 -57
- package/components/descriptions/styles/index.less +8 -17
- package/components/divider/styles/index.less +20 -18
- package/components/drawer/styles/animal.less +0 -1
- package/components/drawer/styles/index.less +8 -11
- package/components/dropdown/styles/index.less +26 -34
- package/components/empty/index.md +3 -2
- package/components/empty/styles/index.less +2 -2
- package/components/flex/demo/align.md +1 -1
- package/components/flex/demo/basic.md +1 -2
- package/components/flex/index.md +1 -1
- package/components/form/demo/dynamicvalid.md +1 -3
- package/components/form/demo/info.md +22 -12
- package/components/form/demo/valid.md +6 -6
- package/components/form/demo/withmodal.md +2 -2
- package/components/form/styles/index.less +10 -11
- package/components/grid/index.md +4 -1
- package/components/grid/styles/index.less +1 -1
- package/components/icon/demo/search.vue +44 -21
- package/components/icon/index.md +1 -1
- package/components/icon/styles/index.less +7 -8
- package/components/image/index.md +7 -1
- package/components/image/preview.jsx +17 -4
- package/components/image/styles/index.less +36 -42
- package/components/index.js +9 -9
- package/components/input/demo/icon.md +0 -1
- package/components/input/demo/suffix.md +2 -7
- package/components/input/input.jsx +31 -29
- package/components/input/inputBox.jsx +13 -0
- package/components/input/inputGroup.jsx +2 -0
- package/components/input/styles/index.less +47 -53
- package/components/input/textarea.jsx +1 -1
- package/components/inputNumber/demo/basic.md +3 -3
- package/components/inputNumber/demo/ffix.md +2 -2
- package/components/inputNumber/inputNumber.jsx +2 -2
- package/components/inputNumber/styles/index.less +36 -42
- package/components/layout/demo/basic.md +5 -5
- package/components/layout/demo/info.md +1 -34
- package/components/layout/demo/layout1.md +7 -7
- package/components/layout/demo/layout2.md +6 -7
- package/components/layout/demo/layout3.md +5 -5
- package/components/layout/demo/layout4.md +12 -8
- package/components/layout/demo/layout5.md +6 -2
- package/components/layout/styles/index.less +1 -18
- package/components/loading/demo/info.md +3 -3
- package/components/loading/styles/index.less +31 -31
- package/components/menu/index.md +14 -3
- package/components/menu/menu.jsx +1 -1
- package/components/menu/recursiveMenu.jsx +1 -0
- package/components/menu/styles/index.less +43 -55
- package/components/message/demo/basic.md +0 -7
- package/components/message/index.js +0 -4
- package/components/message/index.md +0 -1
- package/components/message/inner.jsx +15 -2
- package/components/message/styles/index.less +12 -17
- package/components/modal/demo/confirm.md +6 -6
- package/components/modal/demo/global.md +0 -15
- package/components/modal/demo/info.md +0 -1
- package/components/modal/index.js +5 -34
- package/components/modal/index.md +1 -2
- package/components/modal/modal.jsx +2 -1
- package/components/modal/styles/index.less +14 -21
- package/components/notice/demo/basic.md +0 -9
- package/components/notice/demo/close.md +4 -0
- package/components/notice/demo/types.md +1 -2
- package/components/notice/index.js +1 -19
- package/components/notice/styles/index.less +16 -22
- package/components/page/page.jsx +5 -4
- package/components/page/styles/index.less +49 -50
- package/components/popconfirm/demo/basic.md +11 -18
- package/components/popconfirm/demo/info.md +3 -1
- package/components/popconfirm/demo/local.md +14 -20
- package/components/popconfirm/demo/placement.md +3 -9
- package/components/popconfirm/index.md +3 -2
- package/components/popconfirm/styles/index.less +9 -15
- package/components/poptip/styles/index.less +44 -49
- package/components/progress/progress.jsx +23 -5
- package/components/progress/styles/index.less +20 -19
- package/components/radio/index.md +7 -7
- package/components/radio/radio.jsx +5 -1
- package/components/radio/styles/index.less +26 -32
- package/components/rate/index.md +11 -11
- package/components/rate/styles/index.less +4 -7
- package/components/select/select.jsx +1 -1
- package/components/select/styles/index.less +38 -51
- package/components/skeleton/index.md +5 -1
- package/components/skeleton/styles/index.less +21 -19
- package/components/slider/slider.jsx +25 -13
- package/components/slider/styles/index.less +13 -12
- package/components/space/space.jsx +2 -1
- package/components/spin/styles/index.less +25 -40
- package/components/statCard/countup.jsx +8 -0
- package/components/statCard/demo/card.md +20 -6
- package/components/statCard/index.md +17 -12
- package/components/statCard/statCard.jsx +16 -1
- package/components/statCard/styles/index.less +9 -6
- package/components/styles/less-css-var.less +309 -0
- package/components/styles/less-var.less +296 -0
- package/components/styles/sys.less +19 -15
- package/components/switch/styles/index.less +9 -24
- package/components/table/index.md +1 -1
- package/components/table/styles/index.less +63 -59
- package/components/tabs/styles/index.less +22 -24
- package/components/tag/demo/basic.md +0 -8
- package/components/tag/index.md +2 -1
- package/components/tag/styles/index.less +40 -41
- package/components/tag/tag.jsx +2 -2
- package/components/timeline/styles/index.less +8 -14
- package/components/tooltip/styles/index.less +35 -40
- package/components/tree/index.md +15 -15
- package/components/tree/styles/index.less +36 -56
- package/components/tree/tree.jsx +1 -0
- package/components/treeselect/index.md +1 -1
- package/components/treeselect/styles/index.less +26 -32
- package/components/treeselect/treeselect.jsx +1 -1
- package/components/upload/demo/forms.md +0 -1
- package/components/upload/fileList.jsx +6 -3
- package/components/upload/styles/index.less +33 -29
- package/components/upload/upload.jsx +5 -1
- package/components/utils/vue.js +4 -2
- package/dist/k-ui.cjs.js +2 -2
- package/dist/k-ui.css +2 -2
- package/dist/k-ui.d.ts +92 -74
- package/dist/k-ui.esm.js +2 -2
- package/dist/k-ui.umd.js +2 -2
- package/dist/locale/de.js +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/ua.js +2 -2
- package/dist/locale/uk.js +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/zh-CN.js +1 -1
- package/dist/locale/zh-TW.js +1 -1
- package/package.json +15 -16
- package/types/alert/Alert.d.ts +2 -0
- package/types/card/Card.d.ts +1 -1
- package/types/checkbox/Checkbox.d.ts +1 -0
- package/types/datePicker/DatePicker.d.ts +1 -0
- package/types/index.d.ts +8 -8
- package/types/input/Input.d.ts +1 -0
- package/types/input/InputGroup.d.ts +2 -0
- package/types/input/TextArea.d.ts +1 -0
- package/types/inputNumber/InputNumber.d.ts +1 -0
- package/types/page/Page.d.ts +1 -0
- package/types/select/Select.d.ts +1 -0
- package/types/statCard/StatCard.d.ts +5 -0
- package/types/tag/Tag.d.ts +1 -0
- package/types/treeselect/TreeSelect.d.ts +1 -0
- package/components/dropdown/demo/custom.md +0 -31
- package/components/icon/lib/dist.json +0 -1
- package/components/icon/lib/kui-icons.js +0 -1
- package/components/icon/lib/sprite.svg +0 -1
- package/components/styles/color.less +0 -209
- package/components/styles/var.less +0 -207
|
@@ -1,193 +1,204 @@
|
|
|
1
1
|
import Icon from "../icon";
|
|
2
2
|
import resize from "../directives/resize";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { ArrowBack, ArrowForward } from "kui-icons";
|
|
4
|
+
import {
|
|
5
|
+
defineComponent,
|
|
6
|
+
provide,
|
|
7
|
+
ref,
|
|
8
|
+
watch,
|
|
9
|
+
onMounted,
|
|
10
|
+
onBeforeUnmount,
|
|
11
|
+
nextTick,
|
|
12
|
+
} from "vue";
|
|
13
|
+
import { withInstall } from "../utils/vue";
|
|
6
14
|
const Carousel = defineComponent({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
name: "Carousel",
|
|
16
|
+
directives: { resize },
|
|
17
|
+
props: {
|
|
18
|
+
value: { type: Number, default: 0 },
|
|
19
|
+
loop: { type: Boolean, default: true },
|
|
20
|
+
autoplay: Boolean,
|
|
21
|
+
delay: { type: Number, default: 3000 },
|
|
22
|
+
vertical: Boolean,
|
|
23
|
+
dots: { type: Boolean, default: true },
|
|
24
|
+
},
|
|
25
|
+
setup(ps, { slots, emit, expose }) {
|
|
26
|
+
const currentIndex = ref(ps.value);
|
|
27
|
+
const posIndex = ref(ps.loop ? ps.value + 1 : ps.value);
|
|
28
|
+
const autoTimer = ref(null);
|
|
29
|
+
const width = ref(0);
|
|
30
|
+
const height = ref(0);
|
|
31
|
+
const animate = ref(ps.value > 0 ? false : true);
|
|
32
|
+
const playing = ref(false);
|
|
33
|
+
const carouselRef = ref(null);
|
|
26
34
|
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
provide("width", width);
|
|
36
|
+
provide("height", height);
|
|
29
37
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
38
|
+
watch(
|
|
39
|
+
() => ps.value,
|
|
40
|
+
(nv, ov) => {
|
|
41
|
+
currentIndex.value = nv;
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
const next = () => {
|
|
45
|
+
toSwitch("right");
|
|
46
|
+
};
|
|
47
|
+
const prev = () => {
|
|
48
|
+
toSwitch("left");
|
|
49
|
+
};
|
|
50
|
+
const goTo = (index) => {
|
|
51
|
+
clearInterval(autoTimer.value);
|
|
52
|
+
animate.value = true;
|
|
53
|
+
currentIndex.value = index;
|
|
54
|
+
posIndex.value = ps.loop ? index + 1 : index;
|
|
55
|
+
emit("update:value", index);
|
|
56
|
+
autoToPlay();
|
|
57
|
+
};
|
|
58
|
+
expose({ next, prev, goTo });
|
|
59
|
+
const autoToPlay = () => {
|
|
60
|
+
if (!ps.autoplay) return;
|
|
61
|
+
clearInterval(autoTimer.value);
|
|
62
|
+
autoTimer.value = setInterval(() => {
|
|
63
|
+
change("right");
|
|
64
|
+
}, parseInt(ps.delay));
|
|
65
|
+
};
|
|
66
|
+
let children = slots.default?.();
|
|
67
|
+
const toSwitch = (type) => {
|
|
68
|
+
clearInterval(autoTimer.value);
|
|
69
|
+
if (playing.value) return;
|
|
70
|
+
playing.value = true;
|
|
71
|
+
change(type);
|
|
72
|
+
};
|
|
65
73
|
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
const change = (type) => {
|
|
75
|
+
animate.value = true;
|
|
68
76
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
const total = ps.loop ? children?.length + 2 : children?.length;
|
|
78
|
+
let index = posIndex.value;
|
|
79
|
+
let nextCurrent = currentIndex.value;
|
|
72
80
|
|
|
73
|
-
|
|
74
|
-
|
|
81
|
+
if (type === "right") {
|
|
82
|
+
index = (index + 1) % total;
|
|
75
83
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
if (ps.loop) {
|
|
85
|
+
nextCurrent = (nextCurrent + 1) % children?.length;
|
|
86
|
+
} else {
|
|
87
|
+
nextCurrent = index;
|
|
88
|
+
}
|
|
89
|
+
} else if (type === "left") {
|
|
90
|
+
index = (index - 1 + total) % total;
|
|
83
91
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
if (ps.loop) {
|
|
93
|
+
nextCurrent = (nextCurrent - 1 + children?.length) % children?.length;
|
|
94
|
+
} else {
|
|
95
|
+
nextCurrent = index;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
90
98
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
99
|
+
posIndex.value = index;
|
|
100
|
+
currentIndex.value = nextCurrent;
|
|
101
|
+
emit("update:value", currentIndex.value);
|
|
94
102
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
playing.value = false;
|
|
105
|
+
if (ps.loop) {
|
|
106
|
+
let count = ps.loop ? children?.length + 2 : children?.length;
|
|
107
|
+
if (posIndex.value === count - 1) {
|
|
108
|
+
animate.value = false;
|
|
109
|
+
posIndex.value = 1;
|
|
110
|
+
}
|
|
111
|
+
if (posIndex.value === 0) {
|
|
112
|
+
animate.value = false;
|
|
113
|
+
posIndex.value = count - 2;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, 501);
|
|
117
|
+
autoToPlay();
|
|
118
|
+
};
|
|
119
|
+
const resize = () => {
|
|
120
|
+
animate.value = false;
|
|
121
|
+
width.value = carouselRef.value.offsetWidth;
|
|
122
|
+
height.value = carouselRef.value.offsetHeight;
|
|
123
|
+
};
|
|
116
124
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
onMounted(() => {
|
|
126
|
+
nextTick(() => {
|
|
127
|
+
resize();
|
|
128
|
+
autoToPlay();
|
|
129
|
+
});
|
|
130
|
+
});
|
|
123
131
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
onBeforeUnmount(() => {
|
|
133
|
+
clearInterval(autoTimer.value);
|
|
134
|
+
});
|
|
127
135
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
return () => {
|
|
137
|
+
let { vertical } = ps;
|
|
138
|
+
const first = children?.[0];
|
|
139
|
+
const last = children?.[children.length - 1];
|
|
140
|
+
const newChildren = ps.loop ? [last, ...children, first] : children;
|
|
141
|
+
let index = Math.min(children?.length - 1, currentIndex.value);
|
|
142
|
+
index = Math.max(0, index);
|
|
143
|
+
const classes = [
|
|
144
|
+
"k-carousel",
|
|
145
|
+
{
|
|
146
|
+
"k-carousel-vertical": vertical,
|
|
147
|
+
},
|
|
148
|
+
];
|
|
149
|
+
const dotsNode = (
|
|
150
|
+
<ul class="k-carousel-dots">
|
|
151
|
+
{children?.map((x, i) => (
|
|
152
|
+
<li
|
|
153
|
+
class={{ "k-carousel-dots-active": index == i }}
|
|
154
|
+
onClick={() => goTo(i)}
|
|
155
|
+
></li>
|
|
156
|
+
))}
|
|
157
|
+
</ul>
|
|
158
|
+
);
|
|
148
159
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
160
|
+
let offsetX = 0,
|
|
161
|
+
offsetY = 0;
|
|
162
|
+
if (!vertical) {
|
|
163
|
+
offsetX = posIndex.value * width.value;
|
|
164
|
+
} else {
|
|
165
|
+
offsetY = posIndex.value * height.value;
|
|
166
|
+
}
|
|
167
|
+
const wrapperCls = {
|
|
168
|
+
class: "k-carousel-wrapper",
|
|
169
|
+
style: {
|
|
170
|
+
transform: `translate3d(-${offsetX}px,-${offsetY}px,0)`,
|
|
171
|
+
width: !vertical ? newChildren?.length * width.value + "px" : "",
|
|
172
|
+
height: vertical ? newChildren?.length * height.value + "px" : "",
|
|
173
|
+
transitionDuration: !animate.value ? "0s" : "",
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
const arrowLeft = (
|
|
177
|
+
<span class="k-carousel-arrow-left" onClick={() => toSwitch("left")}>
|
|
178
|
+
<Icon type={ArrowBack} />
|
|
179
|
+
</span>
|
|
180
|
+
);
|
|
181
|
+
const arrowRight = (
|
|
182
|
+
<span class="k-carousel-arrow-right" onClick={() => toSwitch("right")}>
|
|
183
|
+
<Icon type={ArrowForward} />
|
|
184
|
+
</span>
|
|
185
|
+
);
|
|
186
|
+
const props = {
|
|
187
|
+
class: classes,
|
|
188
|
+
ref: carouselRef,
|
|
189
|
+
onMouseEnter: () => clearInterval(autoTimer.value),
|
|
190
|
+
onMouseLeave: () => {
|
|
191
|
+
ps.autoplay && autoToPlay();
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
return (
|
|
195
|
+
<div v-resize={resize} {...props}>
|
|
196
|
+
<div {...wrapperCls}>{newChildren}</div>
|
|
197
|
+
{!vertical ? [arrowLeft, arrowRight] : null}
|
|
198
|
+
{ps.dots ? dotsNode : null}
|
|
199
|
+
</div>
|
|
200
|
+
);
|
|
201
|
+
};
|
|
202
|
+
},
|
|
192
203
|
});
|
|
193
204
|
export default withInstall(Carousel);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import "../../styles/less-css-var.less";
|
|
2
2
|
|
|
3
3
|
.k-carousel {
|
|
4
4
|
position: relative;
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
width: 100%;
|
|
8
8
|
|
|
9
9
|
&:hover {
|
|
10
|
-
[class*=
|
|
11
|
-
opacity: .2;
|
|
10
|
+
[class*="k-carousel-arrow"] {
|
|
11
|
+
opacity: 0.2;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.k-carousel-wrapper {
|
|
16
|
-
transition: transform .5s ease-in-out;
|
|
16
|
+
transition: transform 0.5s ease-in-out;
|
|
17
17
|
width: 100%;
|
|
18
18
|
height: 100%;
|
|
19
19
|
}
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
width: 16px;
|
|
43
43
|
height: 3px;
|
|
44
44
|
margin: 0 3px;
|
|
45
|
-
opacity: .3;
|
|
45
|
+
opacity: 0.3;
|
|
46
46
|
border-radius: 1px;
|
|
47
|
-
transition: all .5s ease-in-out;
|
|
47
|
+
transition: all 0.5s ease-in-out;
|
|
48
48
|
cursor: pointer;
|
|
49
49
|
|
|
50
50
|
&:hover {
|
|
51
|
-
opacity: .8;
|
|
51
|
+
opacity: 0.8;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
[class*=
|
|
74
|
+
[class*="k-carousel-arrow"] {
|
|
75
75
|
position: absolute;
|
|
76
76
|
top: 50%;
|
|
77
77
|
z-index: 100;
|
|
@@ -89,19 +89,14 @@
|
|
|
89
89
|
margin-top: -18px;
|
|
90
90
|
cursor: pointer;
|
|
91
91
|
color: #fff;
|
|
92
|
-
transition: opacity .3s ease-in-out;
|
|
92
|
+
transition: opacity 0.3s ease-in-out;
|
|
93
93
|
|
|
94
94
|
&:hover {
|
|
95
|
-
opacity: .5;
|
|
95
|
+
opacity: 0.5;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.k-carousel-arrow-left {
|
|
100
|
-
transform: rotate(-90deg);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
99
|
.k-carousel-arrow-right {
|
|
104
|
-
transform: rotate(90deg);
|
|
105
100
|
left: auto;
|
|
106
101
|
right: 10px;
|
|
107
102
|
}
|
|
@@ -150,4 +145,4 @@
|
|
|
150
145
|
opacity: 1;
|
|
151
146
|
}
|
|
152
147
|
}
|
|
153
|
-
}
|
|
148
|
+
}
|
|
@@ -24,7 +24,7 @@ const Checkbox = defineComponent({
|
|
|
24
24
|
|
|
25
25
|
value: { type: [String, Number, Boolean] },
|
|
26
26
|
label: { type: [String, Number] },
|
|
27
|
-
theme: String,
|
|
27
|
+
theme: { type: String, default: "light" },
|
|
28
28
|
disabled: Boolean,
|
|
29
29
|
indeterminate: Boolean,
|
|
30
30
|
size: {
|
|
@@ -87,7 +87,7 @@ const Checkbox = defineComponent({
|
|
|
87
87
|
const labelNode = props.label || slots.default?.();
|
|
88
88
|
|
|
89
89
|
return (
|
|
90
|
-
<label class={wpClasses} onKeydown={triggerCheck} tabindex=
|
|
90
|
+
<label class={wpClasses} onKeydown={triggerCheck} tabindex={props.disabled ? null : 0}>
|
|
91
91
|
<span class="k-checkbox-symbol">
|
|
92
92
|
<input
|
|
93
93
|
type="checkbox"
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
@import "../../styles/var.less";
|
|
1
|
+
@import "../../styles/less-css-var.less";
|
|
2
2
|
|
|
3
3
|
.k-checkbox {
|
|
4
4
|
cursor: pointer;
|
|
5
5
|
font-size: 12px;
|
|
6
6
|
display: inline-flex;
|
|
7
7
|
align-items: center;
|
|
8
|
+
-webkit-user-select: none;
|
|
8
9
|
user-select: none;
|
|
9
10
|
line-height: 1;
|
|
10
|
-
color: var(--kui-color-
|
|
11
|
+
color: var(--kui-color-text);
|
|
11
12
|
white-space: nowrap;
|
|
12
13
|
outline: none;
|
|
13
14
|
&:focus {
|
|
14
15
|
.k-checkbox-symbol {
|
|
15
|
-
outline: 2px solid var(--kui-color-
|
|
16
|
+
outline: 2px solid var(--kui-color-outline);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
// margin-right: 16px;
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
width: 16px;
|
|
29
30
|
height: 16px;
|
|
30
31
|
border: 1px solid var(--kui-color-border);
|
|
31
|
-
background-color: var(--kui-color-
|
|
32
|
+
background-color: var(--kui-color-bg-component);
|
|
32
33
|
color: #fff;
|
|
33
34
|
overflow: hidden;
|
|
34
35
|
outline: 2px solid transparent;
|
|
@@ -64,13 +65,11 @@
|
|
|
64
65
|
|
|
65
66
|
&.k-checkbox-indeterminate {
|
|
66
67
|
.k-checkbox-symbol {
|
|
67
|
-
// background: var(--kui-color-main);
|
|
68
|
-
// border-color: var(--kui-color-main);
|
|
69
68
|
position: relative;
|
|
70
69
|
|
|
71
70
|
&:after {
|
|
72
71
|
box-sizing: content-box;
|
|
73
|
-
background-color: var(--kui-color-
|
|
72
|
+
background-color: var(--kui-color-primary);
|
|
74
73
|
position: absolute;
|
|
75
74
|
width: 8px;
|
|
76
75
|
height: 8px;
|
|
@@ -84,8 +83,8 @@
|
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
|
|
87
|
-
&:hover .k-checkbox-symbol {
|
|
88
|
-
border-color: var(--kui-color-
|
|
86
|
+
&:hover:not(.k-checkbox-disabled) .k-checkbox-symbol {
|
|
87
|
+
border-color: var(--kui-color-primary);
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
.k-checkbox-label {
|
|
@@ -117,39 +116,32 @@
|
|
|
117
116
|
}
|
|
118
117
|
.k-checkbox-light {
|
|
119
118
|
.k-checkbox-symbol {
|
|
120
|
-
background-color: var(--kui-color-
|
|
119
|
+
background-color: var(--kui-color-bg-component);
|
|
121
120
|
}
|
|
122
121
|
}
|
|
123
|
-
.k-checkbox-checked {
|
|
122
|
+
.k-checkbox-checked:not(.k-checkbox-disabled) {
|
|
124
123
|
.k-checkbox-symbol {
|
|
125
|
-
background: var(--kui-color-
|
|
126
|
-
border-color: var(--kui-color-
|
|
124
|
+
background: var(--kui-color-primary);
|
|
125
|
+
border-color: var(--kui-color-primary);
|
|
127
126
|
}
|
|
128
127
|
}
|
|
129
128
|
|
|
130
129
|
.k-checkbox-disabled {
|
|
131
130
|
cursor: not-allowed;
|
|
132
|
-
color: var(--kui-color-disabled);
|
|
131
|
+
color: var(--kui-color-text-disabled);
|
|
133
132
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.k-checkbox-symbol {
|
|
140
|
-
background: var(--kui-color-disable-back);
|
|
141
|
-
border-color: var(--kui-color-disable-border);
|
|
142
|
-
color: var(--kui-color-disabled);
|
|
133
|
+
.k-checkbox-input {
|
|
134
|
+
cursor: not-allowed;
|
|
135
|
+
}
|
|
143
136
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
137
|
+
.k-checkbox-symbol {
|
|
138
|
+
border-color: var(--kui-color-border-disabled);
|
|
139
|
+
background-color: var(--kui-color-bg-component-disabled);
|
|
140
|
+
color: var(--kui-color-text-disabled);
|
|
149
141
|
}
|
|
150
142
|
|
|
151
143
|
&.k-checkbox-indeterminate .k-checkbox-symbol:after {
|
|
152
|
-
background-color: var(--kui-color-
|
|
144
|
+
background-color: var(--kui-color-border-disabled);
|
|
153
145
|
}
|
|
154
146
|
}
|
|
155
147
|
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
@import "../../styles/var.less";
|
|
1
|
+
@import "../../styles/less-css-var.less";
|
|
2
2
|
.k-collapse {
|
|
3
|
-
background-color: var(--kui-color-
|
|
3
|
+
background-color: var(--kui-color-bg);
|
|
4
4
|
border: 1px solid var(--kui-color-border);
|
|
5
|
-
border-radius: var(--kui-border-card
|
|
6
|
-
// border-bottom: 0;
|
|
5
|
+
border-radius: var(--kui-border-radius-card);
|
|
7
6
|
overflow: hidden;
|
|
8
|
-
color: var(--kui-color-
|
|
7
|
+
color: var(--kui-color-text);
|
|
9
8
|
& > .k-collapse-item {
|
|
10
9
|
& > .k-collapse-header {
|
|
11
10
|
line-height: 22px;
|
|
12
11
|
padding: 12px 16px 12px 40px;
|
|
13
12
|
cursor: pointer;
|
|
14
13
|
position: relative;
|
|
15
|
-
color: var(--kui-color-title);
|
|
14
|
+
color: var(--kui-color-text-title);
|
|
16
15
|
font-size: 14px;
|
|
17
16
|
border-bottom: 1px solid var(--kui-color-border);
|
|
18
17
|
border-top: 1px solid var(--kui-color-border);
|
|
@@ -38,9 +37,6 @@
|
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
.k-collapse-content {
|
|
41
|
-
// background-color: #fff;
|
|
42
|
-
// border: 1px solid var(--kui-color-border);
|
|
43
|
-
// border-top: 1px solid var(--kui-color-border);
|
|
44
40
|
padding: 0 16px;
|
|
45
41
|
transition: all 0.3s ease-in-out;
|
|
46
42
|
box-sizing: border-box;
|
|
@@ -61,10 +57,10 @@
|
|
|
61
57
|
border: none;
|
|
62
58
|
background: none;
|
|
63
59
|
.k-collapse-item {
|
|
64
|
-
background: var(--kui-color-
|
|
60
|
+
background: var(--kui-color-bg-component);
|
|
65
61
|
border: none;
|
|
66
62
|
margin-bottom: 10px;
|
|
67
|
-
border-radius: var(--kui-border-card
|
|
63
|
+
border-radius: var(--kui-border-radius-card);
|
|
68
64
|
overflow: hidden;
|
|
69
65
|
.k-collapse-header {
|
|
70
66
|
border: none;
|