kui-vue 3.6.9 → 3.6.10
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 +1 -1
- package/components/backtop/backtop.jsx +1 -1
- package/components/button/button.jsx +1 -1
- package/components/carousel/carousel.jsx +1 -1
- package/components/checkbox/checkbox.jsx +1 -1
- package/components/checkbox/styles/index.less +3 -0
- package/components/collapse/collapsePanel.jsx +1 -1
- package/components/colorPicker/presets.jsx +1 -1
- package/components/components.js +1 -2
- package/components/datePicker/datepicker.jsx +1 -1
- package/components/drawer/drawer.jsx +1 -1
- package/components/dropdown/dropdownButton.jsx +1 -1
- package/components/empty/empty.jsx +1 -1
- package/components/image/image.jsx +1 -1
- package/components/image/preview.jsx +6 -5
- package/components/image/styles/index.less +0 -8
- package/components/index.js +16 -35
- package/components/input/input.jsx +1 -1
- package/components/inputNumber/inputNumber.jsx +1 -1
- package/components/loading/loading.jsx +0 -6
- package/components/message/index.js +0 -6
- package/components/message/inner.jsx +1 -1
- package/components/modal/index.js +4 -7
- package/components/modal/modal.jsx +2 -3
- package/components/modal/toast.jsx +1 -1
- package/components/notice/index.js +0 -6
- package/components/page/page.jsx +1 -1
- package/components/popconfirm/popconfirm.jsx +1 -1
- package/components/progress/progress.jsx +1 -1
- package/components/radio/styles/index.less +3 -0
- package/components/rate/star.jsx +1 -1
- package/components/select/option.jsx +1 -1
- package/components/select/select.jsx +1 -1
- package/components/statCard/statNumber.jsx +2 -2
- package/components/statCard/{countup.jsx → statup/countup.jsx} +1 -1
- package/components/switch/switch.jsx +1 -1
- package/components/table/table.jsx +1 -1
- package/components/tabs/tabs.jsx +1 -1
- package/components/tag/tag.jsx +1 -1
- package/components/tree/tree.jsx +1 -1
- package/components/treeselect/treeselect.jsx +1 -1
- package/components/upload/fileList.jsx +1 -1
- package/components/upload/selector.jsx +1 -1
- package/components/utils/theme.js +0 -10
- package/components/utils/vue.js +8 -0
- package/dist/k-ui.cjs.js +2 -2
- package/dist/k-ui.css +2 -2
- package/dist/k-ui.d.ts +373 -373
- 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/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 +13 -13
- package/types/index.d.ts +38 -38
- package/components/utils/i18n.js +0 -32
- /package/components/statCard/{countup.js → statup/countup.js} +0 -0
- /package/components/statCard/{rollup.jsx → statup/rollup.jsx} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import Icon from "../icon";
|
|
3
3
|
import scroll from "../directives/scroll";
|
|
4
|
-
import { ArrowUp } from "kui-icons";
|
|
4
|
+
import { ArrowUp } from "kui-icons/dist/icons";
|
|
5
5
|
import { withInstall } from '../utils/vue';
|
|
6
6
|
import { defineComponent, ref } from "vue";
|
|
7
7
|
const BackTop = defineComponent({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, inject, computed } from "vue";
|
|
2
2
|
import Icon from "../icon";
|
|
3
|
-
import { Loading } from "kui-icons";
|
|
3
|
+
import { Loading } from "kui-icons/dist/icons";
|
|
4
4
|
import { getChildren } from "../utils/vnode";
|
|
5
5
|
import { withInstall } from "../utils/vue";
|
|
6
6
|
import { colors } from "../const/var";
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
outline: 2px solid transparent;
|
|
36
36
|
outline-offset: 1px;
|
|
37
37
|
border-radius: 3px;
|
|
38
|
+
flex-shrink: 0;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
.k-icon {
|
|
@@ -91,6 +92,8 @@
|
|
|
91
92
|
padding-left: 8px;
|
|
92
93
|
vertical-align: middle;
|
|
93
94
|
font-size: 14px;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
text-overflow: ellipsis;
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
99
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, reactive, ref, onMounted, watch } from "vue";
|
|
2
2
|
import Color from "color";
|
|
3
|
-
import { Checkmark } from "kui-icons";
|
|
3
|
+
import { Checkmark } from "kui-icons/dist/icons";
|
|
4
4
|
import Icon from "../icon";
|
|
5
5
|
export default defineComponent({
|
|
6
6
|
name: "Presets",
|
package/components/components.js
CHANGED
|
@@ -77,8 +77,7 @@ import loading from "./loading";
|
|
|
77
77
|
export { loading };
|
|
78
78
|
|
|
79
79
|
import modal from "./modal";
|
|
80
|
-
|
|
81
|
-
export { modal, Modal };
|
|
80
|
+
export { modal, modal as Modal };
|
|
82
81
|
|
|
83
82
|
import { Menu, MenuGroup, MenuItem, SubMenu, MenuDivider } from "./menu";
|
|
84
83
|
export { Menu, MenuGroup, MenuItem, SubMenu, MenuDivider };
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
ChevronForward,
|
|
22
22
|
ChevronDoubleForward,
|
|
23
23
|
ArrowForward,
|
|
24
|
-
} from "kui-icons";
|
|
24
|
+
} from "kui-icons/dist/icons";
|
|
25
25
|
import { setPlacement } from "../utils/placement";
|
|
26
26
|
import transfer from "../directives/transfer";
|
|
27
27
|
import resize from "../directives/resize";
|
|
@@ -3,7 +3,7 @@ import ButtonGroup from "../button/buttonGroup";
|
|
|
3
3
|
import Dropdown from "./dropdown";
|
|
4
4
|
import TriggerButton from "./trigger";
|
|
5
5
|
import { defineComponent, ref, inject } from "vue";
|
|
6
|
-
import { Ellipsis } from "kui-icons";
|
|
6
|
+
import { Ellipsis } from "kui-icons/dist/icons";
|
|
7
7
|
import { withInstall } from "../utils/vue";
|
|
8
8
|
const DropdownButton = defineComponent({
|
|
9
9
|
name: "DropdownButton",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Icon from "../icon";
|
|
2
|
-
import { FileTrayOutline } from "kui-icons";
|
|
2
|
+
import { FileTrayOutline } from "kui-icons/dist/icons";
|
|
3
3
|
import zhCN from "../locale/zh-CN";
|
|
4
4
|
import { defineComponent, inject, computed } from "vue";
|
|
5
5
|
import { withInstall } from "../utils/vue";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "vue";
|
|
9
9
|
import Icon from "../icon";
|
|
10
10
|
import newInstance from "./instance";
|
|
11
|
-
import { Loading, IconImage, EyeOutline } from "kui-icons";
|
|
11
|
+
import { Loading, IconImage, EyeOutline } from "kui-icons/dist/icons";
|
|
12
12
|
import { withInstall } from "../utils/vue";
|
|
13
13
|
import { loadImage } from "./utils";
|
|
14
14
|
|
|
@@ -12,7 +12,6 @@ import Icon from "../icon";
|
|
|
12
12
|
import { getChildren } from "../utils/vnode";
|
|
13
13
|
import { withInstall } from "../utils/vue";
|
|
14
14
|
import {
|
|
15
|
-
Refresh,
|
|
16
15
|
Close,
|
|
17
16
|
ArrowDown,
|
|
18
17
|
IconImage,
|
|
@@ -24,7 +23,9 @@ import {
|
|
|
24
23
|
ChevronUp,
|
|
25
24
|
ChevronForward,
|
|
26
25
|
Loading,
|
|
27
|
-
|
|
26
|
+
RotateLeft,
|
|
27
|
+
RotateRight,
|
|
28
|
+
} from "kui-icons/dist/icons";
|
|
28
29
|
import Slider from "../slider";
|
|
29
30
|
import { Button } from "../button";
|
|
30
31
|
import { loadImage } from "./utils";
|
|
@@ -411,13 +412,13 @@ const ImagePreview = defineComponent({
|
|
|
411
412
|
class="k-image-preview-action k-image-preview-action-rotate-left"
|
|
412
413
|
onClick={() => setRotate(1)}
|
|
413
414
|
>
|
|
414
|
-
<Icon type={
|
|
415
|
+
<Icon type={RotateLeft} />
|
|
415
416
|
</li>
|
|
416
417
|
<li
|
|
417
418
|
class="k-image-preview-action k-image-preview-action-rotate-right"
|
|
418
419
|
onClick={() => setRotate(0)}
|
|
419
420
|
>
|
|
420
|
-
<Icon type={
|
|
421
|
+
<Icon type={RotateRight} />
|
|
421
422
|
</li>
|
|
422
423
|
<li
|
|
423
424
|
class={[
|
|
@@ -430,7 +431,7 @@ const ImagePreview = defineComponent({
|
|
|
430
431
|
</li>
|
|
431
432
|
<li class="k-image-preview-action k-image-preview-action-scale">
|
|
432
433
|
<Slider
|
|
433
|
-
|
|
434
|
+
value={state.scale}
|
|
434
435
|
min={1}
|
|
435
436
|
max={maxScale}
|
|
436
437
|
size="small"
|
|
@@ -147,14 +147,6 @@
|
|
|
147
147
|
background-color: var(--kui-color-border);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
.k-image-preview-action-rotate-left .k-icon {
|
|
151
|
-
transform: rotateY(-180deg) rotate(45deg);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.k-image-preview-action-rotate-right .k-icon {
|
|
155
|
-
transform: rotate(45deg);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
150
|
.k-image-preview-action-disabled {
|
|
159
151
|
opacity: 0.6;
|
|
160
152
|
cursor: not-allowed;
|
package/components/index.js
CHANGED
|
@@ -1,49 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import locale from "./utils/i18n";
|
|
3
|
-
|
|
1
|
+
import { version } from "../package.json";
|
|
4
2
|
import * as components from "./components";
|
|
5
|
-
import "./
|
|
6
|
-
|
|
3
|
+
import { globalComponents, installGlobal } from "./utils/vue";
|
|
7
4
|
export * from "./components";
|
|
5
|
+
import "./styles/index.less";
|
|
8
6
|
|
|
9
7
|
const UI = {
|
|
10
|
-
version:
|
|
11
|
-
locale: locale.use,
|
|
12
|
-
i18n: locale.i18n,
|
|
8
|
+
version: version,
|
|
13
9
|
lang: {},
|
|
14
|
-
install: function (app
|
|
15
|
-
if (opts.locale) {
|
|
16
|
-
locale.use(opts.locale);
|
|
17
|
-
}
|
|
18
|
-
if (opts.i18n) {
|
|
19
|
-
locale.setI18n(opts.i18n);
|
|
20
|
-
}
|
|
21
|
-
|
|
10
|
+
install: function (app) {
|
|
22
11
|
Object.keys(components).forEach((key) => {
|
|
23
12
|
const component = components[key];
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
if (globalComponents.includes(key)) {
|
|
14
|
+
installGlobal(app, component);
|
|
15
|
+
} else if (!key.startsWith("K")) {
|
|
16
|
+
const name = key
|
|
17
|
+
.replace(/([A-Z])/g, "-$1")
|
|
18
|
+
.replace(/^-/, "")
|
|
19
|
+
.toLowerCase();
|
|
20
|
+
const kebabName = `k-${name}`;
|
|
31
21
|
app.component(kebabName, component);
|
|
22
|
+
app.component(key, component);
|
|
23
|
+
} else {
|
|
24
|
+
app.component(key, component);
|
|
32
25
|
}
|
|
33
|
-
app.component(key, component);
|
|
34
26
|
});
|
|
35
|
-
app.prototype.$message = components.message;
|
|
36
|
-
app.prototype.$notice = components.notice;
|
|
37
|
-
app.prototype.$modal = components.modal;
|
|
38
|
-
app.prototype.$loading = components.loading;
|
|
39
|
-
app.prototype.$image = components.KImage;
|
|
40
|
-
app.prototype.$theme = components.theme;
|
|
41
27
|
},
|
|
42
28
|
};
|
|
43
29
|
|
|
44
|
-
// auto install
|
|
45
|
-
// if (typeof window !== 'undefined' && window.Vue) {
|
|
46
|
-
// UI.install(window.Vue);
|
|
47
|
-
// }
|
|
48
|
-
|
|
49
30
|
export default UI;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Icon from "../icon";
|
|
2
2
|
import { isEmpty } from "../utils/number";
|
|
3
|
-
import { Search, CloseCircle, EyeOutline, EyeOffOutline } from "kui-icons";
|
|
3
|
+
import { Search, CloseCircle, EyeOutline, EyeOffOutline } from "kui-icons/dist/icons";
|
|
4
4
|
import InputGroup from "./inputGroup.jsx";
|
|
5
5
|
import { defineComponent, ref, nextTick, watch, inject, provide } from "vue";
|
|
6
6
|
import { withInstall } from "../utils/vue";
|
|
@@ -3,7 +3,7 @@ import Big from "big.js";
|
|
|
3
3
|
import Input from "../input/input";
|
|
4
4
|
import Icon from "../icon";
|
|
5
5
|
import { withInstall } from "../utils/vue";
|
|
6
|
-
import { ChevronUp, ChevronDown } from "kui-icons";
|
|
6
|
+
import { ChevronUp, ChevronDown } from "kui-icons/dist/icons";
|
|
7
7
|
import { sizeMap, filterSize } from "../utils/size";
|
|
8
8
|
import { normalize, isValidBig } from "../utils/number";
|
|
9
9
|
const InputNumber = defineComponent({
|
|
@@ -130,11 +130,5 @@ let Loading = {
|
|
|
130
130
|
loadInstance = null;
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
|
-
install(app) {
|
|
134
|
-
// app.provide("loading", Loading);
|
|
135
|
-
// 可选:同时挂到 globalProperties 兼容 this.$loading
|
|
136
|
-
// app.config.globalProperties.$loading = Loading; //for 3
|
|
137
|
-
app.prototype.$loading = Loading;
|
|
138
|
-
},
|
|
139
133
|
};
|
|
140
134
|
export default withInstall(Loading);
|
|
@@ -20,12 +20,6 @@ let Message = {
|
|
|
20
20
|
messageInstance = null;
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
install(app) {
|
|
24
|
-
// app.provide("message", Message);
|
|
25
|
-
// 可选:同时挂到 globalProperties 兼容 this.$message
|
|
26
|
-
// app.config.globalProperties.$message = Message; //for 3
|
|
27
|
-
app.prototype.$message = Message;
|
|
28
|
-
},
|
|
29
23
|
};
|
|
30
24
|
["info", "success", "warning", "error"].forEach((type) => {
|
|
31
25
|
Message[type] = (content, duration, onClose) => {
|
|
@@ -3,6 +3,7 @@ import Toast from "./toast";
|
|
|
3
3
|
// import { /*createVNode, render,*/ inject } from "vue"; // for 3
|
|
4
4
|
import { createVNode, render } from "../utils/vue"; //for 2
|
|
5
5
|
import { recordMousePoint } from "../config/context";
|
|
6
|
+
import { withInstall } from "../utils/vue";
|
|
6
7
|
let modalList = [];
|
|
7
8
|
|
|
8
9
|
recordMousePoint();
|
|
@@ -23,7 +24,7 @@ let showModal = (props = {}, context = null) => {
|
|
|
23
24
|
},
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
|
-
context
|
|
27
|
+
context,
|
|
27
28
|
);
|
|
28
29
|
render(vm, container);
|
|
29
30
|
|
|
@@ -54,9 +55,5 @@ Modal.destroyAll = () => {
|
|
|
54
55
|
toast.destroy();
|
|
55
56
|
});
|
|
56
57
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
// app.config.globalProperties.$modal = Modal;
|
|
60
|
-
app.prototype.$modal = Modal;
|
|
61
|
-
};
|
|
62
|
-
export default Modal;
|
|
58
|
+
|
|
59
|
+
export default withInstall(Modal);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from "../button";
|
|
2
2
|
import transfer from "../directives/transfer";
|
|
3
|
-
import { Close } from "kui-icons";
|
|
3
|
+
import { Close } from "kui-icons/dist/icons";
|
|
4
4
|
import { getMousePoint } from "../config/context";
|
|
5
5
|
import {
|
|
6
6
|
defineComponent,
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
inject,
|
|
14
14
|
} from "vue";
|
|
15
15
|
import zhCN from "../locale/zh-CN";
|
|
16
|
-
import { withInstall } from "../utils/vue";
|
|
17
16
|
const Modal = defineComponent({
|
|
18
17
|
name: "Modal",
|
|
19
18
|
directives: { transfer },
|
|
@@ -282,4 +281,4 @@ const Modal = defineComponent({
|
|
|
282
281
|
};
|
|
283
282
|
},
|
|
284
283
|
});
|
|
285
|
-
export default
|
|
284
|
+
export default Modal;
|
|
@@ -23,12 +23,6 @@ let Notice = {
|
|
|
23
23
|
noticeInstance = null;
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
install(app) {
|
|
27
|
-
// app.provide("notice", Notice);
|
|
28
|
-
// 可选:同时挂到 globalProperties 兼容 this.$notice
|
|
29
|
-
// app.config.globalProperties.$notice = Notice;
|
|
30
|
-
app.prototype.$notice = Notice;
|
|
31
|
-
},
|
|
32
26
|
};
|
|
33
27
|
|
|
34
28
|
["info", "success", "warning", "error"].forEach((type) => {
|
package/components/page/page.jsx
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "vue";
|
|
11
11
|
import transfer from "../directives/transfer";
|
|
12
12
|
import { getChildren } from "../utils/vnode";
|
|
13
|
-
import { HelpCircle } from "kui-icons";
|
|
13
|
+
import { HelpCircle } from "kui-icons/dist/icons";
|
|
14
14
|
import Icon from "../icon";
|
|
15
15
|
import { Button } from "../button";
|
|
16
16
|
import { setPlacement } from "../utils/placement";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Icon from "../icon";
|
|
2
|
-
import { CheckmarkCircle, CloseCircle, Close, Checkmark } from "kui-icons";
|
|
2
|
+
import { CheckmarkCircle, CloseCircle, Close, Checkmark } from "kui-icons/dist/icons";
|
|
3
3
|
import { defineComponent, watch, ref } from "vue";
|
|
4
4
|
import { withInstall } from "../utils/vue";
|
|
5
5
|
const Progress = defineComponent({
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
background-color: var(--kui-color-bg-component);
|
|
96
96
|
outline: 2px solid transparent;
|
|
97
97
|
outline-offset: 1px;
|
|
98
|
+
flex-shrink: 0;
|
|
98
99
|
&:after {
|
|
99
100
|
box-sizing: content-box;
|
|
100
101
|
width: 0;
|
|
@@ -132,6 +133,8 @@
|
|
|
132
133
|
.k-radio-label {
|
|
133
134
|
font-size: 14px;
|
|
134
135
|
margin-left: 8px;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
text-overflow: ellipsis;
|
|
135
138
|
}
|
|
136
139
|
}
|
|
137
140
|
.k-radio-light {
|
package/components/rate/star.jsx
CHANGED
|
@@ -7,7 +7,7 @@ import zhCN from "../locale/zh-CN";
|
|
|
7
7
|
import { isEmpty } from "../utils/number";
|
|
8
8
|
import { getChildren } from "../utils/vnode";
|
|
9
9
|
import { setPlacement } from "../utils/placement";
|
|
10
|
-
import { Loading, Close, CloseCircle, ChevronDown } from "kui-icons";
|
|
10
|
+
import { Loading, Close, CloseCircle, ChevronDown } from "kui-icons/dist/icons";
|
|
11
11
|
import { withInstall } from "../utils/vue";
|
|
12
12
|
import {
|
|
13
13
|
ref,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent } from "vue";
|
|
2
2
|
import { withInstall } from "../utils/vue.js";
|
|
3
|
-
import CountUp from "./countup.jsx";
|
|
4
|
-
import RollUp from "./rollup.jsx";
|
|
3
|
+
import CountUp from "./statup/countup.jsx";
|
|
4
|
+
import RollUp from "./statup/rollup.jsx";
|
|
5
5
|
const StatNumber = defineComponent({
|
|
6
6
|
name: "StatNumber",
|
|
7
7
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CountUp } from "./countup.js";
|
|
2
2
|
import { ref, watch, onMounted, defineComponent, onUnmounted } from "vue";
|
|
3
|
-
import { withInstall } from "
|
|
3
|
+
import { withInstall } from "../../utils/vue.js";
|
|
4
4
|
const CountUpNumber = defineComponent({
|
|
5
5
|
name: "CountUpNumber",
|
|
6
6
|
props: {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
h,
|
|
10
10
|
} from "vue";
|
|
11
11
|
import { Checkbox } from "../checkbox";
|
|
12
|
-
import { CaretUp, CaretDown } from "kui-icons";
|
|
12
|
+
import { CaretUp, CaretDown } from "kui-icons/dist/icons";
|
|
13
13
|
import Empty from "../empty";
|
|
14
14
|
import Spin from "../spin";
|
|
15
15
|
import { withInstall } from "../utils/vue";
|
package/components/tabs/tabs.jsx
CHANGED
package/components/tag/tag.jsx
CHANGED
package/components/tree/tree.jsx
CHANGED
|
@@ -5,7 +5,7 @@ import resize from "../directives/resize";
|
|
|
5
5
|
import zhCN from "../locale/zh-CN";
|
|
6
6
|
import { isEmpty } from "../utils/number";
|
|
7
7
|
import { setPlacement } from "../utils/placement";
|
|
8
|
-
import { Loading, Close, CloseCircle, ChevronDown } from "kui-icons";
|
|
8
|
+
import { Loading, Close, CloseCircle, ChevronDown } from "kui-icons/dist/icons";
|
|
9
9
|
import { withInstall } from "../utils/vue";
|
|
10
10
|
import Tree from "../tree";
|
|
11
11
|
import { buildTree } from "../tree/utils";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent } from "vue";
|
|
2
|
-
import { DocumentTextOutline, Close, AlertCircle } from "kui-icons";
|
|
2
|
+
import { DocumentTextOutline, Close, AlertCircle } from "kui-icons/dist/icons";
|
|
3
3
|
import Icon from "../icon";
|
|
4
4
|
import { Button } from "../button";
|
|
5
5
|
import Tooltip from "../tooltip";
|
|
@@ -15,16 +15,6 @@ const toggle = () => {
|
|
|
15
15
|
|
|
16
16
|
const Theme = {
|
|
17
17
|
name: "Theme",
|
|
18
|
-
install(app) {
|
|
19
|
-
app.prototype.$theme = Theme;
|
|
20
|
-
// for 3
|
|
21
|
-
// app.provide("theme", Theme);
|
|
22
|
-
// app.config.globalProperties.$theme = Theme;
|
|
23
|
-
},
|
|
24
|
-
useTheme() {
|
|
25
|
-
// return inject("theme", null); //for 3
|
|
26
|
-
return Theme
|
|
27
|
-
},
|
|
28
18
|
setThemeMode(event, callback) {
|
|
29
19
|
const x = event.clientX;
|
|
30
20
|
const y = event.clientY;
|
package/components/utils/vue.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
const globalComponents = ["message", "modal", "notice", "loading", "theme"];
|
|
2
|
+
export { globalComponents };
|
|
3
|
+
|
|
1
4
|
import { getAppContext } from "../config/context";
|
|
2
5
|
|
|
6
|
+
export const installGlobal = (app, component) => {
|
|
7
|
+
if (globalComponents.includes(component.name)) {
|
|
8
|
+
app.prototype[`$${component.name}`] = component;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
3
11
|
export const withInstall = (component) => {
|
|
4
12
|
component.install = function (app) {
|
|
5
13
|
app.component(component.name, component);
|