kui-vue 3.6.0 → 3.6.1

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.
Files changed (75) hide show
  1. package/{readme.md → README.md} +4 -10
  2. package/components/button/demo/group.md +1 -1
  3. package/components/card/card.jsx +1 -1
  4. package/components/checkbox/checkboxGroup.jsx +4 -4
  5. package/components/checkbox/demo/group.md +17 -6
  6. package/components/checkbox/styles/index.less +4 -11
  7. package/components/colorPicker/colorpicker.jsx +5 -6
  8. package/components/colorPicker/demo/customTrigger.md +2 -2
  9. package/components/colorPicker/demo/mode.md +1 -4
  10. package/components/datePicker/datepicker.jsx +19 -11
  11. package/components/datePicker/demo/basic.md +15 -6
  12. package/components/datePicker/demo/lang.md +2 -2
  13. package/components/drawer/drawer.jsx +2 -2
  14. package/components/dropdown/dropdown.jsx +9 -40
  15. package/components/form/demo/valid.md +1 -0
  16. package/components/image/image.jsx +1 -0
  17. package/components/input/index.md +1 -1
  18. package/components/inputNumber/demo/basic.md +12 -5
  19. package/components/inputNumber/demo/format.md +0 -5
  20. package/components/inputNumber/index.md +1 -1
  21. package/components/inputNumber/inputNumber.jsx +3 -5
  22. package/components/inputNumber/styles/index.less +64 -64
  23. package/components/menu/submenu.jsx +5 -5
  24. package/components/page/page.jsx +0 -1
  25. package/components/popconfirm/popconfirm.jsx +4 -4
  26. package/components/poptip/poptip.jsx +4 -4
  27. package/components/radio/demo/group.md +16 -6
  28. package/components/radio/demo/radioButton.md +3 -8
  29. package/components/radio/radioGroup.jsx +8 -11
  30. package/components/radio/styles/index.less +10 -21
  31. package/components/select/demo/basic.md +16 -7
  32. package/components/select/demo/filterable.md +4 -2
  33. package/components/select/index.md +23 -22
  34. package/components/select/option.jsx +7 -3
  35. package/components/select/select.jsx +43 -36
  36. package/components/select/styles/index.less +1 -0
  37. package/components/slider/demo/basic.md +2 -1
  38. package/components/slider/demo/withNumber.md +3 -3
  39. package/components/slider/slider.jsx +0 -25
  40. package/components/space/styles/index.less +3 -1
  41. package/components/styles/sys.less +3 -0
  42. package/components/switch/switch.jsx +15 -5
  43. package/components/table/styles/index.less +10 -5
  44. package/components/table/table.jsx +98 -69
  45. package/components/tooltip/tooltip.jsx +3 -3
  46. package/components/treeselect/demo/size.md +2 -2
  47. package/components/treeselect/treeselect.jsx +15 -20
  48. package/components/utils/placement.js +137 -126
  49. package/dist/k-ui.cjs.js +2 -2
  50. package/dist/k-ui.css +2 -2
  51. package/dist/k-ui.d.ts +118 -115
  52. package/dist/k-ui.esm.js +2 -2
  53. package/dist/k-ui.umd.js +2 -2
  54. package/dist/locale/de.js +1 -1
  55. package/dist/locale/el.js +1 -1
  56. package/dist/locale/en.js +1 -1
  57. package/dist/locale/fr.js +1 -1
  58. package/dist/locale/it.js +1 -1
  59. package/dist/locale/ja.js +1 -1
  60. package/dist/locale/ko.js +1 -1
  61. package/dist/locale/ru.js +1 -1
  62. package/dist/locale/th.js +1 -1
  63. package/dist/locale/uk.js +1 -1
  64. package/dist/locale/vi.js +1 -1
  65. package/dist/locale/zh-CN.js +1 -1
  66. package/dist/locale/zh-TW.js +1 -1
  67. package/package.json +5 -5
  68. package/test/i18n@8.x.html +6 -2
  69. package/types/image/KImage.d.ts +1 -0
  70. package/types/index.d.ts +10 -10
  71. package/types/switch/Switch.d.ts +2 -0
  72. package/components/steps/index.js +0 -4
  73. package/components/steps/step.vue +0 -82
  74. package/components/steps/steps.vue +0 -68
  75. package/components/steps/styles/index.less +0 -198
