@silver-formily/element-plus 3.0.1 → 3.0.3
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/README.en-US.md +1 -1
- package/README.md +1 -1
- package/esm/__builtins__/configs/index.mjs +6 -5
- package/esm/__builtins__/configs/index.mjs.map +1 -1
- package/esm/__builtins__/shared/load-config-provider.mjs +19 -11
- package/esm/__builtins__/shared/load-config-provider.mjs.map +1 -1
- package/esm/__builtins__/shared/loading.mjs +50 -46
- package/esm/__builtins__/shared/loading.mjs.map +1 -1
- package/esm/__builtins__/shared/simple-version-compare.mjs +16 -15
- package/esm/__builtins__/shared/simple-version-compare.mjs.map +1 -1
- package/esm/__builtins__/shared/transform-component.mjs +30 -31
- package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
- package/esm/__builtins__/shared/use-enter-submit.mjs +77 -24
- package/esm/__builtins__/shared/use-enter-submit.mjs.map +1 -1
- package/esm/__builtins__/shared/utils.mjs +44 -32
- package/esm/__builtins__/shared/utils.mjs.map +1 -1
- package/esm/_virtual/_/plugin-vue/export-helper.mjs +8 -0
- package/esm/array-base/array-base-addition.mjs +53 -0
- package/esm/array-base/array-base-addition.mjs.map +1 -0
- package/esm/array-base/array-base-index.mjs +17 -0
- package/esm/array-base/array-base-index.mjs.map +1 -0
- package/esm/array-base/array-base-inner.mjs +30 -0
- package/esm/array-base/array-base-inner.mjs.map +1 -0
- package/esm/array-base/array-base-item.mjs +21 -0
- package/esm/array-base/array-base-item.mjs.map +1 -0
- package/esm/array-base/array-base-move-down.mjs +45 -0
- package/esm/array-base/array-base-move-down.mjs.map +1 -0
- package/esm/array-base/array-base-move-up.mjs +45 -0
- package/esm/array-base/array-base-move-up.mjs.map +1 -0
- package/esm/array-base/array-base-remove.mjs +45 -0
- package/esm/array-base/array-base-remove.mjs.map +1 -0
- package/esm/array-base/array-base-sort-handle.mjs +33 -0
- package/esm/array-base/array-base-sort-handle.mjs.map +1 -0
- package/esm/array-base/index.mjs +28 -209
- package/esm/array-base/index.mjs.map +1 -1
- package/esm/array-base/style.css +36 -0
- package/esm/array-base/symbols.mjs +7 -6
- package/esm/array-base/symbols.mjs.map +1 -1
- package/esm/array-base/types.d.ts +23 -24
- package/esm/array-base/utils.d.ts +11 -17
- package/esm/array-base/utils.mjs +58 -61
- package/esm/array-base/utils.mjs.map +1 -1
- package/esm/array-cards/array-cards.mjs +109 -0
- package/esm/array-cards/array-cards.mjs.map +1 -0
- package/esm/array-cards/index.d.ts +120 -113
- package/esm/array-cards/index.mjs +19 -119
- package/esm/array-cards/index.mjs.map +1 -1
- package/esm/array-cards/style.css +20 -0
- package/esm/array-collapse/array-collapse-item.mjs +74 -0
- package/esm/array-collapse/array-collapse-item.mjs.map +1 -0
- package/esm/array-collapse/array-collapse.mjs +117 -0
- package/esm/array-collapse/array-collapse.mjs.map +1 -0
- package/esm/array-collapse/index.d.ts +137 -129
- package/esm/array-collapse/index.mjs +21 -175
- package/esm/array-collapse/index.mjs.map +1 -1
- package/esm/array-collapse/style.css +20 -0
- package/esm/array-collapse/utils.mjs +7 -13
- package/esm/array-collapse/utils.mjs.map +1 -1
- package/esm/array-items/array-items-item.mjs +22 -0
- package/esm/array-items/array-items-item.mjs.map +1 -0
- package/esm/array-items/array-items.mjs +88 -0
- package/esm/array-items/array-items.mjs.map +1 -0
- package/esm/array-items/index.d.ts +132 -125
- package/esm/array-items/index.mjs +21 -108
- package/esm/array-items/index.mjs.map +1 -1
- package/esm/array-items/style.css +22 -0
- package/esm/array-list-tabs/array-list-tabs.mjs +191 -0
- package/esm/array-list-tabs/array-list-tabs.mjs.map +1 -0
- package/esm/array-list-tabs/index.d.ts +80 -74
- package/esm/array-list-tabs/index.mjs +12 -187
- package/esm/array-list-tabs/index.mjs.map +1 -1
- package/esm/array-list-tabs/style.css +90 -0
- package/esm/array-list-tabs/utils.mjs +11 -16
- package/esm/array-list-tabs/utils.mjs.map +1 -1
- package/esm/array-table/array-table.mjs +236 -0
- package/esm/array-table/array-table.mjs.map +1 -0
- package/esm/array-table/index.d.ts +106 -1597
- package/esm/array-table/index.mjs +24 -224
- package/esm/array-table/index.mjs.map +1 -1
- package/esm/array-table/style.css +23 -0
- package/esm/array-table/types.d.ts +11 -6
- package/esm/array-table/utils.mjs +14 -23
- package/esm/array-table/utils.mjs.map +1 -1
- package/esm/array-tabs/array-tabs.mjs +92 -0
- package/esm/array-tabs/array-tabs.mjs.map +1 -0
- package/esm/array-tabs/index.d.ts +7 -2
- package/esm/array-tabs/index.mjs +8 -87
- package/esm/array-tabs/index.mjs.map +1 -1
- package/esm/array-tabs/style.css +7 -0
- package/esm/autocomplete/autocomplete.mjs +99 -0
- package/esm/autocomplete/autocomplete.mjs.map +1 -0
- package/esm/autocomplete/index.d.ts +5 -639
- package/esm/autocomplete/index.mjs +14 -114
- package/esm/autocomplete/index.mjs.map +1 -1
- package/esm/cascader/cascader.mjs +32 -0
- package/esm/cascader/cascader.mjs.map +1 -0
- package/esm/cascader/index.d.ts +5 -28
- package/esm/cascader/index.mjs +13 -51
- package/esm/cascader/index.mjs.map +1 -1
- package/esm/checkbox/checkbox-group.mjs +64 -0
- package/esm/checkbox/checkbox-group.mjs.map +1 -0
- package/esm/checkbox/index.d.ts +5 -817
- package/esm/checkbox/index.mjs +16 -70
- package/esm/checkbox/index.mjs.map +1 -1
- package/esm/color-picker/index.d.ts +8 -210
- package/esm/color-picker/index.mjs +13 -17
- package/esm/color-picker/index.mjs.map +1 -1
- package/esm/color-picker-panel/index.d.ts +8 -129
- package/esm/color-picker-panel/index.mjs +16 -25
- package/esm/color-picker-panel/index.mjs.map +1 -1
- package/esm/date-picker/index.d.ts +5 -443
- package/esm/date-picker/index.mjs +21 -29
- package/esm/date-picker/index.mjs.map +1 -1
- package/esm/date-picker/utils.mjs +21 -26
- package/esm/date-picker/utils.mjs.map +1 -1
- package/esm/date-picker-panel/index.d.ts +5 -143
- package/esm/date-picker-panel/index.mjs +23 -30
- package/esm/date-picker-panel/index.mjs.map +1 -1
- package/esm/editable/editable-popover.mjs +95 -0
- package/esm/editable/editable-popover.mjs.map +1 -0
- package/esm/editable/editable.mjs +113 -0
- package/esm/editable/editable.mjs.map +1 -0
- package/esm/editable/index.d.ts +10 -150
- package/esm/editable/index.mjs +17 -220
- package/esm/editable/index.mjs.map +1 -1
- package/esm/editable/style.css +29 -0
- package/esm/form/form.mjs +50 -70
- package/esm/form/form.mjs.map +1 -1
- package/esm/form/form.vue.d.ts +48 -0
- package/esm/form/index.d.ts +1 -1
- package/esm/form-button-group/form-button-group-sticky.mjs +37 -0
- package/esm/form-button-group/form-button-group-sticky.mjs.map +1 -0
- package/esm/form-button-group/form-button-group.mjs +71 -0
- package/esm/form-button-group/form-button-group.mjs.map +1 -0
- package/esm/form-button-group/index.d.ts +94 -87
- package/esm/form-button-group/index.mjs +10 -97
- package/esm/form-button-group/index.mjs.map +1 -1
- package/esm/form-button-group/style.css +281 -0
- package/esm/form-button-group/utils.mjs +7 -13
- package/esm/form-button-group/utils.mjs.map +1 -1
- package/esm/form-collapse/form-collapse.mjs +74 -0
- package/esm/form-collapse/form-collapse.mjs.map +1 -0
- package/esm/form-collapse/index.d.ts +43 -39
- package/esm/form-collapse/index.mjs +20 -87
- package/esm/form-collapse/index.mjs.map +1 -1
- package/esm/form-collapse/style.css +7 -0
- package/esm/form-collapse/utils.d.ts +21 -27
- package/esm/form-collapse/utils.mjs +48 -46
- package/esm/form-collapse/utils.mjs.map +1 -1
- package/esm/form-dialog/dialog-content.mjs +118 -0
- package/esm/form-dialog/dialog-content.mjs.map +1 -0
- package/esm/form-dialog/index.d.ts +8 -4
- package/esm/form-dialog/index.mjs +142 -211
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-dialog/types.d.ts +38 -32
- package/esm/form-drawer/drawer-content.mjs +118 -0
- package/esm/form-drawer/drawer-content.mjs.map +1 -0
- package/esm/form-drawer/index.d.ts +8 -4
- package/esm/form-drawer/index.mjs +142 -204
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +38 -32
- package/esm/form-grid/form-grid-column.mjs +28 -0
- package/esm/form-grid/form-grid-column.mjs.map +1 -0
- package/esm/form-grid/form-grid.mjs +69 -0
- package/esm/form-grid/form-grid.mjs.map +1 -0
- package/esm/form-grid/hooks.mjs +7 -7
- package/esm/form-grid/hooks.mjs.map +1 -1
- package/esm/form-grid/index.d.ts +5 -2
- package/esm/form-grid/index.mjs +10 -110
- package/esm/form-grid/index.mjs.map +1 -1
- package/esm/form-grid/style.css +128 -0
- package/esm/form-item/form-item.mjs +308 -0
- package/esm/form-item/form-item.mjs.map +1 -0
- package/esm/form-item/form-item.vue.d.ts +29 -0
- package/esm/form-item/index.d.ts +9 -77
- package/esm/form-item/index.mjs +28 -333
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-item/style.css +263 -0
- package/esm/form-item/types.d.ts +34 -29
- package/esm/form-item/utils.mjs +15 -15
- package/esm/form-item/utils.mjs.map +1 -1
- package/esm/form-layout/form-layout.mjs +103 -84
- package/esm/form-layout/form-layout.mjs.map +1 -1
- package/esm/form-layout/form-layout.vue.d.ts +28 -0
- package/esm/form-layout/index.d.ts +1 -1
- package/esm/form-layout/types.d.ts +24 -40
- package/esm/form-layout/utils.mjs +73 -99
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/form-step/form-step-pane.mjs +15 -0
- package/esm/form-step/form-step-pane.mjs.map +1 -0
- package/esm/form-step/form-step.mjs +63 -0
- package/esm/form-step/form-step.mjs.map +1 -0
- package/esm/form-step/index.d.ts +29 -23
- package/esm/form-step/index.mjs +12 -94
- package/esm/form-step/index.mjs.map +1 -1
- package/esm/form-step/types.d.ts +19 -19
- package/esm/form-step/utils.d.ts +14 -10
- package/esm/form-step/utils.mjs +75 -59
- package/esm/form-step/utils.mjs.map +1 -1
- package/esm/form-tab/form-tab.mjs +79 -0
- package/esm/form-tab/form-tab.mjs.map +1 -0
- package/esm/form-tab/hooks.mjs +18 -16
- package/esm/form-tab/hooks.mjs.map +1 -1
- package/esm/form-tab/index.d.ts +5 -3
- package/esm/form-tab/index.mjs +10 -77
- package/esm/form-tab/index.mjs.map +1 -1
- package/esm/form-tab/style.css +4 -0
- package/esm/form-tab/utils.mjs +14 -13
- package/esm/form-tab/utils.mjs.map +1 -1
- package/esm/index.d.ts +53 -48
- package/esm/index.mjs +50 -103
- package/esm/input/index.d.ts +5 -52
- package/esm/input/index.mjs +16 -69
- package/esm/input/index.mjs.map +1 -1
- package/esm/input/input.mjs +41 -0
- package/esm/input/input.mjs.map +1 -0
- package/esm/input-number/index.d.ts +8 -329
- package/esm/input-number/index.mjs +12 -24
- package/esm/input-number/index.mjs.map +1 -1
- package/esm/input-tag/index.d.ts +5 -32
- package/esm/input-tag/index.mjs +13 -50
- package/esm/input-tag/index.mjs.map +1 -1
- package/esm/input-tag/input-tag.mjs +41 -0
- package/esm/input-tag/input-tag.mjs.map +1 -0
- package/esm/mention/index.d.ts +5 -50
- package/esm/mention/index.mjs +15 -97
- package/esm/mention/index.mjs.map +1 -1
- package/esm/mention/mention.mjs +77 -0
- package/esm/mention/mention.mjs.map +1 -0
- package/esm/pagination/components/jumper.mjs +11 -12
- package/esm/pagination/components/jumper.mjs.map +1 -1
- package/esm/pagination/components/jumper2.mjs +59 -0
- package/esm/pagination/components/jumper2.mjs.map +1 -0
- package/esm/pagination/components/next.mjs +18 -22
- package/esm/pagination/components/next.mjs.map +1 -1
- package/esm/pagination/components/next2.mjs +38 -0
- package/esm/pagination/components/next2.mjs.map +1 -0
- package/esm/pagination/components/pager.mjs +21 -22
- package/esm/pagination/components/pager.mjs.map +1 -1
- package/esm/pagination/components/pager2.mjs +229 -0
- package/esm/pagination/components/pager2.mjs.map +1 -0
- package/esm/pagination/components/prev.mjs +16 -22
- package/esm/pagination/components/prev.mjs.map +1 -1
- package/esm/pagination/components/prev2.mjs +38 -0
- package/esm/pagination/components/prev2.mjs.map +1 -0
- package/esm/pagination/components/sizes.mjs +32 -7
- package/esm/pagination/components/sizes.mjs.map +1 -1
- package/esm/pagination/components/sizes2.mjs +66 -0
- package/esm/pagination/components/sizes2.mjs.map +1 -0
- package/esm/pagination/components/total.mjs +10 -11
- package/esm/pagination/components/total.mjs.map +1 -1
- package/esm/pagination/components/total2.mjs +26 -0
- package/esm/pagination/components/total2.mjs.map +1 -0
- package/esm/pagination/pagination.mjs +271 -626
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/password/index.d.ts +8 -54
- package/esm/password/index.mjs +11 -14
- package/esm/password/index.mjs.map +1 -1
- package/esm/preview-text/cascader.mjs +51 -0
- package/esm/preview-text/cascader.mjs.map +1 -0
- package/esm/preview-text/color-picker.mjs +37 -0
- package/esm/preview-text/color-picker.mjs.map +1 -0
- package/esm/preview-text/date-picker.mjs +61 -0
- package/esm/preview-text/date-picker.mjs.map +1 -0
- package/esm/preview-text/index.d.ts +107 -106
- package/esm/preview-text/index.mjs +25 -364
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/preview-text/input.mjs +39 -0
- package/esm/preview-text/input.mjs.map +1 -0
- package/esm/preview-text/preview.mjs +30 -0
- package/esm/preview-text/preview.mjs.map +1 -0
- package/esm/preview-text/rate.mjs +32 -0
- package/esm/preview-text/rate.mjs.map +1 -0
- package/esm/preview-text/select.mjs +42 -0
- package/esm/preview-text/select.mjs.map +1 -0
- package/esm/preview-text/style.css +16 -0
- package/esm/preview-text/time-picker.mjs +39 -0
- package/esm/preview-text/time-picker.mjs.map +1 -0
- package/esm/preview-text/tree.mjs +73 -0
- package/esm/preview-text/tree.mjs.map +1 -0
- package/esm/preview-text/utils.d.ts +10 -13
- package/esm/preview-text/utils.mjs +15 -15
- package/esm/preview-text/utils.mjs.map +1 -1
- package/esm/query-form/default-components.mjs +45 -45
- package/esm/query-form/default-components.mjs.map +1 -1
- package/esm/query-form/hooks.mjs +31 -26
- package/esm/query-form/hooks.mjs.map +1 -1
- package/esm/query-form/index.d.ts +115 -105
- package/esm/query-form/index.mjs +10 -334
- package/esm/query-form/index.mjs.map +1 -1
- package/esm/query-form/query-form-light.mjs +86 -0
- package/esm/query-form/query-form-light.mjs.map +1 -0
- package/esm/query-form/query-form.mjs +263 -0
- package/esm/query-form/query-form.mjs.map +1 -0
- package/esm/query-form/style.css +27 -0
- package/esm/query-form/types.d.ts +42 -41
- package/esm/query-form-item/index.d.ts +7 -151
- package/esm/query-form-item/index.mjs +15 -184
- package/esm/query-form-item/index.mjs.map +1 -1
- package/esm/query-form-item/query-form-item.mjs +195 -0
- package/esm/query-form-item/query-form-item.mjs.map +1 -0
- package/esm/query-form-item/style.css +12 -0
- package/esm/query-form-item/types.d.ts +42 -38
- package/esm/radio/index.d.ts +429 -473
- package/esm/radio/index.mjs +15 -69
- package/esm/radio/index.mjs.map +1 -1
- package/esm/radio/radio-group.mjs +70 -0
- package/esm/radio/radio-group.mjs.map +1 -0
- package/esm/{styles/radio/index.css → radio/style.css} +3 -1
- package/esm/rate/index.d.ts +8 -187
- package/esm/rate/index.mjs +13 -17
- package/esm/rate/index.mjs.map +1 -1
- package/esm/reset/index.d.ts +5 -2
- package/esm/reset/index.mjs +8 -44
- package/esm/reset/index.mjs.map +1 -1
- package/esm/reset/reset.mjs +42 -0
- package/esm/reset/reset.mjs.map +1 -0
- package/esm/segmented/index.d.ts +5 -26
- package/esm/segmented/index.mjs +13 -41
- package/esm/segmented/index.mjs.map +1 -1
- package/esm/segmented/segmented.mjs +26 -0
- package/esm/segmented/segmented.mjs.map +1 -0
- package/esm/select/index.d.ts +5 -129
- package/esm/select/index.mjs +14 -128
- package/esm/select/index.mjs.map +1 -1
- package/esm/select/select.mjs +95 -0
- package/esm/select/select.mjs.map +1 -0
- package/esm/select-table/index.d.ts +4 -1557
- package/esm/select-table/index.mjs +12 -205
- package/esm/select-table/index.mjs.map +1 -1
- package/esm/select-table/select-table.mjs +202 -0
- package/esm/select-table/select-table.mjs.map +1 -0
- package/esm/select-table/style.css +14 -0
- package/esm/shared/overlay-elements.mjs +15 -16
- package/esm/shared/overlay-elements.mjs.map +1 -1
- package/esm/shared/url-change-listener.mjs +50 -0
- package/esm/shared/url-change-listener.mjs.map +1 -0
- package/esm/slider/index.d.ts +8 -177
- package/esm/slider/index.mjs +13 -17
- package/esm/slider/index.mjs.map +1 -1
- package/esm/space/index.d.ts +2 -1
- package/esm/space/index.mjs +2 -6
- package/esm/submit/index.d.ts +5 -2
- package/esm/submit/index.mjs +8 -40
- package/esm/submit/index.mjs.map +1 -1
- package/esm/submit/submit.mjs +41 -0
- package/esm/submit/submit.mjs.map +1 -0
- package/esm/switch/index.d.ts +8 -299
- package/esm/switch/index.mjs +8 -13
- package/esm/switch/index.mjs.map +1 -1
- package/esm/time-picker/index.d.ts +8 -445
- package/esm/time-picker/index.mjs +10 -17
- package/esm/time-picker/index.mjs.map +1 -1
- package/esm/time-select/index.d.ts +5 -185
- package/esm/time-select/index.mjs +13 -17
- package/esm/time-select/index.mjs.map +1 -1
- package/esm/transfer/index.d.ts +8 -267
- package/esm/transfer/index.mjs +8 -11
- package/esm/transfer/index.mjs.map +1 -1
- package/esm/tree/index.d.ts +4 -41
- package/esm/tree/index.mjs +14 -105
- package/esm/tree/index.mjs.map +1 -1
- package/esm/tree/tree.mjs +127 -0
- package/esm/tree/tree.mjs.map +1 -0
- package/esm/tree/utils.mjs +157 -149
- package/esm/tree/utils.mjs.map +1 -1
- package/esm/tree-select/index.d.ts +5 -16
- package/esm/tree-select/index.mjs +13 -41
- package/esm/tree-select/index.mjs.map +1 -1
- package/esm/tree-select/tree-select.mjs +38 -0
- package/esm/tree-select/tree-select.mjs.map +1 -0
- package/esm/upload/index.d.ts +5 -712
- package/esm/upload/index.mjs +11 -176
- package/esm/upload/index.mjs.map +1 -1
- package/esm/upload/upload.mjs +176 -0
- package/esm/upload/upload.mjs.map +1 -0
- package/package.json +25 -26
- package/esm/__builtins__/configs/index.d.ts +0 -1
- package/esm/__builtins__/index.d.ts +0 -2
- package/esm/__builtins__/index.mjs +0 -23
- package/esm/__builtins__/index.mjs.map +0 -1
- package/esm/__builtins__/shared/index.d.ts +0 -6
- package/esm/__builtins__/shared/index.mjs +0 -21
- package/esm/__builtins__/shared/index.mjs.map +0 -1
- package/esm/__builtins__/shared/load-config-provider.d.ts +0 -2
- package/esm/__builtins__/shared/loading.d.ts +0 -12
- package/esm/__builtins__/shared/simple-version-compare.d.ts +0 -2
- package/esm/__builtins__/shared/transform-component.d.ts +0 -3
- package/esm/__builtins__/shared/types.d.ts +0 -2
- package/esm/__builtins__/shared/types.mjs +0 -2
- package/esm/__builtins__/shared/types.mjs.map +0 -1
- package/esm/__builtins__/shared/use-enter-submit.d.ts +0 -9
- package/esm/__builtins__/shared/utils.d.ts +0 -9
- package/esm/array-base/array-base-addition.d.ts +0 -5
- package/esm/array-base/array-base-index.d.ts +0 -19
- package/esm/array-base/array-base-inner.d.ts +0 -18
- package/esm/array-base/array-base-item.d.ts +0 -18
- package/esm/array-base/array-base-move-down.d.ts +0 -18
- package/esm/array-base/array-base-move-up.d.ts +0 -18
- package/esm/array-base/array-base-remove.d.ts +0 -18
- package/esm/array-base/array-base-sort-handle.d.ts +0 -2
- package/esm/array-base/index.d.ts +0 -114
- package/esm/array-base/symbols.d.ts +0 -4
- package/esm/array-base/types.mjs +0 -2
- package/esm/array-base/types.mjs.map +0 -1
- package/esm/array-cards/array-cards.d.ts +0 -13
- package/esm/array-collapse/array-collapse-item.d.ts +0 -18
- package/esm/array-collapse/array-collapse.d.ts +0 -16
- package/esm/array-collapse/utils.d.ts +0 -1
- package/esm/array-items/array-items-item.d.ts +0 -30
- package/esm/array-items/array-items.d.ts +0 -2
- package/esm/array-list-tabs/array-list-tabs.d.ts +0 -31
- package/esm/array-list-tabs/utils.d.ts +0 -3
- package/esm/array-table/array-table.d.ts +0 -1505
- package/esm/array-table/types.mjs +0 -2
- package/esm/array-table/types.mjs.map +0 -1
- package/esm/array-table/utils.d.ts +0 -5
- package/esm/array-tabs/array-tabs.d.ts +0 -2
- package/esm/autocomplete/autocomplete.d.ts +0 -1222
- package/esm/cascader/cascader.d.ts +0 -25
- package/esm/checkbox/checkbox-group.d.ts +0 -42
- package/esm/date-picker/utils.d.ts +0 -4
- package/esm/editable/editable-popover.d.ts +0 -25
- package/esm/editable/editable.d.ts +0 -193
- package/esm/env.d.d.ts +0 -1
- package/esm/env.d.mjs +0 -2
- package/esm/env.d.mjs.map +0 -1
- package/esm/form/form.d.ts +0 -46
- package/esm/form/index.mjs +0 -6
- package/esm/form/index.mjs.map +0 -1
- package/esm/form-button-group/form-button-group-sticky.d.ts +0 -17
- package/esm/form-button-group/form-button-group.d.ts +0 -57
- package/esm/form-button-group/utils.d.ts +0 -1
- package/esm/form-collapse/form-collapse.d.ts +0 -18
- package/esm/form-dialog/dialog-content.d.ts +0 -846
- package/esm/form-dialog/types.mjs +0 -2
- package/esm/form-dialog/types.mjs.map +0 -1
- package/esm/form-drawer/drawer-content.d.ts +0 -976
- package/esm/form-drawer/types.mjs +0 -2
- package/esm/form-drawer/types.mjs.map +0 -1
- package/esm/form-grid/form-grid-column.d.ts +0 -29
- package/esm/form-grid/form-grid.d.ts +0 -101
- package/esm/form-grid/hooks.d.ts +0 -4
- package/esm/form-item/form-item.d.ts +0 -19
- package/esm/form-item/types.mjs +0 -2
- package/esm/form-item/types.mjs.map +0 -1
- package/esm/form-item/utils.d.ts +0 -3
- package/esm/form-layout/form-layout.d.ts +0 -31
- package/esm/form-layout/index.mjs +0 -6
- package/esm/form-layout/index.mjs.map +0 -1
- package/esm/form-layout/types.mjs +0 -2
- package/esm/form-layout/types.mjs.map +0 -1
- package/esm/form-layout/utils.d.ts +0 -57
- package/esm/form-step/form-step-pane.d.ts +0 -2
- package/esm/form-step/form-step.d.ts +0 -5
- package/esm/form-step/types.mjs +0 -2
- package/esm/form-step/types.mjs.map +0 -1
- package/esm/form-tab/form-tab.d.ts +0 -7
- package/esm/form-tab/hooks.d.ts +0 -8
- package/esm/form-tab/types.d.ts +0 -12
- package/esm/form-tab/types.mjs +0 -2
- package/esm/form-tab/types.mjs.map +0 -1
- package/esm/form-tab/utils.d.ts +0 -4
- package/esm/index.mjs.map +0 -1
- package/esm/input/input.d.ts +0 -25
- package/esm/input-tag/input-tag.d.ts +0 -32
- package/esm/mention/mention.d.ts +0 -51
- package/esm/pagination/components/jumper.d.ts +0 -16
- package/esm/pagination/components/next.d.ts +0 -42
- package/esm/pagination/components/pager.d.ts +0 -42
- package/esm/pagination/components/prev.d.ts +0 -39
- package/esm/pagination/components/sizes.d.ts +0 -56
- package/esm/pagination/components/total.d.ts +0 -8
- package/esm/pagination/pagination.d.ts +0 -128
- package/esm/preview-text/cascader.d.ts +0 -5
- package/esm/preview-text/color-picker.d.ts +0 -5
- package/esm/preview-text/date-picker.d.ts +0 -5
- package/esm/preview-text/input.d.ts +0 -28
- package/esm/preview-text/preview.d.ts +0 -18
- package/esm/preview-text/rate.d.ts +0 -5
- package/esm/preview-text/select.d.ts +0 -5
- package/esm/preview-text/time-picker.d.ts +0 -5
- package/esm/preview-text/tree.d.ts +0 -22
- package/esm/query-form/default-components.d.ts +0 -5
- package/esm/query-form/hooks.d.ts +0 -25
- package/esm/query-form/query-form-light.d.ts +0 -27
- package/esm/query-form/query-form.d.ts +0 -52
- package/esm/query-form/types.mjs +0 -2
- package/esm/query-form/types.mjs.map +0 -1
- package/esm/query-form-item/query-form-item.d.ts +0 -96
- package/esm/query-form-item/types.mjs +0 -2
- package/esm/query-form-item/types.mjs.map +0 -1
- package/esm/radio/radio-group.d.ts +0 -33
- package/esm/reset/reset.d.ts +0 -45
- package/esm/segmented/segmented.d.ts +0 -25
- package/esm/select/select.d.ts +0 -45
- package/esm/select-table/select-table.d.ts +0 -3030
- package/esm/select-table/types.d.ts +0 -17
- package/esm/select-table/types.mjs +0 -2
- package/esm/select-table/types.mjs.map +0 -1
- package/esm/shared/overlay-elements.d.ts +0 -6
- package/esm/space/index.mjs.map +0 -1
- package/esm/styles/array-base/index.css +0 -1
- package/esm/styles/array-cards/index.css +0 -1
- package/esm/styles/array-collapse/index.css +0 -1
- package/esm/styles/array-items/index.css +0 -1
- package/esm/styles/array-list-tabs/index.css +0 -1
- package/esm/styles/array-table/index.css +0 -1
- package/esm/styles/array-tabs/index.css +0 -1
- package/esm/styles/editable/index.css +0 -1
- package/esm/styles/form-button-group/index.css +0 -1
- package/esm/styles/form-collapse/index.css +0 -1
- package/esm/styles/form-grid/index.css +0 -1
- package/esm/styles/form-item/index.css +0 -1
- package/esm/styles/form-tab/index.css +0 -1
- package/esm/styles/preview-text/index.css +0 -1
- package/esm/styles/query-form/index.css +0 -1
- package/esm/styles/query-form-item/index.css +0 -1
- package/esm/styles/select-table/index.css +0 -1
- package/esm/submit/submit.d.ts +0 -36
- package/esm/tree/tree.d.ts +0 -20
- package/esm/tree/types.d.ts +0 -13
- package/esm/tree/types.mjs +0 -2
- package/esm/tree/types.mjs.map +0 -1
- package/esm/tree/utils.d.ts +0 -45
- package/esm/tree-select/tree-select.d.ts +0 -10
- package/esm/upload/upload.d.ts +0 -1259
- package/esm/vendor/icon.mjs +0 -11
- package/esm/vendor/icon.mjs.map +0 -1
- package/esm/vendor/lodash.mjs +0 -1506
- package/esm/vendor/lodash.mjs.map +0 -1
- package/esm/vendor/runtime.mjs +0 -34
- package/esm/vendor/runtime.mjs.map +0 -1
- package/esm/vendor/shared.esm-bundler.mjs +0 -9
- package/esm/vendor/shared.esm-bundler.mjs.map +0 -1
- package/esm/vendor/sizes.mjs +0 -27
- package/esm/vendor/sizes.mjs.map +0 -1
- package/esm/vendor/types.mjs +0 -19
- package/esm/vendor/types.mjs.map +0 -1
package/esm/editable/index.mjs
CHANGED
|
@@ -1,220 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import
|
|
6
|
-
import "@formily/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
props: {
|
|
19
|
-
internalFormItemClass: {},
|
|
20
|
-
label: {},
|
|
21
|
-
for: {},
|
|
22
|
-
tooltip: {},
|
|
23
|
-
addonBefore: {},
|
|
24
|
-
addonAfter: {},
|
|
25
|
-
extra: {},
|
|
26
|
-
feedbackText: {},
|
|
27
|
-
feedbackStatus: {},
|
|
28
|
-
asterisk: { type: Boolean },
|
|
29
|
-
colon: { type: Boolean },
|
|
30
|
-
labelAlign: {},
|
|
31
|
-
wrapperAlign: {},
|
|
32
|
-
labelWrap: { type: Boolean },
|
|
33
|
-
labelWidth: {},
|
|
34
|
-
wrapperWidth: {},
|
|
35
|
-
labelCol: {},
|
|
36
|
-
wrapperCol: {},
|
|
37
|
-
fullness: { type: Boolean },
|
|
38
|
-
size: { default: "default" },
|
|
39
|
-
layout: {},
|
|
40
|
-
feedbackLayout: { default: "popover" },
|
|
41
|
-
tooltipLayout: {}
|
|
42
|
-
},
|
|
43
|
-
setup(b) {
|
|
44
|
-
const a = b, e = E(), r = `${L}-editable`, s = m(), l = m(!1);
|
|
45
|
-
$(e.value.data) ? $(e.value.data.readPretty) || (e.value.data.readPretty = !0) : (e.value.data = {}, e.value.data.readPretty = !0);
|
|
46
|
-
function v(o) {
|
|
47
|
-
s.value.parentElement.contains(o.target) || (l.value = !1);
|
|
48
|
-
}
|
|
49
|
-
function y() {
|
|
50
|
-
l.value = !0;
|
|
51
|
-
}
|
|
52
|
-
return V(
|
|
53
|
-
() => e.value.form.queryFeedbacks({
|
|
54
|
-
type: "error",
|
|
55
|
-
address: `${e.value.address.entire}.*`
|
|
56
|
-
}),
|
|
57
|
-
(o) => {
|
|
58
|
-
o.length > 0 && (l.value = !0);
|
|
59
|
-
}
|
|
60
|
-
), (o, p) => (n(), f("div", {
|
|
61
|
-
class: i(r)
|
|
62
|
-
}, [
|
|
63
|
-
u(t(W), P(o.$attrs, {
|
|
64
|
-
visible: l.value,
|
|
65
|
-
title: o.$attrs.title || t(e).title,
|
|
66
|
-
trigger: "click",
|
|
67
|
-
width: "auto"
|
|
68
|
-
}), {
|
|
69
|
-
default: d(() => [
|
|
70
|
-
_("div", {
|
|
71
|
-
ref_key: "contentRef",
|
|
72
|
-
ref: s,
|
|
73
|
-
class: i(`${r}-popover-wrapper`)
|
|
74
|
-
}, [
|
|
75
|
-
T(o.$slots, "default")
|
|
76
|
-
], 2)
|
|
77
|
-
]),
|
|
78
|
-
reference: d(() => [
|
|
79
|
-
F((n(), C(t(c), P(a, {
|
|
80
|
-
class: `${r}-trigger`
|
|
81
|
-
}), {
|
|
82
|
-
default: d(() => [
|
|
83
|
-
_("div", {
|
|
84
|
-
class: i(`${r}-content`),
|
|
85
|
-
onClick: y
|
|
86
|
-
}, [
|
|
87
|
-
u(t(S), null, {
|
|
88
|
-
default: d(() => [
|
|
89
|
-
q(D(t(e).title), 1)
|
|
90
|
-
]),
|
|
91
|
-
_: 1
|
|
92
|
-
}),
|
|
93
|
-
u(t(I), {
|
|
94
|
-
class: i(`${r}-edit-btn`)
|
|
95
|
-
}, null, 8, ["class"])
|
|
96
|
-
], 2)
|
|
97
|
-
]),
|
|
98
|
-
_: 1
|
|
99
|
-
}, 16, ["class"])), [
|
|
100
|
-
[t(R), v]
|
|
101
|
-
])
|
|
102
|
-
]),
|
|
103
|
-
_: 3
|
|
104
|
-
}, 16, ["visible", "title"])
|
|
105
|
-
]));
|
|
106
|
-
}
|
|
107
|
-
}), K = /* @__PURE__ */ z({
|
|
108
|
-
name: "FEditable",
|
|
109
|
-
__name: "editable",
|
|
110
|
-
props: {
|
|
111
|
-
internalFormItemClass: {},
|
|
112
|
-
label: {},
|
|
113
|
-
for: {},
|
|
114
|
-
tooltip: {},
|
|
115
|
-
addonBefore: {},
|
|
116
|
-
addonAfter: {},
|
|
117
|
-
extra: {},
|
|
118
|
-
feedbackText: {},
|
|
119
|
-
feedbackStatus: {},
|
|
120
|
-
asterisk: { type: Boolean },
|
|
121
|
-
colon: { type: Boolean },
|
|
122
|
-
labelAlign: {},
|
|
123
|
-
wrapperAlign: {},
|
|
124
|
-
labelWrap: { type: Boolean },
|
|
125
|
-
labelWidth: {},
|
|
126
|
-
wrapperWidth: {},
|
|
127
|
-
labelCol: {},
|
|
128
|
-
wrapperCol: {},
|
|
129
|
-
fullness: { type: Boolean },
|
|
130
|
-
size: { default: "default" },
|
|
131
|
-
layout: {},
|
|
132
|
-
feedbackLayout: { default: "popover" },
|
|
133
|
-
tooltipLayout: {},
|
|
134
|
-
editProps: {}
|
|
135
|
-
},
|
|
136
|
-
setup(b) {
|
|
137
|
-
const a = b, e = E(), r = m(null), s = `${L}-editable`, l = m(null), v = g(() => k(a, "editProps")), y = g(() => H(a.editProps) ? { ...k(a, "editProps"), ...a.editProps } : k(a, "editProps"));
|
|
138
|
-
function o() {
|
|
139
|
-
$(e.value.data) || (e.value.data = {});
|
|
140
|
-
}
|
|
141
|
-
o(), e.value.data.readPretty = !0;
|
|
142
|
-
async function p() {
|
|
143
|
-
e.value.disabled || (o(), e.value.data.readPretty = !1, await x(), l.value.feedbackTooltipRef.updatePopper(), r.value?.querySelector("input")?.focus());
|
|
144
|
-
}
|
|
145
|
-
function B() {
|
|
146
|
-
e.value.data?.readPretty !== !0 && (o(), setTimeout(async () => {
|
|
147
|
-
e.value.data.readPretty = !0, await x(), l.value?.feedbackTooltipRef.updatePopper();
|
|
148
|
-
}, 0));
|
|
149
|
-
}
|
|
150
|
-
return (O, X) => (n(), f("div", {
|
|
151
|
-
ref_key: "innerRef",
|
|
152
|
-
ref: r,
|
|
153
|
-
class: i([s, t(e).disabled && "is-disabled"])
|
|
154
|
-
}, [
|
|
155
|
-
F((n(), f("div", {
|
|
156
|
-
class: i(`${s}-content`)
|
|
157
|
-
}, [
|
|
158
|
-
u(t(c), P({
|
|
159
|
-
ref_key: "formItemRef",
|
|
160
|
-
ref: l
|
|
161
|
-
}, t(e).data?.readPretty === !1 ? y.value : v.value, { onClick: p }), {
|
|
162
|
-
default: d(() => [
|
|
163
|
-
_("div", null, [
|
|
164
|
-
T(O.$slots, "default")
|
|
165
|
-
])
|
|
166
|
-
]),
|
|
167
|
-
_: 3
|
|
168
|
-
}, 16),
|
|
169
|
-
t(e).disabled ? M("", !0) : (n(), f(N, { key: 0 }, [
|
|
170
|
-
t(e).data?.readPretty === !0 ? (n(), C(t(c), {
|
|
171
|
-
key: 0,
|
|
172
|
-
size: a.size,
|
|
173
|
-
"feedback-layout": a.feedbackLayout
|
|
174
|
-
}, {
|
|
175
|
-
default: d(() => [
|
|
176
|
-
u(t(I), {
|
|
177
|
-
class: i(`${s}-edit-btn`),
|
|
178
|
-
onClick: p
|
|
179
|
-
}, null, 8, ["class"])
|
|
180
|
-
]),
|
|
181
|
-
_: 1
|
|
182
|
-
}, 8, ["size", "feedback-layout"])) : (n(), C(t(c), {
|
|
183
|
-
key: 1,
|
|
184
|
-
size: a.size,
|
|
185
|
-
"feedback-layout": a.feedbackLayout
|
|
186
|
-
}, {
|
|
187
|
-
default: d(() => [
|
|
188
|
-
u(t(G), {
|
|
189
|
-
class: i(`${s}-close-btn`),
|
|
190
|
-
onClick: B
|
|
191
|
-
}, null, 8, ["class"])
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
}, 8, ["size", "feedback-layout"]))
|
|
195
|
-
], 64))
|
|
196
|
-
], 2)), [
|
|
197
|
-
[t(R), B]
|
|
198
|
-
])
|
|
199
|
-
], 2));
|
|
200
|
-
}
|
|
201
|
-
}), Q = h(K, w(
|
|
202
|
-
{
|
|
203
|
-
required: !0,
|
|
204
|
-
description: "extra"
|
|
205
|
-
},
|
|
206
|
-
A
|
|
207
|
-
)), U = h(J, w(
|
|
208
|
-
{
|
|
209
|
-
required: !0,
|
|
210
|
-
description: "extra"
|
|
211
|
-
},
|
|
212
|
-
A
|
|
213
|
-
)), pe = j(Q, {
|
|
214
|
-
Popover: U
|
|
215
|
-
});
|
|
216
|
-
export {
|
|
217
|
-
pe as Editable,
|
|
218
|
-
pe as default
|
|
219
|
-
};
|
|
220
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import { composeExport } from "../__builtins__/shared/utils.mjs";
|
|
2
|
+
import { fieldFeedbackMapper } from "../form-item/index.mjs";
|
|
3
|
+
import _sfc_main from "./editable-popover.mjs";
|
|
4
|
+
import _sfc_main$1 from "./editable.mjs";
|
|
5
|
+
import "./style.css";
|
|
6
|
+
import { connect, mapProps } from "@silver-formily/vue";
|
|
7
|
+
const Editable = composeExport(connect(_sfc_main$1, mapProps({
|
|
8
|
+
required: true,
|
|
9
|
+
description: "extra"
|
|
10
|
+
}, fieldFeedbackMapper)), { Popover: connect(_sfc_main, mapProps({
|
|
11
|
+
required: true,
|
|
12
|
+
description: "extra"
|
|
13
|
+
}, fieldFeedbackMapper)) });
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Editable as default };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/editable/editable-popover.vue","../../src/editable/editable.vue","../../src/editable/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Field } from '@formily/core'\nimport type { IFormItemProps } from '../form-item/types'\nimport { Edit } from '@element-plus/icons-vue'\nimport { reaction } from '@formily/reactive'\nimport { isValid } from '@formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ElPopover, ElText, ClickOutside as vClickOutside } from 'element-plus'\nimport { ref } from 'vue'\nimport { stylePrefix } from '../__builtins__/configs'\nimport { FormBaseItem } from '../form-item'\n\ndefineOptions({\n name: 'FEditablePopover',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<IFormItemProps>(), {\n feedbackLayout: 'popover',\n size: 'default',\n})\n\nconst fieldRef = useField<Field>()\nconst prefixCls = `${stylePrefix}-editable`\nconst contentRef = ref<HTMLElement>()\nconst visible = ref(false)\n\nif (isValid(fieldRef.value.data)) {\n /* istanbul ignore else -- @preserve */\n if (!isValid(fieldRef.value.data.readPretty)) {\n fieldRef.value.data.readPretty = true\n }\n}\nelse {\n fieldRef.value.data = {}\n fieldRef.value.data.readPretty = true\n}\n\nfunction onClickOutside(e) {\n const popoverDOM = contentRef.value.parentElement\n /* istanbul ignore else -- @preserve */\n if (!popoverDOM.contains(e.target)) {\n visible.value = false\n }\n}\nfunction onClick() {\n visible.value = true\n}\n\nreaction(\n () => fieldRef.value.form.queryFeedbacks({\n type: 'error',\n address: `${fieldRef.value.address.entire}.*`,\n }),\n (errorList) => {\n if (errorList.length > 0) {\n visible.value = true\n }\n },\n)\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <ElPopover\n v-bind=\"$attrs\"\n :visible=\"visible\"\n :title=\"$attrs.title || fieldRef.title\" trigger=\"click\" width=\"auto\"\n >\n <template #default>\n <div ref=\"contentRef\" :class=\"`${prefixCls}-popover-wrapper`\">\n <slot />\n </div>\n </template>\n <template #reference>\n <FormBaseItem v-click-outside=\"onClickOutside\" v-bind=\"props\" :class=\"`${prefixCls}-trigger`\">\n <div :class=\"`${prefixCls}-content`\" @click=\"onClick\">\n <ElText>\n {{ fieldRef.title }}\n </ElText>\n <Edit :class=\"`${prefixCls}-edit-btn`\" />\n </div>\n </FormBaseItem>\n </template>\n </ElPopover>\n </div>\n</template>\n","<script lang=\"ts\" setup>\nimport type { Field } from '@formily/core'\nimport type { IFormItemProps } from '../form-item/types'\nimport { Close, Edit } from '@element-plus/icons-vue'\nimport { isPlainObj, isValid } from '@formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ClickOutside as vClickOutside } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, nextTick, ref } from 'vue'\nimport { stylePrefix } from '../__builtins__/configs'\nimport { FormBaseItem } from '../form-item'\n\ndefineOptions({\n name: 'FEditable',\n})\n\nconst props = withDefaults(defineProps<IFormItemProps & { editProps?: IFormItemProps }>(), {\n feedbackLayout: 'popover',\n size: 'default',\n})\n\nconst fieldRef = useField<Field>()\nconst innerRef = ref<HTMLElement>(null)\nconst prefixCls = `${stylePrefix}-editable`\nconst formItemRef = ref<InstanceType<typeof FormBaseItem>>(null)\n\nconst commonProps = computed(() => omit(props, 'editProps'))\nconst editProps = computed(() => {\n if (isPlainObj(props.editProps)) {\n return { ...omit(props, 'editProps'), ...props.editProps }\n }\n return omit(props, 'editProps')\n})\n\nfunction handleEnsureReadPretty() {\n if (!isValid(fieldRef.value.data)) {\n fieldRef.value.data = {}\n }\n}\n\nhandleEnsureReadPretty()\nfieldRef.value.data.readPretty = true\n\nasync function onClick() {\n if (fieldRef.value.disabled)\n return\n handleEnsureReadPretty()\n fieldRef.value.data.readPretty = false\n await nextTick()\n formItemRef.value.feedbackTooltipRef.updatePopper()\n innerRef.value?.querySelector('input')?.focus()\n}\n\nfunction onClickOutside() {\n if (fieldRef.value.data?.readPretty === true)\n return\n handleEnsureReadPretty()\n // 使用下拉菜单等触发的事件完成应有的操作\n setTimeout(async () => {\n fieldRef.value.data.readPretty = true\n await nextTick()\n formItemRef.value?.feedbackTooltipRef.updatePopper()\n }, 0)\n}\n</script>\n\n<template>\n <div ref=\"innerRef\" :class=\"[prefixCls, fieldRef.disabled && 'is-disabled']\">\n <div v-click-outside=\"onClickOutside\" :class=\"`${prefixCls}-content`\">\n <FormBaseItem ref=\"formItemRef\" v-bind=\"fieldRef.data?.readPretty === false ? editProps : commonProps\" @click=\"onClick\">\n <div>\n <slot />\n </div>\n </FormBaseItem>\n <template v-if=\"!fieldRef.disabled\">\n <template v-if=\"fieldRef.data?.readPretty === true\">\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\n <Edit :class=\"`${prefixCls}-edit-btn`\" @click=\"onClick\" />\n </FormBaseItem>\n </template>\n <template v-else>\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\n <Close :class=\"`${prefixCls}-close-btn`\" @click=\"onClickOutside\" />\n </FormBaseItem>\n </template>\n </template>\n </div>\n </div>\n</template>\n","import type { ElPopover } from 'element-plus'\nimport type { IFormItemProps } from '../form-item/types'\nimport { connect, mapProps } from '@silver-formily/vue'\nimport { composeExport } from '../__builtins__/shared'\nimport { fieldFeedbackMapper } from '../form-item'\nimport FEditablePopover from './editable-popover.vue'\nimport FEditable from './editable.vue'\nimport './style.scss'\n\nexport type EditableProps = IFormItemProps\nexport type EditablePopoverProps = typeof ElPopover\n\nconst EditableInner = connect<typeof FEditable>(FEditable, mapProps(\n {\n required: true,\n description: 'extra',\n },\n fieldFeedbackMapper,\n))\n\nconst EditablePopover = connect<typeof FEditablePopover>(FEditablePopover, mapProps(\n {\n required: true,\n description: 'extra',\n },\n fieldFeedbackMapper,\n))\n\nexport const Editable = composeExport(EditableInner, {\n Popover: EditablePopover,\n})\n\nexport default Editable\n"],"names":["props","__props","fieldRef","useField","prefixCls","stylePrefix","contentRef","ref","visible","isValid","onClickOutside","e","onClick","reaction","errorList","_createElementBlock","_createVNode","_unref","ElPopover","_mergeProps","_ctx","$attrs","_createElementVNode","_renderSlot","_createBlock","FormBaseItem","ElText","_createTextVNode","_toDisplayString","Edit","innerRef","formItemRef","commonProps","computed","omit","editProps","isPlainObj","handleEnsureReadPretty","nextTick","_normalizeClass","_Fragment","Close","EditableInner","connect","FEditable","mapProps","fieldFeedbackMapper","EditablePopover","FEditablePopover","Editable","composeExport"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["FEditable","FEditablePopover"],"sources":["../../src/editable/index.ts"],"sourcesContent":["import type { ElPopover } from 'element-plus'\nimport type { IFormItemProps } from '../form-item/types'\nimport { connect, mapProps } from '@silver-formily/vue'\nimport { composeExport } from '../__builtins__/shared'\nimport { fieldFeedbackMapper } from '../form-item'\nimport FEditablePopover from './editable-popover.vue'\nimport FEditable from './editable.vue'\nimport './style.scss'\n\nexport type EditableProps = IFormItemProps\nexport type EditablePopoverProps = typeof ElPopover\n\nconst EditableInner = connect<typeof FEditable>(FEditable, mapProps(\n {\n required: true,\n description: 'extra',\n },\n fieldFeedbackMapper,\n))\n\nconst EditablePopover = connect<typeof FEditablePopover>(FEditablePopover, mapProps(\n {\n required: true,\n description: 'extra',\n },\n fieldFeedbackMapper,\n))\n\nexport const Editable = composeExport(EditableInner, {\n Popover: EditablePopover,\n})\n\nexport default Editable\n"],"mappings":";;;;;;AA4BA,MAAa,WAAW,cAhBF,QAA0BA,aAAW,SACzD;CACE,UAAU;CACV,aAAa;CACd,EACD,oBACD,CAAC,EAUmD,EACnD,SATsB,QAAiCC,WAAkB,SACzE;CACE,UAAU;CACV,aAAa;CACd,EACD,oBACD,CAAC,EAID,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.formily-element-plus-editable {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
display: inline-block !important;
|
|
4
|
+
}
|
|
5
|
+
.formily-element-plus-editable.is-disabled {
|
|
6
|
+
cursor: not-allowed;
|
|
7
|
+
}
|
|
8
|
+
.formily-element-plus-editable-content {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
.formily-element-plus-editable-content > * {
|
|
13
|
+
margin-right: 3px;
|
|
14
|
+
}
|
|
15
|
+
.formily-element-plus-editable-content > *:last-child {
|
|
16
|
+
margin-right: 0;
|
|
17
|
+
}
|
|
18
|
+
.formily-element-plus-editable .formily-element-plus-editable-edit-btn,
|
|
19
|
+
.formily-element-plus-editable .formily-element-plus-editable-close-btn {
|
|
20
|
+
transition: all 0.25s ease-in-out;
|
|
21
|
+
width: 14px;
|
|
22
|
+
height: 14px;
|
|
23
|
+
display: inline;
|
|
24
|
+
vertical-align: sub;
|
|
25
|
+
}
|
|
26
|
+
.formily-element-plus-editable .formily-element-plus-editable-edit-btn:hover,
|
|
27
|
+
.formily-element-plus-editable .formily-element-plus-editable-close-btn:hover {
|
|
28
|
+
color: var(--el-color-primary);
|
|
29
|
+
}
|
package/esm/form/form.mjs
CHANGED
|
@@ -1,71 +1,51 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, 8, ["placeholder"])
|
|
48
|
-
]),
|
|
49
|
-
_: 3
|
|
50
|
-
}, 8, ["form"])) : t(u) ? (f(), p(t(b), {
|
|
51
|
-
key: 1,
|
|
52
|
-
placeholder: o.previewTextPlaceholder
|
|
53
|
-
}, {
|
|
54
|
-
default: i(() => [
|
|
55
|
-
n(t(c), d(m.$attrs, {
|
|
56
|
-
onSubmit: r[1] || (r[1] = S((e) => a(e, t(u)), ["prevent", "stop"]))
|
|
57
|
-
}), {
|
|
58
|
-
default: i(() => [
|
|
59
|
-
s(m.$slots, "default")
|
|
60
|
-
]),
|
|
61
|
-
_: 3
|
|
62
|
-
}, 16)
|
|
63
|
-
]),
|
|
64
|
-
_: 3
|
|
65
|
-
}, 8, ["placeholder"])) : F("", !0);
|
|
66
|
-
}
|
|
1
|
+
import PreviewText from "../preview-text/index.mjs";
|
|
2
|
+
import _sfc_main$1 from "../form-layout/form-layout.mjs";
|
|
3
|
+
import { createBlock, createCommentVNode, createVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx, withModifiers } from "vue";
|
|
4
|
+
import { FormProvider, useForm } from "@silver-formily/vue";
|
|
5
|
+
//#region src/form/form.vue
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "FForm",
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
__name: "form",
|
|
10
|
+
props: {
|
|
11
|
+
form: { type: Object },
|
|
12
|
+
previewTextPlaceholder: { type: String },
|
|
13
|
+
onAutoSubmit: { type: Function },
|
|
14
|
+
onAutoSubmitFailed: { type: Function }
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const top = useForm();
|
|
19
|
+
function handleSubmit(e, form) {
|
|
20
|
+
form.submit((values) => props.onAutoSubmit?.(values)).catch((error) => props.onAutoSubmitFailed?.(error));
|
|
21
|
+
}
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return props.form ? (openBlock(), createBlock(unref(FormProvider), {
|
|
24
|
+
key: 0,
|
|
25
|
+
form: props.form
|
|
26
|
+
}, {
|
|
27
|
+
default: withCtx(() => [createVNode(unref(PreviewText), { placeholder: props.previewTextPlaceholder }, {
|
|
28
|
+
default: withCtx(() => [createVNode(unref(_sfc_main$1), mergeProps(_ctx.$attrs, { onSubmit: _cache[0] || (_cache[0] = (e) => handleSubmit(e, __props.form)) }), {
|
|
29
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
30
|
+
_: 3
|
|
31
|
+
}, 16)]),
|
|
32
|
+
_: 3
|
|
33
|
+
}, 8, ["placeholder"])]),
|
|
34
|
+
_: 3
|
|
35
|
+
}, 8, ["form"])) : unref(top) ? (openBlock(), createBlock(unref(PreviewText), {
|
|
36
|
+
key: 1,
|
|
37
|
+
placeholder: props.previewTextPlaceholder
|
|
38
|
+
}, {
|
|
39
|
+
default: withCtx(() => [createVNode(unref(_sfc_main$1), mergeProps(_ctx.$attrs, { onSubmit: _cache[1] || (_cache[1] = withModifiers((e) => handleSubmit(e, unref(top)), ["prevent", "stop"])) }), {
|
|
40
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
41
|
+
_: 3
|
|
42
|
+
}, 16)]),
|
|
43
|
+
_: 3
|
|
44
|
+
}, 8, ["placeholder"])) : createCommentVNode("v-if", true);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
67
47
|
});
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
//# sourceMappingURL=form.mjs.map
|
|
48
|
+
//#endregion
|
|
49
|
+
export { _sfc_main as default };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=form.mjs.map
|
package/esm/form/form.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.mjs","sources":["../../src/form/form.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Form as FormType, IFormFeedback } from '@formily/core'\nimport type { PropType } from 'vue'\nimport { FormProvider, useForm } from '@silver-formily/vue'\nimport { FormLayout } from '../form-layout'\nimport { PreviewText } from '../preview-text'\n\ndefineOptions({\n name: 'FForm',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n form: {\n type: Object as PropType<FormType>,\n },\n previewTextPlaceholder: {\n type: String,\n },\n onAutoSubmit: {\n type: Function as PropType<(values: FormType['values']) => Promise<any>>,\n },\n onAutoSubmitFailed: {\n type: Function as PropType<(error: IFormFeedback[]) => void>,\n },\n})\n\nconst top = useForm()\n\nfunction handleSubmit(e: Event, form: FormType) {\n form\n .submit(values => props.onAutoSubmit?.(values))\n .catch(error => props.onAutoSubmitFailed?.(error))\n}\n</script>\n\n<template>\n <FormProvider v-if=\"props.form\" :form=\"props.form\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout v-bind=\"$attrs\" @submit=\"(e) => handleSubmit(e, form)\">\n <slot />\n </FormLayout>\n </PreviewText>\n </FormProvider>\n <template v-else-if=\"top\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout\n v-bind=\"$attrs\"\n @submit.prevent.stop=\"(e) => handleSubmit(e, top)\"\n >\n <slot />\n </FormLayout>\n </PreviewText>\n </template>\n</template>\n"],"
|
|
1
|
+
{"version":3,"file":"form.mjs","names":["$attrs"],"sources":["../../src/form/form.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Form as FormType, IFormFeedback } from '@formily/core'\nimport type { PropType } from 'vue'\nimport { FormProvider, useForm } from '@silver-formily/vue'\nimport { FormLayout } from '../form-layout'\nimport { PreviewText } from '../preview-text'\n\ndefineOptions({\n name: 'FForm',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n form: {\n type: Object as PropType<FormType>,\n },\n previewTextPlaceholder: {\n type: String,\n },\n onAutoSubmit: {\n type: Function as PropType<(values: FormType['values']) => Promise<any>>,\n },\n onAutoSubmitFailed: {\n type: Function as PropType<(error: IFormFeedback[]) => void>,\n },\n})\n\nconst top = useForm()\n\nfunction handleSubmit(e: Event, form: FormType) {\n form\n .submit(values => props.onAutoSubmit?.(values))\n .catch(error => props.onAutoSubmitFailed?.(error))\n}\n</script>\n\n<template>\n <FormProvider v-if=\"props.form\" :form=\"props.form\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout v-bind=\"$attrs\" @submit=\"(e) => handleSubmit(e, form)\">\n <slot />\n </FormLayout>\n </PreviewText>\n </FormProvider>\n <template v-else-if=\"top\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout\n v-bind=\"$attrs\"\n @submit.prevent.stop=\"(e) => handleSubmit(e, top)\"\n >\n <slot />\n </FormLayout>\n </PreviewText>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAYA,MAAM,QAAQ;EAed,MAAM,MAAM,SAAQ;EAEpB,SAAS,aAAa,GAAU,MAAgB;AAC9C,QACG,QAAO,WAAU,MAAM,eAAe,OAAO,CAAA,CAC7C,OAAM,UAAS,MAAM,qBAAqB,MAAM,CAAA;;;UAK/B,MAAM,QAAA,WAAA,EAA1B,YAMe,MAAA,aAAA,EAAA;;IANkB,MAAM,MAAM;;2BAK7B,CAJd,YAIc,MAAA,YAAA,EAAA,EAJA,aAAa,MAAM,wBAAA,EAAA;4BAGlB,CAFb,YAEa,MAAA,YAAA,EAFb,WAAoBA,KAEP,QAFa,EAAG,UAAM,OAAA,OAAA,OAAA,MAAG,MAAM,aAAa,GAAG,QAAA,KAAI,GAAA,CAAA,EAAA;6BACtD,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA;;;;;;sBAIO,MAAA,IAAG,IAAA,WAAA,EACtB,YAOc,MAAA,YAAA,EAAA;;IAPA,aAAa,MAAM;;2BAMlB,CALb,YAKa,MAAA,YAAA,EALb,WACUA,KAIG,QAJG,EACb,UAAM,OAAA,OAAA,OAAA,KAAA,eAAgB,MAAM,aAAa,GAAG,MAAA,IAAG,CAAA,EAAA,CAAA,WAAA,OAAA,CAAA,GAAA,CAAA,EAAA;4BAExC,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
import { Form, IFormFeedback } from "@formily/core";
|
|
4
|
+
|
|
5
|
+
//#region src/form/form.vue.d.ts
|
|
6
|
+
declare var __VLS_22: {}, __VLS_39: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_22) => any;
|
|
9
|
+
} & {
|
|
10
|
+
default?: (props: typeof __VLS_39) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
13
|
+
form: {
|
|
14
|
+
type: PropType<Form>;
|
|
15
|
+
};
|
|
16
|
+
previewTextPlaceholder: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
};
|
|
19
|
+
onAutoSubmit: {
|
|
20
|
+
type: PropType<(values: Form["values"]) => Promise<any>>;
|
|
21
|
+
};
|
|
22
|
+
onAutoSubmitFailed: {
|
|
23
|
+
type: PropType<(error: IFormFeedback[]) => void>;
|
|
24
|
+
};
|
|
25
|
+
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
|
26
|
+
form: {
|
|
27
|
+
type: PropType<Form>;
|
|
28
|
+
};
|
|
29
|
+
previewTextPlaceholder: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
};
|
|
32
|
+
onAutoSubmit: {
|
|
33
|
+
type: PropType<(values: Form["values"]) => Promise<any>>;
|
|
34
|
+
};
|
|
35
|
+
onAutoSubmitFailed: {
|
|
36
|
+
type: PropType<(error: IFormFeedback[]) => void>;
|
|
37
|
+
};
|
|
38
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { _default };
|
|
48
|
+
//# sourceMappingURL=form.vue.d.ts.map
|
package/esm/form/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import { _default } from "./form.vue.js";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useFormLayoutId } from "../form-layout/utils.mjs";
|
|
2
|
+
import { prefixCls } from "./utils.mjs";
|
|
3
|
+
import { ElAffix, useAttrs } from "element-plus";
|
|
4
|
+
import { computed, createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
5
|
+
import { useForm } from "@silver-formily/vue";
|
|
6
|
+
//#region src/form-button-group/form-button-group-sticky.vue
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "form-button-group-sticky",
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const attrs = useAttrs();
|
|
11
|
+
const formRef = useForm();
|
|
12
|
+
const formLayoutId = useFormLayoutId();
|
|
13
|
+
const target = computed(() => {
|
|
14
|
+
if (attrs.value.target) return attrs.value.target;
|
|
15
|
+
if (formLayoutId.value) return `#${formLayoutId.value}`;
|
|
16
|
+
/* istanbul ignore next -- @preserve */
|
|
17
|
+
return formRef.value?.id ? `#formily-${formRef.value.id}` : void 0;
|
|
18
|
+
});
|
|
19
|
+
return (_ctx, _cache) => {
|
|
20
|
+
return openBlock(), createBlock(unref(ElAffix), mergeProps({ class: `${unref(prefixCls)}__sticky` }, unref(attrs), {
|
|
21
|
+
position: unref(attrs).position ?? "bottom",
|
|
22
|
+
target: target.value
|
|
23
|
+
}), {
|
|
24
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
25
|
+
_: 3
|
|
26
|
+
}, 16, [
|
|
27
|
+
"class",
|
|
28
|
+
"position",
|
|
29
|
+
"target"
|
|
30
|
+
]);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { _sfc_main as default };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=form-button-group-sticky.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-button-group-sticky.mjs","names":[],"sources":["../../src/form-button-group/form-button-group-sticky.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { AffixProps } from 'element-plus'\nimport type { ComputedRef } from 'vue'\nimport { useForm } from '@silver-formily/vue'\nimport { ElAffix, useAttrs } from 'element-plus'\nimport { computed } from 'vue'\nimport { useFormLayoutId } from '../form-layout/utils'\nimport { prefixCls } from './utils'\n\nconst attrs = useAttrs() as ComputedRef<Partial<AffixProps>>\nconst formRef = useForm()\nconst formLayoutId = useFormLayoutId()\n\nconst target = computed(() => {\n if (attrs.value.target) {\n return attrs.value.target\n }\n if (formLayoutId.value) {\n return `#${formLayoutId.value}`\n }\n /* istanbul ignore next -- @preserve */\n return formRef.value?.id ? `#formily-${formRef.value.id}` : undefined\n})\n</script>\n\n<template>\n <ElAffix\n :class=\"`${prefixCls}__sticky`\"\n v-bind=\"attrs\"\n :position=\"attrs.position ?? 'bottom'\"\n :target=\"target\"\n >\n <slot />\n </ElAffix>\n</template>\n"],"mappings":";;;;;;;;;EASA,MAAM,QAAQ,UAAU;EACxB,MAAM,UAAU,SAAQ;EACxB,MAAM,eAAe,iBAAgB;EAErC,MAAM,SAAS,eAAe;AAC5B,OAAI,MAAM,MAAM,OACd,QAAO,MAAM,MAAM;AAErB,OAAI,aAAa,MACf,QAAO,IAAI,aAAa;;AAG1B,UAAO,QAAQ,OAAO,KAAK,YAAY,QAAQ,MAAM,OAAO,KAAA;IAC7D;;uBAIC,YAOU,MAAA,QAAA,EAPV,WAOU,EANP,OAAK,GAAK,MAAA,UAAS,CAAA,WAAA,EACZ,MAAA,MAAK,EAAA;IACZ,UAAU,MAAA,MAAK,CAAC,YAAQ;IACxB,QAAQ,OAAA;;2BAED,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import FormItem from "../form-item/index.mjs";
|
|
2
|
+
import { prefixCls } from "./utils.mjs";
|
|
3
|
+
import { ElSpace } from "element-plus";
|
|
4
|
+
import { createBlock, createVNode, defineComponent, mergeProps, normalizeStyle, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
5
|
+
//#region src/form-button-group/form-button-group.vue
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "FFormButtonGroup",
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
__name: "form-button-group",
|
|
10
|
+
props: {
|
|
11
|
+
align: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "left"
|
|
14
|
+
},
|
|
15
|
+
inline: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
19
|
+
gutter: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 8
|
|
22
|
+
},
|
|
23
|
+
alignFormItem: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
setup(__props) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
return (_ctx, _cache) => {
|
|
31
|
+
return props.alignFormItem ? (openBlock(), createBlock(unref(FormItem), mergeProps({
|
|
32
|
+
key: 0,
|
|
33
|
+
label: "\xA0"
|
|
34
|
+
}, _ctx.$attrs, {
|
|
35
|
+
class: [unref(prefixCls), props.inline && `${unref(prefixCls)}--inline`],
|
|
36
|
+
style: { width: "100%" }
|
|
37
|
+
}), {
|
|
38
|
+
default: withCtx(() => [createVNode(unref(ElSpace), {
|
|
39
|
+
size: props.gutter,
|
|
40
|
+
style: normalizeStyle(props.align === "left" ? void 0 : {
|
|
41
|
+
justifyContent: props.align === "right" ? "flex-end" : "center",
|
|
42
|
+
display: "flex",
|
|
43
|
+
width: "100%"
|
|
44
|
+
})
|
|
45
|
+
}, {
|
|
46
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
47
|
+
_: 3
|
|
48
|
+
}, 8, ["size", "style"])]),
|
|
49
|
+
_: 3
|
|
50
|
+
}, 16, ["class"])) : (openBlock(), createBlock(unref(ElSpace), mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
51
|
+
class: [unref(prefixCls), props.inline && `${unref(prefixCls)}--inline`],
|
|
52
|
+
style: {
|
|
53
|
+
justifyContent: props.align === "left" ? "flex-start" : props.align === "right" ? "flex-end" : "center",
|
|
54
|
+
display: "flex"
|
|
55
|
+
},
|
|
56
|
+
size: props.gutter
|
|
57
|
+
}), {
|
|
58
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
59
|
+
_: 3
|
|
60
|
+
}, 16, [
|
|
61
|
+
"class",
|
|
62
|
+
"style",
|
|
63
|
+
"size"
|
|
64
|
+
]));
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
//#endregion
|
|
69
|
+
export { _sfc_main as default };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=form-button-group.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-button-group.mjs","names":["$attrs"],"sources":["../../src/form-button-group/form-button-group.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ElSpace } from 'element-plus'\nimport FormItem from '../form-item/index'\nimport { prefixCls } from './utils'\n\ndefineOptions({\n name: 'FFormButtonGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n align: {\n type: String,\n default: 'left',\n },\n inline: {\n type: Boolean,\n default: false,\n },\n gutter: {\n type: Number,\n default: 8,\n },\n alignFormItem: {\n type: Boolean,\n default: false,\n },\n})\n</script>\n\n<template>\n <FormItem\n v-if=\"props.alignFormItem\"\n label=\" \"\n v-bind=\"$attrs\"\n :class=\"[prefixCls, props.inline && `${prefixCls}--inline`]\"\n :style=\"{\n width: '100%',\n }\"\n >\n <ElSpace\n :size=\"props.gutter\"\n :style=\"props.align === 'left'\n ? undefined\n : {\n justifyContent: props.align === 'right' ? 'flex-end' : 'center',\n display: 'flex',\n width: '100%',\n }\"\n >\n <slot />\n </ElSpace>\n </FormItem>\n <ElSpace\n v-else\n v-bind=\"$attrs\"\n :class=\"[prefixCls, props.inline && `${prefixCls}--inline`]\"\n :style=\"{\n justifyContent: props.align === 'left'\n ? 'flex-start'\n : (props.align === 'right'\n ? 'flex-end'\n : 'center'),\n display: 'flex',\n }\"\n :size=\"props.gutter\"\n >\n <slot />\n </ElSpace>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUA,MAAM,QAAQ;;UAsBJ,MAAM,iBAAA,WAAA,EADd,YAqBW,MAAA,SAAA,EArBX,WAqBW;;IAnBT,OAAM;MACEA,KAAAA,QAAM;IACb,OAAK,CAAG,MAAA,UAAS,EAAE,MAAM,UAAM,GAAO,MAAA,UAAS,CAAA,UAAA;IAC/C,OAAO,EAAA,OAAA,QAEP;;2BAaS,CAXV,YAWU,MAAA,QAAA,EAAA;KAVP,MAAM,MAAM;KACZ,OAAK,eAAE,MAAM,UAAK,SAAsB,KAAA,IAAA;sBAAgD,MAAM,UAAK,UAAA,aAAA;;;;;4BAQ5F,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA;;;;sCAGZ,YAeU,MAAA,QAAA,EAfV,WAeU,EAAA,KAAA,GAAA,EAbAA,KAAAA,QAAM;IACb,OAAK,CAAG,MAAA,UAAS,EAAE,MAAM,UAAM,GAAO,MAAA,UAAS,CAAA,UAAA;IAC/C,OAAK;qBAA0B,MAAM,UAAK,SAAA,eAA8C,MAAM,UAAK,UAAA,aAAA;;;IAQnG,MAAM,MAAM;;2BAEL,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
|