vft 0.0.509 → 0.0.511
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/dist/index.css +1 -1
- package/es/components/affix/affix.vue2.js +2 -2
- package/es/components/alert/alert.vue2.js +1 -1
- package/es/components/autocomplete/autocomplete.vue2.js +1 -1
- package/es/components/avatar/avatar.vue2.js +2 -2
- package/es/components/avatar-stack/avatar-stack.vue2.js +7 -7
- package/es/components/backtop/backtop.vue2.js +1 -1
- package/es/components/breadcrumb/breadcrumb-item.vue2.js +3 -3
- package/es/components/breadcrumb/breadcrumb.vue2.js +2 -2
- package/es/components/button/button-group.vue2.js +2 -2
- package/es/components/button/button.vue2.js +7 -7
- package/es/components/button/use-button.js +3 -3
- package/es/components/card/card.vue2.js +6 -6
- package/es/components/carousel/carousel-item.vue2.js +3 -3
- package/es/components/carousel/carousel.vue2.js +1 -1
- package/es/components/cascader/cascader.vue2.js +2 -2
- package/es/components/cascader-panel/index.vue2.js +1 -1
- package/es/components/cascader-panel/menu.vue2.js +6 -6
- package/es/components/cascader-panel/node.vue2.js +8 -8
- package/es/components/check-tag/check-tag.vue2.js +2 -2
- package/es/components/checkbox/checkbox-button.vue2.js +13 -13
- package/es/components/checkbox/checkbox-group.vue2.js +3 -3
- package/es/components/checkbox/checkbox.vue2.js +1 -1
- package/es/components/clamp/clamp.vue2.js +2 -2
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +4 -4
- package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +6 -6
- package/es/components/col/col.vue2.js +2 -2
- package/es/components/collapse/collapse-item.vue2.js +2 -2
- package/es/components/collapse/collapse.vue2.js +2 -2
- package/es/components/collapse-transition/collapse-transition.vue2.js +2 -2
- package/es/components/color-picker/color-picker.vue2.js +2 -2
- package/es/components/color-picker/components/alpha-slider.vue2.js +2 -2
- package/es/components/color-picker/components/hue-slider.vue.js +2 -2
- package/es/components/color-picker/components/predefine.vue.js +3 -3
- package/es/components/color-picker/components/sv-panel.vue.js +2 -2
- package/es/components/config-provider/config-provider.vue2.js +2 -2
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/container/aside.vue2.js +2 -2
- package/es/components/container/container.vue2.js +2 -2
- package/es/components/container/footer.vue2.js +2 -2
- package/es/components/container/header.vue2.js +2 -2
- package/es/components/container/main.vue2.js +2 -2
- package/es/components/context-menu/context-menu.vue2.js +1 -1
- package/es/components/countdown/countdown.vue2.js +2 -2
- package/es/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
- package/es/components/date-picker/composables/use-basic-date-table.js +115 -115
- package/es/components/date-picker/composables/use-month-range-header.js +1 -1
- package/es/components/date-picker/composables/use-panel-date-range.js +1 -1
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +6 -6
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +5 -5
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +5 -5
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +12 -12
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +3 -3
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +12 -12
- package/es/components/date-picker/date-picker-com/panel-year-range.vue2.js +12 -12
- package/es/components/date-picker/props/basic-date-table.js +3 -3
- package/es/components/date-picker/props/basic-month-table.js +3 -3
- package/es/components/date-picker/props/basic-year-table.js +3 -3
- package/es/components/date-time-select/date-time-select.vue2.js +1 -1
- package/es/components/descriptions/description.vue2.js +1 -1
- package/es/components/descriptions/descriptions-row.vue2.js +10 -10
- package/es/components/dialog/dialog-content.vue2.js +3 -3
- package/es/components/dialog/dialog.vue2.js +5 -5
- package/es/components/divider/divider.vue2.js +5 -5
- package/es/components/drawer/drawer.vue2.js +4 -4
- package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-item-impl.vue2.js +3 -3
- package/es/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-item.vue2.js +2 -2
- package/es/components/dropdown/dropdown-menu.vue2.js +2 -2
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue2.js +5 -5
- package/es/components/dropdown/index.d.ts +33 -33
- package/es/components/empty/empty.vue2.js +6 -6
- package/es/components/footer-layout/footer-layout.vue2.js +2 -2
- package/es/components/form/form-item.vue2.js +16 -16
- package/es/components/form/form.vue2.js +2 -2
- package/es/components/full-screen/full-screen.vue2.js +3 -3
- package/es/components/header-layout/header-layout.vue2.js +1 -1
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +3 -3
- package/es/components/icon/icon.vue2.js +3 -3
- package/es/components/icon-text/icon-text.vue2.js +1 -1
- package/es/components/iframe-layout/iframe-layout.vue2.js +4 -4
- package/es/components/iframe-layout/iframe-page.vue2.js +2 -2
- package/es/components/image/image.vue2.js +2 -2
- package/es/components/image-viewer/image-viewer.vue2.js +7 -7
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +206 -203
- package/es/components/input/input.vue2.js +6 -6
- package/es/components/input-number/input-number.vue2.js +4 -4
- package/es/components/input-tag/input-tag.vue2.js +7 -7
- package/es/components/link/link.vue2.js +1 -1
- package/es/components/list-cell/list-cell.vue2.js +1 -1
- package/es/components/logo/logo.vue2.js +10 -10
- package/es/components/md-comment/md-comment.vue2.js +2 -2
- package/es/components/md-container/md-container.vue2.js +2 -2
- package/es/components/md-container/toc.js +1 -1
- package/es/components/menu/menu-collapse-transition.vue.js +2 -2
- package/es/components/menu/menu-item-group.vue2.js +7 -7
- package/es/components/menu/menu-item.vue2.js +1 -1
- package/es/components/message/message.vue2.js +3 -3
- package/es/components/message-box/index.d.ts +4 -0
- package/es/components/message-box/index.js +14 -0
- package/es/components/message-box/message-box.vue.d.ts +103 -0
- package/es/components/message-box/message-box.vue.js +4 -0
- package/es/components/message-box/message-box.vue2.js +358 -0
- package/es/components/message-box/method.d.ts +3 -0
- package/es/components/message-box/method.js +101 -0
- package/es/components/message-box/style/css.d.ts +2 -0
- package/es/components/message-box/style/css.js +3 -0
- package/es/components/message-box/style/index.d.ts +2 -0
- package/es/components/message-box/style/index.js +3 -0
- package/es/components/message-box/types.d.ts +202 -0
- package/es/components/message-box/types.js +1 -0
- package/es/components/modal/index.d.ts +1 -0
- package/es/components/modal/modal-footer-action.vue2.js +11 -11
- package/es/components/modal/modal.vue.d.ts +1 -0
- package/es/components/modal/modal.vue2.js +30 -28
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +1 -1
- package/es/components/multiple-tabs/tab-content.vue2.js +2 -2
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +1 -1
- package/es/components/notification/notification.vue2.js +1 -1
- package/es/components/overlay/overlay.vue2.js +1 -1
- package/es/components/page-wrapper/page-wrapper.vue2.js +2 -2
- package/es/components/pagination/components/jumper.vue2.js +28 -29
- package/es/components/pagination/components/next.vue2.js +4 -4
- package/es/components/pagination/components/pager.vue2.js +1 -1
- package/es/components/pagination/components/prev.vue2.js +4 -4
- package/es/components/pagination/components/sizes.vue2.js +20 -21
- package/es/components/pagination/components/total.vue2.js +10 -11
- package/es/components/popconfirm/popconfirm.vue2.js +4 -4
- package/es/components/popover/popover.vue2.js +1 -1
- package/es/components/popper/arrow.vue2.js +2 -2
- package/es/components/popper/content.vue2.js +2 -2
- package/es/components/popper/trigger.vue2.js +4 -4
- package/es/components/progress/progress.vue2.js +1 -1
- package/es/components/progress-i/progress-i.vue2.js +2 -2
- package/es/components/qrcode/qrcode.vue2.js +1 -1
- package/es/components/radio/radio-button.vue2.js +2 -2
- package/es/components/radio/radio-group.vue2.js +3 -3
- package/es/components/radio/radio.vue2.js +2 -2
- package/es/components/rate/rate.vue2.js +6 -6
- package/es/components/router-view-content/router-view-content.vue2.js +7 -7
- package/es/components/roving-focus-group/roving-focus-group.vue2.js +2 -2
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +2 -2
- package/es/components/row/row.vue2.js +2 -2
- package/es/components/scrollbar/bar.vue2.js +2 -2
- package/es/components/scrollbar/scrollbar.vue2.js +7 -7
- package/es/components/scrollbar/thumb.vue2.js +2 -2
- package/es/components/search/search.vue2.js +8 -8
- package/es/components/segmented/segmented.vue2.js +7 -7
- package/es/components/select/group-item.vue.js +2 -2
- package/es/components/select/option-item.vue.js +2 -2
- package/es/components/select/select.vue.js +1 -1
- package/es/components/select/useSelect.js +1 -1
- package/es/components/skeleton/skeleton-item.vue2.js +2 -2
- package/es/components/skeleton/skeleton.vue2.js +8 -8
- package/es/components/slider/button.vue2.js +2 -2
- package/es/components/slider/slider.vue2.js +1 -1
- package/es/components/space/space.js +1 -1
- package/es/components/statistic/statistic.vue2.js +17 -17
- package/es/components/steps/item.vue2.js +11 -11
- package/es/components/steps/steps.vue2.js +2 -2
- package/es/components/super-form/super-form-action.vue2.js +47 -48
- package/es/components/super-form/super-form-item.vue2.js +204 -206
- package/es/components/super-form/super-form.vue2.js +7 -7
- package/es/components/super-form/use/helper.d.ts +1 -1
- package/es/components/super-form/use/helper.js +63 -63
- package/es/components/super-form/use/use-form.js +8 -8
- package/es/components/switch/switch.vue2.js +1 -1
- package/es/components/table/field.js +111 -130
- package/es/components/table/table.vue2.js +128 -133
- package/es/components/table/use/use-columns.js +26 -29
- package/es/components/table/use/use-data-source.js +59 -60
- package/es/components/tabs/tab-bar.vue2.js +2 -2
- package/es/components/tabs/tab-pane.vue2.js +6 -6
- package/es/components/teleport/teleport.vue2.js +2 -2
- package/es/components/time-picker/common/picker-range-trigger.vue2.js +2 -2
- package/es/components/time-picker/common/picker.vue2.js +8 -8
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +1 -1
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +4 -4
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +4 -4
- package/es/components/time-select/time-select.vue2.js +3 -3
- package/es/components/timeline/timeline-item.vue2.js +1 -1
- package/es/components/tooltip/content.vue2.js +6 -6
- package/es/components/tooltip/tooltip.vue2.js +1 -1
- package/es/components/tooltip/trigger.vue2.js +2 -2
- package/es/components/transfer/transfer-panel.vue2.js +8 -8
- package/es/components/transfer/transfer.vue2.js +5 -5
- package/es/components/tree/tree-node.vue.js +1 -1
- package/es/components/tree/tree.vue2.js +7 -7
- package/es/components/upload/upload-content.vue2.js +8 -8
- package/es/components/upload/upload-dragger.vue2.js +2 -2
- package/es/components/upload/upload-list.vue2.js +2 -2
- package/es/components/upload/upload.vue2.js +20 -20
- package/es/components/verify-code/verify-code.vue2.js +2 -2
- package/es/components/watermark/watermark.vue2.js +2 -2
- package/es/hooks/use-id/index.js +2 -2
- package/es/index.js +40 -39
- package/es/locale/index.js +6 -6
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/plugin.js +5 -3
- package/es/utils/helper.js +2 -2
- package/es/utils/ns-cover.js +1 -1
- package/es/utils/vue/vnode.js +3 -3
- package/lib/components/button/use-button.cjs +1 -1
- package/lib/components/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +2 -2
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
- package/lib/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/dropdown/index.d.ts +33 -33
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/toc.cjs +1 -1
- package/lib/components/message-box/index.cjs +1 -0
- package/lib/components/message-box/index.d.ts +4 -0
- package/lib/components/message-box/message-box.vue.cjs +1 -0
- package/lib/components/message-box/message-box.vue.d.ts +103 -0
- package/lib/components/message-box/message-box.vue2.cjs +1 -0
- package/lib/components/message-box/method.cjs +1 -0
- package/lib/components/message-box/method.d.ts +3 -0
- package/lib/components/message-box/style/css.cjs +1 -0
- package/lib/components/message-box/style/css.d.ts +2 -0
- package/lib/components/message-box/style/index.cjs +1 -0
- package/lib/components/message-box/style/index.d.ts +2 -0
- package/lib/components/message-box/types.cjs +1 -0
- package/lib/components/message-box/types.d.ts +202 -0
- package/lib/components/modal/index.d.ts +1 -0
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue.d.ts +1 -0
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/helper.d.ts +1 -1
- package/lib/components/super-form/use/use-form.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/use/use-columns.cjs +1 -1
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
- package/lib/components/transfer/transfer.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/locale/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/plugin.cjs +1 -1
- package/package.json +2 -2
- package/theme-style/index.css +1 -1
- package/theme-style/src/table.scss +4 -0
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as J, useAttrs as le, reactive as ue, ref as m, computed as u, unref as n, watch as d, nextTick as ie, useSlots as me,
|
|
1
|
+
import { defineComponent as J, useAttrs as le, reactive as ue, ref as m, computed as u, unref as n, watch as d, nextTick as ie, useSlots as me, openBlock as l, createBlock as i, mergeProps as B, withKeys as fe, withModifiers as ce, withCtx as h, normalizeProps as U, renderSlot as O, createElementBlock as pe, Fragment as de, renderList as W, createSlots as Be, resolveDynamicComponent as A, createCommentVNode as j, h as he } from "vue";
|
|
2
2
|
import { VftCol as ye } from "../col/index.js";
|
|
3
3
|
import { VftForm as ve } from "../form/index.js";
|
|
4
4
|
import { VftRow as be } from "../row/index.js";
|
|
@@ -314,10 +314,10 @@ const _e = J({
|
|
|
314
314
|
}, ["prevent"])),
|
|
315
315
|
onKeypress: fe(ne, ["enter"])
|
|
316
316
|
}), {
|
|
317
|
-
default: h(() => [a.value?.length ? (l(), i(n(be),
|
|
317
|
+
default: h(() => [a.value?.length ? (l(), i(n(be), U(B({
|
|
318
318
|
key: 0
|
|
319
319
|
}, f.value?.rowProps)), {
|
|
320
|
-
default: h(() => [O(e.$slots, "formHeader"), (l(!0), pe(de, null,
|
|
320
|
+
default: h(() => [O(e.$slots, "formHeader"), (l(!0), pe(de, null, W(a.value, (s) => (l(), i(Oe, {
|
|
321
321
|
key: s.field,
|
|
322
322
|
"form-action-type": H,
|
|
323
323
|
schema: s,
|
|
@@ -328,14 +328,14 @@ const _e = J({
|
|
|
328
328
|
"update-schema": n(R)
|
|
329
329
|
}, Be({
|
|
330
330
|
_: 2
|
|
331
|
-
}, [
|
|
331
|
+
}, [W(Object.keys(e.$slots), (K) => ({
|
|
332
332
|
name: K,
|
|
333
333
|
fn: h((re) => [O(e.$slots, K, B({
|
|
334
334
|
ref_for: !0
|
|
335
335
|
}, re || {}))])
|
|
336
336
|
}))]), 1032, ["schema", "form-props", "all-default-values", "form-model", "update-schema"]))), 128)), t.value?.customLayout ? (l(), i(A(E(t.value?.showActionButtonGroup && t.value?.actionInline)), {
|
|
337
337
|
key: 1
|
|
338
|
-
})) : (l(), i(n(ye),
|
|
338
|
+
})) : (l(), i(n(ye), U(B({
|
|
339
339
|
key: 0
|
|
340
340
|
}, f.value?.quickColSpan ? {
|
|
341
341
|
span: Math.ceil(24 / f.value?.quickColSpan),
|
|
@@ -345,9 +345,9 @@ const _e = J({
|
|
|
345
345
|
_: 1
|
|
346
346
|
}, 16))]),
|
|
347
347
|
_: 3
|
|
348
|
-
}, 16)) :
|
|
348
|
+
}, 16)) : j("", !0), (l(), i(A(E(t.value?.showActionButtonGroup && !t.value?.actionInline)))), O(e.$slots, "formFooter")]),
|
|
349
349
|
_: 3
|
|
350
|
-
}, 16, ["class", "model"])) :
|
|
350
|
+
}, 16, ["class", "model"])) : j("", !0);
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
export {
|
|
@@ -7,7 +7,7 @@ import { type FormCompEnumType } from 'vft/es/utils';
|
|
|
7
7
|
* @param type 组件类型
|
|
8
8
|
* @param label
|
|
9
9
|
*/
|
|
10
|
-
export declare function createPlaceholderMessage(type: FormCompEnumType, label?: string):
|
|
10
|
+
export declare function createPlaceholderMessage(type: FormCompEnumType, label?: string): string;
|
|
11
11
|
/**
|
|
12
12
|
* @description 处理 input 输入为数值的 val
|
|
13
13
|
* @example
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import { isBoolean as
|
|
2
|
-
import { isInput as
|
|
3
|
-
import { FormCompEnum as
|
|
1
|
+
import { isBoolean as a, isFunction as d, isNumber as S } from "@vft/utils";
|
|
2
|
+
import { isInput as h } from "../component-map.js";
|
|
3
|
+
import { FormCompEnum as i } from "../../../utils/form-register.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import "../../config-provider/hooks/use-global-config.js";
|
|
6
6
|
import "vue";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../../form/index.js";
|
|
9
|
-
function
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
].includes(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
].includes(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
].includes(
|
|
9
|
+
function R(t, e = "") {
|
|
10
|
+
return e = (e || "").replace(":", "") || "", [
|
|
11
|
+
i.Input,
|
|
12
|
+
i.InputNumber,
|
|
13
|
+
i.Textarea,
|
|
14
|
+
i.AutoComplete
|
|
15
|
+
].includes(t) ? `请输入${e}` : [i.Password].includes(t) ? `请输入${e || "密码"}` : [
|
|
16
|
+
i.Select,
|
|
17
|
+
i.Radio,
|
|
18
|
+
i.RadioSingle,
|
|
19
|
+
i.RadioButton,
|
|
20
|
+
i.Cascader,
|
|
21
|
+
i.TreeSelect,
|
|
22
|
+
i.ColorPicker,
|
|
23
|
+
i.Checkbox,
|
|
24
|
+
i.CheckboxButton
|
|
25
|
+
].includes(t) ? `请选择${e}` : [i.CheckboxSingle].includes(t) ? `请勾选${e}` : [i.Search].includes(t) ? `请输入要搜索的内容${e ? ":" + e : ""}` : [i.InputTag].includes(t) ? `请输入标签内容${e ? ":" + e : ""}` : [i.Upload].includes(t) ? `请选择上传文件${e ? ":" + e : ""}` : [i.Slider].includes(t) ? `请拖动滑块${e ? ":" + e : ""}` : [
|
|
26
|
+
i.TimePicker,
|
|
27
|
+
i.YearPicker,
|
|
28
|
+
i.MonthPicker,
|
|
29
|
+
i.DatePicker,
|
|
30
|
+
i.DatesPicker,
|
|
31
|
+
i.DateTimePicker,
|
|
32
|
+
i.WeekPicker,
|
|
33
|
+
i.DateTimeRangePicker,
|
|
34
|
+
i.DateRangePicker,
|
|
35
|
+
i.MonthRangePicker
|
|
36
|
+
].includes(t) ? `请选择时间${e ? ":" + e : ""}` : "";
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
38
|
+
function P(t, e) {
|
|
39
|
+
return t && h(t) && e && S(e) ? `${e}` : e;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const { show: n, ifShow:
|
|
43
|
-
let u = !0,
|
|
44
|
-
return
|
|
41
|
+
function k(t, e) {
|
|
42
|
+
const { show: n, ifShow: o } = t;
|
|
43
|
+
let u = !0, c = !0;
|
|
44
|
+
return a(n) ? u = n : d(n) && e && (u = n(e)), a(o) ? c = o : d(o) && e && (c = o(e)), { isShow: u, isIfShow: c };
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const { baseColProps: n = {}, quickColSpan:
|
|
48
|
-
return
|
|
46
|
+
function m(t, e) {
|
|
47
|
+
const { baseColProps: n = {}, quickColSpan: o } = e;
|
|
48
|
+
return t.type === i.Divider ? 24 : t.colProps?.span !== void 0 ? t.colProps.span : t.quickColSpan ? Math.ceil(24 / t.quickColSpan) : n.span !== void 0 ? n.span : o ? Math.ceil(24 / o) : 24;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
if (
|
|
50
|
+
function q(t, e, n, o) {
|
|
51
|
+
if (e.customLayout)
|
|
52
52
|
return {
|
|
53
53
|
willExceed: !1,
|
|
54
54
|
totalSpan: 0,
|
|
55
55
|
visibleItems: []
|
|
56
56
|
};
|
|
57
57
|
const u = [];
|
|
58
|
-
let
|
|
59
|
-
for (const
|
|
60
|
-
const
|
|
61
|
-
field:
|
|
58
|
+
let c = 0;
|
|
59
|
+
for (const r of t) {
|
|
60
|
+
const f = n && o ? {
|
|
61
|
+
field: r.field,
|
|
62
62
|
model: n,
|
|
63
63
|
values: {
|
|
64
|
-
...
|
|
64
|
+
...o,
|
|
65
65
|
...n
|
|
66
66
|
},
|
|
67
|
-
schema:
|
|
68
|
-
} : void 0, { isIfShow:
|
|
69
|
-
if (!
|
|
67
|
+
schema: r
|
|
68
|
+
} : void 0, { isIfShow: l } = k(r, f);
|
|
69
|
+
if (!l)
|
|
70
70
|
continue;
|
|
71
|
-
const s =
|
|
72
|
-
u.push({ field:
|
|
71
|
+
const s = m(r, e);
|
|
72
|
+
u.push({ field: r.field, span: s }), c += s;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
77
|
-
|
|
74
|
+
const p = e.showCommonButton || e.showResetButton || e.showSubmitButton;
|
|
75
|
+
if (e.actionInline && e.showActionButtonGroup && p && !e.customLayout) {
|
|
76
|
+
const r = e.quickColSpan ? Math.ceil(24 / e.quickColSpan) : e.baseColProps?.span || 24;
|
|
77
|
+
c += r;
|
|
78
78
|
}
|
|
79
79
|
return {
|
|
80
|
-
willExceed:
|
|
81
|
-
totalSpan:
|
|
80
|
+
willExceed: c > 24,
|
|
81
|
+
totalSpan: c,
|
|
82
82
|
visibleItems: u
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
m as calculateSchemaSpan,
|
|
87
|
+
R as createPlaceholderMessage,
|
|
88
|
+
k as getSchemaShowState,
|
|
89
|
+
P as handleInputNumberValue,
|
|
90
|
+
q as willFormExceedOneRow
|
|
91
91
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../form/index.js";
|
|
2
|
-
import { tryOnBeforeUnmount as
|
|
3
|
-
import { ref as m, unref as o, watch as
|
|
2
|
+
import { tryOnBeforeUnmount as u } from "@vueuse/core";
|
|
3
|
+
import { ref as m, unref as o, watch as f, nextTick as c } from "vue";
|
|
4
4
|
function d(s) {
|
|
5
5
|
const r = {};
|
|
6
6
|
return Object.keys(s).map((i) => {
|
|
@@ -13,12 +13,12 @@ function v(s) {
|
|
|
13
13
|
const e = o(r);
|
|
14
14
|
return e || console.error(
|
|
15
15
|
"The form instance has not been obtained, please make sure that the form has been rendered when performing the form operation!"
|
|
16
|
-
), await
|
|
16
|
+
), await c(), e;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
18
|
+
function l(e) {
|
|
19
|
+
u(() => {
|
|
20
20
|
r.value = null, i.value = null;
|
|
21
|
-
}), !(o(i) && e === o(r)) && (r.value = e, i.value = !0,
|
|
21
|
+
}), !(o(i) && e === o(r)) && (r.value = e, i.value = !0, f(
|
|
22
22
|
() => s,
|
|
23
23
|
() => {
|
|
24
24
|
s && e && e.setProps(d(s));
|
|
@@ -29,7 +29,7 @@ function v(s) {
|
|
|
29
29
|
}
|
|
30
30
|
));
|
|
31
31
|
}
|
|
32
|
-
return [
|
|
32
|
+
return [l, {
|
|
33
33
|
scrollToField: async (e, t) => {
|
|
34
34
|
(await a()).scrollToField(e, t);
|
|
35
35
|
},
|
|
@@ -66,7 +66,7 @@ function v(s) {
|
|
|
66
66
|
getFieldValue: (e) => o(r)?.getFieldValue(e),
|
|
67
67
|
getFieldsValue: () => o(r)?.getFieldsValue(),
|
|
68
68
|
setFieldsValue: async (e, t = !0) => {
|
|
69
|
-
(await a()).setFieldsValue(e, t);
|
|
69
|
+
await c(), await (await a()).setFieldsValue(e, t);
|
|
70
70
|
},
|
|
71
71
|
appendSchemaByField: async (e, t, n) => {
|
|
72
72
|
await (await a()).appendSchemaByField(e, t, n);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as M, computed as s, ref as g, watch as T, onMounted as Q,
|
|
1
|
+
import { defineComponent as M, computed as s, ref as g, watch as T, onMounted as Q, openBlock as o, createElementBlock as v, withModifiers as R, normalizeStyle as F, normalizeClass as c, createElementVNode as p, withKeys as X, unref as i, createBlock as k, normalizeProps as I, mergeProps as w, createCommentVNode as r, toDisplayString as B, nextTick as Y } from "vue";
|
|
2
2
|
import { singleAttrToObj as O, isPromise as A, isBoolean as Z } from "@vft/utils";
|
|
3
3
|
import "../form/index.js";
|
|
4
4
|
import { VftIcon as V } from "../icon/index.js";
|
|
@@ -1,174 +1,155 @@
|
|
|
1
|
-
import { createVNode as r, Fragment as
|
|
2
|
-
import { useLoadingDelay as
|
|
3
|
-
import { formatToDateTime as
|
|
4
|
-
import { isNullOrUndefined as
|
|
5
|
-
import { VftButton as
|
|
6
|
-
import { VftPopconfirm as
|
|
7
|
-
import { VftTag as
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !h(t);
|
|
1
|
+
import { createVNode as r, Fragment as _, isVNode as g } from "vue";
|
|
2
|
+
import { useLoadingDelay as h } from "@vft/use";
|
|
3
|
+
import { formatToDateTime as d } from "@vft/utils/date";
|
|
4
|
+
import { isNullOrUndefined as L } from "@vft/utils";
|
|
5
|
+
import { VftButton as u } from "../button/index.js";
|
|
6
|
+
import { VftPopconfirm as M } from "../popconfirm/index.js";
|
|
7
|
+
import { VftTag as c } from "../tag/index.js";
|
|
8
|
+
function m(t) {
|
|
9
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !g(t);
|
|
11
10
|
}
|
|
12
|
-
const
|
|
11
|
+
const N = {
|
|
13
12
|
type: "seq",
|
|
14
|
-
title: "
|
|
13
|
+
title: "序号",
|
|
15
14
|
fixed: "left",
|
|
16
15
|
width: 53
|
|
17
|
-
},
|
|
16
|
+
}, V = {
|
|
18
17
|
type: "checkbox",
|
|
19
18
|
title: "",
|
|
20
19
|
minWidth: 60,
|
|
21
20
|
fixed: "left"
|
|
22
|
-
},
|
|
21
|
+
}, S = {
|
|
23
22
|
field: "id",
|
|
24
23
|
title: "Id",
|
|
25
24
|
minWidth: 100
|
|
26
|
-
},
|
|
25
|
+
}, k = {
|
|
27
26
|
field: "name",
|
|
28
|
-
title: "
|
|
27
|
+
title: "名称",
|
|
29
28
|
minWidth: 100
|
|
30
|
-
},
|
|
29
|
+
}, O = ({
|
|
31
30
|
format: t = "YYYY-MM-DD",
|
|
32
31
|
field: e = "date",
|
|
33
|
-
title:
|
|
32
|
+
title: i = "时间"
|
|
34
33
|
} = {}) => ({
|
|
35
34
|
minWidth: 100,
|
|
36
35
|
field: e,
|
|
37
|
-
title:
|
|
36
|
+
title: i,
|
|
38
37
|
formatter: ({
|
|
39
38
|
row: o
|
|
40
|
-
}) => o[e] ?
|
|
41
|
-
}),
|
|
39
|
+
}) => o[e] ? d(o[e], t) : "-"
|
|
40
|
+
}), D = ({
|
|
42
41
|
format: t = "YYYY-MM-DD HH:mm:ss",
|
|
43
42
|
field: e = "date",
|
|
44
|
-
title:
|
|
43
|
+
title: i = "时间"
|
|
45
44
|
} = {}) => ({
|
|
46
45
|
minWidth: 190,
|
|
47
46
|
field: e,
|
|
48
|
-
title:
|
|
47
|
+
title: i,
|
|
49
48
|
formatter: ({
|
|
50
49
|
row: o
|
|
51
|
-
}) => o[e] ?
|
|
52
|
-
}),
|
|
50
|
+
}) => o[e] ? d(o[e], t) : "-"
|
|
51
|
+
}), P = ({
|
|
53
52
|
format: t = "YYYY-MM-DD HH:mm:ss",
|
|
54
53
|
field: e = "createTime",
|
|
55
|
-
title:
|
|
56
|
-
} = {}) =>
|
|
54
|
+
title: i = "创建时间"
|
|
55
|
+
} = {}) => D({
|
|
57
56
|
format: t,
|
|
58
57
|
field: e,
|
|
59
|
-
title:
|
|
60
|
-
}),
|
|
58
|
+
title: i
|
|
59
|
+
}), b = ({
|
|
61
60
|
format: t = "YYYY-MM-DD HH:mm:ss",
|
|
62
61
|
field: e = "updateTime",
|
|
63
|
-
title:
|
|
64
|
-
} = {}) =>
|
|
62
|
+
title: i = "更新时间"
|
|
63
|
+
} = {}) => D({
|
|
65
64
|
format: t,
|
|
66
65
|
field: e,
|
|
67
|
-
title:
|
|
68
|
-
}),
|
|
66
|
+
title: i
|
|
67
|
+
}), j = ({
|
|
69
68
|
field: t = "status",
|
|
70
|
-
title: e = "
|
|
71
|
-
normalText:
|
|
72
|
-
disabledText: o = "
|
|
73
|
-
strToNumber:
|
|
74
|
-
} = {}) => {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
let n, a;
|
|
91
|
-
return u && Number(i) === 0 && (i = !1), i ? r(D, null, f(n = m(l)) ? n : {
|
|
92
|
-
default: () => [n]
|
|
93
|
-
}) : r(D, {
|
|
94
|
-
type: "danger"
|
|
95
|
-
}, f(a = m(o)) ? a : {
|
|
96
|
-
default: () => [a]
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
69
|
+
title: e = "状态",
|
|
70
|
+
normalText: i = "正常",
|
|
71
|
+
disabledText: o = "禁用",
|
|
72
|
+
strToNumber: l = !0
|
|
73
|
+
} = {}) => ({
|
|
74
|
+
field: t,
|
|
75
|
+
title: e,
|
|
76
|
+
minWidth: 100,
|
|
77
|
+
slots: {
|
|
78
|
+
default: ({
|
|
79
|
+
row: a
|
|
80
|
+
}) => {
|
|
81
|
+
let n = a?.[t];
|
|
82
|
+
return L(n) ? "-" : (l && Number(n) === 0 && (n = !1), n ? r(c, null, m(i) ? i : {
|
|
83
|
+
default: () => [i]
|
|
84
|
+
}) : r(c, {
|
|
85
|
+
type: "danger"
|
|
86
|
+
}, m(o) ? o : {
|
|
87
|
+
default: () => [o]
|
|
88
|
+
}));
|
|
100
89
|
}
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
confirmText: t = "
|
|
90
|
+
}
|
|
91
|
+
}), U = ({
|
|
92
|
+
confirmText: t = "确认删除?",
|
|
104
93
|
leftCallback: e,
|
|
105
|
-
rightCallback:
|
|
106
|
-
leftText: o = "
|
|
107
|
-
rightText:
|
|
108
|
-
showLeft:
|
|
109
|
-
showRight:
|
|
110
|
-
} = {}) => {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
94
|
+
rightCallback: i,
|
|
95
|
+
leftText: o = "编辑",
|
|
96
|
+
rightText: l = "删除",
|
|
97
|
+
showLeft: a = !0,
|
|
98
|
+
showRight: n = !0
|
|
99
|
+
} = {}) => ({
|
|
100
|
+
title: "操作",
|
|
101
|
+
field: "custom-action",
|
|
102
|
+
fixed: "right",
|
|
103
|
+
minWidth: 180,
|
|
104
|
+
slots: {
|
|
105
|
+
default: ({
|
|
106
|
+
row: f
|
|
107
|
+
}) => {
|
|
108
|
+
const {
|
|
109
|
+
loading: p,
|
|
110
|
+
start: E,
|
|
111
|
+
cancel: I
|
|
112
|
+
} = h(), Y = () => {
|
|
113
|
+
E(), i?.(f)?.finally(() => {
|
|
114
|
+
I();
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
return r(_, null, [a ? r(u, {
|
|
118
|
+
size: "small",
|
|
119
|
+
type: "primary",
|
|
120
|
+
onClick: (s) => {
|
|
121
|
+
s.stopPropagation(), e?.(f);
|
|
122
|
+
}
|
|
123
|
+
}, m(o) ? o : {
|
|
124
|
+
default: () => [o]
|
|
125
|
+
}) : null, n ? r(M, {
|
|
126
|
+
width: "150",
|
|
127
|
+
onConfirm: Y,
|
|
128
|
+
title: t
|
|
129
|
+
}, {
|
|
130
|
+
reference: () => r(u, {
|
|
131
|
+
loading: p.value,
|
|
133
132
|
size: "small",
|
|
134
|
-
type: "
|
|
133
|
+
type: "danger",
|
|
135
134
|
onClick: (s) => {
|
|
136
|
-
s.stopPropagation()
|
|
137
|
-
}
|
|
138
|
-
}, f(a = i(o)) ? a : {
|
|
139
|
-
default: () => [a]
|
|
140
|
-
}) : null, c ? r(F, {
|
|
141
|
-
width: "150",
|
|
142
|
-
onConfirm: Y,
|
|
143
|
-
title: i(t)
|
|
144
|
-
}, {
|
|
145
|
-
reference: () => {
|
|
146
|
-
let s;
|
|
147
|
-
return r(d, {
|
|
148
|
-
loading: _.value,
|
|
149
|
-
size: "small",
|
|
150
|
-
type: "danger",
|
|
151
|
-
onClick: (g) => {
|
|
152
|
-
g.stopPropagation();
|
|
153
|
-
}
|
|
154
|
-
}, f(s = i(u)) ? s : {
|
|
155
|
-
default: () => [s]
|
|
156
|
-
});
|
|
135
|
+
s.stopPropagation();
|
|
157
136
|
}
|
|
158
|
-
}) :
|
|
159
|
-
|
|
137
|
+
}, m(l) ? l : {
|
|
138
|
+
default: () => [l]
|
|
139
|
+
})
|
|
140
|
+
}) : null]);
|
|
160
141
|
}
|
|
161
|
-
}
|
|
162
|
-
};
|
|
142
|
+
}
|
|
143
|
+
});
|
|
163
144
|
export {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
145
|
+
U as ACTION_FIELD,
|
|
146
|
+
V as CHECKED_FIELD,
|
|
147
|
+
P as CREATE_TIME_FIELD,
|
|
148
|
+
O as DATE_FIELD,
|
|
149
|
+
D as DATE_TIME_FIELD,
|
|
150
|
+
S as ID_FIELD,
|
|
151
|
+
k as NAME_FIELD,
|
|
152
|
+
N as SEQ_FIELD,
|
|
153
|
+
j as STATUS_FIELD,
|
|
154
|
+
b as UPDATE_TIME_FIELD
|
|
174
155
|
};
|