kui-vue 3.4.8 → 3.5.0
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 +1 -1
- package/components/affix/affix.jsx +42 -42
- package/components/alert/alert.jsx +12 -7
- package/components/avatar/AvatarGroup.jsx +8 -5
- package/components/avatar/avatar.jsx +10 -7
- package/components/avatar/demo/base.md +1 -0
- package/components/avatar/demo/info.md +2 -5
- package/components/backtop/backtop.jsx +39 -32
- package/components/badge/badge.jsx +7 -7
- package/components/badge/demo/color.md +0 -1
- package/components/badge/styles/index.less +0 -4
- package/components/base/{collapse.js → collapse.jsx} +2 -7
- package/components/base/drop.jsx +181 -195
- package/components/base/input.jsx +27 -46
- package/components/base/pop.jsx +21 -17
- package/components/base/transition.js +1 -4
- package/components/breadcrumb/breadcrumb.jsx +6 -3
- package/components/breadcrumb/breadcrumbItem.jsx +4 -2
- package/components/breadcrumb/styles/index.less +1 -1
- package/components/button/button.jsx +95 -56
- package/components/button/buttonGroup.jsx +5 -3
- package/components/button/demo/base.md +3 -3
- package/components/button/demo/block.md +1 -1
- package/components/button/demo/color.md +30 -0
- package/components/button/demo/disabled.md +2 -2
- package/components/button/demo/index.vue +4 -4
- package/components/button/demo/light.md +8 -8
- package/components/button/demo/loading.md +10 -7
- package/components/button/demo/outline.md +22 -0
- package/components/button/demo/size.md +3 -4
- package/components/button/demo/with-icon.md +5 -5
- package/components/button/styles/index.less +269 -44
- package/components/card/card.jsx +4 -2
- package/components/carousel/carousel.jsx +143 -97
- package/components/carousel/carouselItem.jsx +13 -14
- package/components/carousel/styles/index.less +1 -1
- package/components/checkbox/checkbox.jsx +6 -4
- package/components/checkbox/demo/disabled.md +1 -3
- package/components/checkbox/group.jsx +6 -3
- package/components/collapse/collapse.jsx +14 -12
- package/components/collapse/demo/{accrodion.md → accordion.md} +2 -2
- package/components/collapse/demo/index.vue +2 -2
- package/components/collapse/panel.jsx +15 -16
- package/components/collapse/styles/index.less +3 -3
- package/components/colorPicker/alpha.jsx +107 -0
- package/components/colorPicker/colorpicker.jsx +177 -384
- package/components/colorPicker/demo/base.md +1 -3
- package/components/colorPicker/demo/customTriggle.md +34 -0
- package/components/colorPicker/demo/disabled.md +22 -0
- package/components/colorPicker/demo/disabledAlpha.md +20 -0
- package/components/colorPicker/demo/index.vue +11 -5
- package/components/colorPicker/demo/mode.md +16 -18
- package/components/colorPicker/demo/placement.md +25 -0
- package/components/colorPicker/demo/{colors.md → presets.md} +2 -2
- package/components/colorPicker/demo/size.md +14 -13
- package/components/colorPicker/hue.jsx +114 -0
- package/components/colorPicker/index.md +11 -11
- package/components/colorPicker/mode.jsx +176 -0
- package/components/colorPicker/paint.jsx +126 -0
- package/components/colorPicker/presets.jsx +69 -0
- package/components/colorPicker/styles/index.less +144 -46
- package/components/components.js +155 -0
- package/components/const/var.js +3 -0
- package/components/datePicker/datecalendar.jsx +34 -34
- package/components/datePicker/datepicker.jsx +24 -23
- package/components/datePicker/styles/calendar.less +3 -3
- package/components/descriptions/descriptions.jsx +12 -8
- package/components/descriptions/descriptionsItem.jsx +5 -2
- package/components/divider/divider.jsx +4 -2
- package/components/drawer/drawer.jsx +74 -69
- package/components/dropdown/dropdown.jsx +5 -2
- package/components/dropdown/styles/index.less +14 -3
- package/components/empty/empty.jsx +5 -5
- package/components/flex/demo/align.md +1 -1
- package/components/flex/demo/size.md +1 -1
- package/components/flex/flex.jsx +12 -4
- package/components/form/demo/length.md +1 -1
- package/components/form/demo/valid.md +1 -1
- package/components/form/form.jsx +9 -8
- package/components/form/formitem.jsx +14 -11
- package/components/grid/col.jsx +5 -2
- package/components/grid/row.jsx +11 -8
- package/components/icon/demo/base.md +8 -7
- package/components/icon/demo/index.vue +3 -1
- package/components/icon/demo/info.md +1 -38
- package/components/icon/demo/search.vue +16 -15
- package/components/icon/demo/use.md +30 -0
- package/components/icon/icon.jsx +5 -2
- package/components/image/group.jsx +4 -2
- package/components/image/image.jsx +16 -13
- package/components/image/index.js +6 -9
- package/components/image/{instance.js → instance.jsx} +6 -6
- package/components/image/preview.jsx +219 -195
- package/components/image/styles/index.less +1 -1
- package/components/index.js +36 -142
- package/components/input/input.jsx +6 -4
- package/components/input/inputGroup.jsx +16 -14
- package/components/input/textarea.jsx +16 -7
- package/components/inputNumber/demo/base.md +16 -8
- package/components/inputNumber/demo/format.md +7 -19
- package/components/inputNumber/demo/size.md +2 -6
- package/components/inputNumber/inputNumber.jsx +112 -104
- package/components/inputNumber/styles/index.less +47 -11
- package/components/layout/demo/base.md +11 -6
- package/components/layout/demo/layout1.md +82 -63
- package/components/layout/demo/layout2.md +93 -56
- package/components/layout/demo/layout3.md +95 -53
- package/components/layout/demo/layout4.md +97 -45
- package/components/layout/demo/layout5.md +81 -80
- package/components/layout/index.js +0 -4
- package/components/layout/layout.jsx +3 -2
- package/components/loading/demo/info.md +3 -3
- package/components/loading/{index.js → index.jsx} +29 -24
- package/components/locale/index.js +27 -69
- package/components/locale/lang/de.js +1 -1
- package/components/locale/lang/el.js +1 -1
- package/components/locale/lang/en.js +1 -1
- package/components/locale/lang/fr.js +2 -2
- package/components/locale/lang/it.js +1 -1
- package/components/locale/lang/ja.js +1 -1
- package/components/locale/lang/ko.js +1 -1
- package/components/locale/lang/ru.js +1 -1
- package/components/locale/lang/th.js +1 -1
- package/components/locale/lang/ua.js +1 -1
- package/components/locale/lang/vi.js +1 -1
- package/components/locale/lang/zh-CN.js +1 -1
- package/components/locale/lang/zh-TW.js +1 -1
- package/components/menu/demo/index.vue +2 -2
- package/components/menu/menu.jsx +6 -3
- package/components/menu/menudivider.jsx +5 -3
- package/components/menu/menugroup.jsx +4 -2
- package/components/menu/menuitem.jsx +6 -4
- package/components/menu/styles/index.less +88 -20
- package/components/menu/submenu.jsx +11 -28
- package/components/message/group.jsx +31 -28
- package/components/message/index.js +2 -2
- package/components/modal/demo/index.vue +2 -3
- package/components/modal/demo/info.md +5 -4
- package/components/modal/index.js +5 -7
- package/components/modal/modal.jsx +116 -121
- package/components/notice/index.js +2 -1
- package/components/page/page.jsx +15 -12
- package/components/page/styles/index.less +4 -4
- package/components/popconfirm/popconfirm.jsx +9 -8
- package/components/popconfirm/styles/index.less +15 -8
- package/components/poptip/poptip.jsx +7 -6
- package/components/poptip/styles/index.less +10 -4
- package/components/progress/progress.jsx +11 -8
- package/components/radio/button.jsx +4 -1
- package/components/radio/demo/button.md +1 -2
- package/components/radio/group.jsx +10 -19
- package/components/radio/radio.jsx +7 -9
- package/components/radio/styles/index.less +1 -1
- package/components/rate/rate.jsx +7 -10
- package/components/select/demo/base.md +5 -2
- package/components/select/demo/info.md +3 -1
- package/components/select/demo/multiple.md +1 -1
- package/components/select/demo/theme.md +0 -5
- package/components/select/index.md +4 -0
- package/components/select/option.jsx +8 -5
- package/components/select/select.jsx +247 -237
- package/components/select/styles/index.less +7 -13
- package/components/skeleton/demo/items.md +3 -3
- package/components/skeleton/skeleton.jsx +6 -2
- package/components/skeleton/skeletonAvatar.jsx +6 -2
- package/components/skeleton/skeletonButton.jsx +6 -2
- package/components/skeleton/skeletonImage.jsx +6 -2
- package/components/skeleton/skeletonText.jsx +6 -2
- package/components/slider/slider.jsx +15 -11
- package/components/slider/thumb.jsx +9 -8
- package/components/space/demo/align.md +5 -6
- package/components/space/demo/size.md +8 -8
- package/components/space/space.jsx +19 -17
- package/components/spin/demo/container.md +10 -10
- package/components/spin/spin.jsx +5 -2
- package/components/styles/color.less +57 -37
- package/components/styles/sys.less +31 -0
- package/components/styles/var.less +40 -11
- package/components/switch/styles/index.less +2 -2
- package/components/switch/switch.jsx +11 -8
- package/components/table/demo/edit.md +4 -4
- package/components/table/demo/expand.md +1 -2
- package/components/table/demo/filter.md +1 -1
- package/components/table/extend.jsx +172 -157
- package/components/table/styles/index.less +2 -1
- package/components/table/table.jsx +8 -6
- package/components/tabs/demo/base.md +6 -6
- package/components/tabs/demo/card.md +6 -6
- package/components/tabs/demo/centered.md +6 -6
- package/components/tabs/demo/closable.md +3 -3
- package/components/tabs/demo/disabled.md +6 -6
- package/components/tabs/demo/extra.md +6 -6
- package/components/tabs/demo/icon.md +4 -4
- package/components/tabs/demo/index.vue +3 -4
- package/components/tabs/demo/sample.md +6 -6
- package/components/tabs/index.js +2 -2
- package/components/tabs/index.md +1 -1
- package/components/tabs/styles/index.less +47 -9
- package/components/tabs/tabpanel.jsx +28 -0
- package/components/tabs/tabs.jsx +198 -151
- package/components/tag/demo/color.md +0 -1
- package/components/tag/styles/index.less +0 -6
- package/components/tag/tag.jsx +6 -3
- package/components/timeline/timeline.jsx +3 -1
- package/components/timeline/timelineitem.jsx +5 -2
- package/components/tooltip/demo/color.md +2 -3
- package/components/tooltip/styles/index.less +15 -26
- package/components/tooltip/tooltip.jsx +8 -6
- package/components/tree/demo/directory.md +3 -3
- package/components/tree/node.jsx +39 -50
- package/components/tree/styles/index.less +3 -3
- package/components/tree/tree.jsx +18 -28
- package/components/treeselect/styles/index.less +1 -1
- package/components/treeselect/treeselect.jsx +21 -22
- package/components/upload/demo/form.md +1 -1
- package/components/upload/upload.jsx +13 -27
- package/components/{_tool → utils}/animate.js +1 -1
- package/components/{_tool → utils}/clone.js +2 -2
- package/components/utils/color.js +5 -0
- package/components/{_tool/utils.js → utils/element.js} +8 -5
- package/components/utils/number.js +81 -0
- package/components/utils/theme.js +62 -0
- package/components/utils/vue.js +7 -0
- package/dist/k-ui.cjs.js +7 -0
- package/dist/k-ui.css +6 -7
- package/dist/k-ui.d.ts +162 -0
- package/dist/k-ui.esm.js +7 -0
- package/dist/k-ui.umd.js +7 -0
- package/dist/locale/de.js +5 -7
- package/dist/locale/el.js +5 -7
- package/dist/locale/en.js +5 -7
- package/dist/locale/fr.js +5 -7
- package/dist/locale/it.js +5 -7
- package/dist/locale/ja.js +5 -7
- package/dist/locale/ko.js +5 -7
- package/dist/locale/ru.js +5 -7
- package/dist/locale/th.js +5 -7
- package/dist/locale/ua.js +5 -7
- package/dist/locale/vi.js +5 -7
- package/dist/locale/zh-CN.js +7 -0
- package/dist/locale/zh-TW.js +7 -0
- package/package.json +53 -20
- package/readme.md +105 -0
- package/test/i18n@8.x.html +65 -0
- package/types/affix/Affix.d.ts +17 -0
- package/types/alert/Alert.d.ts +18 -0
- package/types/anchor/Anchor.d.ts +16 -0
- package/types/anchor/Link.d.ts +15 -0
- package/types/avatar/Avatar.d.ts +17 -0
- package/types/avatar/AvatarGroup.d.ts +15 -0
- package/types/backtop/BackTop.d.ts +16 -0
- package/types/badge/Badge.d.ts +20 -0
- package/types/base/BasePop.d.ts +24 -0
- package/types/base/Collapse.d.ts +15 -0
- package/types/base/Drop.d.ts +27 -0
- package/types/base/baseInput.d.ts +32 -0
- package/types/base/input.d.ts +32 -0
- package/types/base/pop.d.ts +36 -0
- package/types/breadcrumb/Breadcrumb.d.ts +11 -0
- package/types/breadcrumb/BreadcrumbItem.d.ts +17 -0
- package/types/button/Button.d.ts +27 -0
- package/types/button/ButtonGroup.d.ts +15 -0
- package/types/card/Card.d.ts +16 -0
- package/types/carousel/Carousel.d.ts +22 -0
- package/types/carousel/CarouselItem.d.ts +11 -0
- package/types/checkbox/Checkbox.d.ts +19 -0
- package/types/checkbox/CheckboxGroup.d.ts +20 -0
- package/types/collapse/Collapse.d.ts +15 -0
- package/types/collapse/Panel.d.ts +14 -0
- package/types/colorPicker/Alpha.d.ts +13 -0
- package/types/colorPicker/ColorPicker.d.ts +26 -0
- package/types/colorPicker/Hue.d.ts +13 -0
- package/types/colorPicker/Mode.d.ts +15 -0
- package/types/colorPicker/Paint.d.ts +14 -0
- package/types/colorPicker/Presets.d.ts +15 -0
- package/types/datePicker/DateCalendar.d.ts +27 -0
- package/types/datePicker/DatePicker.d.ts +36 -0
- package/types/descriptions/Descriptions.d.ts +21 -0
- package/types/descriptions/DescriptionsItem.d.ts +18 -0
- package/types/divider/Divider.d.ts +18 -0
- package/types/drawer/Drawer.d.ts +35 -0
- package/types/dropdown/Dropdown.d.ts +21 -0
- package/types/empty/Empty.d.ts +15 -0
- package/types/flex/Flex.d.ts +17 -0
- package/types/form/Form.d.ts +25 -0
- package/types/form/FormItem.d.ts +17 -0
- package/types/grid/Col.d.ts +15 -0
- package/types/grid/Row.d.ts +17 -0
- package/types/icon/Icon.d.ts +17 -0
- package/types/image/ImageGroup.d.ts +11 -0
- package/types/image/ImagePreview.d.ts +24 -0
- package/types/image/KImage.d.ts +21 -0
- package/types/image/imageProps.d.ts +19 -0
- package/types/image/instance.d.ts +19 -0
- package/types/index.d.ts +188 -0
- package/types/input/Input.d.ts +31 -0
- package/types/input/InputGroup.d.ts +17 -0
- package/types/input/TextArea.d.ts +16 -0
- package/types/inputNumber/InputNumber.d.ts +33 -0
- package/types/layout/layout.d.ts +13 -0
- package/types/layout/prop.d.ts +13 -0
- package/types/loading/Loading.d.ts +11 -0
- package/types/menu/Menu.d.ts +21 -0
- package/types/menu/MenuDivider.d.ts +11 -0
- package/types/menu/MenuGroup.d.ts +13 -0
- package/types/menu/MenuItem.d.ts +15 -0
- package/types/menu/SubMenu.d.ts +15 -0
- package/types/menu/show.d.ts +15 -0
- package/types/message/group.d.ts +13 -0
- package/types/message/inner.d.ts +24 -0
- package/types/modal/Modal.d.ts +31 -0
- package/types/page/Page.d.ts +26 -0
- package/types/popconfirm/Popconfirm.d.ts +21 -0
- package/types/poptip/Poptip.d.ts +22 -0
- package/types/progress/Progress.d.ts +33 -0
- package/types/radio/Radio.d.ts +19 -0
- package/types/radio/RadioButton.d.ts +18 -0
- package/types/radio/RadioGroup.d.ts +23 -0
- package/types/rate/Rate.d.ts +26 -0
- package/types/rate/Star.d.ts +22 -0
- package/types/select/Option.d.ts +15 -0
- package/types/select/Select.d.ts +38 -0
- package/types/skeleton/Skeleton.d.ts +21 -0
- package/types/skeleton/SkeletonAvatar.d.ts +19 -0
- package/types/skeleton/SkeletonButton.d.ts +20 -0
- package/types/skeleton/SkeletonImage.d.ts +18 -0
- package/types/skeleton/SkeletonText.d.ts +18 -0
- package/types/slider/Slider.d.ts +29 -0
- package/types/slider/thumb.d.ts +24 -0
- package/types/space/Space.d.ts +18 -0
- package/types/spin/Spin.d.ts +20 -0
- package/types/switch/KSwitch.d.ts +20 -0
- package/types/switch/Switch.d.ts +20 -0
- package/types/table/ExtendTable.d.ts +21 -0
- package/types/table/Table.d.ts +24 -0
- package/types/table/extend.d.ts +21 -0
- package/types/tabs/TabPanel.d.ts +17 -0
- package/types/tabs/Tabs.d.ts +18 -0
- package/types/tag/Tag.d.ts +18 -0
- package/types/timeline/TimeLine.d.ts +14 -0
- package/types/timeline/TimeLineItem.d.ts +16 -0
- package/types/tooltip/Tooltip.d.ts +23 -0
- package/types/tree/Tree.d.ts +28 -0
- package/types/tree/TreeNode.d.ts +17 -0
- package/types/treeselect/TreeSelect.d.ts +41 -0
- package/types/upload/Upload.d.ts +39 -0
- package/README.md +0 -106
- package/components/_tool/directives.js +0 -31
- package/components/_tool/number.js +0 -177
- package/components/bin/index.js +0 -3
- package/components/button/demo/normal.md +0 -41
- package/components/button/demo/solid.md +0 -16
- package/components/colorPicker/canvasHelper.js +0 -274
- package/components/colorPicker/demo/shape.md +0 -36
- package/components/tabs/tabpane.jsx +0 -25
- package/dist/k-ui.js +0 -9
- package/dist/locale/zhCN.js +0 -9
- package/dist/locale/zhTW.js +0 -9
- package/test/i18n@6.x.html +0 -52
- /package/components/{_tool → directives}/outsiteclick.js +0 -0
- /package/components/{_tool → directives}/resize.js +0 -0
- /package/components/{_tool → directives}/scroll.js +0 -0
- /package/components/{_tool → directives}/transfer.js +0 -0
- /package/components/menu/demo/{accrodion.md → accordion.md} +0 -0
- /package/components/modal/demo/{confrim.md → confirm.md} +0 -0
- /package/components/{_tool → utils}/docClick.js +0 -0
|
@@ -14,11 +14,21 @@
|
|
|
14
14
|
|
|
15
15
|
.k-dropdown-menu {
|
|
16
16
|
min-width: 150px;
|
|
17
|
+
border: 1px solid var(--kui-color-border);
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
.k-dropdown-menu-item-icon {
|
|
20
21
|
margin-right: 8px;
|
|
21
22
|
}
|
|
23
|
+
|
|
24
|
+
#ot {
|
|
25
|
+
stroke-width: 1px;
|
|
26
|
+
stroke: var(--kui-color-border);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.k-dropdown-menu {
|
|
31
|
+
border: 1px solid var(--kui-color-border);
|
|
22
32
|
}
|
|
23
33
|
|
|
24
34
|
.k-dropdown-has-arrow {
|
|
@@ -31,8 +41,9 @@
|
|
|
31
41
|
box-sizing: border-box;
|
|
32
42
|
display: flex;
|
|
33
43
|
width: 24px;
|
|
34
|
-
height:
|
|
44
|
+
height: 9px;
|
|
35
45
|
color: var(--kui-color-back);
|
|
46
|
+
|
|
36
47
|
svg {
|
|
37
48
|
filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 0.05));
|
|
38
49
|
}
|
|
@@ -47,7 +58,7 @@
|
|
|
47
58
|
&[k-placement^=top] {
|
|
48
59
|
.k-dropdown-arrow {
|
|
49
60
|
bottom: 6px;
|
|
50
|
-
height:
|
|
61
|
+
height: 9px;
|
|
51
62
|
}
|
|
52
63
|
|
|
53
64
|
.k-dropdown-body {
|
|
@@ -77,7 +88,7 @@
|
|
|
77
88
|
&[k-placement^=bottom] {
|
|
78
89
|
.k-dropdown-arrow {
|
|
79
90
|
top: 6px;
|
|
80
|
-
height:
|
|
91
|
+
height: 9px;
|
|
81
92
|
transform: rotate(180deg);
|
|
82
93
|
}
|
|
83
94
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import Icon from "../icon";
|
|
2
2
|
import { t } from "../locale";
|
|
3
3
|
import { FileTrayOutline } from "kui-icons";
|
|
4
|
-
|
|
4
|
+
import { withInstall } from '../utils/vue'
|
|
5
|
+
const Empty = {
|
|
5
6
|
name: 'Empty',
|
|
6
7
|
props: {
|
|
7
8
|
description: String,
|
|
@@ -10,9 +11,6 @@ export default {
|
|
|
10
11
|
},
|
|
11
12
|
render() {
|
|
12
13
|
let { image, imageStyle, $slots, description } = this
|
|
13
|
-
// description = getChild($slots.description).length > 0 || description
|
|
14
|
-
// image = getChild($slots.image)
|
|
15
|
-
// console.log(description, $slots.description)
|
|
16
14
|
|
|
17
15
|
return (<div class="k-empty">
|
|
18
16
|
{(!image && !$slots.image) ? <Icon type={FileTrayOutline} class="k-empty-icon" /> : ($slots.image ? $slots.image : <img src={image} class="k-empty-image" style={imageStyle} />)}
|
|
@@ -20,4 +18,6 @@ export default {
|
|
|
20
18
|
{$slots.default ? <div class="k-empty-footer">{$slots.default}</div> : null}
|
|
21
19
|
</div>)
|
|
22
20
|
}
|
|
23
|
-
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default withInstall(Empty)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
|
-
<Flex vertical
|
|
8
|
+
<Flex vertical align="start" size="middle">
|
|
9
9
|
<span>Justify</span>
|
|
10
10
|
<RadioGroup v-model="justify" theme="card" type="button">
|
|
11
11
|
<RadioButton v-for="(item,index) in justifyOps" :key="index" :value="item">{{item}}</RadioButton>
|
package/components/flex/flex.jsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { withInstall } from '../utils/vue'
|
|
2
|
+
const Flex = {
|
|
2
3
|
name: 'Flex',
|
|
3
4
|
props: {
|
|
4
5
|
align: {
|
|
@@ -23,6 +24,11 @@ export default {
|
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
},
|
|
27
|
+
provide() {
|
|
28
|
+
return {
|
|
29
|
+
size: this.size,
|
|
30
|
+
}
|
|
31
|
+
},
|
|
26
32
|
render() {
|
|
27
33
|
let { align, justify, vertical, $slots, size, wrap } = this
|
|
28
34
|
align = (!vertical && !align) ? 'center' : align
|
|
@@ -44,7 +50,9 @@ export default {
|
|
|
44
50
|
} else if (size !== undefined && size !== null) {
|
|
45
51
|
props.style.gap = `${size}px`
|
|
46
52
|
}
|
|
47
|
-
let
|
|
48
|
-
return <div {...props}>{
|
|
53
|
+
let children = $slots.default
|
|
54
|
+
return <div {...props}>{children}</div>
|
|
49
55
|
}
|
|
50
|
-
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default withInstall(Flex)
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<FormItem :wrapperCol="{offset:6}">
|
|
55
55
|
<Button type="primary" htmlType="submit">Submit</Button>
|
|
56
56
|
<Button style="margin:0 10px" htmlType="reset">Reset</Button>
|
|
57
|
-
<Button
|
|
57
|
+
<Button theme="dashed" @click="setValue">Set Value</Button>
|
|
58
58
|
</FormItem>
|
|
59
59
|
</Form>
|
|
60
60
|
</div>
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
<FormItem :wrapperCol="{offset:6}">
|
|
96
96
|
<Button type="primary" @click="submit" >Submit</Button>
|
|
97
97
|
<Button style="margin:0 10px" @click="reset" >Reset</Button>
|
|
98
|
-
<Button
|
|
98
|
+
<Button theme="dashed" @click="setValue" >Set Value</Button>
|
|
99
99
|
</FormItem>
|
|
100
100
|
</Form>
|
|
101
101
|
|
package/components/form/form.jsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import cloneVNode from '../
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import cloneVNode from '../utils/clone';
|
|
3
|
+
import { getChildren } from '../utils/element'
|
|
4
|
+
import { withInstall } from '../utils/vue'
|
|
5
|
+
const Form = {
|
|
5
6
|
name: "Form",
|
|
6
7
|
props: {
|
|
7
8
|
layout: {
|
|
@@ -31,7 +32,7 @@ export default {
|
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
34
|
watch: {
|
|
34
|
-
model(
|
|
35
|
+
model() {
|
|
35
36
|
this.validate()
|
|
36
37
|
}
|
|
37
38
|
},
|
|
@@ -49,11 +50,11 @@ export default {
|
|
|
49
50
|
'k-form-sm': size == 'small',
|
|
50
51
|
}
|
|
51
52
|
];
|
|
52
|
-
const
|
|
53
|
+
const children = getChildren(this.$slots.default)
|
|
53
54
|
return (
|
|
54
55
|
<form autocomplete="off" class={classes} ref="form" id={name} onSubmit={this.submit} onReset={this.reset}>
|
|
55
56
|
{
|
|
56
|
-
|
|
57
|
+
children.map(child => {
|
|
57
58
|
labelCol = (child.componentOptions && child.componentOptions.propsData.labelCol) || labelCol
|
|
58
59
|
wrapperCol = (child.componentOptions && child.componentOptions.propsData.wrapperCol) || wrapperCol
|
|
59
60
|
return cloneVNode(child, {
|
|
@@ -89,7 +90,6 @@ export default {
|
|
|
89
90
|
} else {
|
|
90
91
|
model[key] = value
|
|
91
92
|
}
|
|
92
|
-
// console.log(model[key],key)
|
|
93
93
|
}
|
|
94
94
|
model = model[key]
|
|
95
95
|
}
|
|
@@ -151,4 +151,5 @@ export default {
|
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
}
|
|
154
|
-
}
|
|
154
|
+
}
|
|
155
|
+
export default withInstall(Form)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Row, Col } from '../grid'
|
|
2
|
-
import cloneVNode from '../
|
|
3
|
-
import {
|
|
2
|
+
import cloneVNode from '../utils/clone';
|
|
3
|
+
import { getChildren, isVNode } from '../utils/element'
|
|
4
|
+
import { withInstall } from '../utils/vue'
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const FormItem = {
|
|
6
7
|
name: "FormItem",
|
|
7
8
|
props: {
|
|
8
9
|
label: String,
|
|
@@ -57,7 +58,7 @@ export default {
|
|
|
57
58
|
wrapperProp = { props: { ...wrapperCol } }
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
const
|
|
61
|
+
const children = getChildren(this.$slots.default)
|
|
61
62
|
let id = null
|
|
62
63
|
if (Form.name && prop) {
|
|
63
64
|
id = `${Form.name || `form_` + this._uid}_${prop}`
|
|
@@ -73,8 +74,8 @@ export default {
|
|
|
73
74
|
<Col {...wrapperProp}>
|
|
74
75
|
<div class="k-form-item-content">
|
|
75
76
|
{
|
|
76
|
-
|
|
77
|
-
if (
|
|
77
|
+
children.map(child => {
|
|
78
|
+
if (isVNode(child)) {
|
|
78
79
|
const tag = child.componentOptions ? child.componentOptions.tag : child.tag
|
|
79
80
|
const value = prop ? this.Form.testProp(prop) : ''
|
|
80
81
|
const size = (child.componentOptions && child.componentOptions.propsData.size) || this.Form.size
|
|
@@ -117,8 +118,8 @@ export default {
|
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
120
|
if (['Input', 'k-input', 'TextArea', 'k-textarea'].indexOf(tag) > -1) {
|
|
120
|
-
props.on.blur = (
|
|
121
|
-
value = value.target.value
|
|
121
|
+
props.on.blur = () => {
|
|
122
|
+
// value = value.target.value
|
|
122
123
|
this.testValue()
|
|
123
124
|
}
|
|
124
125
|
}
|
|
@@ -168,7 +169,7 @@ export default {
|
|
|
168
169
|
else if (rule.type) {
|
|
169
170
|
switch (rule.type) {
|
|
170
171
|
case 'mail':
|
|
171
|
-
valid = /^
|
|
172
|
+
valid = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[A-Za-z]{2,}$/.test(itemValue)
|
|
172
173
|
message = message || 'Incorrect email format'
|
|
173
174
|
break;
|
|
174
175
|
case 'mobile':
|
|
@@ -233,7 +234,7 @@ export default {
|
|
|
233
234
|
validate(rules) {
|
|
234
235
|
if (rules.constructor === Object) return this.test(rules)
|
|
235
236
|
// 有 required 排前面
|
|
236
|
-
rules = rules.sort((a,
|
|
237
|
+
rules = rules.sort((a,) => a.required ? -1 : 0)
|
|
237
238
|
for (let i = 0; i < rules.length; i++) {
|
|
238
239
|
let valid = this.test(rules[i])
|
|
239
240
|
if (!valid) {
|
|
@@ -243,4 +244,6 @@ export default {
|
|
|
243
244
|
return this.valid
|
|
244
245
|
}
|
|
245
246
|
}
|
|
246
|
-
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export default withInstall(FormItem)
|
package/components/grid/col.jsx
CHANGED
package/components/grid/row.jsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
import { withInstall } from '../utils/vue'
|
|
3
|
+
const Row = {
|
|
3
4
|
name: "Row",
|
|
4
5
|
props: {
|
|
5
6
|
gutter: [Number, Array],
|
|
@@ -38,17 +39,17 @@ export default {
|
|
|
38
39
|
if (Array.isArray(gutter)) {
|
|
39
40
|
let [v = 0, h = 0] = gutter;
|
|
40
41
|
if ((v == h && v > 0)) {
|
|
41
|
-
props.style.margin = `-${v/2}px`
|
|
42
|
+
props.style.margin = `-${v / 2}px`
|
|
42
43
|
} else if (v > 0 && h > 0) {
|
|
43
|
-
props.style.margin = `-${h/2}px -${v/2}px`
|
|
44
|
+
props.style.margin = `-${h / 2}px -${v / 2}px`
|
|
44
45
|
} else {
|
|
45
46
|
if (v > 0) {
|
|
46
|
-
props.style.marginLeft = `-${v/2}px`
|
|
47
|
-
props.style.marginRight = `-${v/2}px`
|
|
47
|
+
props.style.marginLeft = `-${v / 2}px`
|
|
48
|
+
props.style.marginRight = `-${v / 2}px`
|
|
48
49
|
}
|
|
49
50
|
if (h > 0) {
|
|
50
|
-
props.style.marginTop = `-${v/2}px`
|
|
51
|
-
props.style.marginTop = `-${v/2}px`
|
|
51
|
+
props.style.marginTop = `-${v / 2}px`
|
|
52
|
+
props.style.marginTop = `-${v / 2}px`
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
|
|
@@ -58,4 +59,6 @@ export default {
|
|
|
58
59
|
}
|
|
59
60
|
return (<div {...props}>{$slots.default}</div >)
|
|
60
61
|
}
|
|
61
|
-
};
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default withInstall(Row);
|
|
@@ -5,19 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
|
-
<
|
|
8
|
+
<Space>
|
|
9
|
+
<Icon :type="Home" />
|
|
9
10
|
<Icon :type="Heart" />
|
|
10
|
-
<Icon :type="LogoKui"
|
|
11
|
-
<Icon :type="LogoKui"
|
|
12
|
-
<Icon :type="
|
|
13
|
-
</
|
|
11
|
+
<Icon :type="LogoKui" />
|
|
12
|
+
<Icon :type="LogoKui" color="#00be83" />
|
|
13
|
+
<Icon :type="Loading" spin />
|
|
14
|
+
</Space>
|
|
14
15
|
</template>
|
|
15
16
|
<script>
|
|
16
|
-
import { Heart, LogoKui } from 'kui-icons'
|
|
17
|
+
import { Home, Heart, LogoKui,Loading } from 'kui-icons'
|
|
17
18
|
export default{
|
|
18
19
|
data() {
|
|
19
20
|
return{
|
|
20
|
-
Heart , LogoKui
|
|
21
|
+
Home, Heart , LogoKui, Loading
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import Base from './base.md'
|
|
3
3
|
import Stroke from './stroke.md'
|
|
4
4
|
import Info from './info.md'
|
|
5
|
+
import Use from './use.md'
|
|
5
6
|
import Search from './search.vue'
|
|
6
7
|
import CN from '../index.md'
|
|
7
8
|
export default {
|
|
@@ -9,10 +10,11 @@ export default {
|
|
|
9
10
|
return (
|
|
10
11
|
<div>
|
|
11
12
|
<Info />
|
|
13
|
+
<Search />
|
|
14
|
+
<Use />
|
|
12
15
|
<Base />
|
|
13
16
|
<Stroke />
|
|
14
17
|
<CN />
|
|
15
|
-
<Search />
|
|
16
18
|
</div>
|
|
17
19
|
)
|
|
18
20
|
}
|
|
@@ -6,41 +6,4 @@ kui 的图标使用开源项目 [ionicons](http://ionicons.com/) 前版本5.5
|
|
|
6
6
|
使用图标组件,你需要安装 `kui-icons` 图标组件包:
|
|
7
7
|
```bash
|
|
8
8
|
npm install --save kui-icons
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## 使用
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
<template>
|
|
15
|
-
<div>
|
|
16
|
-
<Icon :type="Heart" />
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
<script>
|
|
20
|
-
import { Heart } from 'kui-icons'
|
|
21
|
-
export default{
|
|
22
|
-
data() {
|
|
23
|
-
return {
|
|
24
|
-
Heart
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
</script>
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
3.3 版本开始, 使用 Icon 需要单独引入,使用按需加载,这样在编译之后的体积会变得更小。
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
3.1.1 版本之后 使用 `ionicons` 图标库 5.5 版本, 5.0 图标库请配合 `kui-vue@3.1.0`
|
|
35
|
-
|
|
36
|
-
## 使用Sprite模式
|
|
37
|
-
```js
|
|
38
|
-
import sprite from 'kui-icons/lib/sprite.svg'
|
|
39
|
-
|
|
40
|
-
<svg width="1em" height="1em">
|
|
41
|
-
<use xlink:href={`${sprite}#LogoKui`}></use>
|
|
42
|
-
</svg>
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## 代码演示
|
|
9
|
+
```
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
<h3>图标快速检索</h3>
|
|
4
4
|
<br />
|
|
5
5
|
<Affix :offsetTop="65">
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<RadioGroup v-model="type" @change="switchIcon">
|
|
11
|
-
<RadioButton value="outline">Outline</RadioButton>
|
|
12
|
-
<RadioButton value="filled">Filled</RadioButton>
|
|
6
|
+
<Flex size="large" style="background-color: var(--kui-color-back);">
|
|
7
|
+
<RadioGroup size="large" v-model="type" @change="switchIcon" theme="card" type="button">
|
|
8
|
+
<RadioButton value="outline">线框风格</RadioButton>
|
|
9
|
+
<RadioButton value="filled">实底风格</RadioButton>
|
|
13
10
|
</RadioGroup>
|
|
14
|
-
|
|
11
|
+
<Space size="large" compact block>
|
|
12
|
+
<Input placeholder="输入英文关键字,搜索图标,点击图标即可复制" :icon="LogoKui" v-model="key" @input="search" clearable
|
|
13
|
+
style="background:var(--kui-color-back);">
|
|
14
|
+
</Input>
|
|
15
|
+
<Button :icon="icons['Search']"></Button>
|
|
16
|
+
</Space>
|
|
17
|
+
</Flex>
|
|
15
18
|
</Affix>
|
|
16
|
-
|
|
17
|
-
<br />
|
|
18
|
-
<br />
|
|
19
19
|
<div class="show-icons">
|
|
20
20
|
<template v-if="showIcons.length">
|
|
21
21
|
<div class="icon-head">
|
|
22
22
|
<h3><span>App icons</span></h3>
|
|
23
23
|
</div>
|
|
24
24
|
<br />
|
|
25
|
-
<
|
|
25
|
+
<Flex class="icon-list" size="small" wrap>
|
|
26
26
|
<span @click.stop="copy(x)" v-for="(x, y) in showIcons" :key="y" class="icon-item">
|
|
27
27
|
<Icon :type="icons[x]" />
|
|
28
28
|
<!-- <svg width="1em" height="1em">
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
</svg> -->
|
|
31
31
|
<span class="item-text">{{ x }}</span>
|
|
32
32
|
</span>
|
|
33
|
-
</
|
|
33
|
+
</Flex>
|
|
34
34
|
</template>
|
|
35
35
|
<template v-if="logo.length">
|
|
36
36
|
<h3>Logos</h3>
|
|
37
|
-
<
|
|
37
|
+
<Flex class="icon-list" size="small" wrap>
|
|
38
38
|
<span @click.stop="copy(x)" v-for="(x, y) in logo" :key="y" class="icon-item">
|
|
39
39
|
<Icon :type="icons[x]" />
|
|
40
40
|
<!-- <svg width="1em"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
</svg> -->
|
|
44
44
|
<span class="item-text">{{ x }}</span>
|
|
45
45
|
</span>
|
|
46
|
-
</
|
|
46
|
+
</Flex>
|
|
47
47
|
</template>
|
|
48
48
|
<h3 v-if="!showIcons.length && !logo.length" style="text-align:center;padding-bottom:50px;color:#888;">
|
|
49
49
|
No results for "{{ key }}"
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
font-size: 32px;
|
|
71
71
|
cursor: pointer;
|
|
72
72
|
transition: color 0.3s ease-in-out;
|
|
73
|
+
border-radius: 12px;
|
|
73
74
|
|
|
74
75
|
&:hover {
|
|
75
76
|
color: #3a95ff;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
## 使用
|
|
3
|
+
|
|
4
|
+
```js
|
|
5
|
+
<template>
|
|
6
|
+
<div>
|
|
7
|
+
<Icon :type="Heart" />
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<script setup>
|
|
11
|
+
import { Heart } from 'kui-icons'
|
|
12
|
+
</script>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
3.3 版本开始, 使用 Icon 需要单独引入,使用按需加载,这样在编译之后的体积会变得更小。
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
3.1.1 版本之后 使用 `ionicons` 图标库 5.5 版本
|
|
19
|
+
|
|
20
|
+
## 使用Sprite模式
|
|
21
|
+
```js
|
|
22
|
+
import sprite from 'kui-icons/lib/sprite.svg'
|
|
23
|
+
|
|
24
|
+
<svg width="1em" height="1em">
|
|
25
|
+
<use xlink:href={`${sprite}#LogoKui`}></use>
|
|
26
|
+
</svg>
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 代码演示
|
package/components/icon/icon.jsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// import icons from 'kui-icons'
|
|
2
2
|
// import icons from './lib/kui-icons'
|
|
3
3
|
// import src from './lib/sprite.svg'
|
|
4
|
+
import { withInstall } from '../utils/vue'
|
|
4
5
|
const sty2obj = stl => {
|
|
5
6
|
stl = stl.replace(/ /g, '')
|
|
6
7
|
let s = stl.split(';')
|
|
@@ -21,7 +22,7 @@ const obj2sty = obj => {
|
|
|
21
22
|
return sty
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
const Icon = {
|
|
25
26
|
name: "Icon",
|
|
26
27
|
props: {
|
|
27
28
|
type: [String, Array],
|
|
@@ -68,4 +69,6 @@ export default {
|
|
|
68
69
|
})
|
|
69
70
|
return (<i {...props}><svg viewBox='0 0 512 512' width="1em" height="1em">{pathNode}</svg>{this.$slots.default}</i>)
|
|
70
71
|
}
|
|
71
|
-
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export default withInstall(Icon)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
import { withInstall } from '../utils/vue'
|
|
3
|
+
const ImageGroup = {
|
|
3
4
|
name: 'ImageGroup',
|
|
4
5
|
provide() {
|
|
5
6
|
return {
|
|
@@ -24,4 +25,5 @@ export default {
|
|
|
24
25
|
render() {
|
|
25
26
|
return <div class="k-image-group">{this.$slots.default}</div>
|
|
26
27
|
}
|
|
27
|
-
}
|
|
28
|
+
}
|
|
29
|
+
export default withInstall(ImageGroup)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import Icon from '../icon'
|
|
2
2
|
import createInstance from './instance'
|
|
3
|
-
// import { easyEqual } from '../
|
|
4
|
-
import { Sync, IconImage
|
|
3
|
+
// import { easyEqual } from '../utils/element'
|
|
4
|
+
import { Sync, IconImage, EyeOutline } from 'kui-icons'
|
|
5
5
|
import { t } from '../locale';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { withInstall } from '../utils/vue'
|
|
7
|
+
const KImage = {
|
|
8
|
+
name: 'KImage',
|
|
8
9
|
props: {
|
|
9
10
|
alt: String,
|
|
10
11
|
src: String,
|
|
@@ -32,7 +33,7 @@ export default {
|
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
35
|
watch: {
|
|
35
|
-
src(
|
|
36
|
+
src() {
|
|
36
37
|
this.reload()
|
|
37
38
|
},
|
|
38
39
|
// origin(origin) {
|
|
@@ -64,7 +65,7 @@ export default {
|
|
|
64
65
|
if ((!src && !origin) || error) return;
|
|
65
66
|
|
|
66
67
|
let showSwitch = ImageGroup != null
|
|
67
|
-
let options = { src, slots: $slots, showPanel, on: { ...$listeners },
|
|
68
|
+
let options = { src, slots: $slots, showPanel, on: { ...$listeners }, global: false, type }
|
|
68
69
|
// { data, src, index }
|
|
69
70
|
if (showSwitch) {
|
|
70
71
|
options.data = ImageGroup.data
|
|
@@ -72,7 +73,7 @@ export default {
|
|
|
72
73
|
options.on.switch = (index) => {
|
|
73
74
|
this.$emit('switch', index)
|
|
74
75
|
if (ImageGroup) {
|
|
75
|
-
let { $slots
|
|
76
|
+
let { $slots } = ImageGroup.$children[index]
|
|
76
77
|
options.slots = $slots
|
|
77
78
|
options.src = ImageGroup.data[index]//$props.origin || $props.src
|
|
78
79
|
this.show(options)
|
|
@@ -84,7 +85,7 @@ export default {
|
|
|
84
85
|
this.show(options);
|
|
85
86
|
} else {
|
|
86
87
|
this.loading = true
|
|
87
|
-
this.
|
|
88
|
+
this.loadImage(origin, () => {
|
|
88
89
|
// this.origins = this.origin
|
|
89
90
|
// this.visible = true
|
|
90
91
|
this.loading = false
|
|
@@ -97,7 +98,7 @@ export default {
|
|
|
97
98
|
}
|
|
98
99
|
e.preventDefault()
|
|
99
100
|
},
|
|
100
|
-
|
|
101
|
+
loadImage(src, callback, err) {
|
|
101
102
|
if (!src) return;
|
|
102
103
|
let image = new Image()
|
|
103
104
|
|
|
@@ -115,7 +116,7 @@ export default {
|
|
|
115
116
|
reload() {
|
|
116
117
|
let { src, placeholder } = this
|
|
117
118
|
if (src) {
|
|
118
|
-
this.
|
|
119
|
+
this.loadImage(src, ({ width, height }) => {
|
|
119
120
|
this.showImg = true
|
|
120
121
|
this.imageUrl = src
|
|
121
122
|
this.error = false
|
|
@@ -160,11 +161,13 @@ export default {
|
|
|
160
161
|
{/* <Preview {...imageProps} /> */}
|
|
161
162
|
{showImg || (!showImg && placeholder) ? <img {...imgProps} /> : null}
|
|
162
163
|
{(!showImg || error) && !placeholder ? <Icon type={IconImage} class="k-image-error" /> : null}
|
|
163
|
-
{loading ? <div class="k-image-loading" key="
|
|
164
|
+
{loading ? <div class="k-image-loading" key="image-loading">
|
|
164
165
|
<Icon type={Sync} spin class="k-image-loading-icon" />
|
|
165
166
|
</div> : null}
|
|
166
|
-
{!loading && !error
|
|
167
|
+
{!loading && !error ? <div class="k-image-preview-mask"><Icon type={EyeOutline} />{t('k.image.preview')}</div> : null}
|
|
167
168
|
{this.$slots.default}
|
|
168
169
|
</div>
|
|
169
170
|
}
|
|
170
|
-
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export default withInstall(KImage)
|