bkui-vue 0.0.1-beta.1 → 0.0.1-beta.13
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.txt +22 -0
- package/README.md +55 -0
- package/dist/bkui-vue.cjs.js +9957 -257
- package/dist/bkui-vue.esm.js +9919 -257
- package/dist/bkui-vue.umd.js +9967 -267
- package/dist/style.css +4010 -428
- package/lib/alert/alert.css +75 -0
- package/lib/alert/alert.d.ts +53 -0
- package/lib/alert/alert.less +110 -0
- package/lib/alert/alert.variable.css +161 -0
- package/lib/alert/index.d.ts +144 -0
- package/lib/alert/index.js +1 -0
- package/lib/animate-number/animate-number.d.ts +22 -0
- package/lib/animate-number/index.d.ts +77 -0
- package/lib/animate-number/index.js +1 -0
- package/lib/backtop/backtop.css +42 -0
- package/lib/backtop/backtop.d.ts +46 -0
- package/lib/backtop/backtop.less +18 -0
- package/lib/backtop/backtop.variable.css +128 -0
- package/lib/backtop/index.d.ts +110 -0
- package/lib/backtop/index.js +1 -0
- package/lib/badge/badge.css +121 -0
- package/lib/badge/badge.d.ts +70 -0
- package/lib/badge/badge.less +137 -0
- package/lib/badge/badge.variable.css +207 -0
- package/lib/badge/index.d.ts +149 -0
- package/lib/badge/index.js +1 -0
- package/lib/breadcrumb/breadcrumb-item.d.ts +32 -0
- package/lib/breadcrumb/breadcrumb.css +59 -0
- package/lib/breadcrumb/breadcrumb.d.ts +26 -0
- package/lib/breadcrumb/breadcrumb.less +54 -0
- package/lib/breadcrumb/breadcrumb.variable.css +145 -0
- package/lib/breadcrumb/index.d.ts +122 -0
- package/lib/breadcrumb/index.js +1 -0
- package/lib/breadcrumb/props.d.ts +4 -0
- package/lib/button/button-group.d.ts +8 -0
- package/lib/button/button.css +242 -22
- package/lib/button/button.d.ts +114 -0
- package/lib/button/button.less +180 -36
- package/lib/button/button.variable.css +339 -0
- package/lib/button/index.d.ts +170 -0
- package/lib/button/index.js +1 -206
- package/lib/card/card.css +63 -0
- package/lib/card/card.d.ts +54 -0
- package/lib/card/card.less +44 -0
- package/lib/card/card.variable.css +149 -0
- package/lib/card/index.d.ts +127 -0
- package/lib/card/index.js +1 -0
- package/lib/checkbox/checkbox-group.d.ts +44 -0
- package/lib/checkbox/checkbox.css +54 -125
- package/lib/checkbox/checkbox.d.ts +105 -0
- package/lib/checkbox/checkbox.less +66 -6
- package/lib/checkbox/checkbox.variable.css +150 -0
- package/lib/checkbox/common.d.ts +13 -0
- package/lib/checkbox/index.d.ts +221 -0
- package/lib/checkbox/index.js +1 -64
- package/lib/checkbox/type.d.ts +19 -0
- package/lib/collapse/collapse.css +30 -0
- package/lib/collapse/collapse.d.ts +74 -0
- package/lib/collapse/collapse.less +37 -0
- package/lib/collapse/collapse.variable.css +30 -0
- package/lib/collapse/index.d.ts +130 -0
- package/lib/collapse/index.js +1 -0
- package/lib/components.d.ts +31 -0
- package/lib/date-picker/date-picker.css +407 -0
- package/lib/date-picker/date-picker.d.ts +357 -0
- package/lib/date-picker/date-picker.less +526 -0
- package/lib/date-picker/date-picker.variable.css +493 -0
- package/lib/date-picker/fecha.d.ts +6 -0
- package/lib/date-picker/index.d.ts +525 -0
- package/lib/date-picker/index.js +1 -0
- package/lib/date-picker/interface.d.ts +22 -0
- package/lib/date-picker/utils.d.ts +97 -0
- package/lib/dialog/dialog.css +68 -0
- package/lib/dialog/dialog.d.ts +83 -0
- package/lib/dialog/dialog.less +80 -0
- package/lib/dialog/dialog.variable.css +68 -0
- package/lib/dialog/index.d.ts +183 -0
- package/lib/dialog/index.js +1 -0
- package/lib/directives/clickoutside.d.ts +23 -0
- package/lib/directives/index.d.ts +3 -0
- package/lib/directives/index.js +15 -0
- package/lib/directives/mousewheel.d.ts +3 -0
- package/lib/directives/tooltips.d.ts +17 -0
- package/lib/divider/divider.css +38 -0
- package/lib/divider/divider.d.ts +40 -0
- package/lib/divider/divider.less +53 -0
- package/lib/divider/divider.variable.css +124 -0
- package/lib/divider/index.d.ts +110 -0
- package/lib/divider/index.js +1 -0
- package/lib/dropdown/dropdown-item.d.ts +18 -0
- package/lib/dropdown/dropdown-menu.d.ts +15 -0
- package/lib/dropdown/dropdown.css +43 -0
- package/lib/dropdown/dropdown.d.ts +49 -0
- package/lib/dropdown/dropdown.less +54 -0
- package/lib/dropdown/dropdown.variable.css +129 -0
- package/lib/dropdown/index.d.ts +160 -0
- package/lib/dropdown/index.js +1 -0
- package/lib/exception/exception.css +32 -0
- package/lib/exception/exception.d.ts +24 -0
- package/lib/exception/exception.less +39 -0
- package/lib/exception/exception.variable.css +118 -0
- package/lib/exception/index.d.ts +88 -0
- package/lib/exception/index.js +1 -0
- package/lib/fixed-navbar/fixed-navbar.css +42 -0
- package/lib/fixed-navbar/fixed-navbar.d.ts +28 -0
- package/lib/fixed-navbar/fixed-navbar.less +53 -0
- package/lib/fixed-navbar/fixed-navbar.variable.css +128 -0
- package/lib/fixed-navbar/index.d.ts +88 -0
- package/lib/fixed-navbar/index.js +1 -0
- package/lib/form/common.d.ts +3 -0
- package/lib/form/form-item.d.ts +140 -0
- package/lib/form/form.css +39 -0
- package/lib/form/form.d.ts +76 -0
- package/lib/form/form.less +50 -0
- package/lib/form/form.variable.css +39 -0
- package/lib/form/index.d.ts +4 -0
- package/lib/form/index.js +1 -0
- package/lib/form/type.d.ts +21 -0
- package/lib/form/validator.d.ts +8 -0
- package/lib/icon/angle-double-left.d.ts +4 -0
- package/lib/icon/angle-double-right.d.ts +4 -0
- package/lib/icon/angle-down-line.d.ts +4 -0
- package/lib/icon/angle-down.d.ts +4 -0
- package/lib/icon/angle-left.d.ts +4 -0
- package/lib/icon/angle-right.d.ts +4 -0
- package/lib/icon/angle-up.d.ts +4 -0
- package/lib/icon/circle.d.ts +4 -0
- package/lib/icon/close.d.ts +4 -0
- package/lib/icon/code.d.ts +4 -0
- package/lib/icon/cog-shape.d.ts +4 -0
- package/lib/icon/collapse-left.d.ts +4 -0
- package/lib/icon/copy.d.ts +4 -0
- package/lib/icon/done.d.ts +4 -0
- package/lib/icon/down-shape.d.ts +4 -0
- package/lib/icon/down-small.d.ts +4 -0
- package/lib/icon/error.d.ts +4 -0
- package/lib/icon/eye.d.ts +4 -0
- package/lib/icon/folder-open.d.ts +4 -0
- package/lib/icon/folder-shape-open.d.ts +4 -0
- package/lib/icon/folder-shape.d.ts +4 -0
- package/lib/icon/folder.d.ts +4 -0
- package/lib/icon/help-document-fill.d.ts +4 -0
- package/lib/icon/help-fill.d.ts +4 -0
- package/lib/icon/help.d.ts +4 -0
- package/lib/icon/icon.d.ts +12 -0
- package/lib/icon/index.d.ts +38 -0
- package/lib/icon/index.js +15 -0
- package/lib/icon/info-line.d.ts +4 -0
- package/lib/icon/info.d.ts +4 -0
- package/lib/icon/play-shape.d.ts +4 -0
- package/lib/icon/plus.d.ts +4 -0
- package/lib/icon/right-shape.d.ts +4 -0
- package/lib/icon/search.d.ts +4 -0
- package/lib/icon/share.d.ts +4 -0
- package/lib/icon/success.d.ts +4 -0
- package/lib/icon/switcher-loading.d.ts +4 -0
- package/lib/icon/text-file.d.ts +4 -0
- package/lib/icon/tree-application-shape.d.ts +4 -0
- package/lib/icon/unvisible.d.ts +4 -0
- package/lib/icon/warn.d.ts +4 -0
- package/lib/index.d.ts +3 -0
- package/lib/input/index.d.ts +275 -0
- package/lib/input/index.js +15 -60
- package/lib/input/input.css +114 -148
- package/lib/input/input.d.ts +185 -0
- package/lib/input/input.less +107 -40
- package/lib/input/input.variable.css +218 -0
- package/lib/link/index.d.ts +116 -0
- package/lib/link/index.js +1 -0
- package/lib/link/link.css +55 -0
- package/lib/link/link.d.ts +46 -0
- package/lib/link/link.less +74 -0
- package/lib/link/link.variable.css +141 -0
- package/lib/loading/index.d.ts +125 -0
- package/lib/loading/index.js +1 -0
- package/lib/loading/loading.css +225 -0
- package/lib/loading/loading.d.ts +64 -0
- package/lib/loading/loading.less +181 -0
- package/lib/loading/loading.variable.css +311 -0
- package/lib/menu/index.d.ts +169 -0
- package/lib/menu/index.js +1 -0
- package/lib/menu/menu-group.d.ts +13 -0
- package/lib/menu/menu-item.d.ts +15 -0
- package/lib/menu/menu.css +182 -0
- package/lib/menu/menu.d.ts +60 -0
- package/lib/menu/menu.less +180 -0
- package/lib/menu/menu.variable.css +268 -0
- package/lib/menu/submenu.d.ts +21 -0
- package/lib/menu/submenu.less +5 -0
- package/lib/menu/submenu.variable.css +86 -0
- package/lib/menu/utils.d.ts +41 -0
- package/lib/message/index.d.ts +2 -0
- package/lib/message/index.js +1 -0
- package/lib/message/message.css +53 -0
- package/lib/message/message.less +61 -0
- package/lib/message/message.variable.css +139 -0
- package/lib/message/messageConstructor.d.ts +61 -0
- package/lib/modal/index.d.ts +155 -0
- package/lib/modal/index.js +1 -0
- package/lib/modal/modal.css +11 -0
- package/lib/modal/modal.d.ts +47 -0
- package/lib/modal/modal.less +12 -0
- package/lib/modal/modal.variable.css +11 -0
- package/lib/modal/props.mixin.d.ts +22 -0
- package/lib/navigation/index.d.ts +2 -0
- package/lib/navigation/index.js +1 -0
- package/lib/navigation/navigation-title.d.ts +22 -0
- package/lib/navigation/navigation.css +184 -0
- package/lib/navigation/navigation.d.ts +94 -0
- package/lib/navigation/navigation.less +210 -0
- package/lib/navigation/navigation.variable.css +270 -0
- package/lib/notify/index.d.ts +2 -0
- package/lib/notify/index.js +1 -0
- package/lib/notify/notify.css +49 -0
- package/lib/notify/notify.less +58 -0
- package/lib/notify/notify.variable.css +135 -0
- package/lib/notify/notifyConstructor.d.ts +75 -0
- package/lib/popover/index.d.ts +202 -0
- package/lib/popover/index.js +1 -0
- package/lib/popover/popover.css +55 -0
- package/lib/popover/popover.d.ts +88 -0
- package/lib/popover/popover.less +70 -0
- package/lib/popover/popover.variable.css +141 -0
- package/lib/preset.d.ts +8 -0
- package/lib/progress/circle.d.ts +6 -0
- package/lib/progress/index.d.ts +228 -0
- package/lib/progress/index.js +1 -0
- package/lib/progress/line.d.ts +6 -0
- package/lib/progress/progress.css +97 -0
- package/lib/progress/progress.d.ts +118 -0
- package/lib/progress/progress.less +94 -0
- package/lib/progress/progress.variable.css +183 -0
- package/lib/radio/common.d.ts +13 -0
- package/lib/radio/index.d.ts +228 -0
- package/lib/radio/index.js +1 -61
- package/lib/radio/radio-button.d.ts +83 -0
- package/lib/radio/radio-group.d.ts +40 -0
- package/lib/radio/radio.css +128 -125
- package/lib/radio/radio.d.ts +77 -0
- package/lib/radio/radio.less +173 -20
- package/lib/radio/radio.variable.css +224 -0
- package/lib/radio/type.d.ts +9 -0
- package/lib/rate/index.d.ts +101 -0
- package/lib/rate/index.js +1 -0
- package/lib/rate/rate.css +10 -0
- package/lib/rate/rate.d.ts +29 -0
- package/lib/rate/rate.less +11 -0
- package/lib/rate/rate.variable.css +10 -0
- package/lib/rate/star.css +24 -0
- package/lib/rate/star.d.ts +57 -0
- package/lib/rate/star.less +29 -0
- package/lib/rate/star.variable.css +24 -0
- package/lib/select/common.d.ts +28 -0
- package/lib/select/index.d.ts +950 -0
- package/lib/select/index.js +15 -0
- package/lib/select/option.d.ts +32 -0
- package/lib/select/optionGroup.d.ts +115 -0
- package/lib/select/select.css +157 -0
- package/lib/select/select.d.ts +285 -0
- package/lib/select/select.less +203 -0
- package/lib/select/select.variable.css +243 -0
- package/lib/shared/bk-helper-core.d.ts +87 -0
- package/lib/shared/bk-mask-manager.d.ts +47 -0
- package/lib/shared/bk-pop-manager.d.ts +19 -0
- package/lib/shared/bk-popover.d.ts +86 -0
- package/lib/shared/index.d.ts +51 -0
- package/lib/shared/index.js +1 -13
- package/lib/shared/scrollbar-width.d.ts +1 -0
- package/lib/shared/vue-types.d.ts +115 -0
- package/lib/shared/z-index-manager.d.ts +93 -0
- package/lib/sideslider/index.d.ts +139 -0
- package/lib/sideslider/index.js +1 -0
- package/lib/sideslider/sideslider.css +69 -0
- package/lib/sideslider/sideslider.d.ts +54 -0
- package/lib/sideslider/sideslider.less +86 -0
- package/lib/sideslider/sideslider.variable.css +155 -0
- package/lib/slider/index.d.ts +27 -0
- package/lib/slider/index.js +15 -0
- package/lib/slider/slider-button.d.ts +72 -0
- package/lib/slider/slider.css +149 -0
- package/lib/slider/slider.d.ts +159 -0
- package/lib/slider/slider.less +179 -0
- package/lib/slider/slider.variable.css +235 -0
- package/lib/steps/index.d.ts +198 -0
- package/lib/steps/index.js +15 -0
- package/lib/steps/steps.css +285 -0
- package/lib/steps/steps.d.ts +148 -0
- package/lib/steps/steps.less +320 -0
- package/lib/steps/steps.variable.css +371 -0
- package/lib/styles/index.d.ts +38 -0
- package/lib/styles/index.js +1 -0
- package/lib/styles/mixins/animate.css +21 -0
- package/lib/styles/mixins/animate.less +27 -0
- package/lib/styles/mixins/animate.variable.css +21 -0
- package/lib/styles/mixins/ellipsis.less +8 -0
- package/lib/styles/mixins/mixins.css +21 -0
- package/lib/styles/mixins/mixins.less +2 -0
- package/lib/styles/mixins/mixins.variable.css +21 -0
- package/lib/styles/mixins/popper.css +43 -0
- package/lib/styles/mixins/popper.less +52 -0
- package/lib/styles/mixins/popper.variable.css +43 -0
- package/lib/styles/mixins/size.less +10 -1
- package/lib/styles/reset.css +273 -0
- package/lib/styles/reset.less +313 -0
- package/lib/styles/reset.variable.css +273 -0
- package/lib/styles/themes/themes.less +84 -284
- package/lib/switcher/index.d.ts +222 -0
- package/lib/switcher/index.js +1 -0
- package/lib/switcher/switcher.css +258 -0
- package/lib/switcher/switcher.d.ts +97 -0
- package/lib/switcher/switcher.less +302 -0
- package/lib/switcher/switcher.variable.css +344 -0
- package/lib/tab/index.d.ts +416 -0
- package/lib/tab/index.js +1 -0
- package/lib/tab/tab-nav.d.ts +154 -0
- package/lib/tab/tab-panel.d.ts +46 -0
- package/lib/tab/tab.css +147 -0
- package/lib/tab/tab.d.ts +131 -0
- package/lib/tab/tab.less +221 -0
- package/lib/tab/tab.variable.css +233 -0
- package/lib/table/index.d.ts +119 -0
- package/lib/table/index.js +1 -0
- package/lib/table/props.d.ts +41 -0
- package/lib/table/render.d.ts +47 -0
- package/lib/table/table.css +44 -0
- package/lib/table/table.d.ts +26 -0
- package/lib/table/table.less +67 -0
- package/lib/table/table.variable.css +130 -0
- package/lib/table/utils.d.ts +22 -0
- package/lib/tag/index.d.ts +338 -0
- package/lib/tag/index.js +1 -0
- package/lib/tag/tag.d.ts +54 -0
- package/lib/tag/tag.less +5 -0
- package/lib/tag/tag.variable.css +86 -0
- package/lib/tree/index.d.ts +149 -0
- package/lib/tree/index.js +1 -0
- package/lib/tree/tree.css +35 -0
- package/lib/tree/tree.d.ts +58 -0
- package/lib/tree/tree.less +55 -0
- package/lib/tree/tree.variable.css +35 -0
- package/lib/tree/util.d.ts +89 -0
- package/lib/use-message.d.ts +2 -0
- package/package.json +92 -40
- package/lib/styles/mixins/size.css +0 -0
- package/lib/styles/themes/themes.css +0 -119
- package/lib/styles/themes/variables.css +0 -27
- package/lib/styles/themes/variables.less +0 -36
@@ -0,0 +1,128 @@
|
|
1
|
+
:root {
|
2
|
+
--bk-prefix: bk;
|
3
|
+
--primary-color: #3a84ff;
|
4
|
+
--success-color: #2dcb56;
|
5
|
+
--warning-color: #ff9c01;
|
6
|
+
--danger-color: #ea3636;
|
7
|
+
--default-color: #63656e;
|
8
|
+
--gray-color: #979ba5;
|
9
|
+
--light-gray: #c4c6cc;
|
10
|
+
--white-color: white;
|
11
|
+
--disable-color: #dcdee5;
|
12
|
+
--font-size-base: 12px;
|
13
|
+
--font-size-medium: 14px;
|
14
|
+
--font-size-large: 16px;
|
15
|
+
--line-height-base: 16px;
|
16
|
+
--line-height-medium: 16px;
|
17
|
+
--line-height-large: 18px;
|
18
|
+
--component-size-small: 26px;
|
19
|
+
--component-size-base: 32px;
|
20
|
+
--component-size-large: 38px;
|
21
|
+
--border-width-base: 1px;
|
22
|
+
--border-style-base: solid;
|
23
|
+
--border-radius-base: 2px;
|
24
|
+
--input-disabled-bg: #fafbfd;
|
25
|
+
--input-disabled-border: var(--disable-color);
|
26
|
+
--input-height-base: var(--component-size-base);
|
27
|
+
--input-color: var(--default-color);
|
28
|
+
--input-bg: white;
|
29
|
+
--input-border-color: var(--light-gray);
|
30
|
+
--input-broder-radius: 3px;
|
31
|
+
--input-shadow-color: #a3c5fd;
|
32
|
+
--input-horizontal-padding: 10px;
|
33
|
+
--input-block-color: #f4f6fa;
|
34
|
+
--input-icon-size: var(--font-size-large);
|
35
|
+
--input-maxlength-color: #979ba5;
|
36
|
+
--button-primary-hover-color: #5594fa;
|
37
|
+
--button-danger-hover-color: #ff5656;
|
38
|
+
--button-success-hover-color: #45e35f;
|
39
|
+
--button-warning-hover-color: #ffb848;
|
40
|
+
--button-default-hover-border-color: #979ba5;
|
41
|
+
--button-primary-active-color: #2c77f4;
|
42
|
+
--button-danger-active-color: #db2626;
|
43
|
+
--button-success-active-color: #1ab943;
|
44
|
+
--button-warning-active-color: #eb9000;
|
45
|
+
--fixed-navbar-background: #fff;
|
46
|
+
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
47
|
+
--switch-default-color: #fff;
|
48
|
+
--switch-grey-color: #c4c6cc;
|
49
|
+
--breadcrumb-black-color: #979ba5;
|
50
|
+
--breadcrumb-primary-hover-color: #0082ff;
|
51
|
+
--breadcrumb-fn-main-color: #63656e;
|
52
|
+
--link-default-hover-color: #979ba5;
|
53
|
+
--link-primary-hover-color: #699df4;
|
54
|
+
--link-success-hover-color: #45e35f;
|
55
|
+
--link-warning-hover-color: #ffb848;
|
56
|
+
--link-danger-hover-color: #ff5656;
|
57
|
+
--link-default-disabled-color: #dcdee5;
|
58
|
+
--link-primary-disabled-color: #a3c5fd;
|
59
|
+
--link-success-disabled-color: #94f5a4;
|
60
|
+
--link-warning-disabled-color: #ffd695;
|
61
|
+
--link-danger-disabled-color: #fd9c9c;
|
62
|
+
--message-color: var(--default-color);
|
63
|
+
--message-primary-bg-color: #f0f8ff;
|
64
|
+
--message-primary-border-color: #e1ecff;
|
65
|
+
--message-warning-bg-color: #fff4e2;
|
66
|
+
--message-warning-border-color: #ffe8c3;
|
67
|
+
--message-success-bg-color: #f2fff4;
|
68
|
+
--message-success-border-color: #dcffe2;
|
69
|
+
--message-danger-bg-color: #ffeded;
|
70
|
+
--message-danger-border-color: #ffdddd;
|
71
|
+
--slider-default-bg: #dcdee5;
|
72
|
+
--slider-disable-bar-bg: #979ba5;
|
73
|
+
--menu-bg-color: #182132;
|
74
|
+
--submenu-bg-color: #151d2c;
|
75
|
+
--menu-active-bg-color: linear-gradient(90deg, #3f87ff 0%, #3a84ff 100%);
|
76
|
+
--menu-color: #96a2b9;
|
77
|
+
--menu-group-color: var(--default-color);
|
78
|
+
--menu-width: 260px;
|
79
|
+
--menu-collapse-width: 60px;
|
80
|
+
--menu-active-color: white;
|
81
|
+
--nav-header-bg-color: #182132;
|
82
|
+
--nav-bg-color: #182132;
|
83
|
+
--date-picker-disabled-bg: #fafbfd;
|
84
|
+
--date-picker-dropdown-mb: 4px;
|
85
|
+
--date-picker-dropdown-bg: #fff;
|
86
|
+
}
|
87
|
+
.bk-fixed-navbar {
|
88
|
+
position: fixed;
|
89
|
+
right: 10px;
|
90
|
+
width: 52px;
|
91
|
+
padding: 22px 14px;
|
92
|
+
background: var(--fixed-navbar-background);
|
93
|
+
border-radius: 26px;
|
94
|
+
opacity: 1;
|
95
|
+
box-shadow: 0px 2px 4px 0px var(--fixed-navbar-boxshadow-color);
|
96
|
+
box-sizing: border-box;
|
97
|
+
}
|
98
|
+
.bk-fixed-navbar.middle {
|
99
|
+
top: 50%;
|
100
|
+
transform: translateY(-50%);
|
101
|
+
}
|
102
|
+
.bk-fixed-navbar.bottom {
|
103
|
+
bottom: 10%;
|
104
|
+
}
|
105
|
+
.bk-fixed-navbar.top {
|
106
|
+
top: 10%;
|
107
|
+
}
|
108
|
+
.bk-fixed-navbar .fixed-navbar-item {
|
109
|
+
display: flex;
|
110
|
+
color: var(--default-color);
|
111
|
+
align-items: center;
|
112
|
+
justify-content: center;
|
113
|
+
flex-direction: column;
|
114
|
+
}
|
115
|
+
.bk-fixed-navbar .fixed-navbar-item:hover {
|
116
|
+
color: var(--primary-color);
|
117
|
+
cursor: pointer;
|
118
|
+
}
|
119
|
+
.bk-fixed-navbar .fixed-navbar-item:not(:last-of-type) {
|
120
|
+
margin-bottom: 25px;
|
121
|
+
}
|
122
|
+
.bk-fixed-navbar .fixed-navbar-item .icon {
|
123
|
+
margin-bottom: 5px;
|
124
|
+
font-size: 17px;
|
125
|
+
}
|
126
|
+
.bk-fixed-navbar .fixed-navbar-item .text {
|
127
|
+
font-size: 12px;
|
128
|
+
}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
declare const BkFixedNavbar: {
|
2
|
+
new (...args: any[]): {
|
3
|
+
$: import("vue").ComponentInternalInstance;
|
4
|
+
$data: {};
|
5
|
+
$props: Partial<{
|
6
|
+
extCls: string;
|
7
|
+
position: string;
|
8
|
+
navItems: unknown[];
|
9
|
+
}> & Omit<Readonly<{
|
10
|
+
navItems?: unknown;
|
11
|
+
extCls?: unknown;
|
12
|
+
position?: unknown;
|
13
|
+
} & {
|
14
|
+
extCls: string;
|
15
|
+
position: string;
|
16
|
+
navItems: unknown[];
|
17
|
+
} & {}> & {} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "extCls" | "position" | "navItems">;
|
18
|
+
$attrs: {
|
19
|
+
[x: string]: unknown;
|
20
|
+
};
|
21
|
+
$refs: {
|
22
|
+
[x: string]: unknown;
|
23
|
+
};
|
24
|
+
$slots: Readonly<{
|
25
|
+
[name: string]: import("vue").Slot;
|
26
|
+
}>;
|
27
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
28
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
29
|
+
$emit: (event: string, ...args: any[]) => void;
|
30
|
+
$el: any;
|
31
|
+
$options: import("vue").ComponentOptionsBase<Readonly<{
|
32
|
+
navItems?: unknown;
|
33
|
+
extCls?: unknown;
|
34
|
+
position?: unknown;
|
35
|
+
} & {
|
36
|
+
extCls: string;
|
37
|
+
position: string;
|
38
|
+
navItems: unknown[];
|
39
|
+
} & {}> & {}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
40
|
+
extCls: string;
|
41
|
+
position: string;
|
42
|
+
navItems: unknown[];
|
43
|
+
}> & {
|
44
|
+
beforeCreate?: (() => void) | (() => void)[];
|
45
|
+
created?: (() => void) | (() => void)[];
|
46
|
+
beforeMount?: (() => void) | (() => void)[];
|
47
|
+
mounted?: (() => void) | (() => void)[];
|
48
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
49
|
+
updated?: (() => void) | (() => void)[];
|
50
|
+
activated?: (() => void) | (() => void)[];
|
51
|
+
deactivated?: (() => void) | (() => void)[];
|
52
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
53
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
54
|
+
destroyed?: (() => void) | (() => void)[];
|
55
|
+
unmounted?: (() => void) | (() => void)[];
|
56
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
57
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
58
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>, info: string) => boolean | void)[];
|
59
|
+
};
|
60
|
+
$forceUpdate: () => void;
|
61
|
+
$nextTick: typeof import("vue").nextTick;
|
62
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
|
63
|
+
} & Readonly<{
|
64
|
+
navItems?: unknown;
|
65
|
+
extCls?: unknown;
|
66
|
+
position?: unknown;
|
67
|
+
} & {
|
68
|
+
extCls: string;
|
69
|
+
position: string;
|
70
|
+
navItems: unknown[];
|
71
|
+
} & {}> & {} & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & {} & import("vue").ComponentCustomProperties;
|
72
|
+
__isFragment?: never;
|
73
|
+
__isTeleport?: never;
|
74
|
+
__isSuspense?: never;
|
75
|
+
} & import("vue").ComponentOptionsBase<Readonly<{
|
76
|
+
navItems?: unknown;
|
77
|
+
extCls?: unknown;
|
78
|
+
position?: unknown;
|
79
|
+
} & {
|
80
|
+
extCls: string;
|
81
|
+
position: string;
|
82
|
+
navItems: unknown[];
|
83
|
+
} & {}> & {}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
84
|
+
extCls: string;
|
85
|
+
position: string;
|
86
|
+
navItems: unknown[];
|
87
|
+
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin;
|
88
|
+
export default BkFixedNavbar;
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared)}(this,(function(e,t,n){"use strict";var o=t.defineComponent({name:"BkFixedNavbar",props:{navItems:n.PropTypes.array.def([]),extCls:n.PropTypes.string.def(""),position:n.PropTypes.oneOf(["middle","top","bottom"]).def("middle")},setup:function(e,o){var i=this,a=o.emit,d=e.navItems.map((function(e){return Object.assign({tooltip:{disabled:!0},action:function(){},icon:"",text:""},e)})),s=n.bkZIndexManager.getModalNextIndex(),r=function(e){a("click",e),e.action()};return function(){return t.createVNode("div",{class:"bk-fixed-navbar ".concat(e.extCls," ").concat(e.position),style:{zIndex:s}},[d.map((function(e){return t.createVNode("div",{class:"fixed-navbar-item",onClick:r.bind(i,e)},[e.icon?t.createVNode("i",{class:"".concat(e.icon," icon")},null):"",e.text?t.createVNode("span",{class:"text"},[e.text]):""])}))])}}}),i=n.withInstall(o);e.default=i,Object.defineProperty(e,"__esModule",{value:!0})}));
|
@@ -0,0 +1,140 @@
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
2
|
+
declare const formItemProps: {
|
3
|
+
label: import("vue-types").VueTypeValidableDef<string> & {
|
4
|
+
default: string;
|
5
|
+
};
|
6
|
+
labelWidth: import("vue-types").VueTypeValidableDef<number> & {
|
7
|
+
default: number;
|
8
|
+
};
|
9
|
+
labelPosition: import("vue-types").VueTypeValidableDef<string> & {
|
10
|
+
default: string;
|
11
|
+
};
|
12
|
+
property: import("vue-types").VueTypeValidableDef<string> & {
|
13
|
+
default: string;
|
14
|
+
} & {
|
15
|
+
default: string;
|
16
|
+
};
|
17
|
+
required: import("vue-types").VueTypeValidableDef<boolean> & {
|
18
|
+
default: boolean;
|
19
|
+
} & {
|
20
|
+
default: boolean;
|
21
|
+
};
|
22
|
+
email: import("vue-types").VueTypeValidableDef<boolean> & {
|
23
|
+
default: boolean;
|
24
|
+
} & {
|
25
|
+
default: boolean;
|
26
|
+
};
|
27
|
+
max: import("vue-types").VueTypeValidableDef<number> & {
|
28
|
+
default: number;
|
29
|
+
};
|
30
|
+
min: import("vue-types").VueTypeValidableDef<number> & {
|
31
|
+
default: number;
|
32
|
+
};
|
33
|
+
maxlength: import("vue-types").VueTypeValidableDef<number> & {
|
34
|
+
default: number;
|
35
|
+
};
|
36
|
+
rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
|
37
|
+
default: () => unknown[];
|
38
|
+
};
|
39
|
+
autoCheck: import("vue-types").VueTypeValidableDef<boolean> & {
|
40
|
+
default: boolean;
|
41
|
+
} & {
|
42
|
+
default: boolean;
|
43
|
+
};
|
44
|
+
description: import("vue-types").VueTypeValidableDef<string> & {
|
45
|
+
default: string;
|
46
|
+
};
|
47
|
+
};
|
48
|
+
export declare type FormItemProps = Readonly<ExtractPropTypes<typeof formItemProps>>;
|
49
|
+
declare const _default: import("vue").DefineComponent<{
|
50
|
+
label: import("vue-types").VueTypeValidableDef<string> & {
|
51
|
+
default: string;
|
52
|
+
};
|
53
|
+
labelWidth: import("vue-types").VueTypeValidableDef<number> & {
|
54
|
+
default: number;
|
55
|
+
};
|
56
|
+
labelPosition: import("vue-types").VueTypeValidableDef<string> & {
|
57
|
+
default: string;
|
58
|
+
};
|
59
|
+
property: import("vue-types").VueTypeValidableDef<string> & {
|
60
|
+
default: string;
|
61
|
+
} & {
|
62
|
+
default: string;
|
63
|
+
};
|
64
|
+
required: import("vue-types").VueTypeValidableDef<boolean> & {
|
65
|
+
default: boolean;
|
66
|
+
} & {
|
67
|
+
default: boolean;
|
68
|
+
};
|
69
|
+
email: import("vue-types").VueTypeValidableDef<boolean> & {
|
70
|
+
default: boolean;
|
71
|
+
} & {
|
72
|
+
default: boolean;
|
73
|
+
};
|
74
|
+
max: import("vue-types").VueTypeValidableDef<number> & {
|
75
|
+
default: number;
|
76
|
+
};
|
77
|
+
min: import("vue-types").VueTypeValidableDef<number> & {
|
78
|
+
default: number;
|
79
|
+
};
|
80
|
+
maxlength: import("vue-types").VueTypeValidableDef<number> & {
|
81
|
+
default: number;
|
82
|
+
};
|
83
|
+
rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
|
84
|
+
default: () => unknown[];
|
85
|
+
};
|
86
|
+
autoCheck: import("vue-types").VueTypeValidableDef<boolean> & {
|
87
|
+
default: boolean;
|
88
|
+
} & {
|
89
|
+
default: boolean;
|
90
|
+
};
|
91
|
+
description: import("vue-types").VueTypeValidableDef<string> & {
|
92
|
+
default: string;
|
93
|
+
};
|
94
|
+
}, {
|
95
|
+
labelStyles: import("vue").ComputedRef<object>;
|
96
|
+
validate: () => any;
|
97
|
+
clearValidate: () => void;
|
98
|
+
isError: import("vue").Ref<boolean>;
|
99
|
+
errorMessage: import("vue").Ref<string>;
|
100
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
101
|
+
label?: unknown;
|
102
|
+
labelWidth?: unknown;
|
103
|
+
labelPosition?: unknown;
|
104
|
+
property?: unknown;
|
105
|
+
required?: unknown;
|
106
|
+
email?: unknown;
|
107
|
+
max?: unknown;
|
108
|
+
min?: unknown;
|
109
|
+
maxlength?: unknown;
|
110
|
+
rules?: unknown;
|
111
|
+
autoCheck?: unknown;
|
112
|
+
description?: unknown;
|
113
|
+
} & {
|
114
|
+
label: string;
|
115
|
+
property: string;
|
116
|
+
email: boolean;
|
117
|
+
labelWidth: number;
|
118
|
+
labelPosition: string;
|
119
|
+
rules: unknown[];
|
120
|
+
required: boolean;
|
121
|
+
max: number;
|
122
|
+
min: number;
|
123
|
+
maxlength: number;
|
124
|
+
autoCheck: boolean;
|
125
|
+
description: string;
|
126
|
+
} & {}> & {}, {
|
127
|
+
label: string;
|
128
|
+
property: string;
|
129
|
+
email: boolean;
|
130
|
+
labelWidth: number;
|
131
|
+
labelPosition: string;
|
132
|
+
rules: unknown[];
|
133
|
+
required: boolean;
|
134
|
+
max: number;
|
135
|
+
min: number;
|
136
|
+
maxlength: number;
|
137
|
+
autoCheck: boolean;
|
138
|
+
description: string;
|
139
|
+
}>;
|
140
|
+
export default _default;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
.bk-form {
|
2
|
+
text-align: left;
|
3
|
+
}
|
4
|
+
.bk-form .bk-form-item {
|
5
|
+
display: flex;
|
6
|
+
margin-bottom: 24px;
|
7
|
+
}
|
8
|
+
.bk-form .bk-form-label {
|
9
|
+
width: 150px;
|
10
|
+
padding-right: 24px;
|
11
|
+
font-size: 14px;
|
12
|
+
font-weight: normal;
|
13
|
+
line-height: 32px;
|
14
|
+
color: #63656e;
|
15
|
+
text-align: right;
|
16
|
+
}
|
17
|
+
.bk-form .bk-form-content {
|
18
|
+
position: relative;
|
19
|
+
line-height: 32px;
|
20
|
+
}
|
21
|
+
.bk-form .bk-form-error {
|
22
|
+
position: absolute;
|
23
|
+
left: 0;
|
24
|
+
padding-top: 4px;
|
25
|
+
font-size: 12px;
|
26
|
+
line-height: 1;
|
27
|
+
color: #ea3636;
|
28
|
+
text-align: left;
|
29
|
+
}
|
30
|
+
.bk-form--vertical .bk-form-item {
|
31
|
+
flex-direction: column;
|
32
|
+
}
|
33
|
+
.bk-form--vertical .bk-form-label {
|
34
|
+
width: auto;
|
35
|
+
text-align: left;
|
36
|
+
}
|
37
|
+
.bk-form--vertical .bk-form-content {
|
38
|
+
text-align: left;
|
39
|
+
}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
2
|
+
declare const formProps: {
|
3
|
+
formType: import("vue-types").VueTypeValidableDef<string> & {
|
4
|
+
default: string;
|
5
|
+
};
|
6
|
+
labelWidth: import("vue-types").VueTypeValidableDef<number> & {
|
7
|
+
default: number;
|
8
|
+
};
|
9
|
+
labelPosition: import("vue-types").VueTypeValidableDef<string> & {
|
10
|
+
default: string;
|
11
|
+
} & {
|
12
|
+
default: string;
|
13
|
+
};
|
14
|
+
model: import("vue-types").VueTypeValidableDef<{
|
15
|
+
[key: string]: any;
|
16
|
+
}> & {
|
17
|
+
default: () => {
|
18
|
+
[key: string]: any;
|
19
|
+
};
|
20
|
+
};
|
21
|
+
rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
|
22
|
+
default: () => unknown[];
|
23
|
+
};
|
24
|
+
};
|
25
|
+
export declare type FormProps = Readonly<ExtractPropTypes<typeof formProps>>;
|
26
|
+
declare const _default: import("vue").DefineComponent<{
|
27
|
+
formType: import("vue-types").VueTypeValidableDef<string> & {
|
28
|
+
default: string;
|
29
|
+
};
|
30
|
+
labelWidth: import("vue-types").VueTypeValidableDef<number> & {
|
31
|
+
default: number;
|
32
|
+
};
|
33
|
+
labelPosition: import("vue-types").VueTypeValidableDef<string> & {
|
34
|
+
default: string;
|
35
|
+
} & {
|
36
|
+
default: string;
|
37
|
+
};
|
38
|
+
model: import("vue-types").VueTypeValidableDef<{
|
39
|
+
[key: string]: any;
|
40
|
+
}> & {
|
41
|
+
default: () => {
|
42
|
+
[key: string]: any;
|
43
|
+
};
|
44
|
+
};
|
45
|
+
rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
|
46
|
+
default: () => unknown[];
|
47
|
+
};
|
48
|
+
}, {
|
49
|
+
validate: (fields: string | Array<string>) => Promise<{
|
50
|
+
[key: string]: any;
|
51
|
+
}>;
|
52
|
+
clearValidate: (fields: string | Array<string>) => void;
|
53
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
54
|
+
formType?: unknown;
|
55
|
+
labelWidth?: unknown;
|
56
|
+
labelPosition?: unknown;
|
57
|
+
model?: unknown;
|
58
|
+
rules?: unknown;
|
59
|
+
} & {
|
60
|
+
formType: string;
|
61
|
+
labelWidth: number;
|
62
|
+
labelPosition: string;
|
63
|
+
model: {
|
64
|
+
[key: string]: any;
|
65
|
+
};
|
66
|
+
rules: unknown[];
|
67
|
+
} & {}> & {}, {
|
68
|
+
formType: string;
|
69
|
+
labelWidth: number;
|
70
|
+
labelPosition: string;
|
71
|
+
model: {
|
72
|
+
[key: string]: any;
|
73
|
+
};
|
74
|
+
rules: unknown[];
|
75
|
+
}>;
|
76
|
+
export default _default;
|
@@ -0,0 +1,50 @@
|
|
1
|
+
.bk-form {
|
2
|
+
text-align: left;
|
3
|
+
|
4
|
+
.bk-form-item {
|
5
|
+
display: flex;
|
6
|
+
margin-bottom: 24px;
|
7
|
+
}
|
8
|
+
|
9
|
+
.bk-form-label {
|
10
|
+
width: 150px;
|
11
|
+
padding-right: 24px;
|
12
|
+
font-size: 14px;
|
13
|
+
font-weight: normal;
|
14
|
+
line-height: 32px;
|
15
|
+
color: #63656e;
|
16
|
+
text-align: right;
|
17
|
+
}
|
18
|
+
|
19
|
+
.bk-form-content {
|
20
|
+
position: relative;
|
21
|
+
line-height: 32px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.bk-form-error {
|
25
|
+
position: absolute;
|
26
|
+
left: 0;
|
27
|
+
padding-top: 4px;
|
28
|
+
font-size: 12px;
|
29
|
+
line-height: 1;
|
30
|
+
color: #ea3636;
|
31
|
+
text-align: left;
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
&--vertical {
|
36
|
+
.bk-form-item {
|
37
|
+
|
38
|
+
flex-direction: column;
|
39
|
+
}
|
40
|
+
|
41
|
+
.bk-form-label {
|
42
|
+
width: auto;
|
43
|
+
text-align: left;
|
44
|
+
}
|
45
|
+
|
46
|
+
.bk-form-content {
|
47
|
+
text-align: left;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
.bk-form {
|
2
|
+
text-align: left;
|
3
|
+
}
|
4
|
+
.bk-form .bk-form-item {
|
5
|
+
display: flex;
|
6
|
+
margin-bottom: 24px;
|
7
|
+
}
|
8
|
+
.bk-form .bk-form-label {
|
9
|
+
width: 150px;
|
10
|
+
padding-right: 24px;
|
11
|
+
font-size: 14px;
|
12
|
+
font-weight: normal;
|
13
|
+
line-height: 32px;
|
14
|
+
color: #63656e;
|
15
|
+
text-align: right;
|
16
|
+
}
|
17
|
+
.bk-form .bk-form-content {
|
18
|
+
position: relative;
|
19
|
+
line-height: 32px;
|
20
|
+
}
|
21
|
+
.bk-form .bk-form-error {
|
22
|
+
position: absolute;
|
23
|
+
left: 0;
|
24
|
+
padding-top: 4px;
|
25
|
+
font-size: 12px;
|
26
|
+
line-height: 1;
|
27
|
+
color: #ea3636;
|
28
|
+
text-align: left;
|
29
|
+
}
|
30
|
+
.bk-form--vertical .bk-form-item {
|
31
|
+
flex-direction: column;
|
32
|
+
}
|
33
|
+
.bk-form--vertical .bk-form-label {
|
34
|
+
width: auto;
|
35
|
+
text-align: left;
|
36
|
+
}
|
37
|
+
.bk-form--vertical .bk-form-content {
|
38
|
+
text-align: left;
|
39
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("vue"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../shared"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared)}(this,(function(e,r,t){"use strict";function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n={exports:{}};!function(e){e.exports=function(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e},e.exports.default=e.exports,e.exports.__esModule=!0}(n);var s=o(n.exports),i=Symbol("form"),a={formType:t.PropTypes.string,labelWidth:t.PropTypes.number,labelPosition:t.PropTypes.string.def("right"),model:t.PropTypes.object,rules:t.PropTypes.array},u=r.defineComponent({name:"BKForm",props:a,setup:function(e){var t=[];r.provide(i,{props:e,register:function(e){t.push(e)},unregister:function(e){t=t.reduce((function(r,t){return t!==e&&r.push(t),r}),[])}});return{validate:function(r){var o={};r?o=("string"==typeof r?[r]:r).reduce((function(e,r){return Object.assign(Object.assign({},e),s({},r,!0))}),{}):o=t.reduce((function(e,r){return r.property?Object.assign(Object.assign({},e),s({},r.property,!0)):e}),{});return Promise.all(t.reduce((function(e,r){return o[r.property]&&e.push(r.validate()),e}),[])).then((function(){return Promise.resolve(e.model)}))},clearValidate:function(e){var r={};e?r=("string"==typeof e?[e]:e).reduce((function(e,r){return Object.assign(Object.assign({},e),s({},r,!0))}),{}):r=t.reduce((function(e,r){return Object.assign(Object.assign({},e),s({},r.property,!0))}),{});t.forEach((function(e){return r[e.property]&&e.clearValidate()}))}}},render:function(){var e,o,n=t.classes(s({"bk-form":!0},"bk-form--".concat(this.formType),!0));return r.createVNode("form",{class:n},[null===(o=(e=this.$slots).default)||void 0===o?void 0:o.call(e)])}}),l={exports:{}},p={exports:{}},c={exports:{}};!function(e){e.exports=function(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o},e.exports.default=e.exports,e.exports.__esModule=!0}(c),function(e){var r=c.exports;e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0}(p);var f={exports:{}};!function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0}(f);var m={exports:{}};!function(e){var r=c.exports;e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0}(m);var d={exports:{}};!function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}(d),function(e){var r=p.exports,t=f.exports,o=m.exports,n=d.exports;e.exports=function(e){return r(e)||t(e)||o(e)||n()},e.exports.default=e.exports,e.exports.__esModule=!0}(l);var g=o(l.exports),b={required:function(e){return console.log("required"),""!==e},min:function(e,r){return console.log("min"),e>=r},max:function(e,r){return console.log("max"),r>=e},email:function(e){return console.log("email"),/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)},maxlength:function(e,r){return console.log("maxlength"),e.length<=r}},x={label:t.PropTypes.string,labelWidth:t.PropTypes.number,labelPosition:t.PropTypes.string,property:t.PropTypes.string.def(""),required:t.PropTypes.bool.def(!1),email:t.PropTypes.bool.def(!1),max:t.PropTypes.number,min:t.PropTypes.number,maxlength:t.PropTypes.number,rules:t.PropTypes.array,autoCheck:t.PropTypes.bool.def(!1),description:t.PropTypes.string},y=r.defineComponent({name:"BKFormItem",props:x,setup:function(e){var t=r.getCurrentInstance(),o=r.reactive({isError:!1,errorMessage:""}),n=r.inject(i),s=Boolean(n),a=r.computed((function(){var r={width:"",textAlign:""},t=e.labelWidth||s&&n.props.labelWidth;return t&&(r.width="".concat(t,"px")),(e.labelPosition||s&&n.props.labelPosition)&&(r["text-align"]="labelPosition"),r}));return r.onMounted((function(){s&&n.register(t.proxy)})),r.onBeforeUnmount((function(){s&&n.unregister(t.proxy)})),Object.assign(Object.assign({},r.toRefs(o)),{labelStyles:a,validate:function(){if(!e.property||s&&!n.props.model)return Promise.resolve();var r,t,i,a,u,l=[];s&&n.props.rules&&(r=n.props.rules,t=e.property,Object.prototype.hasOwnProperty.call(r,t))&&(l=n.props.rules[e.property]),e.rules&&(l=e.rules),i=l,a=function(e){var r=[];return e.required&&r.push({validator:b.required,message:"".concat(e.label,"不能为空"),trigger:"blur"}),e.email&&r.push({validator:b.email,message:"".concat(e.label,"格式不正确"),trigger:"blur"}),Number(e.max)>-1&&r.push({validator:function(r){return b.max(r,e.max)},message:"".concat(e.label,"最大值").concat(e.max),trigger:"blur"}),Number(e.min)>-1&&r.push({validator:function(r){return b.min(r,e.min)},message:"".concat(e.label,"最小值").concat(e.min),trigger:"blur"}),Number(e.maxlength)>-1&&r.push({validator:function(r){return b.maxlength(r,e.maxlength)},message:"".concat(e.label,"最大长度").concat(e.maxlength),trigger:"blur"}),r}(e),u=i.map((function(e){return{validator:e.required?b.required:e.email?b.email:Number(e.max)>-1?function(r){return b.max(r,e.max)}:Number(e.min)>-1||Number(e.maxlength)>-1?function(r){return b.min(r,e.max)}:function(){return!0},message:e.message,trigger:e.trigger}})),l=[].concat(g(a),g(u));var p,c=n.props.model[e.property],f=(p=-1,function(){if((p+=1)>=l.length)return Promise.resolve();var e=l[p];return Promise.resolve().then((function(){var r=e.validator(c);return"boolean"!=typeof r&&"function"==typeof r.then?r.then((function(){return f}),(function(){return o.isError=!0,o.errorMessage=e.message,Promise.reject(e.message)})):r?f():(o.isError=!0,o.errorMessage=e.message,Promise.reject(e.message))}))});return f()},clearValidate:function(){o.isError=!1,o.errorMessage=""}})},render:function(){var e=t.classes({"is-error":this.isError,"is-required":this.required},"bk-form-item");return r.createVNode("div",{class:e},[r.createVNode("div",{class:"bk-form-label",style:this.labelStyles},[this.label]),r.createVNode("div",{class:"bk-form-content"},[this.$slots.default(),this.isError&&r.createVNode("div",{class:"bk-form-error"},[this.errorMessage])])])}});u.install=function(e){e.component(u.name,u),e.component(y.name,y)},u.FormItem=y,e.BkFormItem=y,e.FormItem=y,e.default=u,Object.defineProperty(e,"__esModule",{value:!0})}));
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { FormProps } from './form';
|
2
|
+
import type { FormItemProps } from './form-item';
|
3
|
+
export interface IFormItemContext extends FormItemProps {
|
4
|
+
validate: () => Promise<boolean>;
|
5
|
+
clearValidate: () => void;
|
6
|
+
}
|
7
|
+
export interface IFormContext {
|
8
|
+
props: FormProps;
|
9
|
+
register: (IFormItemContext: any) => void;
|
10
|
+
unregister: (IFormItemContext: any) => void;
|
11
|
+
}
|
12
|
+
export declare type IFormItemRules = Array<{
|
13
|
+
required?: boolean;
|
14
|
+
email?: boolean;
|
15
|
+
min?: number;
|
16
|
+
max?: number;
|
17
|
+
maxlength?: number;
|
18
|
+
validator?: (any: any) => boolean | Promise<boolean>;
|
19
|
+
message: string;
|
20
|
+
trigger: 'blur' | 'change';
|
21
|
+
}>;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
required: (value: any) => boolean;
|
3
|
+
min: (value: number, min: number) => boolean;
|
4
|
+
max: (value: number, max: number) => boolean;
|
5
|
+
email: (value: string) => boolean;
|
6
|
+
maxlength: (value: string, maxlength: number) => boolean;
|
7
|
+
};
|
8
|
+
export default _default;
|