package/dist/locale/de.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/dist/locale/el.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/dist/locale/en.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/dist/locale/fr.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/dist/locale/it.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/dist/locale/ja.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/dist/locale/ko.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/dist/locale/ru.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/dist/locale/th.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/dist/locale/uk.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/dist/locale/vi.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.6.0
2
+ * kui-vue v3.6.1
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: Qiu / https://chuchur.com
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kui-vue",
3
3
  "private": false,
4
- "version": "3.6.0",
4
+ "version": "3.6.1",
5
5
  "description": "A lightweight desktop UI component library suitable for Vue.js 2.",
6
6
  "type": "module",
7
7
  "main": "dist/k-ui.cjs.js",
@@ -94,12 +94,12 @@
94
94
  "@vitejs/plugin-vue2": "^2.3.4",
95
95
  "@vitejs/plugin-vue2-jsx": "^1.1.1",
96
96
  "color": "^5.0.2",
97
- "dayjs": "^1.11.18",
98
- "less": "^4.4.2",
99
- "vite": "npm:rolldown-vite@7.2.2",
97
+ "dayjs": "^1.11.19",
98
+ "less": "^4.5.1",
99
+ "vite": "npm:rolldown-vite@7.3.0",
100
100
  "vue-router": "^3.6.2"
101
101
  },
102
102
  "overrides": {
103
- "vite": "npm:rolldown-vite@7.2.2"
103
+ "vite": "npm:rolldown-vite@7.3.0"
104
104
  }
105
105
  }
@@ -7,13 +7,15 @@
7
7
  <link rel="stylesheet" type="text/css" href="../dist/k-ui.css" />
8
8
  <script src="https://unpkg.com/vue@2.x"></script>
9
9
  <script src="https://unpkg.com/dayjs"></script>
10
+ <!-- <script src="https://app.unpkg.com/dayjs@1.11.19/files/locale/zh-cn.js"></script> -->
11
+ <script src="https://app.unpkg.com/dayjs@1.11.19/files/locale/de.js"></script>
10
12
  <!-- <script src="https://unpkg.com/vue-i18n@8.x"></script> -->
11
13
  <script src="../dist/k-ui.umd.js?t=22"></script>
12
14
 
13
15
  <script src="../dist/locale/en.js"></script>
14
16
  <script src="../dist/locale/zh-CN.js"></script>
15
17
  <script src="../dist/locale/de.js"></script>
16
- <script src="../dist/locale/ua.js"></script>
18
+ <script src="../dist/locale/uk.js"></script>
17
19
  <style>
18
20
  body,
19
21
  html {
@@ -69,7 +71,9 @@
69
71
  },
70
72
  mounted() {
71
73
  setTimeout(() => {
72
- this.locale = kui_lang_ua;
74
+ console.log("change locale", kui_lang_de);
75
+ dayjs.locale("de");
76
+ this.locale = kui_lang_de;
73
77
  }, 2000);
74
78
  },
75
79
  });
@@ -9,6 +9,7 @@ export interface KImageProps {
9
9
  height?: string | number;
10
10
  width?: string | number;
11
11
  placeholder?: string;
12
+ data?: any[];
12
13
  imgStyle?: Record<string, any>;
13
14
  showPanel?: boolean;
14
15
  }
package/types/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  export { default as Affix } from "./affix/Affix";
2
2
  export type { AffixProps } from "./affix/Affix";
3
- export { default as Alert } from "./alert/Alert";
4
- export type { AlertProps } from "./alert/Alert";
5
3
  export { default as Avatar } from "./avatar/Avatar";
6
4
  export type { AvatarProps } from "./avatar/Avatar";
5
+ export { default as BackTop } from "./backtop/BackTop";
6
+ export type { BackTopProps } from "./backtop/BackTop";
7
7
  export { default as Badge } from "./badge/Badge";
8
8
  export type { BadgeProps } from "./badge/Badge";
9
9
  export { default as Breadcrumb } from "./breadcrumb/Breadcrumb";
10
10
  export type { BreadcrumbProps } from "./breadcrumb/Breadcrumb";
11
11
  export { default as BreadcrumbItem } from "./breadcrumb/BreadcrumbItem";
