vft 0.0.136 → 0.0.138
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/comp-resolver.js +1 -3
- package/es/component.js +29 -25
- package/es/components/alert/alert.vue2.js +1 -4
- package/es/components/autocomplete/autocomplete.vue2.js +2 -8
- package/es/components/backtop/backtop.vue2.js +3 -2
- package/es/components/backtop/use-backtop.js +9 -5
- package/es/components/button/constants.js +1 -3
- package/es/components/button/use-button.js +4 -6
- package/es/components/carousel/carousel.vue2.js +3 -13
- package/es/components/carousel/use-carousel-item.js +2 -10
- package/es/components/carousel/use-carousel.js +2 -9
- package/es/components/checkbox/checkbox-button.vue2.js +1 -8
- package/es/components/checkbox/checkbox-group.vue2.js +1 -9
- package/es/components/checkbox/composables/use-checkbox-disabled.js +1 -3
- package/es/components/checkbox/composables/use-checkbox-event.js +2 -8
- package/es/components/checkbox/composables/use-checkbox.js +3 -7
- package/es/components/clamp/clamp.vue2.js +1 -4
- package/es/components/col/col.vue2.js +1 -3
- package/es/components/collection/collection.js +2 -6
- package/es/components/color-picker/color-picker.vue2.js +1 -5
- package/es/components/color-picker/components/hue-slider.vue2.js +4 -12
- package/es/components/color-picker/components/predefine.vue.js +1 -5
- package/es/components/color-picker/composables/use-alpha-slider.js +5 -17
- package/es/components/color-picker/contants.js +1 -3
- package/es/components/color-picker/utils/color.js +9 -29
- package/es/components/config-provider/hooks/use-global-config.js +5 -10
- package/es/components/container/footer.vue2.js +1 -3
- package/es/components/context-menu/context-menu.vue2.js +30 -15
- package/es/components/date-picker/composables/use-shortcut.js +1 -4
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +2 -6
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +3 -11
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +6 -20
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +2 -14
- package/es/components/descriptions/description.vue2.js +4 -6
- package/es/components/descriptions/descriptions-cell.js +1 -3
- package/es/components/dialog/dialog.vue.d.ts +1 -1
- package/es/components/drawer/drawer.vue2.js +1 -3
- package/es/components/dropdown/dropdown-item-impl.vue2.js +2 -9
- package/es/components/dropdown/dropdown-item.vue2.js +1 -4
- package/es/components/dropdown/dropdown-menu.vue2.js +5 -25
- package/es/components/dropdown/dropdown.vue2.js +2 -14
- package/es/components/dropdown/types.js +1 -10
- package/es/components/dropdown/useDropdown.js +1 -3
- package/es/components/exception/exception.vue2.js +6 -3
- package/es/components/focus-trap/focus-trap.vue2.js +4 -19
- package/es/components/footer-layout/footer-layout.vue2.js +3 -2
- package/es/components/form/form-item.vue2.js +7 -15
- package/es/components/form/hooks/use-form-common-props.js +1 -3
- package/es/components/form/types.d.ts +1 -1
- package/es/components/form/types.js +1 -6
- package/es/components/header-layout/header-layout.vue2.js +3 -2
- package/es/components/icon/icon.vue2.js +12 -7
- package/es/components/icon-text/icon-text.vue2.js +9 -6
- package/es/components/image/image.vue2.js +2 -10
- package/es/components/image/index.d.ts +49 -0
- package/es/components/image/index.js +3 -1
- package/es/components/image/p-image.vue.d.ts +51 -0
- package/es/components/image/p-image.vue.js +4 -0
- package/es/components/image/p-image.vue2.js +57 -0
- package/es/components/image/types.d.ts +1 -0
- package/es/components/image-viewer/image-viewer.vue2.js +4 -16
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +277 -274
- package/es/components/infinite-scroll/infinite-scroll.js +1 -3
- package/es/components/input/input.vue2.js +17 -9
- package/es/components/input-number/directives.js +1 -3
- package/es/components/input-number/input-number.vue2.js +2 -9
- package/es/components/link/link.vue2.js +1 -6
- package/es/components/list-cell/list-cell.vue2.js +7 -4
- package/es/components/loading/directive.js +1 -3
- package/es/components/md-code-demo/code-demo/code.js +14 -7
- package/es/components/md-code-demo/md-code-demo.js +97 -85
- package/es/components/md-code-tabs/md-code-tabs.js +3 -1
- package/es/components/md-container/md-container.vue2.js +3 -2
- package/es/components/md-container/toc.js +6 -1
- package/es/components/md-container/use/useActiveHeaderLinks.js +1 -7
- package/es/components/md-tabs/md-tabs.js +3 -1
- package/es/components/menu/menu-item.vue2.js +7 -3
- package/es/components/menu/menu.vue2.js +6 -14
- package/es/components/menu/sub-menu.vue2.js +3 -2
- package/es/components/message/message.vue2.js +1 -3
- package/es/components/message/method.js +5 -1
- package/es/components/modal/modal-footer-action.vue2.js +3 -2
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +45 -36
- package/es/components/overlay/overlay.vue2.js +1 -5
- package/es/components/p-image/style/css.d.ts +0 -0
- package/es/components/p-image/style/css.js +2 -0
- package/es/components/p-image/style/index.d.ts +0 -0
- package/es/components/p-image/style/index.js +2 -0
- package/es/components/pagination/components/next.vue2.js +1 -3
- package/es/components/pagination/components/pager.vue2.js +5 -24
- package/es/components/pagination/components/prev.vue2.js +1 -3
- package/es/components/popconfirm/popconfirm.vue2.js +1 -5
- package/es/components/popper/arrow.vue2.js +1 -4
- package/es/components/popper/composables/use-content-dom.js +3 -16
- package/es/components/popper/composables/use-content.js +7 -11
- package/es/components/popper/content.vue.d.ts +2 -4
- package/es/components/popper/content.vue2.js +8 -12
- package/es/components/popper/trigger.vue2.js +6 -29
- package/es/components/progress/progress.vue2.js +1 -6
- package/es/components/progress-i/index.d.ts +2 -0
- package/es/components/progress-i/index.js +12 -0
- package/es/components/progress-i/progress-i.vue.d.ts +2 -0
- package/es/components/progress-i/progress-i.vue.js +4 -0
- package/es/components/progress-i/progress-i.vue2.js +10 -0
- package/es/components/progress-i/style/css.d.ts +0 -0
- package/es/components/progress-i/style/css.js +2 -0
- package/es/components/progress-i/style/index.d.ts +0 -0
- package/es/components/progress-i/style/index.js +2 -0
- package/es/components/qrcode/drawLogo.js +8 -1
- package/es/components/qrcode/qrcode.vue2.js +7 -3
- package/es/components/radio/radio.vue2.js +2 -9
- package/es/components/result/result.vue2.js +10 -5
- package/es/components/roving-focus-group/roving-focus-group-impl.vue2.js +2 -11
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +2 -10
- package/es/components/roving-focus-group/types.js +1 -6
- package/es/components/scrollbar/constants.js +1 -3
- package/es/components/scrollbar/scrollbar.vue2.js +2 -9
- package/es/components/scrollbar/thumb.vue2.js +2 -12
- package/es/components/search/index.d.ts +2 -0
- package/es/components/search/search.vue.d.ts +1 -1
- package/es/components/select/select.vue.js +5 -20
- package/es/components/select/select.vue2.js +1 -9
- package/es/components/select/token.js +1 -3
- package/es/components/select/useAllowCreate.js +1 -3
- package/es/components/select/useSelect.js +10 -48
- package/es/components/side-menu/side-menu.vue2.js +19 -18
- package/es/components/skeleton/skeleton.vue2.js +5 -5
- package/es/components/slider/composables/use-lifecycle.js +1 -4
- package/es/components/slider/composables/use-slide.js +1 -4
- package/es/components/slider/composables/use-slider-button.js +5 -1
- package/es/components/slider/composables/use-stops.js +2 -6
- package/es/components/slider/composables/use-watch.js +1 -3
- package/es/components/slider/marker.js +1 -3
- package/es/components/slider/slider.vue2.js +2 -8
- package/es/components/space/space.js +25 -39
- package/es/components/super-form/component-map.js +13 -10
- package/es/components/super-form/index.d.ts +10 -7
- package/es/components/super-form/super-form-action.vue2.js +4 -6
- package/es/components/super-form/super-form-item.vue.d.ts +1 -1
- package/es/components/super-form/super-form-item.vue2.js +26 -25
- package/es/components/super-form/super-form.vue.d.ts +4 -3
- package/es/components/super-form/super-form.vue2.js +5 -3
- package/es/components/super-form/use/use-auto-focus.js +1 -6
- package/es/components/super-form/use/use-form-events.js +2 -6
- package/es/components/super-form/use/use-form-values.js +1 -6
- package/es/components/switch/switch.vue2.js +3 -17
- package/es/components/table/field.js +21 -20
- package/es/components/table/index.d.ts +357 -82
- package/es/components/table/table.vue.d.ts +91 -30
- package/es/components/table/table.vue2.js +128 -113
- package/es/components/table/types.d.ts +2 -2
- package/es/components/table/use/use-data-source.js +91 -92
- package/es/components/table/use/use-table.d.ts +1 -4
- package/es/components/table/use/use-table.js +3 -1
- package/es/components/tabs/tab-nav.vue2.js +18 -17
- package/es/components/time-picker/common/picker.vue2.js +8 -26
- package/es/components/time-picker/composables/use-time-panel.js +3 -14
- package/es/components/time-picker/composables/use-time-picker.js +2 -8
- package/es/components/time-picker/constants.d.ts +1 -1
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +2 -9
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +6 -10
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +3 -14
- package/es/components/time-picker/utils.js +1 -5
- package/es/components/tooltip/content.vue2.js +4 -12
- package/es/components/tooltip/trigger.vue2.js +7 -25
- package/es/components/tooltip/utils.js +1 -3
- package/es/components/tree/model/node.js +2 -8
- package/es/components/tree/model/useDragNode.js +2 -12
- package/es/components/tree/model/useKeydown.js +5 -17
- package/es/components/tree/tree-node.vue2.js +2 -12
- package/es/components/tree/tree.vue2.js +2 -10
- package/es/components/upload/upload-content.vue2.js +2 -6
- package/es/components/upload/upload-dragger.vue2.js +1 -4
- package/es/components/upload/upload-list.vue2.js +2 -10
- package/es/components/upload/use-handlers.js +1 -3
- package/es/components/virtual-list/builders/build-grid.js +14 -77
- package/es/components/virtual-list/builders/build-list.js +9 -46
- package/es/components/virtual-list/components/dynamic-size-grid.js +4 -29
- package/es/components/virtual-list/components/dynamic-size-list.js +2 -11
- package/es/components/virtual-list/components/fixed-size-grid.js +9 -40
- package/es/components/virtual-list/components/fixed-size-list.js +1 -3
- package/es/components/virtual-list/components/scrollbar.js +3 -14
- package/es/components/virtual-list/props.js +1 -4
- package/es/constants/date.d.ts +1 -1
- package/es/constants/date.js +1 -9
- package/es/constants/size.d.ts +1 -1
- package/es/hooks/use-draggable/index.js +2 -10
- package/es/hooks/use-lockscreen/index.js +1 -4
- package/es/hooks/use-model-toggle/index.js +1 -3
- package/es/hooks/use-ordered-children/index.js +1 -3
- package/es/hooks/use-popper/index.js +5 -18
- package/es/index.js +408 -405
- package/es/package.json.d.ts +77 -0
- package/es/package.json.js +1 -1
- package/es/plugin.js +1 -5
- package/es/utils/ns-cover.js +16 -7
- package/es/utils/vue/install.d.ts +3 -0
- package/es/utils/vue/props/runtime.js +2 -9
- package/lib/component.cjs +1 -1
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue.d.ts +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/form/types.d.ts +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/image/index.cjs +1 -1
- package/lib/components/image/index.d.ts +49 -0
- package/lib/components/image/p-image.vue.cjs +1 -0
- package/lib/components/image/p-image.vue.d.ts +51 -0
- package/lib/components/image/p-image.vue2.cjs +1 -0
- package/lib/components/image/types.d.ts +1 -0
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/p-image/style/css.cjs +1 -0
- package/lib/components/p-image/style/css.d.ts +0 -0
- package/lib/components/p-image/style/index.cjs +1 -0
- package/lib/components/p-image/style/index.d.ts +0 -0
- package/lib/components/popper/content.vue.d.ts +2 -4
- package/lib/components/progress-i/index.cjs +1 -0
- package/lib/components/progress-i/index.d.ts +2 -0
- package/lib/components/progress-i/progress-i.vue.cjs +1 -0
- package/lib/components/progress-i/progress-i.vue.d.ts +2 -0
- package/lib/components/progress-i/progress-i.vue2.cjs +1 -0
- package/lib/components/progress-i/style/css.cjs +1 -0
- package/lib/components/progress-i/style/css.d.ts +0 -0
- package/lib/components/progress-i/style/index.cjs +1 -0
- package/lib/components/progress-i/style/index.d.ts +0 -0
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/search/index.d.ts +2 -0
- package/lib/components/search/search.vue.d.ts +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/index.d.ts +10 -7
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue.d.ts +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue.d.ts +4 -3
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/index.d.ts +357 -82
- package/lib/components/table/table.vue.d.ts +91 -30
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/types.d.ts +2 -2
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/table/use/use-table.d.ts +1 -4
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/time-picker/constants.d.ts +1 -1
- package/lib/constants/date.d.ts +1 -1
- package/lib/constants/size.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +77 -0
- package/lib/utils/vue/install.d.ts +3 -0
- package/package.json +4 -4
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/index.scss +4 -0
- package/theme-style/src/input.scss +1 -0
- package/theme-style/src/p-image.scss +18 -0
- package/theme-style/src/progress-i.scss +0 -0
- package/theme-style/src/table.scss +7 -0
- package/theme-style/src/tabs.scss +120 -3
- package/theme-style/vft-input.css +1 -1
- package/theme-style/vft-md-comment.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-md-vue-playground.css +1 -1
- package/theme-style/vft-p-image.css +1 -0
- package/theme-style/vft-progress-i.css +0 -0
- package/theme-style/vft-select.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/theme-style/vft-tabs.css +1 -1
- package/web-types.json +1 -1
|
@@ -21,11 +21,7 @@ const z = A({
|
|
|
21
21
|
* @description Classname
|
|
22
22
|
*/
|
|
23
23
|
class: {
|
|
24
|
-
type: d([
|
|
25
|
-
String,
|
|
26
|
-
Object,
|
|
27
|
-
Array
|
|
28
|
-
]),
|
|
24
|
+
type: d([String, Object, Array]),
|
|
29
25
|
default: ""
|
|
30
26
|
},
|
|
31
27
|
/**
|
|
@@ -88,11 +84,7 @@ const z = A({
|
|
|
88
84
|
const { prefixCls: i } = e;
|
|
89
85
|
return n.forEach((l, f) => {
|
|
90
86
|
h(l) ? p(l.children) && l.children.forEach((o, s) => {
|
|
91
|
-
h(o) && p(o.children) ? y(
|
|
92
|
-
o.children,
|
|
93
|
-
`${a + s}-`,
|
|
94
|
-
t
|
|
95
|
-
) : t.push(
|
|
87
|
+
h(o) && p(o.children) ? y(o.children, `${a + s}-`, t) : t.push(
|
|
96
88
|
c(
|
|
97
89
|
g,
|
|
98
90
|
{
|
|
@@ -132,35 +124,29 @@ const z = A({
|
|
|
132
124
|
let i = y(t.children);
|
|
133
125
|
if (n) {
|
|
134
126
|
const l = i.length - 1;
|
|
135
|
-
i = i.reduce(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
r.STYLE
|
|
159
|
-
)
|
|
160
|
-
), S;
|
|
161
|
-
},
|
|
162
|
-
[]
|
|
163
|
-
);
|
|
127
|
+
i = i.reduce((f, o, s) => {
|
|
128
|
+
const S = [...f, o];
|
|
129
|
+
return s !== l && S.push(
|
|
130
|
+
c(
|
|
131
|
+
"span",
|
|
132
|
+
// adding width 100% for vertical alignment,
|
|
133
|
+
// when the spacer inherit the width from the
|
|
134
|
+
// parent, this span's width was not set, so space
|
|
135
|
+
// might disappear
|
|
136
|
+
{
|
|
137
|
+
style: [u.value, a === "vertical" ? "width: 100%" : null],
|
|
138
|
+
key: s
|
|
139
|
+
},
|
|
140
|
+
[
|
|
141
|
+
// if spacer is already a valid vnode, then append it to the current
|
|
142
|
+
// span element.
|
|
143
|
+
// otherwise, treat it as string.
|
|
144
|
+
b(n) ? n : V(n, r.TEXT)
|
|
145
|
+
],
|
|
146
|
+
r.STYLE
|
|
147
|
+
)
|
|
148
|
+
), S;
|
|
149
|
+
}, []);
|
|
164
150
|
}
|
|
165
151
|
return c(
|
|
166
152
|
"div",
|
|
@@ -92,6 +92,7 @@ import "@popperjs/core";
|
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
94
|
import "../infinite-scroll/index.js";
|
|
95
|
+
import "../progress-i/index.js";
|
|
95
96
|
var T = /* @__PURE__ */ ((t) => (t.INPUT = "input", t.INPUT_NUMBER = "input-number", t.INPUT_NUMBER_STEP = "input-number-step", t.PASSWORD = "password", t.TEXTAREA = "textarea", t.DIVIDER = "divider", t.SELECT = "select", t.SEARCH = "search", t.RADIO = "radio", t.RADIO_SINGLE = "radio_single", t.RADIO_BUTTON = "radio-button", t.CHECKBOX = "checkbox", t.CHECKBOX_SINGLE = "checkbox_single", t.CHECKBOX_BUTTON = "checkbox-button", t.SWITCH = "switch", t.TIME_PICKER = "time-picker", t.YEAR_PICKER = "year", t.MONTH_PICKER = "month", t.DATE_PICKER = "date", t.DATES_PICKER = "dates", t.DATETIME_PICKER = "datetime", t.WEEK_PICKER = "week", t.DATETIMERANGE_PICKER = "datetimerange", t.DATERANGE_PICKER = "daterange", t.MONTHRANGE_PICKER = "monthrange", t))(T || {});
|
|
96
97
|
const i = /* @__PURE__ */ new Map();
|
|
97
98
|
i.set("input", e);
|
|
@@ -119,25 +120,27 @@ i.set("week", r);
|
|
|
119
120
|
i.set("datetimerange", r);
|
|
120
121
|
i.set("daterange", r);
|
|
121
122
|
i.set("monthrange", r);
|
|
122
|
-
function
|
|
123
|
+
function ei(t, a) {
|
|
123
124
|
i.set(t, a);
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
+
function oi(t) {
|
|
126
127
|
i.delete(t);
|
|
127
128
|
}
|
|
128
|
-
const
|
|
129
|
+
const pi = (t) => [
|
|
129
130
|
"datetimerange",
|
|
130
131
|
"daterange",
|
|
131
132
|
"monthrange"
|
|
132
133
|
/* MONTHRANGE_PICKER */
|
|
133
|
-
].includes(
|
|
134
|
+
].includes(
|
|
135
|
+
t
|
|
136
|
+
), ai = (t) => [
|
|
134
137
|
"input",
|
|
135
138
|
"input-number",
|
|
136
139
|
"password",
|
|
137
140
|
"textarea",
|
|
138
141
|
"search"
|
|
139
142
|
/* SEARCH */
|
|
140
|
-
].includes(t),
|
|
143
|
+
].includes(t), si = (t) => [
|
|
141
144
|
"year",
|
|
142
145
|
"month",
|
|
143
146
|
"date",
|
|
@@ -151,10 +154,10 @@ const oi = (t) => [
|
|
|
151
154
|
].includes(t);
|
|
152
155
|
export {
|
|
153
156
|
T as FormCompEnum,
|
|
154
|
-
|
|
157
|
+
ei as add,
|
|
155
158
|
i as componentMap,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
oi as del,
|
|
160
|
+
si as isDatePicker,
|
|
161
|
+
ai as isInput,
|
|
162
|
+
pi as isRangePicker
|
|
160
163
|
};
|
|
@@ -93,7 +93,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
93
93
|
readonly submitButtonOptions?: import("./types").ButtonOptions | undefined;
|
|
94
94
|
readonly commonButtonOptions?: import("./types").ButtonOptions | undefined;
|
|
95
95
|
readonly actionRowOptions?: Partial<import("..").RowProps> | undefined;
|
|
96
|
-
onRegister?: (() => any) | undefined;
|
|
96
|
+
onRegister?: ((args_0: Partial<import("./types").FormActionType>) => any) | undefined;
|
|
97
97
|
"onField-value-change"?: (() => any) | undefined;
|
|
98
98
|
};
|
|
99
99
|
$attrs: {
|
|
@@ -107,7 +107,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
107
107
|
}>;
|
|
108
108
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
109
109
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
110
|
-
$emit: ((event: "reset") => void) & ((event: "submit") => void) & ((event: "register") => void) & ((event: "field-value-change") => void);
|
|
110
|
+
$emit: ((event: "reset") => void) & ((event: "submit") => void) & ((event: "register", args_0: Partial<import("./types").FormActionType>) => void) & ((event: "field-value-change") => void);
|
|
111
111
|
$el: any;
|
|
112
112
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
113
113
|
size: {
|
|
@@ -267,7 +267,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
267
267
|
}>> & {
|
|
268
268
|
onReset?: (() => any) | undefined;
|
|
269
269
|
onSubmit?: (() => any) | undefined;
|
|
270
|
-
onRegister?: (() => any) | undefined;
|
|
270
|
+
onRegister?: ((args_0: Partial<import("./types").FormActionType>) => any) | undefined;
|
|
271
271
|
"onField-value-change"?: (() => any) | undefined;
|
|
272
272
|
}, {
|
|
273
273
|
getFieldsValue: () => Recordable<any>;
|
|
@@ -284,8 +284,9 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
284
284
|
validate: (nameList?: any[] | undefined) => Promise<any>;
|
|
285
285
|
submit: (e?: Event | undefined) => Promise<void>;
|
|
286
286
|
setFormItemError: any;
|
|
287
|
+
getSchema: import("vue").ComputedRef<import("./types").FormSchema[]>;
|
|
287
288
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
288
|
-
register: () => void;
|
|
289
|
+
register: (args_0: Partial<import("./types").FormActionType>) => void;
|
|
289
290
|
reset: () => void;
|
|
290
291
|
submit: () => void;
|
|
291
292
|
'field-value-change': () => void;
|
|
@@ -488,7 +489,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
488
489
|
}>> & {
|
|
489
490
|
onReset?: (() => any) | undefined;
|
|
490
491
|
onSubmit?: (() => any) | undefined;
|
|
491
|
-
onRegister?: (() => any) | undefined;
|
|
492
|
+
onRegister?: ((args_0: Partial<import("./types").FormActionType>) => any) | undefined;
|
|
492
493
|
"onField-value-change"?: (() => any) | undefined;
|
|
493
494
|
} & import("vue").ShallowUnwrapRef<{
|
|
494
495
|
getFieldsValue: () => Recordable<any>;
|
|
@@ -505,6 +506,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
505
506
|
validate: (nameList?: any[] | undefined) => Promise<any>;
|
|
506
507
|
submit: (e?: Event | undefined) => Promise<void>;
|
|
507
508
|
setFormItemError: any;
|
|
509
|
+
getSchema: import("vue").ComputedRef<import("./types").FormSchema[]>;
|
|
508
510
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
509
511
|
__isFragment?: undefined;
|
|
510
512
|
__isTeleport?: undefined;
|
|
@@ -667,7 +669,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
667
669
|
}>> & {
|
|
668
670
|
onReset?: (() => any) | undefined;
|
|
669
671
|
onSubmit?: (() => any) | undefined;
|
|
670
|
-
onRegister?: (() => any) | undefined;
|
|
672
|
+
onRegister?: ((args_0: Partial<import("./types").FormActionType>) => any) | undefined;
|
|
671
673
|
"onField-value-change"?: (() => any) | undefined;
|
|
672
674
|
}, {
|
|
673
675
|
getFieldsValue: () => Recordable<any>;
|
|
@@ -684,8 +686,9 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
684
686
|
validate: (nameList?: any[] | undefined) => Promise<any>;
|
|
685
687
|
submit: (e?: Event | undefined) => Promise<void>;
|
|
686
688
|
setFormItemError: any;
|
|
689
|
+
getSchema: import("vue").ComputedRef<import("./types").FormSchema[]>;
|
|
687
690
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
688
|
-
register: () => void;
|
|
691
|
+
register: (args_0: Partial<import("./types").FormActionType>) => void;
|
|
689
692
|
reset: () => void;
|
|
690
693
|
submit: () => void;
|
|
691
694
|
'field-value-change': () => void;
|
|
@@ -92,8 +92,9 @@ import "@popperjs/core";
|
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
94
|
import "../infinite-scroll/index.js";
|
|
95
|
+
import "../progress-i/index.js";
|
|
95
96
|
import { useFormContext as x } from "./use/use-form-context.js";
|
|
96
|
-
const
|
|
97
|
+
const Co = /* @__PURE__ */ k({
|
|
97
98
|
__name: "super-form-action",
|
|
98
99
|
props: {
|
|
99
100
|
showResetButton: { type: Boolean },
|
|
@@ -105,10 +106,7 @@ const wo = /* @__PURE__ */ k({
|
|
|
105
106
|
actionRowOptions: {}
|
|
106
107
|
},
|
|
107
108
|
setup(r) {
|
|
108
|
-
const m = V("form-action"), {
|
|
109
|
-
resetAction: d,
|
|
110
|
-
submitAction: w
|
|
111
|
-
} = x(), C = p(() => ({
|
|
109
|
+
const m = V("form-action"), { resetAction: d, submitAction: w } = x(), C = p(() => ({
|
|
112
110
|
justify: "end",
|
|
113
111
|
...r.actionRowOptions
|
|
114
112
|
})), b = p(() => Object.assign({ btnText: "重置" }, r.resetButtonOptions)), s = p(() => Object.assign({ btnText: "确认" }, r.submitButtonOptions)), O = p(() => Object.assign({ btnText: "取消" }, r.commonButtonOptions));
|
|
@@ -160,5 +158,5 @@ const wo = /* @__PURE__ */ k({
|
|
|
160
158
|
}
|
|
161
159
|
});
|
|
162
160
|
export {
|
|
163
|
-
|
|
161
|
+
Co as default
|
|
164
162
|
};
|
|
@@ -5,7 +5,7 @@ export interface SuperFormItemProps {
|
|
|
5
5
|
allDefaultValues?: Record<string, any>;
|
|
6
6
|
formModel?: Record<string, any>;
|
|
7
7
|
setFormModel?: (key: string, value: any, schema: FormSchema) => void;
|
|
8
|
-
updateSchema?: (data:
|
|
8
|
+
updateSchema?: (data: Partial<FormSchema> | Partial<FormSchema>[]) => Promise<void>;
|
|
9
9
|
tableAction?: any;
|
|
10
10
|
formActionType?: FormActionType;
|
|
11
11
|
isAdvanced?: boolean;
|
|
@@ -92,6 +92,7 @@ import "@popperjs/core";
|
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
94
|
import "../infinite-scroll/index.js";
|
|
95
|
+
import "../progress-i/index.js";
|
|
95
96
|
import { FormCompEnum as s, componentMap as B, isInput as se, isDatePicker as me, isRangePicker as le } from "./component-map.js";
|
|
96
97
|
import { createPlaceholderMessage as U } from "./use/helper.js";
|
|
97
98
|
function q(r) {
|
|
@@ -99,7 +100,7 @@ function q(r) {
|
|
|
99
100
|
}
|
|
100
101
|
const ae = H({
|
|
101
102
|
inheritAttrs: !1
|
|
102
|
-
}),
|
|
103
|
+
}), _t = /* @__PURE__ */ H({
|
|
103
104
|
...ae,
|
|
104
105
|
__name: "super-form-item",
|
|
105
106
|
props: {
|
|
@@ -207,23 +208,23 @@ const ae = H({
|
|
|
207
208
|
dynamicRule: c,
|
|
208
209
|
required: R,
|
|
209
210
|
dynamicRuleAdd: C = !0
|
|
210
|
-
} = r.schema,
|
|
211
|
+
} = r.schema, d = m || l;
|
|
211
212
|
if (P(c) && !C)
|
|
212
213
|
return c(u(E));
|
|
213
214
|
let o = _(e);
|
|
214
215
|
const {
|
|
215
216
|
rulesMessageJoinLabel: b
|
|
216
|
-
} = r.formProps, A = Reflect.has(r.schema, "rulesMessageJoinLabel") ? a : b, y = U(t, `${A ?
|
|
217
|
+
} = r.formProps, A = Reflect.has(r.schema, "rulesMessageJoinLabel") ? a : b, y = U(t, `${A ? d : ""}`);
|
|
217
218
|
function T(n, i) {
|
|
218
219
|
const I = n.message || y;
|
|
219
220
|
return i === void 0 || ee(i) || Array.isArray(i) && i.length === 0 || typeof i == "string" && i.trim() === "" || typeof i == "object" && Reflect.has(i, "checked") && Reflect.has(i, "halfChecked") && Array.isArray(i.checked) && Array.isArray(i.halfChecked) && i.checked.length === 0 && i.halfChecked.length === 0 ? Promise.reject(I) : Promise.resolve();
|
|
220
221
|
}
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
required:
|
|
222
|
+
const p = P(R) ? R(u(E)) : R;
|
|
223
|
+
p && (!o || o.length === 0 ? o = [{
|
|
224
|
+
required: p,
|
|
224
225
|
validator: T
|
|
225
226
|
}] : o.findIndex((i) => Reflect.has(i, "required")) === -1 && o.unshift({
|
|
226
|
-
required:
|
|
227
|
+
required: p,
|
|
227
228
|
validator: T
|
|
228
229
|
}));
|
|
229
230
|
const M = o.findIndex((n) => Reflect.has(n, "required") && !Reflect.has(n, "validator"));
|
|
@@ -236,11 +237,11 @@ const ae = H({
|
|
|
236
237
|
const f = o.findIndex((n) => n.min), g = o.findIndex((n) => n.max);
|
|
237
238
|
function N(n, i, I = "all") {
|
|
238
239
|
const K = o[i].isNumber ? isNaN(te(n)) ? (n == null ? void 0 : n.length) || 0 : Number(n) : (n == null ? void 0 : n.length) || 0;
|
|
239
|
-
return ["min", "all"].includes(I) && K < o[i].min ? Promise.reject(
|
|
240
|
+
return ["min", "all"].includes(I) && K < o[i].min ? Promise.reject(d + "至少为" + o[i].min + "位") : ["max", "all"].includes(I) && K > o[i].max ? Promise.reject(d + "最多" + o[i].max + "位") : Promise.resolve();
|
|
240
241
|
}
|
|
241
242
|
(f !== -1 || g !== -1) && (f !== -1 && g !== -1 && !o[f].validator && !o[f].message ? o[f].validator = (n, i) => N(i, f) : f !== -1 && !o[f].validator && !o[f].message ? o[f].validator = (n, i) => N(i, f, "min") : g !== -1 && !o[g].validator && !o[g].message && (o[g].validator = (n, i) => N(i, g, "max")));
|
|
242
243
|
const S = o.findIndex((n) => n.len);
|
|
243
|
-
return S !== -1 && (o[S].validator = (n, i) => i.length !== o[S].len ? Promise.reject(
|
|
244
|
+
return S !== -1 && (o[S].validator = (n, i) => i.length !== o[S].len ? Promise.reject(d + "必须是" + o[S].len + "位") : Promise.resolve()), P(c) && C && o.push(c(u(E))), o;
|
|
244
245
|
}
|
|
245
246
|
const W = () => {
|
|
246
247
|
var S;
|
|
@@ -254,30 +255,30 @@ const ae = H({
|
|
|
254
255
|
title: R,
|
|
255
256
|
placeholderJoinLabel: C = !0
|
|
256
257
|
} = r.schema;
|
|
257
|
-
let
|
|
258
|
-
se(t) ?
|
|
259
|
-
const o = `on${re(
|
|
258
|
+
let d = m;
|
|
259
|
+
se(t) ? d = "input" : (me(t) || t === s.TIME_PICKER) && (d = "update:modelValue");
|
|
260
|
+
const o = `on${re(d)}`, b = {
|
|
260
261
|
[o]: (...n) => {
|
|
261
262
|
const [i] = n;
|
|
262
|
-
|
|
263
|
+
p[o] && p[o](...n);
|
|
263
264
|
const I = i ? i.target : null, K = I ? I.value : i;
|
|
264
265
|
r.setFormModel(a, K, r.schema);
|
|
265
266
|
}
|
|
266
267
|
}, A = B.get(t), {
|
|
267
268
|
autoSetPlaceHolder: y,
|
|
268
269
|
size: T
|
|
269
|
-
} = r.formProps,
|
|
270
|
+
} = r.formProps, p = {
|
|
270
271
|
clearable: !0,
|
|
271
272
|
size: T,
|
|
272
273
|
...u(x),
|
|
273
274
|
disabled: u(G)
|
|
274
275
|
};
|
|
275
|
-
!
|
|
276
|
+
!p.disabled && y && !le(t) && t && (p.placeholder = ((S = u(x)) == null ? void 0 : S.placeholder) || U(t, C ? c || R : ""));
|
|
276
277
|
const f = {
|
|
277
278
|
[l || "model-value"]: r.formModel[a]
|
|
278
279
|
}, g = {
|
|
279
280
|
...b,
|
|
280
|
-
...
|
|
281
|
+
...p,
|
|
281
282
|
...f
|
|
282
283
|
};
|
|
283
284
|
if (!e)
|
|
@@ -320,8 +321,8 @@ const ae = H({
|
|
|
320
321
|
prefixParentStyle: R
|
|
321
322
|
} = r.schema, {
|
|
322
323
|
autoCleanErrorMessage: C,
|
|
323
|
-
compFullWidth:
|
|
324
|
-
} = r.formProps, o = () => t ? v(k, t, u(E)) : a ? a(u(E)) : W(), b = !!l, A = !!c, y = P(l) ? l(u(E)) : l, T = P(c) ? c(u(E)) : c,
|
|
324
|
+
compFullWidth: d
|
|
325
|
+
} = r.formProps, o = () => t ? v(k, t, u(E)) : a ? a(u(E)) : W(), b = !!l, A = !!c, y = P(l) ? l(u(E)) : l, T = P(c) ? c(u(E)) : c, p = () => {
|
|
325
326
|
r.updateSchema([{
|
|
326
327
|
field: m,
|
|
327
328
|
itemProps: {
|
|
@@ -333,11 +334,11 @@ const ae = H({
|
|
|
333
334
|
class: [{
|
|
334
335
|
[D.is(l)]: b
|
|
335
336
|
}, {
|
|
336
|
-
[D.is("comp-full-width")]:
|
|
337
|
+
[D.is("comp-full-width")]: d
|
|
337
338
|
}, D.e("item")]
|
|
338
339
|
}, e, {
|
|
339
340
|
label: (e == null ? void 0 : e.label) || (e == null ? void 0 : e.title),
|
|
340
|
-
"onUpdate:error": C ?
|
|
341
|
+
"onUpdate:error": C ? p : null,
|
|
341
342
|
rules: J()
|
|
342
343
|
}), {
|
|
343
344
|
default: () => [h("div", {
|
|
@@ -369,9 +370,9 @@ const ae = H({
|
|
|
369
370
|
return null;
|
|
370
371
|
const {
|
|
371
372
|
baseColProps: C = {},
|
|
372
|
-
quickColSpan:
|
|
373
|
-
} = r.formProps, o =
|
|
374
|
-
span: Math.ceil(24 /
|
|
373
|
+
quickColSpan: d
|
|
374
|
+
} = r.formProps, o = d ? {
|
|
375
|
+
span: Math.ceil(24 / d),
|
|
375
376
|
...C
|
|
376
377
|
} : {}, b = R ? {
|
|
377
378
|
span: Math.ceil(24 / R),
|
|
@@ -382,7 +383,7 @@ const ae = H({
|
|
|
382
383
|
}, {
|
|
383
384
|
isIfShow: y,
|
|
384
385
|
isShow: T
|
|
385
|
-
} = O(),
|
|
386
|
+
} = O(), p = u(E), M = () => a ? v(k, a, p) : m ? m(p) : $();
|
|
386
387
|
if (l === s.DIVIDER) {
|
|
387
388
|
let f;
|
|
388
389
|
return h(L, F({
|
|
@@ -400,5 +401,5 @@ const ae = H({
|
|
|
400
401
|
}
|
|
401
402
|
});
|
|
402
403
|
export {
|
|
403
|
-
|
|
404
|
+
_t as default
|
|
404
405
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FormSchema, SuperFormProps } from './types';
|
|
1
|
+
import type { FormActionType, FormSchema, SuperFormProps } from './types';
|
|
2
2
|
declare function setProps(formProps: Partial<SuperFormProps>): Promise<void>;
|
|
3
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
4
4
|
size: {
|
|
@@ -170,8 +170,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
170
170
|
validate: (nameList?: any[] | undefined) => Promise<any>;
|
|
171
171
|
submit: (e?: Event | undefined) => Promise<void>;
|
|
172
172
|
setFormItemError: any;
|
|
173
|
+
getSchema: import("vue").ComputedRef<FormSchema[]>;
|
|
173
174
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
174
|
-
register: () => void;
|
|
175
|
+
register: (args_0: Partial<FormActionType>) => void;
|
|
175
176
|
reset: () => void;
|
|
176
177
|
submit: () => void;
|
|
177
178
|
'field-value-change': () => void;
|
|
@@ -333,7 +334,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
333
334
|
}>> & {
|
|
334
335
|
onReset?: (() => any) | undefined;
|
|
335
336
|
onSubmit?: (() => any) | undefined;
|
|
336
|
-
onRegister?: (() => any) | undefined;
|
|
337
|
+
onRegister?: ((args_0: Partial<FormActionType>) => any) | undefined;
|
|
337
338
|
"onField-value-change"?: (() => any) | undefined;
|
|
338
339
|
}, {
|
|
339
340
|
size: "" | "small" | "default" | "large";
|
|
@@ -92,6 +92,7 @@ import "@popperjs/core";
|
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
94
|
import "../infinite-scroll/index.js";
|
|
95
|
+
import "../progress-i/index.js";
|
|
95
96
|
import { FormCompEnum as Et } from "./component-map.js";
|
|
96
97
|
import et from "./super-form-action.vue2.js";
|
|
97
98
|
import Vt from "./super-form-item.vue2.js";
|
|
@@ -104,7 +105,7 @@ const It = (
|
|
|
104
105
|
Rt("super-form")
|
|
105
106
|
), Tt = ot({
|
|
106
107
|
name: "vft-super-form"
|
|
107
|
-
}),
|
|
108
|
+
}), Oo = /* @__PURE__ */ ot({
|
|
108
109
|
...Tt,
|
|
109
110
|
props: {
|
|
110
111
|
rowProps: {
|
|
@@ -354,7 +355,8 @@ const It = (
|
|
|
354
355
|
validateField: P,
|
|
355
356
|
validate: N,
|
|
356
357
|
submit: s,
|
|
357
|
-
setFormItemError: lt
|
|
358
|
+
setFormItemError: lt,
|
|
359
|
+
getSchema: a
|
|
358
360
|
}), (t, r) => {
|
|
359
361
|
var V;
|
|
360
362
|
const i = ht("vft-col");
|
|
@@ -413,5 +415,5 @@ const It = (
|
|
|
413
415
|
}
|
|
414
416
|
});
|
|
415
417
|
export {
|
|
416
|
-
|
|
418
|
+
Oo as default
|
|
417
419
|
};
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { watchEffect as u, unref as e, nextTick as m } from "vue";
|
|
2
2
|
import { FormCompEnum as a } from "../component-map.js";
|
|
3
|
-
async function F({
|
|
4
|
-
getSchema: n,
|
|
5
|
-
getProps: s,
|
|
6
|
-
formElRef: f,
|
|
7
|
-
isInitedDefault: i
|
|
8
|
-
}) {
|
|
3
|
+
async function F({ getSchema: n, getProps: s, formElRef: f, isInitedDefault: i }) {
|
|
9
4
|
u(async () => {
|
|
10
5
|
if (e(i) || !e(s).autoFocusFirstItem)
|
|
11
6
|
return;
|
|
@@ -122,9 +122,7 @@ function vt({
|
|
|
122
122
|
if (I(t) && n.push(t), w(t) && (n = [...t]), !n.every(
|
|
123
123
|
(i) => i.type === x.DIVIDER || Reflect.has(i, "field") && i.field
|
|
124
124
|
)) {
|
|
125
|
-
console.error(
|
|
126
|
-
"All children of the form Schema array that need to be updated must contain the `field` field"
|
|
127
|
-
);
|
|
125
|
+
console.error("All children of the form Schema array that need to be updated must contain the `field` field");
|
|
128
126
|
return;
|
|
129
127
|
}
|
|
130
128
|
y.value = n;
|
|
@@ -134,9 +132,7 @@ function vt({
|
|
|
134
132
|
if (I(t) && n.push(t), w(t) && (n = [...t]), !n.every(
|
|
135
133
|
(e) => e.type === x.DIVIDER || Reflect.has(e, "field") && e.field
|
|
136
134
|
)) {
|
|
137
|
-
console.error(
|
|
138
|
-
"All children of the form Schema array that need to be updated must contain the `field` field"
|
|
139
|
-
);
|
|
135
|
+
console.error("All children of the form Schema array that need to be updated must contain the `field` field");
|
|
140
136
|
return;
|
|
141
137
|
}
|
|
142
138
|
const i = [], r = [];
|
|
@@ -25,12 +25,7 @@ function M(m, e, a) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
function $({
|
|
29
|
-
defaultValueRef: m,
|
|
30
|
-
getSchema: e,
|
|
31
|
-
formModel: a,
|
|
32
|
-
getProps: c
|
|
33
|
-
}) {
|
|
28
|
+
function $({ defaultValueRef: m, getSchema: e, formModel: a, getProps: c }) {
|
|
34
29
|
function o(r) {
|
|
35
30
|
var i, f;
|
|
36
31
|
if (!T(r))
|
|
@@ -84,13 +84,7 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
|
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
const l = e();
|
|
87
|
-
[
|
|
88
|
-
j(l),
|
|
89
|
-
te(l)
|
|
90
|
-
].includes(!0) || le(
|
|
91
|
-
i.b(),
|
|
92
|
-
"beforeChange must return type `Promise<boolean>` or `boolean`"
|
|
93
|
-
), j(l) ? l.then((p) => {
|
|
87
|
+
[j(l), te(l)].includes(!0) || le(i.b(), "beforeChange must return type `Promise<boolean>` or `boolean`"), j(l) ? l.then((p) => {
|
|
94
88
|
p && k();
|
|
95
89
|
}).catch((p) => {
|
|
96
90
|
G(i.b(), `some error occurred: ${p}`);
|
|
@@ -140,11 +134,7 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
|
|
|
140
134
|
}, null, 42, ve),
|
|
141
135
|
!e.inlinePrompt && (e.inactiveIcon || e.inactiveText) ? (n(), u("span", {
|
|
142
136
|
key: 0,
|
|
143
|
-
class: r([
|
|
144
|
-
o(i).e("label"),
|
|
145
|
-
o(i).em("label", "left"),
|
|
146
|
-
o(i).is("active", !t.value)
|
|
147
|
-
])
|
|
137
|
+
class: r([o(i).e("label"), o(i).em("label", "left"), o(i).is("active", !t.value)])
|
|
148
138
|
}, [
|
|
149
139
|
(b = f.value) != null && b.icon ? (n(), V(o(C), E(I({ key: 0 }, f.value)), null, 16)) : c("", !0),
|
|
150
140
|
!((p = f.value) != null && p.icon) && e.inactiveText ? (n(), u("span", {
|
|
@@ -181,11 +171,7 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
|
|
|
181
171
|
], 6),
|
|
182
172
|
!e.inlinePrompt && ((K = m.value) != null && K.icon || e.activeText) ? (n(), u("span", {
|
|
183
173
|
key: 1,
|
|
184
|
-
class: r([
|
|
185
|
-
o(i).e("label"),
|
|
186
|
-
o(i).em("label", "right"),
|
|
187
|
-
o(i).is("active", t.value)
|
|
188
|
-
])
|
|
174
|
+
class: r([o(i).e("label"), o(i).em("label", "right"), o(i).is("active", t.value)])
|
|
189
175
|
}, [
|
|
190
176
|
(O = m.value) != null && O.icon ? (n(), V(o(C), E(I({ key: 0 }, m.value)), null, 16)) : c("", !0),
|
|
191
177
|
!((A = m.value) != null && A.icon) && e.activeText ? (n(), u("span", {
|
|
@@ -92,28 +92,29 @@ import "@popperjs/core";
|
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
94
|
import "../infinite-scroll/index.js";
|
|
95
|
+
import "../progress-i/index.js";
|
|
95
96
|
function u(i) {
|
|
96
97
|
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !_(i);
|
|
97
98
|
}
|
|
98
|
-
const
|
|
99
|
+
const si = {
|
|
99
100
|
type: "seq",
|
|
100
101
|
title: "序号",
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
},
|
|
102
|
+
fixed: "left",
|
|
103
|
+
width: 53
|
|
104
|
+
}, fi = {
|
|
104
105
|
type: "checkbox",
|
|
105
106
|
title: "",
|
|
106
107
|
minWidth: 60,
|
|
107
108
|
fixed: "left"
|
|
108
|
-
},
|
|
109
|
+
}, di = {
|
|
109
110
|
field: "id",
|
|
110
111
|
title: "Id",
|
|
111
112
|
minWidth: 100
|
|
112
|
-
},
|
|
113
|
+
}, Di = {
|
|
113
114
|
field: "name",
|
|
114
115
|
title: "名称",
|
|
115
116
|
minWidth: 100
|
|
116
|
-
},
|
|
117
|
+
}, Ei = ({
|
|
117
118
|
format: i = "YYYY-MM-DD",
|
|
118
119
|
field: t = "date",
|
|
119
120
|
title: o = "时间"
|
|
@@ -135,7 +136,7 @@ const ui = {
|
|
|
135
136
|
formatter: ({
|
|
136
137
|
row: r
|
|
137
138
|
}) => r[t] ? l(r[t], i) : "-"
|
|
138
|
-
}),
|
|
139
|
+
}), li = ({
|
|
139
140
|
format: i = "YYYY-MM-DD HH:mm:ss",
|
|
140
141
|
field: t = "createTime",
|
|
141
142
|
title: o = "创建时间"
|
|
@@ -143,7 +144,7 @@ const ui = {
|
|
|
143
144
|
format: i,
|
|
144
145
|
field: t,
|
|
145
146
|
title: o
|
|
146
|
-
}),
|
|
147
|
+
}), ci = ({
|
|
147
148
|
format: i = "YYYY-MM-DD HH:mm:ss",
|
|
148
149
|
field: t = "updateTime",
|
|
149
150
|
title: o = "更新时间"
|
|
@@ -151,7 +152,7 @@ const ui = {
|
|
|
151
152
|
format: i,
|
|
152
153
|
field: t,
|
|
153
154
|
title: o
|
|
154
|
-
}),
|
|
155
|
+
}), ai = ({
|
|
155
156
|
field: i = "status",
|
|
156
157
|
title: t = "状态",
|
|
157
158
|
normalText: o = "正常",
|
|
@@ -175,7 +176,7 @@ const ui = {
|
|
|
175
176
|
}));
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
|
-
}),
|
|
179
|
+
}), Ii = ({
|
|
179
180
|
confirmText: i = "确认删除?",
|
|
180
181
|
leftCallback: t,
|
|
181
182
|
rightCallback: o,
|
|
@@ -220,14 +221,14 @@ const ui = {
|
|
|
220
221
|
}
|
|
221
222
|
});
|
|
222
223
|
export {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
Ii as ACTION_FIELD,
|
|
225
|
+
fi as CHECKED_FIELD,
|
|
226
|
+
li as CREATE_TIME_FIELD,
|
|
227
|
+
Ei as DATE_FIELD,
|
|
227
228
|
c as DATE_TIME_FIELD,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
di as ID_FIELD,
|
|
230
|
+
Di as NAME_FIELD,
|
|
231
|
+
si as SEQ_FIELD,
|
|
232
|
+
ai as STATUS_FIELD,
|
|
233
|
+
ci as UPDATE_TIME_FIELD
|
|
233
234
|
};
|