kui-vue 3.3.5-b → 3.3.5-d
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/LICENSE +21 -0
- package/components/_tool/utils.js +13 -2
- package/components/alert/index.md +1 -1
- package/components/avatar/styles/index.less +1 -0
- package/components/badge/index.md +1 -1
- package/components/breadcrumb/index.md +1 -1
- package/components/button/button.jsx +1 -1
- package/components/card/index.md +1 -1
- package/components/carousel/index.md +1 -1
- package/components/carousel/styles/index.less +1 -0
- package/components/checkbox/index.md +2 -2
- package/components/checkbox/styles/index.less +1 -0
- package/components/collapse/index.md +2 -2
- package/components/colorPicker/canvasHelper.js +1 -1
- package/components/colorPicker/colorpicker.jsx +2 -2
- package/components/colorPicker/index.md +1 -1
- package/components/colorPicker/styles/index.less +1 -0
- package/components/datePicker/demo/inside.md +5 -5
- package/components/descriptions/index.md +2 -2
- package/components/divider/index.md +1 -1
- package/components/drawer/index.md +1 -1
- package/components/empty/index.md +1 -1
- package/components/form/demo/dynamicvalid.md +1 -1
- package/components/grid/index.md +2 -2
- package/components/icon/index.md +1 -1
- package/components/image/demo/extra.md +1 -1
- package/components/image/image.jsx +2 -2
- package/components/image/index.md +2 -2
- package/components/image/styles/index.less +1 -0
- package/components/input/index.md +1 -1
- package/components/inputNumber/index.md +1 -1
- package/components/layout/demo/layout1.md +1 -1
- package/components/layout/demo/layout2.md +2 -2
- package/components/loading/index.md +1 -1
- package/components/message/index.md +1 -1
- package/components/notice/index.md +1 -1
- package/components/radio/index.md +2 -2
- package/components/rate/index.md +1 -1
- package/components/select/index.md +2 -2
- package/components/slider/demo/index.vue +2 -0
- package/components/slider/demo/size.md +40 -0
- package/components/slider/demo/vertical.md +2 -2
- package/components/slider/index.md +1 -1
- package/components/slider/slider.jsx +3 -2
- package/components/slider/styles/index.less +48 -7
- package/components/slider/thumb.jsx +4 -4
- package/components/space/index.md +1 -1
- package/components/spin/index.md +1 -1
- package/components/tabs/index.md +2 -2
- package/components/tag/index.md +1 -1
- package/components/timeline/index.md +1 -1
- package/components/tree/demo/custom-render.md +3 -4
- package/components/upload/demo/form.md +1 -1
- package/components/upload/demo/transform.md +1 -1
- package/dist/k-ui.css +2 -2
- package/dist/k-ui.js +2 -2
- package/dist/locale/de.js +2 -2
- package/dist/locale/el.js +2 -2
- package/dist/locale/en.js +2 -2
- package/dist/locale/fr.js +2 -2
- package/dist/locale/it.js +2 -2
- package/dist/locale/ja.js +2 -2
- package/dist/locale/ko.js +2 -2
- package/dist/locale/ru.js +2 -2
- package/dist/locale/th.js +2 -2
- package/dist/locale/ua.js +2 -2
- package/dist/locale/vi.js +2 -2
- package/dist/locale/zhCN.js +2 -2
- package/dist/locale/zhTW.js +2 -2
- package/package.json +2 -1
- /package/{README.md → readme.md} +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 chuchur
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
export function isEmptyNode(vnode = {}) {
|
|
2
2
|
return !(vnode.eml || vnode.tag || (vnode.text && vnode.text.trim() !== ''))
|
|
3
3
|
}
|
|
4
|
-
export function getChild(child = []) {
|
|
5
|
-
return child.filter(c => !isEmptyNode(c))
|
|
4
|
+
export function getChild(child = [], name) {
|
|
5
|
+
// return child.filter(c => !isEmptyNode(c, name) )
|
|
6
|
+
return child.filter(c => {
|
|
7
|
+
let tag_name = ''
|
|
8
|
+
if (name && c.componentOptions != null && c.componentOptions.Ctor != undefined) {
|
|
9
|
+
tag_name = c.componentOptions.Ctor.extendOptions.name
|
|
10
|
+
}
|
|
11
|
+
if (!isEmptyNode(c) && name !== tag_name) {
|
|
12
|
+
return true
|
|
13
|
+
} else {
|
|
14
|
+
return false
|
|
15
|
+
}
|
|
16
|
+
})
|
|
6
17
|
}
|
|
7
18
|
|
|
8
19
|
export function contains(ele, target) {
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
render() {
|
|
49
49
|
const { $slots, $attrs, size, disabled, click, theme,
|
|
50
50
|
shape, htmlType, icon, loading, $listeners, type, block } = this
|
|
51
|
-
const onlyIcon = !getChild($slots.default).length && icon
|
|
51
|
+
const onlyIcon = !getChild($slots.default, 'Drop').length && icon
|
|
52
52
|
const classes = [
|
|
53
53
|
"k-btn",
|
|
54
54
|
{
|
package/components/card/index.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
2
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
3
3
|
| ------------- | --------------------------------------------- | ----------------- | ------ |
|
|
4
4
|
| checked | 是否选中状态,可以使用 `v-model` 双向绑定数据 | Boolean | false |
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| indeterminate | 组合辅助选项控制半选状态 | Boolean | false |
|
|
8
8
|
| change | 在选项状态发生改变时回调 | Function(e:Event) | - |
|
|
9
9
|
| value | 组合使用时表示的值 | String、Number | - |
|
|
10
|
-
|
|
10
|
+
## CheckboxGroup API
|
|
11
11
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
12
12
|
| --------- | ---------------------------------------------------- | ------------------------------------------------- | ---------- |
|
|
13
13
|
| value | 用于设置当前选中的值,可以使用 `v-model` 双向绑定数据 | Array | - |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
2
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
3
3
|
|-----------|------------------------------------------------------|----------------|--------|
|
|
4
4
|
| value | 当前激活的面板的 `name`,可以使用 `v-model` 双向绑定 | Array , String | - |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| sample | 是否开启简洁模式 | Boolean | false |
|
|
7
7
|
| change | 切换面板时触发回调,返回当前选项卡的 `name` | Function | - |
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Panel
|
|
10
10
|
|
|
11
11
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
12
12
|
|-------|----------------------|--------|--------|
|
|
@@ -241,7 +241,7 @@ export function limit(value, min, max) {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
export function canvasHelper(canvas) {
|
|
244
|
-
const ctx = canvas.getContext('2d'),
|
|
244
|
+
const ctx = canvas.getContext('2d', { willReadFrequently: true }),
|
|
245
245
|
width = canvas.width,
|
|
246
246
|
height = canvas.height;
|
|
247
247
|
|
|
@@ -156,7 +156,7 @@ export default {
|
|
|
156
156
|
this.currentMode = modes[i]
|
|
157
157
|
},
|
|
158
158
|
initHueCanvas(canvas) {
|
|
159
|
-
const ctx = canvas.getContext('2d'),
|
|
159
|
+
const ctx = canvas.getContext('2d', { willReadFrequently: true }),
|
|
160
160
|
setp = 1 / 360,
|
|
161
161
|
width = canvas.width,
|
|
162
162
|
height = canvas.height,
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
192
192
|
})
|
|
193
193
|
},
|
|
194
194
|
alphaCanvsSetHue(canvas) {
|
|
195
|
-
const ctx = canvas.getContext('2d'),
|
|
195
|
+
const ctx = canvas.getContext('2d', { willReadFrequently: true }),
|
|
196
196
|
{ width, height } = canvas,
|
|
197
197
|
gradient = ctx.createLinearGradient(0, 0, width - 1, 0);
|
|
198
198
|
let { H, S, L } = this
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:showClose="false"
|
|
16
16
|
:width="316"
|
|
17
17
|
>
|
|
18
|
-
<DateCalendar v-model="date" @change="change">
|
|
18
|
+
<DateCalendar v-model="date" @change="change"></DateCalendar>
|
|
19
19
|
</Modal>
|
|
20
20
|
|
|
21
21
|
<div class="date-demo">
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
:closable="false"
|
|
26
26
|
:footer="null"
|
|
27
27
|
:title="null"
|
|
28
|
-
height="300"
|
|
28
|
+
:height="300"
|
|
29
29
|
placement="bottom"
|
|
30
30
|
:target="()=>$refs['demo-date']">
|
|
31
|
-
<DateCalendar v-model="date2" @change="change2" picker-size="small">
|
|
31
|
+
<DateCalendar v-model="date2" @change="change2" picker-size="small"></DateCalendar>
|
|
32
32
|
</Drawer>
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
35
|
</div>
|
|
36
36
|
</template>
|
|
37
37
|
<script>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
2
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
3
3
|
| -------- | ----------------------------------------- | -------------------------- | ---------- |
|
|
4
4
|
| bordered | 是否展示边框 | Boolean | false |
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| layout | 描述布局 | horizontal \| vertical | horizontal |
|
|
8
8
|
| size | 设置列表的大小。可以设置为 middle 、small | default \| middle \| small | default |
|
|
9
9
|
| title | 描述列表的标题,显示在最顶部 | String,slot | - |
|
|
10
|
-
|
|
10
|
+
## Item props
|
|
11
11
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
12
12
|
| ----- | ---------- | -------------- | ------ |
|
|
13
13
|
| label | 内容的描述 | String \| slot | - |
|
package/components/grid/index.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
## Row API
|
|
2
2
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
3
3
|
| ------- | -------------------------------------------------------------------------------- | ------------ | ------- |
|
|
4
4
|
| align | flex 布局下的垂直对齐方式:`top` `middle` `bottom` | String | `top` |
|
|
5
5
|
| justify | flex 布局下的水平排列方式:`start` `end` `center` `space-around` `space-between` | String | `start` |
|
|
6
6
|
| gutter | 栅格间距,单位 px,左右平分,使用数组形式同时设置 [水平间距, 垂直间距] | Number,Array | - |
|
|
7
7
|
| type | 布局模式,可选 flex,现代浏览器 下有效 | String | |
|
|
8
|
-
|
|
8
|
+
## Col API
|
|
9
9
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
10
10
|
| ------ | -------------------------------------- | ------------- | ------ |
|
|
11
11
|
| span | 栅格的占位格数,可选值为0~24的整数 | Number | - |
|
package/components/icon/index.md
CHANGED
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
beforeDestroy() {
|
|
42
42
|
let preview = this.preview
|
|
43
43
|
preview && preview.destroy()
|
|
44
|
-
this.ImageGroup && this.ImageGroup.updateCollection(
|
|
44
|
+
this.ImageGroup && this.ImageGroup.updateCollection(false, this.origin || this.src || this._uid + '')
|
|
45
45
|
},
|
|
46
46
|
methods: {
|
|
47
47
|
togglePanel() {
|
|
@@ -135,7 +135,7 @@ export default {
|
|
|
135
135
|
},
|
|
136
136
|
mounted() {
|
|
137
137
|
this.reload()
|
|
138
|
-
this.ImageGroup && this.ImageGroup.updateCollection(
|
|
138
|
+
this.ImageGroup && this.ImageGroup.updateCollection(true, this.origin || this.src || this._uid + '')
|
|
139
139
|
},
|
|
140
140
|
render() {
|
|
141
141
|
const { imageUrl, alt, width, height, showImg, imgStyle,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
2
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
3
3
|
|-------------|----------------------------------------------|------------------|--------|
|
|
4
4
|
| width | 组件的宽度 | [String、Number] | - |
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
| tool | 自定义工具栏按钮 | slot | - |
|
|
15
15
|
| panel | 自定义扩展面板 | slot | - |
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## Image.method()
|
|
18
18
|
|
|
19
19
|
组件提供了一些静态方法 `this.$Image.show(options)`
|
|
20
20
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
</Col>
|
|
18
18
|
<Col flex="1">
|
|
19
|
-
<Input :icon="Search" placeholder="搜索功能" style="width:200px;" theme="light" shape="circle"
|
|
19
|
+
<Input :icon="Search" placeholder="搜索功能" style="width:200px;" theme="light" shape="circle" />
|
|
20
20
|
</Col>
|
|
21
21
|
<Col>
|
|
22
22
|
<Tooltip title="全屏显示" placement="bottom">
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
</Col>
|
|
18
18
|
<Col flex="1">
|
|
19
|
-
<Input :icon="Search" placeholder="搜索功能" style="width:200px;" theme="light" shape="circle"
|
|
19
|
+
<Input :icon="Search" placeholder="搜索功能" style="width:200px;" theme="light" shape="circle" />
|
|
20
20
|
</Col>
|
|
21
21
|
<Col>
|
|
22
22
|
<Tooltip title="全屏显示" placement="bottom">
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</Col>
|
|
29
29
|
</Row>
|
|
30
30
|
</Header>
|
|
31
|
-
<Content class="k-demo-main
|
|
31
|
+
<Content class="k-demo-main demo-back">
|
|
32
32
|
<Breadcrumb class="nav">
|
|
33
33
|
<BreadcrumbItem>Home</BreadcrumbItem>
|
|
34
34
|
<BreadcrumbItem>List</BreadcrumbItem>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
## Radio API
|
|
2
2
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
3
3
|
| -------- | --------------------------------------------- | ----------------- | ------ |
|
|
4
4
|
| checked | 是否选中状态,可以使用 `v-model` 双向绑定数据 | Boolean | false |
|
|
5
5
|
| label | 文字提示 | String 、 Number | - |
|
|
6
6
|
| disabled | 是否禁用当前项 | Boolean | false |
|
|
7
7
|
| change | 在选项状态发生改变时回调 | Function(e:Event) | - |
|
|
8
|
-
|
|
8
|
+
## RadioGroup API
|
|
9
9
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
10
10
|
| --------- | -------------------------------------------------------------------------- | ------------------------------------------------- | ---------- |
|
|
11
11
|
| value | 用于设置当前选中的值。可以使用 `v-model` 双向绑定数据 | Any | - |
|
package/components/rate/index.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
## Select API
|
|
2
2
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
3
3
|
| ----------- | ---------------------------------------------------------- | ------------------------------ | ---------- |
|
|
4
4
|
| value | 指定选中项目的 `value` 值,可以使用 `v-model` 双向绑定数据 | String,Number | - |
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
| icon | 自定义图标 | String | - |
|
|
21
21
|
| shape | shape='circle' 时呈现圆角 | String | - |
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
## Option API
|
|
24
24
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
25
25
|
| -------- | -------------------------------------------------------------------------------------------- | ------------- | ------ |
|
|
26
26
|
| key | 和 value 含义一致。如果 Vue 需要你设置此项,此项值与 value 的值相同,然后可以省略 value 设置 | String,Number | - |
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Info from "./info.md";
|
|
3
3
|
import Base from "./base.md";
|
|
4
|
+
import Size from "./size.md";
|
|
4
5
|
import WithNumber from "./withNumber.md";
|
|
5
6
|
import Formatter from "./formatter.md";
|
|
6
7
|
import Marks from "./marks.md";
|
|
@@ -14,6 +15,7 @@ export default {
|
|
|
14
15
|
<div class="demo-slider">
|
|
15
16
|
<Info />
|
|
16
17
|
<Base />
|
|
18
|
+
<Size />
|
|
17
19
|
<WithNumber />
|
|
18
20
|
<Formatter />
|
|
19
21
|
<Marks />
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<cn>
|
|
2
|
+
#### 尺寸/自定义
|
|
3
|
+
size 可以控制操作杆的大小
|
|
4
|
+
</cn>
|
|
5
|
+
|
|
6
|
+
```vue
|
|
7
|
+
<template>
|
|
8
|
+
<div style="max-width:520px;">
|
|
9
|
+
<Slider v-model="v1" :step="10" :disabled="disabled" :min="20" size="small" />
|
|
10
|
+
<Slider v-model="v2" range :disabled="disabled" :min="10" :max="80" size="small"/>
|
|
11
|
+
<Slider v-model="v1" :step="10" :disabled="disabled" :min="20" size="small" class="slider-demo-custom"/>
|
|
12
|
+
<Slider v-model="v2" range :disabled="disabled" :min="10" :max="80" size="small" class="slider-demo-custom"/>
|
|
13
|
+
|
|
14
|
+
<Slider :marks="{ 0: '0°C',25: '25°C', 36: '36°C',100: '100°C', }"
|
|
15
|
+
:step="null"
|
|
16
|
+
:disabled="disabled"
|
|
17
|
+
size="small"
|
|
18
|
+
:value="25"></Slider>
|
|
19
|
+
<br />
|
|
20
|
+
<br />
|
|
21
|
+
Disabled: <Switch v-model="disabled" />
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
<script>
|
|
25
|
+
export default{
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
disabled: false ,
|
|
29
|
+
v1: 80,
|
|
30
|
+
v2: [30, 50]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
<style>
|
|
36
|
+
.slider-demo-custom .k-slider-track{
|
|
37
|
+
background: linear-gradient(270deg,green 5.56%,orange);
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
40
|
+
```
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<Slider vertical reverse range :marks="{ 20: '20°C', 40: '40°C' }" :step="10" :value="[20, 60]"></Slider>
|
|
25
25
|
</div>
|
|
26
26
|
</template>
|
|
27
|
-
|
|
27
|
+
<style lang="less">
|
|
28
28
|
.demo-slider-vertical{
|
|
29
29
|
height: 300px;
|
|
30
30
|
margin-left: 30px;
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
padding-right: 30px;
|
|
33
33
|
display: inline-block
|
|
34
34
|
}
|
|
35
|
-
</style
|
|
35
|
+
</style>
|
|
36
36
|
```
|
|
@@ -11,6 +11,7 @@ export default {
|
|
|
11
11
|
default: 1,
|
|
12
12
|
validator: (val) => val !== 0
|
|
13
13
|
},
|
|
14
|
+
size: String,
|
|
14
15
|
range: Boolean,
|
|
15
16
|
vertical: Boolean,
|
|
16
17
|
reverse: Boolean,
|
|
@@ -204,10 +205,10 @@ export default {
|
|
|
204
205
|
|
|
205
206
|
},
|
|
206
207
|
thumbProps() {
|
|
207
|
-
let { vertical, disabled, range, step, reverse, max, min, defaultValue, tooltipVisible, tipFormatter } = this
|
|
208
|
+
let { vertical, disabled, range, step, reverse, max, min, defaultValue, tooltipVisible, tipFormatter, size } = this
|
|
208
209
|
return {
|
|
209
210
|
props: {
|
|
210
|
-
vertical, disabled, range, step, reverse, min,
|
|
211
|
+
vertical, disabled, range, step, reverse, min, size,
|
|
211
212
|
max, tipFormatter, tooltipVisible,
|
|
212
213
|
value: range ? [].concat(defaultValue) : defaultValue * 1
|
|
213
214
|
},
|