12
12
  export type { BreadcrumbItemProps } from "./breadcrumb/BreadcrumbItem";
13
- export { default as BackTop } from "./backtop/BackTop";
14
- export type { BackTopProps } from "./backtop/BackTop";
13
+ export { default as Alert } from "./alert/Alert";
14
+ export type { AlertProps } from "./alert/Alert";
15
15
  export { default as Button } from "./button/Button";
16
16
  export type { ButtonProps } from "./button/Button";
17
17
  export { default as ButtonGroup } from "./button/ButtonGroup";
@@ -42,10 +42,6 @@ export { default as Divider } from "./divider/Divider";
42
42
  export type { DividerProps } from "./divider/Divider";
43
43
  export { default as Drawer } from "./drawer/Drawer";
44
44
  export type { DrawerProps } from "./drawer/Drawer";
45
- export { default as Dropdown } from "./dropdown/Dropdown";
46
- export type { DropdownProps } from "./dropdown/Dropdown";
47
- export { default as DropdownButton } from "./dropdown/DropdownButton";
48
- export type { DropdownButtonProps } from "./dropdown/DropdownButton";
49
45
  export { default as Empty } from "./empty/Empty";
50
46
  export type { EmptyProps } from "./empty/Empty";
51
47
  export { default as Flex } from "./flex/Flex";
@@ -70,6 +66,10 @@ export { default as TextArea } from "./input/TextArea";
70
66
  export type { TextAreaProps } from "./input/TextArea";
71
67
  export { default as InputGroup } from "./input/InputGroup";
72
68
  export type { InputGroupProps } from "./input/InputGroup";
69
+ export { default as Dropdown } from "./dropdown/Dropdown";
70
+ export type { DropdownProps } from "./dropdown/Dropdown";
71
+ export { default as DropdownButton } from "./dropdown/DropdownButton";
72
+ export type { DropdownButtonProps } from "./dropdown/DropdownButton";
73
73
  export { default as InputNumber } from "./inputNumber/InputNumber";
74
74
  export type { InputNumberProps } from "./inputNumber/InputNumber";
75
75
  export { default as sider } from "./layout/sider";
@@ -94,8 +94,6 @@ export { default as Popconfirm } from "./popconfirm/Popconfirm";
94
94
  export type { PopconfirmProps } from "./popconfirm/Popconfirm";
95
95
  export { default as Poptip } from "./poptip/Poptip";
96
96
  export type { PoptipProps } from "./poptip/Poptip";
97
- export { default as Progress } from "./progress/Progress";
98
- export type { ProgressProps } from "./progress/Progress";
99
97
  export { default as Radio } from "./radio/Radio";
100
98
  export type { RadioProps } from "./radio/Radio";
101
99
  export { default as RadioGroup } from "./radio/RadioGroup";
@@ -122,6 +120,8 @@ export { default as Slider } from "./slider/Slider";
122
120
  export type { SliderProps } from "./slider/Slider";
123
121
  export { default as Space } from "./space/Space";
124
122
  export type { SpaceProps } from "./space/Space";
123
+ export { default as Progress } from "./progress/Progress";
124
+ export type { ProgressProps } from "./progress/Progress";
125
125
  export { default as Spin } from "./spin/Spin";
126
126
  export type { SpinProps } from "./spin/Spin";
127
127
  export { default as Switch } from "./switch/Switch";
@@ -2,6 +2,8 @@ import Vue, { VueConstructor } from "vue";
2
2
 
3
3
  /** Switch component props */
