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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Icon from '../icon'
|
|
2
|
-
import { isNotEmpty } from '../
|
|
2
|
+
import { isNotEmpty } from '../utils/element'
|
|
3
3
|
import { Search, CloseCircle, EyeOutline, EyeOffOutline } from 'kui-icons';
|
|
4
|
-
import
|
|
4
|
+
import InputGroup from '../input/inputGroup'
|
|
5
5
|
export default {
|
|
6
6
|
name: "baseInput",
|
|
7
7
|
props: {
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
disabled: Boolean,
|
|
21
21
|
type: {
|
|
22
22
|
validator(value) {
|
|
23
|
-
return (["text", "
|
|
23
|
+
return (["text", "password", "url", "email", "date", "search", "hidden"].indexOf(value) >= 0);
|
|
24
24
|
},
|
|
25
25
|
default: 'text'
|
|
26
26
|
},
|
|
@@ -37,13 +37,11 @@ export default {
|
|
|
37
37
|
return {
|
|
38
38
|
currentValue: this.value,
|
|
39
39
|
isFocus: false,
|
|
40
|
-
// isEnter: false,
|
|
41
40
|
isPassword: !this.visiblePassword,
|
|
42
41
|
};
|
|
43
42
|
},
|
|
44
43
|
inject: {
|
|
45
44
|
Input: { default: null },
|
|
46
|
-
TextArea: { default: null },
|
|
47
45
|
InputNumber: { default: null },
|
|
48
46
|
},
|
|
49
47
|
watch: {
|
|
@@ -55,7 +53,7 @@ export default {
|
|
|
55
53
|
}
|
|
56
54
|
},
|
|
57
55
|
mounted() {
|
|
58
|
-
let textInput = (this.Input || this.
|
|
56
|
+
let textInput = (this.Input || this.InputNumber) || {}
|
|
59
57
|
textInput.focus = (e) => {
|
|
60
58
|
this.$nextTick(() => this.$refs.input.focus(e))
|
|
61
59
|
}
|
|
@@ -66,21 +64,18 @@ export default {
|
|
|
66
64
|
methods: {
|
|
67
65
|
clear() {
|
|
68
66
|
this.setValue({ input: '', output: '' })
|
|
69
|
-
this.$nextTick(
|
|
67
|
+
this.$nextTick(() => this.$refs.input.focus())
|
|
70
68
|
},
|
|
71
69
|
iconClick() {
|
|
72
70
|
!this.disabled && this.$emit("icon-click");
|
|
73
71
|
},
|
|
74
72
|
handleFocus(e) {
|
|
75
73
|
this.isFocus = true
|
|
76
|
-
let
|
|
77
|
-
|
|
74
|
+
let input = this.Input || this.InputNumber
|
|
75
|
+
input && input.$emit('focus', e)
|
|
78
76
|
},
|
|
79
77
|
handleBlur(e) {
|
|
80
|
-
let intput = this.Input || this.TextArea || this.InputNumber
|
|
81
|
-
// console.log('base blur')
|
|
82
78
|
this.$emit('blur', e);
|
|
83
|
-
// intput && intput.$emit('blur', e)
|
|
84
79
|
this.isFocus = false
|
|
85
80
|
},
|
|
86
81
|
handleInput(e) {
|
|
@@ -91,19 +86,15 @@ export default {
|
|
|
91
86
|
output = parser(v)
|
|
92
87
|
}
|
|
93
88
|
|
|
94
|
-
// console.log('output', output)
|
|
95
89
|
|
|
96
90
|
if (output !== '' && formatter) {
|
|
97
91
|
input = formatter(output)
|
|
98
|
-
// e.target.value = v
|
|
99
92
|
}
|
|
100
|
-
// console.log('res', input, output)
|
|
101
93
|
e.target.value = input
|
|
102
94
|
if (input === '') {
|
|
103
95
|
output = ''
|
|
104
96
|
}
|
|
105
97
|
|
|
106
|
-
// e.target.value = e.target.value.replace(/\D/g, '')
|
|
107
98
|
this.setValue({ input, output })
|
|
108
99
|
},
|
|
109
100
|
showPassword() {
|
|
@@ -115,7 +106,7 @@ export default {
|
|
|
115
106
|
setValue({ input, output }) {
|
|
116
107
|
this.currentValue = input
|
|
117
108
|
this.$emit('input', output)
|
|
118
|
-
this.$emit('change', output)
|
|
109
|
+
// this.$emit('change', output)
|
|
119
110
|
},
|
|
120
111
|
|
|
121
112
|
searchEvent() {
|
|
@@ -128,24 +119,23 @@ export default {
|
|
|
128
119
|
|
|
129
120
|
const Password = (this.type == 'password' && visiblePasswordIcon) ? <Icon class="k-input-password-icon" type={!this.isPassword ? EyeOutline : EyeOffOutline} onClick={this.showPassword} /> : null
|
|
130
121
|
|
|
131
|
-
return Password || SearchNode || this.$slots.suffix || (suffix ? <div class=
|
|
122
|
+
return Password || SearchNode || this.$slots.suffix || (suffix ? <div class={[`k-${this.inputType}-suffix`]}>{suffix}</div> : null)
|
|
132
123
|
},
|
|
133
|
-
getTextInput(
|
|
124
|
+
getTextInput(multiple) {
|
|
134
125
|
const { disabled, size, type, inputType, currentValue, id, theme, shape, placeholder } = this
|
|
135
|
-
let isTextArea = inputType == 'textarea'
|
|
136
126
|
const props = {
|
|
137
127
|
domProps: {
|
|
138
128
|
value: currentValue
|
|
139
129
|
},
|
|
140
130
|
class: [
|
|
141
131
|
{
|
|
142
|
-
[`k-${inputType}`]: !
|
|
143
|
-
[`k-${inputType}-text`]:
|
|
132
|
+
[`k-${inputType}`]: !multiple,
|
|
133
|
+
[`k-${inputType}-text`]: multiple,
|
|
144
134
|
[`k-${inputType}-disabled`]: disabled,
|
|
145
|
-
[`k-${inputType}-sm`]: size == 'small' && !
|
|
146
|
-
[`k-${inputType}-lg`]: size == 'large' && !
|
|
147
|
-
[`k-${inputType}-${theme}`]: theme != 'solid' && !
|
|
148
|
-
[`k-${inputType}-circle`]: shape == 'circle' && !
|
|
135
|
+
[`k-${inputType}-sm`]: size == 'small' && !multiple,
|
|
136
|
+
[`k-${inputType}-lg`]: size == 'large' && !multiple,
|
|
137
|
+
[`k-${inputType}-${theme}`]: theme != 'solid' && !multiple && theme,
|
|
138
|
+
[`k-${inputType}-circle`]: shape == 'circle' && !multiple,
|
|
149
139
|
}
|
|
150
140
|
],
|
|
151
141
|
ref: 'input',
|
|
@@ -161,29 +151,24 @@ export default {
|
|
|
161
151
|
}
|
|
162
152
|
}
|
|
163
153
|
|
|
164
|
-
|
|
165
|
-
props.attrs.type = type
|
|
154
|
+
props.attrs.type = type
|
|
166
155
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
156
|
+
if (!this.isPassword && type == 'password') {
|
|
157
|
+
props.attrs.type = 'text'
|
|
170
158
|
}
|
|
171
|
-
return
|
|
159
|
+
return (<input {...props} single />)
|
|
172
160
|
},
|
|
173
161
|
},
|
|
174
162
|
render() {
|
|
175
163
|
const { inputType, icon, $slots, size, disabled, type, $listeners, clearable, suffix, theme, prefix, shape } = this
|
|
176
164
|
|
|
177
|
-
let
|
|
178
|
-
let
|
|
165
|
+
let multiple = (icon || ('search' in $listeners) || $slots.suffix || suffix || $slots.prefix || prefix || type == 'password' || clearable || $slots.controls) && type !== 'hidden'
|
|
166
|
+
let textInput = this.getTextInput(multiple)
|
|
179
167
|
|
|
180
|
-
|
|
168
|
+
if (!multiple) return textInput;
|
|
181
169
|
|
|
182
|
-
if (isTextArea || !mult)
|
|
183
|
-
return textInput
|
|
184
170
|
|
|
185
|
-
let { isFocus,
|
|
186
|
-
// let clearableShow = clearable && (isFocus || isEnter) && isNotEmpty(currentValue)
|
|
171
|
+
let { isFocus, currentValue } = this
|
|
187
172
|
let clearableShow = clearable && isNotEmpty(currentValue)
|
|
188
173
|
const props = {
|
|
189
174
|
class: {
|
|
@@ -193,12 +178,8 @@ export default {
|
|
|
193
178
|
[`k-${inputType}-sm`]: size == 'small',
|
|
194
179
|
[`k-${inputType}-lg`]: size == 'large',
|
|
195
180
|
[`k-${inputType}-${theme}`]: theme && theme != 'solid',
|
|
196
|
-
[`k-${inputType}-circle`]: shape == 'circle'
|
|
181
|
+
[`k-${inputType}-circle`]: shape == 'circle',
|
|
197
182
|
},
|
|
198
|
-
// on: {
|
|
199
|
-
// mouseenter: () => this.isEnter = true,
|
|
200
|
-
// mouseleave: () => this.isEnter = false
|
|
201
|
-
// }
|
|
202
183
|
}
|
|
203
184
|
const suffixNode = this.getSuffix()
|
|
204
185
|
const prefixNode = (prefix ? <div class={`k-${inputType}-prefix`}>{prefix}</div> : null)
|
|
@@ -211,7 +192,7 @@ export default {
|
|
|
211
192
|
{textInput}
|
|
212
193
|
{clearable ? <Icon type={CloseCircle} class={[`k-${inputType}-clearable`, { [`k-${inputType}-clearable-hidden`]: !clearableShow }]} onClick={this.clear} /> : null}
|
|
213
194
|
{/* {suffixNode} */}
|
|
214
|
-
{$slots.
|
|
195
|
+
{$slots.controls}
|
|
215
196
|
</div >
|
|
216
197
|
{$slots.suffix ? <div class={{ "k-input-group-suffix": true }}>{$slots.suffix}</div> : null}
|
|
217
198
|
</InputGroup>
|
|
@@ -222,7 +203,7 @@ export default {
|
|
|
222
203
|
{textInput}
|
|
223
204
|
{clearable ? <Icon type={CloseCircle} class={[`k-${inputType}-clearable`, { [`k-${inputType}-clearable-hidden`]: !clearableShow }]} onClick={this.clear} /> : null}
|
|
224
205
|
{suffixNode}
|
|
225
|
-
{$slots.
|
|
206
|
+
{$slots.controls}
|
|
226
207
|
</div >
|
|
227
208
|
}
|
|
228
209
|
}
|
package/components/base/pop.jsx
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Button } from "../button";
|
|
2
2
|
import Icon from "../icon";
|
|
3
|
-
import {
|
|
4
|
-
import cloneVNode from '../
|
|
3
|
+
import { getChildren } from "../utils/element";
|
|
4
|
+
import cloneVNode from '../utils/clone'
|
|
5
5
|
import Drop from './drop'
|
|
6
6
|
import { t } from "../locale";
|
|
7
7
|
import { HelpCircle } from 'kui-icons'
|
|
8
|
+
import { isColor } from "../utils/color";
|
|
9
|
+
import { colors, placements } from "../const/var";
|
|
8
10
|
export default {
|
|
9
11
|
name: 'BasePop',
|
|
10
12
|
props: {
|
|
@@ -21,9 +23,7 @@ export default {
|
|
|
21
23
|
offsetLeft: { type: Number, default: 0 },
|
|
22
24
|
placement: {
|
|
23
25
|
validator(value) {
|
|
24
|
-
return (
|
|
25
|
-
["top", "top-left", "top-right", "bottom", "bottom-left", "bottom-right", "left", "left-bottom", "left-top", "right", "right-top", "right-bottom"].indexOf(value) >= 0
|
|
26
|
-
);
|
|
26
|
+
return placements.includes(value);
|
|
27
27
|
},
|
|
28
28
|
default: "top"
|
|
29
29
|
},
|
|
@@ -31,7 +31,8 @@ export default {
|
|
|
31
31
|
cancelText: String,
|
|
32
32
|
updateKey: [String, Object, Array],
|
|
33
33
|
show: Boolean,
|
|
34
|
-
isMenu: { type: Boolean, default: false }
|
|
34
|
+
isMenu: { type: Boolean, default: false },
|
|
35
|
+
extendWidth: Boolean,
|
|
35
36
|
},
|
|
36
37
|
data() {
|
|
37
38
|
return {
|
|
@@ -69,7 +70,7 @@ export default {
|
|
|
69
70
|
}
|
|
70
71
|
this.$emit('mouseenter', e)
|
|
71
72
|
},
|
|
72
|
-
mouseLeave(
|
|
73
|
+
mouseLeave() {
|
|
73
74
|
if (this.trigger == 'hover' &&
|
|
74
75
|
!this.confirm &&
|
|
75
76
|
this.opened
|
|
@@ -104,12 +105,12 @@ export default {
|
|
|
104
105
|
this.$emit('click', e)
|
|
105
106
|
},
|
|
106
107
|
renderPopup() {
|
|
107
|
-
let { placement, trigger, title, preCls, $slots,
|
|
108
|
+
let { placement, trigger, title, preCls, $slots, color, updateKey } = this, childNode;
|
|
108
109
|
|
|
109
110
|
let okText = this.okText || t('k.pop.ok')
|
|
110
111
|
let cancelText = this.cancelText || t('k.pop.cancel')
|
|
111
112
|
if (this.showPlacementArrow) {
|
|
112
|
-
title = title ||
|
|
113
|
+
title = title || getChildren($slots.title)
|
|
113
114
|
let titleNode, contentNode, footerNode;
|
|
114
115
|
if (this.confirm) {
|
|
115
116
|
contentNode = [<Icon type={HelpCircle} />, <div class={`k-${preCls}-title`}>{title}</div>]
|
|
@@ -126,12 +127,14 @@ export default {
|
|
|
126
127
|
if (!titleNode && !contentNode && !footerNode) {
|
|
127
128
|
childNode = null
|
|
128
129
|
} else {
|
|
130
|
+
let resultColor = isColor(color) ? (colors.includes(color) ? `var(--kui-color-${color})` : color) : null
|
|
129
131
|
childNode = [
|
|
130
|
-
<div class={`k-${preCls}-content`} style={{ backgroundColor:
|
|
132
|
+
<div class={`k-${preCls}-content`} style={{ backgroundColor: resultColor }}>
|
|
131
133
|
{[titleNode, contentNode, footerNode]}
|
|
132
|
-
<div class={`k-${preCls}-arrow`}>
|
|
133
|
-
<svg style={{ fill:
|
|
134
|
-
<path d="
|
|
134
|
+
<div class={`k-${preCls}-arrow`} style={{ color: resultColor }}>
|
|
135
|
+
<svg style={{ fill: isColor(color) ? (colors.includes(color) ? `var(--kui-color-${color})` : color) : "currentcolor" }} viewBox="0 0 24 8">
|
|
136
|
+
<path id="ot" d="m24,0.97087l0,1c-4,0 -5.5,1 -7.5,3c-2,2 -2.5,3 -4.5,3c-2,0 -2.5,-1 -4.5,-3c-2,-2 -3.5,-3 -7.5,-3l0,-1l24,0z" />
|
|
137
|
+
<path stroke="currentcolor" id="in" d="m24,0l0,1c-4,0 -5.5,1 -7.5,3c-2,2 -2.5,3 -4.5,3c-2,0 -2.5,-1 -4.5,-3c-2,-2 -3.5,-3 -7.5,-3l0,-1l24,0z" />
|
|
135
138
|
</svg>
|
|
136
139
|
</div>
|
|
137
140
|
</div>]
|
|
@@ -151,8 +154,8 @@ export default {
|
|
|
151
154
|
offsetLeft: this.offsetLeft,
|
|
152
155
|
value: this.opened,
|
|
153
156
|
className: [`k-${preCls}`, {
|
|
154
|
-
[`k-${preCls}-${color}`]:
|
|
155
|
-
[`k-${preCls}-has-color`]:
|
|
157
|
+
[`k-${preCls}-${color}`]: colors.includes(color),
|
|
158
|
+
[`k-${preCls}-has-color`]: isColor(color),
|
|
156
159
|
[`k-${preCls}-has-arrow`]: this.showPlacementArrow,
|
|
157
160
|
[`k-${preCls}-dark`]: this.dark
|
|
158
161
|
}],
|
|
@@ -162,7 +165,8 @@ export default {
|
|
|
162
165
|
updateKey,
|
|
163
166
|
color,
|
|
164
167
|
trigger,
|
|
165
|
-
transitionName: `k-${preCls}
|
|
168
|
+
transitionName: `k-${preCls}`,
|
|
169
|
+
extendWidth: this.extendWidth
|
|
166
170
|
},
|
|
167
171
|
on: {
|
|
168
172
|
mouseenter: e => {
|
|
@@ -193,7 +197,7 @@ export default {
|
|
|
193
197
|
|
|
194
198
|
render() {
|
|
195
199
|
let { $slots } = this
|
|
196
|
-
let vNode =
|
|
200
|
+
let vNode = getChildren($slots.default)[0]
|
|
197
201
|
let popup = this.renderPopup()
|
|
198
202
|
let props = {}
|
|
199
203
|
if (!this.isMenu) {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { withInstall } from '../utils/vue'
|
|
2
|
+
import { getChildren } from '../utils/element'
|
|
3
|
+
|
|
4
|
+
const Breadcrumb = {
|
|
3
5
|
name: 'Breadcrumb',
|
|
4
6
|
render() {
|
|
5
7
|
return (
|
|
6
8
|
<div class="k-breadcrumb">
|
|
7
|
-
{
|
|
9
|
+
{getChildren(this.$slots.default)}
|
|
8
10
|
</div>
|
|
9
11
|
)
|
|
10
12
|
}
|
|
11
13
|
}
|
|
14
|
+
export default withInstall(Breadcrumb);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Icon from "../icon";
|
|
2
|
-
|
|
2
|
+
import { withInstall } from '../utils/vue'
|
|
3
|
+
const BreadcrumbItem = {
|
|
3
4
|
name: 'BreadcrumbItem',
|
|
4
5
|
props: {
|
|
5
6
|
separator: { type: String, default: '/' },
|
|
@@ -24,4 +25,5 @@ export default {
|
|
|
24
25
|
</span>
|
|
25
26
|
)
|
|
26
27
|
}
|
|
27
|
-
}
|
|
28
|
+
}
|
|
29
|
+
export default withInstall(BreadcrumbItem)
|
|
@@ -1,87 +1,126 @@
|
|
|
1
|
-
import Icon from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import Icon from "../icon";
|
|
2
|
+
import { Loading } from "kui-icons";
|
|
3
|
+
import { getChildren } from "../utils/element";
|
|
4
|
+
import { colors } from "../const/var";
|
|
5
|
+
import { withInstall } from "../utils/vue";
|
|
6
|
+
const Button = {
|
|
5
7
|
name: "Button",
|
|
8
|
+
inject: {
|
|
9
|
+
parentSize: {
|
|
10
|
+
from: "size",
|
|
11
|
+
default: null,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
6
14
|
props: {
|
|
7
15
|
htmlType: {
|
|
16
|
+
type: String,
|
|
8
17
|
default: "button",
|
|
9
18
|
validator(value) {
|
|
10
|
-
return ["button", "submit", "reset"].
|
|
11
|
-
}
|
|
19
|
+
return ["button", "submit", "reset"].includes(value);
|
|
20
|
+
},
|
|
12
21
|
},
|
|
13
22
|
icon: [String, Array],
|
|
14
23
|
block: Boolean,
|
|
15
24
|
size: {
|
|
16
|
-
|
|
25
|
+
type: String,
|
|
17
26
|
validator(value) {
|
|
18
|
-
return ["small", "large", "default"].
|
|
19
|
-
}
|
|
27
|
+
return ["small", "large", "default"].includes(value);
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
color: {
|
|
31
|
+
type: String,
|
|
32
|
+
validator(value) {
|
|
33
|
+
return colors.includes(value);
|
|
34
|
+
},
|
|
20
35
|
},
|
|
21
36
|
loading: Boolean,
|
|
22
37
|
type: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "default",
|
|
23
40
|
validator(value) {
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
41
|
+
return [
|
|
42
|
+
"primary",
|
|
43
|
+
"danger",
|
|
44
|
+
"warning",
|
|
45
|
+
"default",
|
|
46
|
+
"text",
|
|
47
|
+
"link",
|
|
48
|
+
].includes(value);
|
|
27
49
|
},
|
|
28
|
-
default: 'default'
|
|
29
50
|
},
|
|
30
51
|
disabled: Boolean,
|
|
31
52
|
theme: {
|
|
32
53
|
type: String,
|
|
33
|
-
default:
|
|
54
|
+
default: "default",
|
|
34
55
|
validator(value) {
|
|
35
|
-
return [
|
|
36
|
-
}
|
|
56
|
+
return ["default", "outline", "solid", "light", "dashed", "card"].includes(value);
|
|
57
|
+
},
|
|
37
58
|
},
|
|
38
59
|
shape: String,
|
|
39
60
|
href: String,
|
|
40
|
-
target: String
|
|
61
|
+
target: String,
|
|
41
62
|
},
|
|
42
|
-
methods: {
|
|
43
|
-
click(e) {
|
|
44
|
-
if (!this.loading) {
|
|
45
|
-
this.$emit('click', e)
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
63
|
render() {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
const onlyIcon = !
|
|
64
|
+
const size = this.size || this.parentSize;
|
|
65
|
+
const children = getChildren(this.$slots.default);
|
|
66
|
+
const onlyIcon = !children?.length && (this.icon || this.loading);
|
|
67
|
+
|
|
54
68
|
const classes = [
|
|
55
69
|
"k-btn",
|
|
56
70
|
{
|
|
57
|
-
[`k-btn-${type}`]: !!type
|
|
58
|
-
["k-btn-
|
|
59
|
-
["k-btn-
|
|
60
|
-
["k-btn-
|
|
71
|
+
[`k-btn-${this.type}`]: !!this.type,
|
|
72
|
+
["k-btn-outline"]: this.theme === "outline",
|
|
73
|
+
["k-btn-sm"]: size === "small",
|
|
74
|
+
["k-btn-block"]: !!this.block,
|
|
75
|
+
["k-btn-loading"]: this.loading,
|
|
61
76
|
["k-btn-icon-only"]: onlyIcon,
|
|
62
|
-
[
|
|
63
|
-
["k-btn-
|
|
64
|
-
[
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
77
|
+
[`k-btn-color-${this.color}`]: colors.includes(this.color),
|
|
78
|
+
["k-btn-lg"]: size === "large",
|
|
79
|
+
["k-btn-circle"]: this.shape === "circle",
|
|
80
|
+
[`k-btn-${this.theme}`]: !!this.theme && this.theme !== "default",
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
let childNodes = [];
|
|
85
|
+
|
|
86
|
+
const iconType = this.loading ? Loading : this.icon;
|
|
87
|
+
if (iconType) {
|
|
88
|
+
childNodes.push(<Icon type={iconType} spin={this.loading} />);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const childNode = children?.map((c) => {
|
|
92
|
+
return typeof c.children === "string"
|
|
93
|
+
? <span>{c.children.trim()}</span>
|
|
94
|
+
: c;
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
childNodes = childNodes.concat(childNode);
|
|
98
|
+
|
|
99
|
+
const propsObj = {
|
|
100
|
+
attrs: {
|
|
101
|
+
disabled: this.disabled,
|
|
102
|
+
type: this.htmlType,
|
|
103
|
+
href: this.href,
|
|
104
|
+
target: this.target,
|
|
105
|
+
},
|
|
69
106
|
class: classes,
|
|
70
107
|
on: {
|
|
71
|
-
|
|
72
|
-
click:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
{
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
};
|
|
108
|
+
...this.$listeners,
|
|
109
|
+
click: (e) => {
|
|
110
|
+
if (this.loading || this.disabled) {
|
|
111
|
+
return
|
|
112
|
+
}
|
|
113
|
+
this.$emit('click', e)
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return this.type === "link" && this.href ? (
|
|
119
|
+
<a {...propsObj}>{childNodes}</a>
|
|
120
|
+
) : (
|
|
121
|
+
<button {...propsObj}>{childNodes}</button>
|
|
122
|
+
);
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export default withInstall(Button);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getChildren } from '../utils/element'
|
|
2
|
+
import { withInstall } from '../utils/vue'
|
|
3
|
+
const ButtonGroup = {
|
|
3
4
|
name: "ButtonGroup",
|
|
4
5
|
props: {
|
|
5
6
|
size: {
|
|
@@ -29,9 +30,10 @@ export default {
|
|
|
29
30
|
render() {
|
|
30
31
|
return (
|
|
31
32
|
<div class={this.classes}>
|
|
32
|
-
{
|
|
33
|
+
{getChildren(this.$slots.default)}
|
|
33
34
|
</div>
|
|
34
35
|
)
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
38
|
|
|
39
|
+
export default withInstall(ButtonGroup);
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<Space>
|
|
9
|
+
<Button>Default</Button>
|
|
9
10
|
<Button type="primary">Primary</Button>
|
|
10
11
|
<Button type="danger">Danger</Button>
|
|
11
12
|
<Button type="warning">Warning</Button>
|
|
12
|
-
<Button>
|
|
13
|
-
<Button type="
|
|
14
|
-
<Button type="link">Link</Button>
|
|
13
|
+
<Button type="text">Text</Button>
|
|
14
|
+
<Button type="link" href="https://k-ui.cn" target="_blank">Link</Button>
|
|
15
15
|
</Space>
|
|
16
16
|
</template>
|
|
17
17
|
```
|
|
@@ -9,7 +9,7 @@ block 属性将使按钮适合其父宽度。
|
|
|
9
9
|
<Button type="primary" block>Primary</Button>
|
|
10
10
|
<Button type="danger" block>Danger</Button>
|
|
11
11
|
<Button block>Default</Button>
|
|
12
|
-
<Button type="
|
|
12
|
+
<Button type="text" block>Text</Button>
|
|
13
13
|
<Button type="link" block>Link</Button>
|
|
14
14
|
</Space>
|
|
15
15
|
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<cn>
|
|
2
|
+
#### 多彩
|
|
3
|
+
使用 `color` 可以衍生出更多的变体按钮。
|
|
4
|
+
</cn>
|
|
5
|
+
|
|
6
|
+
```vue
|
|
7
|
+
<template>
|
|
8
|
+
<Flex size="small" wrap>
|
|
9
|
+
<Flex size="small" wrap>
|
|
10
|
+
<Button v-for="color in colors" :color="color" :key="color" theme="solid">Solid</Button>
|
|
11
|
+
</Flex>
|
|
12
|
+
<Flex size="small" wrap>
|
|
13
|
+
<Button v-for="color in colors" :color="color" :key="color" theme="outline">Outline</Button>
|
|
14
|
+
</Flex>
|
|
15
|
+
<Flex size="small" wrap>
|
|
16
|
+
<Button v-for="color in colors" :color="color" :key="color" theme="dashed">Dashed</Button>
|
|
17
|
+
</Flex>
|
|
18
|
+
</Flex>
|
|
19
|
+
</template>
|
|
20
|
+
<script>
|
|
21
|
+
const colors = ['default', 'red', 'orange', 'yellow', 'olive', 'green', 'teal', 'blue', 'volcano', 'violet', 'cyan', 'gold', 'lime', 'magenta', 'purple', 'pink', 'brown', 'gray']
|
|
22
|
+
export default {
|
|
23
|
+
data () {
|
|
24
|
+
return {
|
|
25
|
+
colors
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
```
|
|
@@ -3,12 +3,12 @@ import Info from './info.md'
|
|
|
3
3
|
import Base from './base.md'
|
|
4
4
|
import Disabled from './disabled.md'
|
|
5
5
|
import Size from './size.md'
|
|
6
|
-
import
|
|
7
|
-
import Normal from './normal.md'
|
|
6
|
+
import Outline from './outline.md'
|
|
8
7
|
import Light from './light.md'
|
|
9
8
|
import WithIcon from './with-icon.md'
|
|
10
9
|
import Loading from './loading.md'
|
|
11
10
|
import Block from './block.md'
|
|
11
|
+
import Color from './color.md'
|
|
12
12
|
import Group from './group.md'
|
|
13
13
|
import CN from '../index.md'
|
|
14
14
|
export default {
|
|
@@ -17,9 +17,9 @@ export default {
|
|
|
17
17
|
<div class="demo-button">
|
|
18
18
|
<Info />
|
|
19
19
|
<Base />
|
|
20
|
-
<
|
|
20
|
+
<Outline />
|
|
21
|
+
<Color />
|
|
21
22
|
<Light />
|
|
22
|
-
<Normal />
|
|
23
23
|
<WithIcon />
|
|
24
24
|
<Size />
|
|
25
25
|
<Disabled />
|