4
4
  export interface SwitchProps {
5
+ /** default: false */
6
+ checked?: boolean;
5
7
  value?: boolean | number;
6
8
  type?: string;
7
9
  disabled?: boolean;
@@ -1,4 +0,0 @@
1
- import Steps from './steps'
2
- import Step from './step'
3
-
4
- export { Steps, Step }
@@ -1,82 +0,0 @@
1
-
2
- <template>
3
- <div
4
- :class="classes"
5
- :style="styles"
6
- >
7
- <div class="k-step-tail">
8
- <i />
9
- </div>
10
- <div class="k-step-icon">
11
- <Icon
12
- v-if="icon"
13
- :type="icon"
14
- />
15
- <div
16
- v-if="!icon"
17
- class="k-step-icon-inner"
18
- >
19
- <span v-if="state!='finish' && !icon && state!='error'">{{ step }}</span>
20
- <Icon
21
- v-if="!icon && state=='finish'"
22
- type="checkmark"
23
- />
24
- <Icon
25
- v-if="!icon && state=='error'"
26
- type="close"
27
- />
28
- </div>
29
- </div>
30
- <div class="k-step-main">
31
- <div class="k-step-title">
32
- {{ title }}
33
- </div>
34
- <div class="k-step-description">
35
- {{ description }}
36
- </div>
37
- </div>
38
- </div>
39
- </template>
40
- <script>
41
- import Icon from '../icon'
42
- import emitter from '@/mixins/emitter'
43
- export default {
44
- name: 'Step',
45
- components: { Icon },
46
- mixins: [emitter],
47
- props: {
48
- title: String,
49
- description: String,
50
- status: {
51
- validator: (v) => {
52
- return ['wait', 'process', 'finish', 'error'].indexOf(v) >= 0
53
- },
54
- default: 'wait'
55
- },
56
- icon: [String, Array]
57
- },
58
- data() {
59
- return {
60
- width: 0,
61
- step: 0,
62
- state: this.status
63
- }
64
- },
65
- computed: {
66
- styles() {
67
- return this.width > 0 ? { width: `${this.width}%` } : {}
68
- },
69
- classes() {
70
- return ['k-step-item', {
71
- [`k-steps-${this.state}`]: this.state
72
- }]
73
- }
74
- },
75
- mounted() {
76
- this.dispatch('Steps', 'steps-add', this)
77
- },
78
- beforeUnmount() {
79
- this.dispatch('Step', 'steps-remove', this)
80
- }
81
- }
82
- </script>
@@ -1,68 +0,0 @@
1
-
2
- <template>
3
- <div :class="classes">
4
- <slot />
5
- </div>
6
- </template>
7
- <script>
8
- export default {
9
- name: 'Steps',
10
- props: {
11
- current: [String, Number],
12
- vertical: Boolean,
13
- mini: Boolean,
14
- status: {
15
- validator: (v) => {
16
- return ['wait', 'process', 'finish', 'error'].indexOf(v) >= 0
17
- },
18
- default: 'process'
19
- },
20
- },
21
- data() {
22
- return {
23
- children: []
24
- }
25
- },
26
- computed: {
27
- classes() {
28
- return ['k-steps', {
29
- ['k-steps-vertical']: this.vertical,
30
- ['k-steps-mini']: this.mini,
31
- }]
32
- }
33
- },
34
- watch: {
35
- current(v) {
36
- this.setState()
37
- }
38
- },
39
- created() {
40
- this.$on('steps-add', this.add)
41
- this.$on('steps-remove', this.remove)
42
- },
43
- mounted() {
44
- this.setState()
45
- },
46
- methods: {
47
- setState() {
48
- this.children.forEach((child, index) => {
49
- child.width = !this.vertical ? 100 / this.children.length : 0;
50
- if (index == this.current) {
51
- child.state = this.status == 'error' ? 'error' : 'process'
52
- } else if (index > this.current) {
53
- child.state = 'wait'
54
- } else if (index < this.current) {
55
- child.state = 'finish'
56
- }
57
- })
58
- },
59
- add(obj) {
60
- this.children.push(obj)
61
- obj.step = this.children.length
62
- },
63
- remove(obj) {
64
- this.children.splice(this.children.indexOf(obj), 1)
65
- }
66
- }
67
- }
68
- </script>
@@ -1,198 +0,0 @@
1
- @import '../../styles/var.less';
2
- .k-steps {
3
- font-size: 0;
4
- width: 100%;
5
- .k-step-item {
6
- position: relative;
7
- display: inline-block;
8
- vertical-align: top;
9
- color: #999;
10
- .k-step-tail {
11
- width: 100%;
12
- padding: 0 10px;
13
- position: absolute;
14
- left: 0;
15
- top: 13px;
16
- box-sizing: border-box;
17
- i {
18
- display: inline-block;
19
- width: 100%;
20
- height: 1px;
21
- vertical-align: top;
22
- background: #e9eaec;
23
- border-radius: 1px;
24
- position: relative;
25
- &::before {
26
- position: absolute;
27
- left: 0;
28
- top: 0;
29
- content: '';
30
- width: 0;
31
- background: var(--kui-color-main);
32
- height: 1px;
33
- transition: width .3s ease-in-out;
34
- }
35
- }
36
- }
37
- .k-step-icon {
38
- display: inline-block;
39
- position: relative;
40
- background-color: #fff;
41
- padding-right: 8px;
42
- &>i {
43
- font-size: 24px;
44
- width: 20px;
45
- height: 28px;
46
- line-height: 28px;
47
- text-align: center;
48
- }
49
- .k-step-icon-inner {
50
- box-sizing: border-box;
51
- width: 26px;
52
- height: 26px;
53
- display: block;
54
- border: 1px solid #ccc;
55
- line-height: 24px;
56
- text-align: center;
57
- border-radius: 50%;
58
- font-size: 14px;
59
- .k-ion-close{
60
- font-size: 20px;
61
- vertical-align: middle;
62
- }
63
- }
64
- }
65
- .k-step-main {
66
- display: inline-block;
67
- position: relative;
68
- vertical-align: top;
69
- .k-step-title {
70
- display: inline-block;
71
- padding-right: 16px;
72
- font-size: 14px;
73
- font-weight: 500; // color: #999;
74
- background: #fff;
75
- line-height: 28px;
76
- }
77
- .k-step-description {
78
- font-size: 12px;
79
- }
80
- }
81
- &:last-child {
82
- .k-step-tail {
83
- display: none;
84
- }
85
- }
86
- }
87
- .k-steps-process {
88
- color: #666;
89
- .k-step-icon {
90
- &>i {
91
- color: var(--kui-color-main);
92
- }
93
- .k-step-icon-inner {
94
- border-color: var(--kui-color-main);
95
- background-color: var(--kui-color-main);
96
- color: #fff;
97
- }
98
- }
99
- }
100
- .k-steps-finish {
101
- // color: #666;
102
- .k-step-icon {
103
- color: var(--kui-color-main);
104
- font-weight: 500;
105
- .k-step-icon-inner {
106
- border-color: var(--kui-color-main); // background-color: var(--kui-color-main);
107
- }
108
- }
109
- .k-step-tail i {
110
- &::before {
111
- width: 100%;
112
- }
113
- }
114
- }
115
- .k-steps-error {
116
- color: var(--kui-color-danger);
117
- .k-step-icon {
118
- .k-step-icon-inner {
119
- border-color: var(--kui-color-danger); // background-color: var(--kui-color-main);
120
- color: var(--kui-color-danger);
121
- }
122
- }
123
- }
124
- }
125
-
126
- .k-steps-vertical {
127
- .k-step-item {
128
- display: block;
129
- .k-step-icon {
130
- padding-right: 16px;
131
- padding-bottom: 8px;
132
- float: left;
133
- }
134
- .k-step-main {
135
- min-height: 48px;
136
- overflow: hidden;
137
- display: block;
138
- .k-step-description {
139
- padding-bottom: 20px;
140
- }
141
- }
142
- .k-step-tail {
143
- height: 100%;
144
- padding: 0 0 5px 0;
145
- left: 13px;
146
- top: 0;
147
- width: 1px;
148
- i {
149
- display: inline-block;
150
- height: 100%;
151
- width: 1px;
152
- vertical-align: top;
153
- &::before {
154
- position: absolute;
155
- left: 0;
156
- top: 0;
157
- height: 0;
158
- content: '';
159
- background: var(--kui-color-main);
160
- width: 1px;
161
- transition: height .3s ease-in-out;
162
- }
163
- }
164
- }
165
- }
166
- .k-steps-finish {
167
- .k-step-tail i {
168
- &::before {
169
- height: 100%;
170
- }
171
- }
172
- }
173
- }
174
-
175
- .k-steps-mini {
176
- .k-step-item {
177
- .k-step-tail {
178
- top: 10px;
179
- }
180
- .k-step-icon {
181
- .k-step-icon-inner {
182
- width: 18px;
183
- height: 18px;
184
- line-height: 16px;
185
- font-size: 12px;
186
- }
187
- }
188
- .k-step-main {
189
- .k-step-title {
190
- font-size: 12px;
191
- line-height: 24px;
192
- }
193
- .k-step-description {
194
- display: none;
195
- }
196
- }
197
- }
198
- }