element-ps 1.0.8 → 1.0.12
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.full.js +109 -102
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +109 -102
- package/es/components/alert/index.d.ts +3 -3
- package/es/components/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +3 -3
- package/es/components/autocomplete/index.d.ts +2 -2
- package/es/components/autocomplete/src/index.vue.d.ts +1 -1
- package/es/components/avatar/index.d.ts +3 -3
- package/es/components/avatar/src/avatar.d.ts +1 -1
- package/es/components/avatar/src/avatar.vue.d.ts +3 -3
- package/es/components/badge/index.d.ts +3 -3
- package/es/components/badge/src/badge.d.ts +1 -1
- package/es/components/badge/src/badge.vue.d.ts +3 -3
- package/es/components/button/index.d.ts +30 -30
- package/es/components/button/src/button-group.d.ts +2 -2
- package/es/components/button/src/button-group.vue.d.ts +6 -6
- package/es/components/button/src/button.d.ts +3 -3
- package/es/components/button/src/button.vue.d.ts +18 -18
- package/es/components/cascader/index.d.ts +14 -14
- package/es/components/cascader/src/index.vue.d.ts +7 -7
- package/es/components/checkbox/index.d.ts +27 -27
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +6 -6
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +4 -4
- package/es/components/checkbox/src/checkbox.vue.d.ts +7 -7
- package/es/components/checkbox/src/useCheckbox.d.ts +4 -4
- package/es/components/collapse/index.d.ts +4 -4
- package/es/components/collapse/src/collapse-item.vue.d.ts +2 -2
- package/es/components/date-picker/index.d.ts +4 -4
- package/es/components/date-picker/src/date-picker.d.ts +2 -2
- package/es/components/descriptions/index.d.ts +4 -4
- package/es/components/descriptions/src/description-item.d.ts +2 -2
- package/es/components/drawer/index.d.ts +4 -4
- package/es/components/drawer/src/index.vue.d.ts +2 -2
- package/es/components/dropdown/index.d.ts +6 -6
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +4 -4
- package/es/components/form/index.d.ts +5 -5
- package/es/components/form/src/form-item.vue.d.ts +1 -1
- package/es/components/form/src/form.vue.d.ts +3 -3
- package/es/components/input/index.d.ts +3 -3
- package/es/components/input/src/input.d.ts +1 -1
- package/es/components/input/src/input.vue.d.ts +3 -3
- package/es/components/input-number/index.d.ts +3 -3
- package/es/components/input-number/src/input-number.d.ts +1 -1
- package/es/components/input-number/src/input-number.vue.d.ts +3 -3
- package/es/components/link/index.d.ts +7 -7
- package/es/components/link/src/link.d.ts +1 -1
- package/es/components/link/src/link.vue.d.ts +7 -7
- package/es/components/page-header/index.d.ts +2 -2
- package/es/components/page-header/src/page-header.vue.d.ts +2 -2
- package/es/components/pagination/index.d.ts +2 -2
- package/es/components/pagination/src/pagination.d.ts +2 -2
- package/es/components/popconfirm/index.d.ts +6 -6
- package/es/components/popconfirm/src/index.vue.d.ts +6 -6
- package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/es/components/popover/index.d.ts +8 -8
- package/es/components/popover/src/index.vue.d.ts +4 -4
- package/es/components/popper/index.d.ts +4 -4
- package/es/components/popper/src/index.vue.d.ts +2 -2
- package/es/components/radio/index.d.ts +16 -16
- package/es/components/radio/src/radio-button.vue.d.ts +3 -3
- package/es/components/radio/src/radio-group.vue.d.ts +3 -3
- package/es/components/radio/src/radio.vue.d.ts +4 -4
- package/es/components/rate/index.d.ts +10 -10
- package/es/components/rate/src/index.vue.d.ts +5 -5
- package/es/components/scrollbar/index.d.ts +4 -4
- package/es/components/scrollbar/src/index.vue.d.ts +2 -2
- package/es/components/select/index.d.ts +12 -12
- package/es/components/select/src/option.vue.d.ts +2 -2
- package/es/components/select/src/select.vue.d.ts +8 -8
- package/es/components/select-v2/index.d.ts +10 -10
- package/es/components/select-v2/src/select.vue.d.ts +5 -5
- package/es/components/slider/index.d.ts +4 -4
- package/es/components/slider/src/index.vue.d.ts +2 -2
- package/es/components/space/index.d.ts +3 -3
- package/es/components/space/src/space.d.ts +4 -4
- package/es/components/steps/index.d.ts +1 -1
- package/es/components/steps/src/index.vue.d.ts +1 -1
- package/es/components/table/index.d.ts +9 -9
- package/es/components/table/src/table/defaults.d.ts +4 -4
- package/es/components/table/src/table-column/defaults.d.ts +2 -2
- package/es/components/table/src/table-column/index.d.ts +2 -2
- package/es/components/table/src/table.vue.d.ts +5 -5
- package/es/components/tabs/index.d.ts +4 -4
- package/es/components/tabs/src/tab-pane.vue.d.ts +2 -2
- package/es/components/tag/index.d.ts +6 -6
- package/es/components/tag/src/tag.d.ts +2 -2
- package/es/components/tag/src/tag.vue.d.ts +6 -6
- package/es/components/time-picker/index.d.ts +4 -4
- package/es/components/time-picker/src/common/picker.vue.d.ts +2 -2
- package/es/components/time-picker/src/time-picker.d.ts +2 -2
- package/es/components/time-select/index.d.ts +8 -8
- package/es/components/time-select/src/time-select.vue.d.ts +4 -4
- package/es/components/timeline/index.d.ts +4 -4
- package/es/components/timeline/src/item.vue.d.ts +2 -2
- package/es/components/tooltip/index.d.ts +6 -6
- package/es/components/tooltip/src/index.vue.d.ts +3 -3
- package/es/components/tree-v2/index.d.ts +1 -1
- package/es/components/tree-v2/src/tree-node.vue.d.ts +2 -2
- package/es/components/tree-v2/src/tree.vue.d.ts +1 -1
- package/es/components/upload/index.d.ts +4 -4
- package/es/components/upload/src/index.vue.d.ts +2 -2
- package/es/components/upload/src/upload.vue.d.ts +2 -2
- package/es/hooks/use-form-item/index.d.ts +1 -1
- package/es/index.mjs +6 -6
- package/es/packages/components/avatar/index.mjs +2 -2
- package/es/packages/components/avatar/src/avatar.mjs +29 -5
- package/es/packages/components/avatar/src/avatar.mjs.map +1 -1
- package/es/packages/components/avatar/src/avatar.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/avatar/src/avatar2.mjs +5 -29
- package/es/packages/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/packages/components/badge/index.mjs +2 -2
- package/es/packages/components/badge/src/badge.mjs +5 -20
- package/es/packages/components/badge/src/badge.mjs.map +1 -1
- package/es/packages/components/badge/src/badge.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/badge/src/badge2.mjs +20 -5
- package/es/packages/components/badge/src/badge2.mjs.map +1 -1
- package/es/packages/components/breadcrumb/index.mjs +2 -2
- package/es/packages/components/breadcrumb/src/breadcrumb-item.mjs +5 -13
- package/es/packages/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/packages/components/breadcrumb/src/breadcrumb-item.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/breadcrumb/src/breadcrumb-item2.mjs +13 -5
- package/es/packages/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/packages/components/card/index.mjs +2 -2
- package/es/packages/components/card/src/card.mjs +17 -5
- package/es/packages/components/card/src/card.mjs.map +1 -1
- package/es/packages/components/card/src/card.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/card/src/card2.mjs +5 -17
- package/es/packages/components/card/src/card2.mjs.map +1 -1
- package/es/packages/components/dialog/src/dialog.vue_vue&type=script&lang.mjs.map +1 -1
- package/es/packages/components/dialog/src/dialog.vue_vue&type=template&id=02672805&lang.mjs +6 -5
- package/es/packages/components/dialog/src/dialog.vue_vue&type=template&id=02672805&lang.mjs.map +1 -1
- package/es/packages/components/dialog/src/use-dialog.mjs +1 -1
- package/es/packages/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/packages/components/drawer/src/index.vue_vue&type=script&lang.mjs.map +1 -1
- package/es/packages/components/drawer/src/index.vue_vue&type=template&id=052d0d8e&lang.mjs +50 -46
- package/es/packages/components/drawer/src/index.vue_vue&type=template&id=052d0d8e&lang.mjs.map +1 -1
- package/es/packages/components/empty/index.mjs +2 -2
- package/es/packages/components/empty/src/empty.mjs +12 -5
- package/es/packages/components/empty/src/empty.mjs.map +1 -1
- package/es/packages/components/empty/src/empty.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/empty/src/empty2.mjs +5 -12
- package/es/packages/components/empty/src/empty2.mjs.map +1 -1
- package/es/packages/components/form/src/form-item.vue_vue&type=script&lang.mjs.map +1 -1
- package/es/packages/components/form/src/form-item.vue_vue&type=template&id=24eda48b&lang.mjs +10 -8
- package/es/packages/components/form/src/form-item.vue_vue&type=template&id=24eda48b&lang.mjs.map +1 -1
- package/es/packages/components/image/index.mjs +2 -2
- package/es/packages/components/image/src/image.mjs +5 -44
- package/es/packages/components/image/src/image.mjs.map +1 -1
- package/es/packages/components/image/src/image.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/image/src/image2.mjs +44 -5
- package/es/packages/components/image/src/image2.mjs.map +1 -1
- package/es/packages/components/index.mjs +6 -6
- package/es/packages/components/table/src/table-body/render-helper.mjs +1 -1
- package/es/packages/components/table/src/table-body/render-helper.mjs.map +1 -1
- package/es/packages/components/table/src/table-header/index.mjs +1 -1
- package/es/packages/components/table/src/table-header/index.mjs.map +1 -1
- package/es/utils/util.d.ts +1 -1
- package/lib/components/alert/index.d.ts +3 -3
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +3 -3
- package/lib/components/autocomplete/index.d.ts +2 -2
- package/lib/components/autocomplete/src/index.vue.d.ts +1 -1
- package/lib/components/avatar/index.d.ts +3 -3
- package/lib/components/avatar/src/avatar.d.ts +1 -1
- package/lib/components/avatar/src/avatar.vue.d.ts +3 -3
- package/lib/components/badge/index.d.ts +3 -3
- package/lib/components/badge/src/badge.d.ts +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +3 -3
- package/lib/components/button/index.d.ts +30 -30
- package/lib/components/button/src/button-group.d.ts +2 -2
- package/lib/components/button/src/button-group.vue.d.ts +6 -6
- package/lib/components/button/src/button.d.ts +3 -3
- package/lib/components/button/src/button.vue.d.ts +18 -18
- package/lib/components/cascader/index.d.ts +14 -14
- package/lib/components/cascader/src/index.vue.d.ts +7 -7
- package/lib/components/checkbox/index.d.ts +27 -27
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +6 -6
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +4 -4
- package/lib/components/checkbox/src/checkbox.vue.d.ts +7 -7
- package/lib/components/checkbox/src/useCheckbox.d.ts +4 -4
- package/lib/components/collapse/index.d.ts +4 -4
- package/lib/components/collapse/src/collapse-item.vue.d.ts +2 -2
- package/lib/components/date-picker/index.d.ts +4 -4
- package/lib/components/date-picker/src/date-picker.d.ts +2 -2
- package/lib/components/descriptions/index.d.ts +4 -4
- package/lib/components/descriptions/src/description-item.d.ts +2 -2
- package/lib/components/drawer/index.d.ts +4 -4
- package/lib/components/drawer/src/index.vue.d.ts +2 -2
- package/lib/components/dropdown/index.d.ts +6 -6
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +4 -4
- package/lib/components/form/index.d.ts +5 -5
- package/lib/components/form/src/form-item.vue.d.ts +1 -1
- package/lib/components/form/src/form.vue.d.ts +3 -3
- package/lib/components/input/index.d.ts +3 -3
- package/lib/components/input/src/input.d.ts +1 -1
- package/lib/components/input/src/input.vue.d.ts +3 -3
- package/lib/components/input-number/index.d.ts +3 -3
- package/lib/components/input-number/src/input-number.d.ts +1 -1
- package/lib/components/input-number/src/input-number.vue.d.ts +3 -3
- package/lib/components/link/index.d.ts +7 -7
- package/lib/components/link/src/link.d.ts +1 -1
- package/lib/components/link/src/link.vue.d.ts +7 -7
- package/lib/components/page-header/index.d.ts +2 -2
- package/lib/components/page-header/src/page-header.vue.d.ts +2 -2
- package/lib/components/pagination/index.d.ts +2 -2
- package/lib/components/pagination/src/pagination.d.ts +2 -2
- package/lib/components/popconfirm/index.d.ts +6 -6
- package/lib/components/popconfirm/src/index.vue.d.ts +6 -6
- package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/lib/components/popover/index.d.ts +8 -8
- package/lib/components/popover/src/index.vue.d.ts +4 -4
- package/lib/components/popper/index.d.ts +4 -4
- package/lib/components/popper/src/index.vue.d.ts +2 -2
- package/lib/components/radio/index.d.ts +16 -16
- package/lib/components/radio/src/radio-button.vue.d.ts +3 -3
- package/lib/components/radio/src/radio-group.vue.d.ts +3 -3
- package/lib/components/radio/src/radio.vue.d.ts +4 -4
- package/lib/components/rate/index.d.ts +10 -10
- package/lib/components/rate/src/index.vue.d.ts +5 -5
- package/lib/components/scrollbar/index.d.ts +4 -4
- package/lib/components/scrollbar/src/index.vue.d.ts +2 -2
- package/lib/components/select/index.d.ts +12 -12
- package/lib/components/select/src/option.vue.d.ts +2 -2
- package/lib/components/select/src/select.vue.d.ts +8 -8
- package/lib/components/select-v2/index.d.ts +10 -10
- package/lib/components/select-v2/src/select.vue.d.ts +5 -5
- package/lib/components/slider/index.d.ts +4 -4
- package/lib/components/slider/src/index.vue.d.ts +2 -2
- package/lib/components/space/index.d.ts +3 -3
- package/lib/components/space/src/space.d.ts +4 -4
- package/lib/components/steps/index.d.ts +1 -1
- package/lib/components/steps/src/index.vue.d.ts +1 -1
- package/lib/components/table/index.d.ts +9 -9
- package/lib/components/table/src/table/defaults.d.ts +4 -4
- package/lib/components/table/src/table-column/defaults.d.ts +2 -2
- package/lib/components/table/src/table-column/index.d.ts +2 -2
- package/lib/components/table/src/table.vue.d.ts +5 -5
- package/lib/components/tabs/index.d.ts +4 -4
- package/lib/components/tabs/src/tab-pane.vue.d.ts +2 -2
- package/lib/components/tag/index.d.ts +6 -6
- package/lib/components/tag/src/tag.d.ts +2 -2
- package/lib/components/tag/src/tag.vue.d.ts +6 -6
- package/lib/components/time-picker/index.d.ts +4 -4
- package/lib/components/time-picker/src/common/picker.vue.d.ts +2 -2
- package/lib/components/time-picker/src/time-picker.d.ts +2 -2
- package/lib/components/time-select/index.d.ts +8 -8
- package/lib/components/time-select/src/time-select.vue.d.ts +4 -4
- package/lib/components/timeline/index.d.ts +4 -4
- package/lib/components/timeline/src/item.vue.d.ts +2 -2
- package/lib/components/tooltip/index.d.ts +6 -6
- package/lib/components/tooltip/src/index.vue.d.ts +3 -3
- package/lib/components/tree-v2/index.d.ts +1 -1
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +2 -2
- package/lib/components/tree-v2/src/tree.vue.d.ts +1 -1
- package/lib/components/upload/index.d.ts +4 -4
- package/lib/components/upload/src/index.vue.d.ts +2 -2
- package/lib/components/upload/src/upload.vue.d.ts +2 -2
- package/lib/hooks/use-form-item/index.d.ts +1 -1
- package/lib/index.js +6 -6
- package/lib/packages/components/avatar/index.js +2 -2
- package/lib/packages/components/avatar/src/avatar.js +28 -5
- package/lib/packages/components/avatar/src/avatar.js.map +1 -1
- package/lib/packages/components/avatar/src/avatar.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/avatar/src/avatar2.js +5 -28
- package/lib/packages/components/avatar/src/avatar2.js.map +1 -1
- package/lib/packages/components/badge/index.js +2 -2
- package/lib/packages/components/badge/src/badge.js +5 -19
- package/lib/packages/components/badge/src/badge.js.map +1 -1
- package/lib/packages/components/badge/src/badge.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/badge/src/badge2.js +19 -5
- package/lib/packages/components/badge/src/badge2.js.map +1 -1
- package/lib/packages/components/breadcrumb/index.js +2 -2
- package/lib/packages/components/breadcrumb/src/breadcrumb-item.js +5 -12
- package/lib/packages/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/packages/components/breadcrumb/src/breadcrumb-item.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/breadcrumb/src/breadcrumb-item2.js +12 -5
- package/lib/packages/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/packages/components/card/index.js +2 -2
- package/lib/packages/components/card/src/card.js +16 -5
- package/lib/packages/components/card/src/card.js.map +1 -1
- package/lib/packages/components/card/src/card.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/card/src/card2.js +5 -16
- package/lib/packages/components/card/src/card2.js.map +1 -1
- package/lib/packages/components/dialog/src/dialog.vue_vue&type=script&lang.js.map +1 -1
- package/lib/packages/components/dialog/src/dialog.vue_vue&type=template&id=02672805&lang.js +6 -5
- package/lib/packages/components/dialog/src/dialog.vue_vue&type=template&id=02672805&lang.js.map +1 -1
- package/lib/packages/components/dialog/src/use-dialog.js +1 -1
- package/lib/packages/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/packages/components/drawer/src/index.vue_vue&type=script&lang.js.map +1 -1
- package/lib/packages/components/drawer/src/index.vue_vue&type=template&id=052d0d8e&lang.js +50 -46
- package/lib/packages/components/drawer/src/index.vue_vue&type=template&id=052d0d8e&lang.js.map +1 -1
- package/lib/packages/components/empty/index.js +2 -2
- package/lib/packages/components/empty/src/empty.js +12 -6
- package/lib/packages/components/empty/src/empty.js.map +1 -1
- package/lib/packages/components/empty/src/empty.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/empty/src/empty2.js +6 -12
- package/lib/packages/components/empty/src/empty2.js.map +1 -1
- package/lib/packages/components/form/src/form-item.vue_vue&type=script&lang.js.map +1 -1
- package/lib/packages/components/form/src/form-item.vue_vue&type=template&id=24eda48b&lang.js +10 -8
- package/lib/packages/components/form/src/form-item.vue_vue&type=template&id=24eda48b&lang.js.map +1 -1
- package/lib/packages/components/image/index.js +2 -2
- package/lib/packages/components/image/src/image.js +5 -44
- package/lib/packages/components/image/src/image.js.map +1 -1
- package/lib/packages/components/image/src/image.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/image/src/image2.js +44 -5
- package/lib/packages/components/image/src/image2.js.map +1 -1
- package/lib/packages/components/index.js +6 -6
- package/lib/packages/components/table/src/table-body/render-helper.js +1 -1
- package/lib/packages/components/table/src/table-body/render-helper.js.map +1 -1
- package/lib/packages/components/table/src/table-header/index.js +1 -1
- package/lib/packages/components/table/src/table-header/index.js.map +1 -1
- package/lib/utils/util.d.ts +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
package/es/packages/components/form/src/form-item.vue_vue&type=template&id=24eda48b&lang.mjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, normalizeStyle, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, Transition } from 'vue';
|
|
2
2
|
|
|
3
|
-
const _hoisted_1 = ["
|
|
4
|
-
const _hoisted_2 = ["widget"];
|
|
3
|
+
const _hoisted_1 = ["widget"];
|
|
4
|
+
const _hoisted_2 = ["for", "widget"];
|
|
5
|
+
const _hoisted_3 = ["widget"];
|
|
5
6
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6
7
|
const _component_LabelWrap = resolveComponent("LabelWrap");
|
|
7
8
|
return openBlock(), createElementBlock("div", {
|
|
8
9
|
ref: "formItemRef",
|
|
9
|
-
class: normalizeClass(["el-form-item", _ctx.formItemClass])
|
|
10
|
+
class: normalizeClass(["el-form-item", _ctx.formItemClass]),
|
|
11
|
+
widget: _ctx.widget
|
|
10
12
|
}, [
|
|
11
13
|
createVNode(_component_LabelWrap, {
|
|
12
14
|
"is-auto-width": _ctx.labelStyle.width === "auto",
|
|
@@ -18,21 +20,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18
20
|
for: _ctx.labelFor,
|
|
19
21
|
class: "el-form-item__label",
|
|
20
22
|
style: normalizeStyle(_ctx.labelStyle),
|
|
21
|
-
widget: _ctx.widget
|
|
23
|
+
widget: `form-item:label:${_ctx.widget.split(":")[1]}`
|
|
22
24
|
}, [
|
|
23
25
|
renderSlot(_ctx.$slots, "label", {
|
|
24
26
|
label: _ctx.label + _ctx.elForm.labelSuffix
|
|
25
27
|
}, () => [
|
|
26
28
|
createTextVNode(toDisplayString(_ctx.label + _ctx.elForm.labelSuffix), 1)
|
|
27
29
|
])
|
|
28
|
-
], 12,
|
|
30
|
+
], 12, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
29
31
|
]),
|
|
30
32
|
_: 3
|
|
31
33
|
}, 8, ["is-auto-width", "update-all"]),
|
|
32
34
|
createElementVNode("div", {
|
|
33
35
|
class: "el-form-item__content",
|
|
34
36
|
style: normalizeStyle(_ctx.contentStyle),
|
|
35
|
-
widget: _ctx.widget
|
|
37
|
+
widget: `form-item:default:${_ctx.widget.split(":")[1]}`
|
|
36
38
|
}, [
|
|
37
39
|
renderSlot(_ctx.$slots, "default"),
|
|
38
40
|
createVNode(Transition, { name: "el-zoom-in-top" }, {
|
|
@@ -50,8 +52,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
50
52
|
]),
|
|
51
53
|
_: 3
|
|
52
54
|
})
|
|
53
|
-
], 12,
|
|
54
|
-
],
|
|
55
|
+
], 12, _hoisted_3)
|
|
56
|
+
], 10, _hoisted_1);
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
export { render };
|
package/es/packages/components/form/src/form-item.vue_vue&type=template&id=24eda48b&lang.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-item.vue_vue&type=template&id=24eda48b&lang.mjs","sources":["../../../../../../../packages/components/form/src/form-item.vue?vue&type=template&id=24eda48b&lang.js"],"sourcesContent":["<template>\n <div ref=\"formItemRef\" class=\"el-form-item\" :class=\"formItemClass\">\n <LabelWrap\n :is-auto-width=\"labelStyle.width === 'auto'\"\n :update-all=\"elForm.labelWidth === 'auto'\"\n >\n <label\n v-if=\"label || $slots.label\"\n :for=\"labelFor\"\n class=\"el-form-item__label\"\n :style=\"labelStyle\"\n :widget=\"widget
|
|
1
|
+
{"version":3,"file":"form-item.vue_vue&type=template&id=24eda48b&lang.mjs","sources":["../../../../../../../packages/components/form/src/form-item.vue?vue&type=template&id=24eda48b&lang.js"],"sourcesContent":["<template>\n <div ref=\"formItemRef\" class=\"el-form-item\" :class=\"formItemClass\"\n :widget=\"widget\"\n >\n <LabelWrap\n :is-auto-width=\"labelStyle.width === 'auto'\"\n :update-all=\"elForm.labelWidth === 'auto'\"\n >\n <label\n v-if=\"label || $slots.label\"\n :for=\"labelFor\"\n class=\"el-form-item__label\"\n :style=\"labelStyle\"\n :widget=\"`form-item:label:${widget.split(':')[1]}`\"\n >\n <slot name=\"label\" :label=\"label + elForm.labelSuffix\">\n {{ label + elForm.labelSuffix }}\n </slot>\n </label>\n </LabelWrap>\n <div class=\"el-form-item__content\" :style=\"contentStyle\"\n :widget=\"`form-item:default:${widget.split(':')[1]}`\"\n >\n <slot></slot>\n <transition name=\"el-zoom-in-top\">\n <slot v-if=\"shouldShowError\" name=\"error\" :error=\"validateMessage\">\n <div\n class=\"el-form-item__error\"\n :class=\"{\n 'el-form-item__error--inline':\n typeof inlineMessage === 'boolean'\n ? inlineMessage\n : elForm.inlineMessage || false,\n }\"\n >\n {{ validateMessage }}\n </div>\n </slot>\n </transition>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n toRefs,\n} from 'vue'\nimport { addUnit, getPropByPath, useGlobalConfig } from '@element-ps/utils/util'\nimport { isValidComponentSize } from '@element-ps/utils/validators'\nimport { elFormItemKey, elFormKey } from '@element-ps/tokens'\nimport LabelWrap from './label-wrap'\n\nimport type { PropType, CSSProperties } from 'vue'\nimport type { ComponentSize } from '@element-ps/utils/types'\nimport type { ElFormContext } from '@element-ps/tokens'\nimport type { FormItemRule } from './form.type'\n\nexport default defineComponent({\n name: 'PsFormItem',\n componentName: 'PsFormItem',\n components: {\n LabelWrap,\n },\n props: {\n label: String,\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n prop: String,\n required: {\n type: Boolean,\n default: undefined,\n },\n rules: [Object, Array] as PropType<FormItemRule | FormItemRule[]>,\n error: String,\n validateStatus: String,\n for: String,\n inlineMessage: {\n type: [String, Boolean],\n default: '',\n },\n showMessage: {\n type: Boolean,\n default: true,\n },\n size: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n widget: {\n type: String,\n },\n },\n setup(props, { slots }) {\n const $ELEMENT = useGlobalConfig()\n\n const elForm = inject(elFormKey, {} as ElFormContext)\n const validateState = ref('')\n const validateMessage = ref('')\n\n const computedLabelWidth = ref('')\n\n const formItemRef = ref<HTMLDivElement>()\n\n const vm = getCurrentInstance()\n const isNested = computed(() => {\n let parent = vm.parent\n while (parent && parent.type.name !== 'PsForm') {\n if (parent.type.name === 'PsFormItem') {\n return true\n }\n parent = parent.parent\n }\n return false\n })\n\n let initialValue = undefined\n\n const labelFor = computed(() => props.for || props.prop)\n const labelStyle = computed(() => {\n const ret: CSSProperties = {}\n if (elForm.labelPosition === 'top') return ret\n const labelWidth = addUnit(props.labelWidth || elForm.labelWidth)\n if (labelWidth) {\n ret.width = labelWidth\n }\n return ret\n })\n const contentStyle = computed(() => {\n const ret: CSSProperties = {}\n if (elForm.labelPosition === 'top' || elForm.inline) {\n return ret\n }\n if (!props.label && !props.labelWidth && isNested.value) {\n return ret\n }\n const labelWidth = addUnit(props.labelWidth || elForm.labelWidth)\n if (!props.label && !slots.label) {\n ret.marginLeft = labelWidth\n }\n return ret\n })\n const fieldValue = computed(() => {\n const model = elForm.model\n if (!model || !props.prop) {\n return\n }\n\n let path = props.prop\n if (path.indexOf(':') !== -1) {\n path = path.replace(/:/, '.')\n }\n\n return getPropByPath(model, path, true).v\n })\n const isRequired = computed(() => {\n const rules = getRules()\n let required = false\n\n if (rules && rules.length) {\n rules.every((rule) => {\n if (rule.required) {\n required = true\n return false\n }\n return true\n })\n }\n return required\n })\n const elFormItemSize = computed(() => props.size || elForm.size)\n const sizeClass = computed<ComponentSize>(() => {\n return elFormItemSize.value || $ELEMENT.size\n })\n\n const getRules = () => {\n const formRules = elForm.rules\n const selfRules = props.rules\n const requiredRule =\n props.required !== undefined ? { required: !!props.required } : []\n\n const prop = getPropByPath(formRules, props.prop || '', false)\n const normalizedRule = formRules ? prop.o[props.prop || ''] || prop.v : []\n\n return [].concat(selfRules || normalizedRule || []).concat(requiredRule)\n }\n\n const updateComputedLabelWidth = (width: string | number) => {\n computedLabelWidth.value = width ? `${width}px` : ''\n }\n\n const elFormItem = reactive({\n ...toRefs(props),\n size: sizeClass,\n $el: formItemRef,\n updateComputedLabelWidth,\n })\n\n onMounted(() => {\n if (props.prop) {\n const value = fieldValue.value\n initialValue = (Array.isArray(value) ? [...value] : value) as any\n }\n })\n\n provide(elFormItemKey, elFormItem as any)\n\n const formItemClass = computed(() => [\n {\n 'el-form-item--feedback': elForm.statusIcon,\n 'is-error': validateState.value === 'error',\n 'is-validating': validateState.value === 'validating',\n 'is-success': validateState.value === 'success',\n 'is-required': isRequired.value || props.required,\n 'is-no-asterisk': elForm.hideRequiredAsterisk,\n },\n sizeClass.value ? `el-form-item--${sizeClass.value}` : '',\n ])\n\n const shouldShowError = computed(() => {\n return (\n validateState.value === 'error' &&\n props.showMessage &&\n elForm.showMessage\n )\n })\n\n return {\n formItemRef,\n formItemClass,\n shouldShowError,\n elForm,\n labelStyle,\n contentStyle,\n validateMessage,\n labelFor,\n }\n },\n})\n</script>\n"],"names":["_createElementBlock","_createVNode","_renderSlot","_createElementVNode"],"mappings":";;;;;;;sBACEA;IAAK,KAAI;AAAA,IAAc,uBAAM,gBAAuB;IAC9C,QAAQ;;IAEZC;MACG,iBAAe,gBAAW;MAC1B,cAAY,YAAO;;uBAEpB;QACQ,cAAS,YAAO,sBADxBD;;UAEG,KAAK;UACN,OAAM;AAAA,UACL,sBAAO;UACP,2BAA2B,YAAO;;UAEnCE;YAAoB,OAAO,aAAQ,YAAO;AAAA,aAA1C;4CACK,aAAQ,YAAO;;;;;;IAIxBC;MAAK,OAAM;AAAA,MAAyB,sBAAO;MACrC,6BAA6B,YAAO;;MAExCD;MACAD,0BAAY,MAAK;yBACf;UAAY,uBAAZC;;YAA2C,OAAO;aAAlD;YACEC;cACE,uBAAM;;;+BAQH;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../../utils/with-install.mjs';
|
|
2
|
-
import './src/
|
|
3
|
-
export { imageEmits, imageProps } from './src/
|
|
2
|
+
import './src/image.mjs';
|
|
3
|
+
export { imageEmits, imageProps } from './src/image2.mjs';
|
|
4
4
|
import script from './src/image.vue_vue&type=script&lang.mjs';
|
|
5
5
|
|
|
6
6
|
const PsImage = withInstall(script);
|
|
@@ -1,46 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import script from './image.vue_vue&type=script&lang.mjs';
|
|
2
|
+
export { default } from './image.vue_vue&type=script&lang.mjs';
|
|
3
|
+
import { render } from './image.vue_vue&type=template&id=34467287&lang.mjs';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type: Boolean,
|
|
7
|
-
default: false
|
|
8
|
-
},
|
|
9
|
-
hideOnClickModal: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: false
|
|
12
|
-
},
|
|
13
|
-
src: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: ""
|
|
16
|
-
},
|
|
17
|
-
fit: {
|
|
18
|
-
type: String,
|
|
19
|
-
values: ["", "contain", "cover", "fill", "none", "scale-down"],
|
|
20
|
-
default: ""
|
|
21
|
-
},
|
|
22
|
-
lazy: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
},
|
|
26
|
-
scrollContainer: {
|
|
27
|
-
type: definePropType([String, Object])
|
|
28
|
-
},
|
|
29
|
-
previewSrcList: {
|
|
30
|
-
type: definePropType(Array),
|
|
31
|
-
default: () => mutable([])
|
|
32
|
-
},
|
|
33
|
-
zIndex: {
|
|
34
|
-
type: Number,
|
|
35
|
-
default: 2e3
|
|
36
|
-
},
|
|
37
|
-
widget: String
|
|
38
|
-
});
|
|
39
|
-
const imageEmits = {
|
|
40
|
-
error: (evt) => evt instanceof Event,
|
|
41
|
-
switch: (val) => isNumber(val),
|
|
42
|
-
close: () => true
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export { imageEmits, imageProps };
|
|
5
|
+
script.render = render;
|
|
6
|
+
script.__file = "packages/components/image/src/image.vue";
|
|
46
7
|
//# sourceMappingURL=image.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"image.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -5,7 +5,7 @@ import '../../../hooks/index.mjs';
|
|
|
5
5
|
import { PsImageViewer } from '../../image-viewer/index.mjs';
|
|
6
6
|
import isServer from '../../../utils/isServer.mjs';
|
|
7
7
|
import { isInContainer, getScrollContainer } from '../../../utils/dom.mjs';
|
|
8
|
-
import { imageProps, imageEmits } from './
|
|
8
|
+
import { imageProps, imageEmits } from './image2.mjs';
|
|
9
9
|
import { useLocaleInject } from '../../../hooks/use-locale/index.mjs';
|
|
10
10
|
import useAttrs from '../../../hooks/use-attrs/index.mjs';
|
|
11
11
|
|
|
@@ -1,7 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { render } from './image.vue_vue&type=template&id=34467287&lang.mjs';
|
|
1
|
+
import { buildProps, definePropType, mutable } from '../../../utils/props.mjs';
|
|
2
|
+
import { isNumber } from '../../../utils/util.mjs';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const imageProps = buildProps({
|
|
5
|
+
appendToBody: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: false
|
|
8
|
+
},
|
|
9
|
+
hideOnClickModal: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
13
|
+
src: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
fit: {
|
|
18
|
+
type: String,
|
|
19
|
+
values: ["", "contain", "cover", "fill", "none", "scale-down"],
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
lazy: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
scrollContainer: {
|
|
27
|
+
type: definePropType([String, Object])
|
|
28
|
+
},
|
|
29
|
+
previewSrcList: {
|
|
30
|
+
type: definePropType(Array),
|
|
31
|
+
default: () => mutable([])
|
|
32
|
+
},
|
|
33
|
+
zIndex: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 2e3
|
|
36
|
+
},
|
|
37
|
+
widget: String
|
|
38
|
+
});
|
|
39
|
+
const imageEmits = {
|
|
40
|
+
error: (evt) => evt instanceof Event,
|
|
41
|
+
switch: (val) => isNumber(val),
|
|
42
|
+
close: () => true
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { imageEmits, imageProps };
|
|
7
46
|
//# sourceMappingURL=image2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image2.mjs","sources":["../../../../../../../packages/components/image/src/image.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-ps/utils/props'\nimport { isNumber } from '@element-ps/utils/util'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const imageProps = buildProps({\n appendToBody: {\n type: Boolean,\n default: false,\n },\n hideOnClickModal: {\n type: Boolean,\n default: false,\n },\n src: {\n type: String,\n default: '',\n },\n fit: {\n type: String,\n values: ['', 'contain', 'cover', 'fill', 'none', 'scale-down'],\n default: '',\n },\n lazy: {\n type: Boolean,\n default: false,\n },\n scrollContainer: {\n type: definePropType<string | HTMLElement | undefined>([String, Object]),\n },\n previewSrcList: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n zIndex: {\n type: Number,\n default: 2000,\n },\n widget: String,\n} as const)\nexport type ImageProps = ExtractPropTypes<typeof imageProps>\n\nexport const imageEmits = {\n error: (evt: Event) => evt instanceof Event,\n switch: (val: number) => isNumber(val),\n close: () => true,\n}\nexport type ImageEmits = typeof imageEmits\n"],"names":[],"mappings":";;;MAKa,aAAa,WAAW;AAAA,EACnC,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,kBAAkB;AAAA,IAChB,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,KAAK;AAAA,IACH,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,KAAK;AAAA,IACH,MAAM;AAAA,IACN,QAAQ,CAAC,IAAI,WAAW,SAAS,QAAQ,QAAQ;AAAA,IACjD,SAAS;AAAA;AAAA,EAEX,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,iBAAiB;AAAA,IACf,MAAM,eAAiD,CAAC,QAAQ;AAAA;AAAA,EAElE,gBAAgB;AAAA,IACd,MAAM,eAAyB;AAAA,IAC/B,SAAS,MAAM,QAAQ;AAAA;AAAA,EAEzB,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,QAAQ;AAAA;MAIG,aAAa;AAAA,EACxB,OAAO,CAAC,QAAe,eAAe;AAAA,EACtC,QAAQ,CAAC,QAAgB,SAAS;AAAA,EAClC,OAAO,MAAM;AAAA;;;;"}
|
|
@@ -68,13 +68,13 @@ export { default as PsLoading, PsLoadingDirective, PsLoadingService } from './lo
|
|
|
68
68
|
export { PsPopover, PsPopoverDirective } from './popover/index.mjs';
|
|
69
69
|
export { affixProps } from './affix/src/affix.mjs';
|
|
70
70
|
export { alertProps } from './alert/src/alert.mjs';
|
|
71
|
-
export { avatarProps } from './avatar/src/
|
|
71
|
+
export { avatarProps } from './avatar/src/avatar.mjs';
|
|
72
72
|
export { backtopProps } from './backtop/src/backtop.mjs';
|
|
73
|
-
export { badgeProps } from './badge/src/
|
|
73
|
+
export { badgeProps } from './badge/src/badge2.mjs';
|
|
74
74
|
export { breadcrumbProps } from './breadcrumb/src/breadcrumb.mjs';
|
|
75
|
-
export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-
|
|
75
|
+
export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item2.mjs';
|
|
76
76
|
export { buttonEmits, buttonNativeType, buttonProps, buttonSize, buttonType } from './button/src/button.mjs';
|
|
77
|
-
export { cardProps } from './card/src/
|
|
77
|
+
export { cardProps } from './card/src/card.mjs';
|
|
78
78
|
export { CASCADER_PANEL_INJECTION_KEY, ExpandTrigger } from './cascader-panel/src/types.mjs';
|
|
79
79
|
export { CommonProps, DefaultProps, useCascaderConfig } from './cascader-panel/src/config.mjs';
|
|
80
80
|
export { colProps } from './col/src/col.mjs';
|
|
@@ -82,9 +82,9 @@ export { configProviderProps } from './config-provider/src/config-provider.mjs';
|
|
|
82
82
|
export { useDialog } from './dialog/src/use-dialog.mjs';
|
|
83
83
|
export { dialogProps } from './dialog/src/dialog.mjs';
|
|
84
84
|
export { dividerProps } from './divider/src/divider.mjs';
|
|
85
|
-
export { emptyProps } from './empty/src/
|
|
85
|
+
export { emptyProps } from './empty/src/empty.mjs';
|
|
86
86
|
export { iconProps } from './icon/src/icon.mjs';
|
|
87
|
-
export { imageEmits, imageProps } from './image/src/
|
|
87
|
+
export { imageEmits, imageProps } from './image/src/image2.mjs';
|
|
88
88
|
export { imageViewerProps } from './image-viewer/src/image-viewer.mjs';
|
|
89
89
|
export { inputProps } from './input/src/input.mjs';
|
|
90
90
|
export { inputNumberProps } from './input-number/src/input-number.mjs';
|
|
@@ -95,7 +95,7 @@ function useRender(props) {
|
|
|
95
95
|
colspan,
|
|
96
96
|
onMouseenter: ($event) => handleCellMouseEnter($event, { ...row, tooltipEffect }),
|
|
97
97
|
onMouseleave: handleCellMouseLeave,
|
|
98
|
-
widget: column.widget
|
|
98
|
+
widget: `table-column:default:${column.widget.split(":")[1]}`
|
|
99
99
|
}, [column.renderCell(data)]);
|
|
100
100
|
}));
|
|
101
101
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-helper.mjs","sources":["../../../../../../../../packages/components/table/src/table-body/render-helper.ts"],"sourcesContent":["import { h, getCurrentInstance, computed } from 'vue'\nimport { getRowIdentity } from '../util'\nimport useEvents from './events-helper'\nimport useStyles from './styles-helper'\n\nimport type { TableBodyProps } from './defaults'\nimport type {\n RenderRowData,\n Table,\n TreeNode,\n TableProps,\n} from '../table/defaults'\n\nfunction useRender<T>(props: Partial<TableBodyProps<T>>) {\n const instance = getCurrentInstance()\n const parent = instance.parent as Table<T>\n const {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger,\n } = useEvents(props)\n const {\n getRowStyle,\n getRowClass,\n getCellStyle,\n getCellClass,\n getSpan,\n getColspanRealWidth,\n } = useStyles(props)\n const firstDefaultColumnIndex = computed(() => {\n return props.store.states.columns.value.findIndex(\n ({ type }) => type === 'default'\n )\n })\n const getKeyOfRow = (row: T, index: number) => {\n const rowKey = (parent.props as Partial<TableProps<T>>).rowKey\n if (rowKey) {\n return getRowIdentity(row, rowKey)\n }\n return index\n }\n const rowRender = (row: T, $index: number, treeRowData?: TreeNode) => {\n const { tooltipEffect, store } = props\n const { indent, columns } = store.states\n const rowClasses = getRowClass(row, $index)\n let display = true\n if (treeRowData) {\n rowClasses.push(`el-table__row--level-${treeRowData.level}`)\n display = treeRowData.display\n }\n const displayStyle = display\n ? null\n : {\n display: 'none',\n }\n return h(\n 'tr',\n {\n style: [displayStyle, getRowStyle(row, $index)],\n class: rowClasses,\n key: getKeyOfRow(row, $index),\n onDblclick: ($event) => handleDoubleClick($event, row),\n onClick: ($event) => handleClick($event, row),\n onContextmenu: ($event) => handleContextMenu($event, row),\n onMouseenter: () => handleMouseEnter($index),\n onMouseleave: handleMouseLeave,\n },\n columns.value.map((column, cellIndex) => {\n const { rowspan, colspan } = getSpan(row, column, $index, cellIndex)\n if (!rowspan || !colspan) {\n return null\n }\n const columnData = { ...column }\n columnData.realWidth = getColspanRealWidth(\n columns.value,\n colspan,\n cellIndex\n )\n const data: RenderRowData<T> = {\n store: props.store,\n _self: props.context || parent,\n column: columnData,\n row,\n $index,\n }\n if (cellIndex === firstDefaultColumnIndex.value && treeRowData) {\n data.treeNode = {\n indent: treeRowData.level * indent.value,\n level: treeRowData.level,\n }\n if (typeof treeRowData.expanded === 'boolean') {\n data.treeNode.expanded = treeRowData.expanded\n // 表明是懒加载\n if ('loading' in treeRowData) {\n data.treeNode.loading = treeRowData.loading\n }\n if ('noLazyChildren' in treeRowData) {\n data.treeNode.noLazyChildren = treeRowData.noLazyChildren\n }\n }\n }\n const baseKey = `${$index},${cellIndex}`\n const patchKey = columnData.columnKey || columnData.rawColumnKey || ''\n return h(\n 'td',\n {\n style: getCellStyle($index, cellIndex, row, column),\n class: getCellClass($index, cellIndex, row, column),\n key: `${patchKey}${baseKey}`,\n rowspan,\n colspan,\n onMouseenter: ($event) =>\n handleCellMouseEnter($event, { ...row, tooltipEffect }),\n onMouseleave: handleCellMouseLeave,\n widget: column.widget,\n },\n [column.renderCell(data)]\n )\n })\n )\n }\n const wrappedRowRender = (row: T, $index: number) => {\n const store = props.store\n const { isRowExpanded, assertRowKey } = store\n const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey } =\n store.states\n const hasExpandColumn = store.states.columns.value.some(\n ({ type }) => type === 'expand'\n )\n if (hasExpandColumn && isRowExpanded(row)) {\n const renderExpanded = parent.renderExpanded\n const tr = rowRender(row, $index, undefined)\n if (!renderExpanded) {\n console.error('[Element Error]renderExpanded is required.')\n return tr\n }\n // 使用二维数组,避免修改 $index\n // Use a two dimensional array avoid modifying $index\n return [\n [\n tr,\n h(\n 'tr',\n {\n key: `expanded-row__${tr.key as string}`,\n },\n [\n h(\n 'td',\n {\n colspan: store.states.columns.value.length,\n class: 'el-table__cell el-table__expanded-cell',\n },\n [renderExpanded({ row, $index, store })]\n ),\n ]\n ),\n ],\n ]\n } else if (Object.keys(treeData.value).length) {\n assertRowKey()\n // TreeTable 时,rowKey 必须由用户设定,不使用 getKeyOfRow 计算\n // 在调用 rowRender 函数时,仍然会计算 rowKey,不太好的操作\n const key = getRowIdentity(row, rowKey.value)\n let cur = treeData.value[key]\n let treeRowData = null\n if (cur) {\n treeRowData = {\n expanded: cur.expanded,\n level: cur.level,\n display: true,\n }\n if (typeof cur.lazy === 'boolean') {\n if (typeof cur.loaded === 'boolean' && cur.loaded) {\n treeRowData.noLazyChildren = !(cur.children && cur.children.length)\n }\n treeRowData.loading = cur.loading\n }\n }\n const tmp = [rowRender(row, $index, treeRowData)]\n // 渲染嵌套数据\n if (cur) {\n // currentRow 记录的是 index,所以还需主动增加 TreeTable 的 index\n let i = 0\n const traverse = (children, parent) => {\n if (!(children && children.length && parent)) return\n children.forEach((node) => {\n // 父节点的 display 状态影响子节点的显示状态\n const innerTreeRowData = {\n display: parent.display && parent.expanded,\n level: parent.level + 1,\n expanded: false,\n noLazyChildren: false,\n loading: false,\n }\n const childKey = getRowIdentity(node, rowKey.value)\n if (childKey === undefined || childKey === null) {\n throw new Error('For nested data item, row-key is required.')\n }\n cur = { ...treeData.value[childKey] }\n // 对于当前节点,分成有无子节点两种情况。\n // 如果包含子节点的,设置 expanded 属性。\n // 对于它子节点的 display 属性由它本身的 expanded 与 display 共同决定。\n if (cur) {\n innerTreeRowData.expanded = cur.expanded\n // 懒加载的某些节点,level 未知\n cur.level = cur.level || innerTreeRowData.level\n cur.display = !!(cur.expanded && innerTreeRowData.display)\n if (typeof cur.lazy === 'boolean') {\n if (typeof cur.loaded === 'boolean' && cur.loaded) {\n innerTreeRowData.noLazyChildren = !(\n cur.children && cur.children.length\n )\n }\n innerTreeRowData.loading = cur.loading\n }\n }\n i++\n tmp.push(rowRender(node, $index + i, innerTreeRowData))\n if (cur) {\n const nodes =\n lazyTreeNodeMap.value[childKey] ||\n node[childrenColumnName.value]\n traverse(nodes, cur)\n }\n })\n }\n // 对于 root 节点,display 一定为 true\n cur.display = true\n const nodes =\n lazyTreeNodeMap.value[key] || row[childrenColumnName.value]\n traverse(nodes, cur)\n }\n return tmp\n } else {\n return rowRender(row, $index, undefined)\n }\n }\n\n return {\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n}\n\nexport default useRender\n"],"names":[],"mappings":";;;;;AAaA,mBAAsB,OAAmC;AACvD,QAAM,WAAW;AACjB,QAAM,SAAS,SAAS;AACxB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,UAAU;AACd,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,UAAU;AACd,QAAM,0BAA0B,SAAS,MAAM;AAC7C,WAAO,MAAM,MAAM,OAAO,QAAQ,MAAM,UACtC,CAAC,EAAE,WAAW,SAAS;AAAA;AAG3B,QAAM,cAAc,CAAC,KAAQ,UAAkB;AAC7C,UAAM,SAAU,OAAO,MAAiC;AACxD,QAAI,QAAQ;AACV,aAAO,eAAe,KAAK;AAAA;AAE7B,WAAO;AAAA;AAET,QAAM,YAAY,CAAC,KAAQ,QAAgB,gBAA2B;AACpE,UAAM,EAAE,eAAe,UAAU;AACjC,UAAM,EAAE,QAAQ,YAAY,MAAM;AAClC,UAAM,aAAa,YAAY,KAAK;AACpC,QAAI,UAAU;AACd,QAAI,aAAa;AACf,iBAAW,KAAK,wBAAwB,YAAY;AACpD,gBAAU,YAAY;AAAA;AAExB,UAAM,eAAe,UACjB,OACA;AAAA,MACE,SAAS;AAAA;AAEf,WAAO,EACL,MACA;AAAA,MACE,OAAO,CAAC,cAAc,YAAY,KAAK;AAAA,MACvC,OAAO;AAAA,MACP,KAAK,YAAY,KAAK;AAAA,MACtB,YAAY,CAAC,WAAW,kBAAkB,QAAQ;AAAA,MAClD,SAAS,CAAC,WAAW,YAAY,QAAQ;AAAA,MACzC,eAAe,CAAC,WAAW,kBAAkB,QAAQ;AAAA,MACrD,cAAc,M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SAAS;AAAA;AAEX,kBAAM,WAAW,eAAe,MAAM,OAAO;AAC7C,gBAAI,aAAa,UAAa,aAAa,MAAM;AAC/C,oBAAM,IAAI,MAAM;AAAA;AAElB,kBAAM,KAAK,SAAS,MAAM;AAI1B,gBAAI,KAAK;AACP,+BAAiB,WAAW,IAAI;AAEhC,kBAAI,QAAQ,IAAI,SAAS,iBAAiB;AAC1C,kBAAI,UAAU,CAAC,MAAM,YAAY,iBAAiB;AAClD,kBAAI,OAAO,IAAI,SAAS,WAAW;AACjC,oBAAI,OAAO,IAAI,WAAW,aAAa,IAAI,QAAQ;AACjD,mCAAiB,iBAAiB,MAC5B,YAAY,IAAI,SAAS;AAAA;AAGjC,iCAAiB,UAAU,IAAI;AAAA;AAAA;AAGnC;AACA,gBAAI,KAAK,UAAU,MAAM,SAAS,GAAG;AACrC,gBAAI,KAAK;AACP,oBAAM,SACJ,gBAAgB,MAAM,aACtB,KAAK,mBAAmB;AAC1B,uBAAS,QAAO;AAAA;AAAA;AAAA;AAKtB,YAAI,UAAU;AACd,cAAM,QACJ,gBAAgB,MAAM,QAAQ,IAAI,mBAAmB;AACvD,iBAAS,OAAO;AAAA;AAElB,aAAO;AAAA,WACF;AACL,aAAO,UAAU,KAAK,QAAQ;AAAA;AAAA;AAIlC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"render-helper.mjs","sources":["../../../../../../../../packages/components/table/src/table-body/render-helper.ts"],"sourcesContent":["import { h, getCurrentInstance, computed } from 'vue'\nimport { getRowIdentity } from '../util'\nimport useEvents from './events-helper'\nimport useStyles from './styles-helper'\n\nimport type { TableBodyProps } from './defaults'\nimport type {\n RenderRowData,\n Table,\n TreeNode,\n TableProps,\n} from '../table/defaults'\n\nfunction useRender<T>(props: Partial<TableBodyProps<T>>) {\n const instance = getCurrentInstance()\n const parent = instance.parent as Table<T>\n const {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger,\n } = useEvents(props)\n const {\n getRowStyle,\n getRowClass,\n getCellStyle,\n getCellClass,\n getSpan,\n getColspanRealWidth,\n } = useStyles(props)\n const firstDefaultColumnIndex = computed(() => {\n return props.store.states.columns.value.findIndex(\n ({ type }) => type === 'default'\n )\n })\n const getKeyOfRow = (row: T, index: number) => {\n const rowKey = (parent.props as Partial<TableProps<T>>).rowKey\n if (rowKey) {\n return getRowIdentity(row, rowKey)\n }\n return index\n }\n const rowRender = (row: T, $index: number, treeRowData?: TreeNode) => {\n const { tooltipEffect, store } = props\n const { indent, columns } = store.states\n const rowClasses = getRowClass(row, $index)\n let display = true\n if (treeRowData) {\n rowClasses.push(`el-table__row--level-${treeRowData.level}`)\n display = treeRowData.display\n }\n const displayStyle = display\n ? null\n : {\n display: 'none',\n }\n return h(\n 'tr',\n {\n style: [displayStyle, getRowStyle(row, $index)],\n class: rowClasses,\n key: getKeyOfRow(row, $index),\n onDblclick: ($event) => handleDoubleClick($event, row),\n onClick: ($event) => handleClick($event, row),\n onContextmenu: ($event) => handleContextMenu($event, row),\n onMouseenter: () => handleMouseEnter($index),\n onMouseleave: handleMouseLeave,\n },\n columns.value.map((column, cellIndex) => {\n const { rowspan, colspan } = getSpan(row, column, $index, cellIndex)\n if (!rowspan || !colspan) {\n return null\n }\n const columnData = { ...column }\n columnData.realWidth = getColspanRealWidth(\n columns.value,\n colspan,\n cellIndex\n )\n const data: RenderRowData<T> = {\n store: props.store,\n _self: props.context || parent,\n column: columnData,\n row,\n $index,\n }\n if (cellIndex === firstDefaultColumnIndex.value && treeRowData) {\n data.treeNode = {\n indent: treeRowData.level * indent.value,\n level: treeRowData.level,\n }\n if (typeof treeRowData.expanded === 'boolean') {\n data.treeNode.expanded = treeRowData.expanded\n // 表明是懒加载\n if ('loading' in treeRowData) {\n data.treeNode.loading = treeRowData.loading\n }\n if ('noLazyChildren' in treeRowData) {\n data.treeNode.noLazyChildren = treeRowData.noLazyChildren\n }\n }\n }\n const baseKey = `${$index},${cellIndex}`\n const patchKey = columnData.columnKey || columnData.rawColumnKey || ''\n return h(\n 'td',\n {\n style: getCellStyle($index, cellIndex, row, column),\n class: getCellClass($index, cellIndex, row, column),\n key: `${patchKey}${baseKey}`,\n rowspan,\n colspan,\n onMouseenter: ($event) =>\n handleCellMouseEnter($event, { ...row, tooltipEffect }),\n onMouseleave: handleCellMouseLeave,\n widget: `table-column:default:${column.widget.split(':')[1]}`,\n },\n [column.renderCell(data)]\n )\n })\n )\n }\n const wrappedRowRender = (row: T, $index: number) => {\n const store = props.store\n const { isRowExpanded, assertRowKey } = store\n const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey } =\n store.states\n const hasExpandColumn = store.states.columns.value.some(\n ({ type }) => type === 'expand'\n )\n if (hasExpandColumn && isRowExpanded(row)) {\n const renderExpanded = parent.renderExpanded\n const tr = rowRender(row, $index, undefined)\n if (!renderExpanded) {\n console.error('[Element Error]renderExpanded is required.')\n return tr\n }\n // 使用二维数组,避免修改 $index\n // Use a two dimensional array avoid modifying $index\n return [\n [\n tr,\n h(\n 'tr',\n {\n key: `expanded-row__${tr.key as string}`,\n },\n [\n h(\n 'td',\n {\n colspan: store.states.columns.value.length,\n class: 'el-table__cell el-table__expanded-cell',\n },\n [renderExpanded({ row, $index, store })]\n ),\n ]\n ),\n ],\n ]\n } else if (Object.keys(treeData.value).length) {\n assertRowKey()\n // TreeTable 时,rowKey 必须由用户设定,不使用 getKeyOfRow 计算\n // 在调用 rowRender 函数时,仍然会计算 rowKey,不太好的操作\n const key = getRowIdentity(row, rowKey.value)\n let cur = treeData.value[key]\n let treeRowData = null\n if (cur) {\n treeRowData = {\n expanded: cur.expanded,\n level: cur.level,\n display: true,\n }\n if (typeof cur.lazy === 'boolean') {\n if (typeof cur.loaded === 'boolean' && cur.loaded) {\n treeRowData.noLazyChildren = !(cur.children && cur.children.length)\n }\n treeRowData.loading = cur.loading\n }\n }\n const tmp = [rowRender(row, $index, treeRowData)]\n // 渲染嵌套数据\n if (cur) {\n // currentRow 记录的是 index,所以还需主动增加 TreeTable 的 index\n let i = 0\n const traverse = (children, parent) => {\n if (!(children && children.length && parent)) return\n children.forEach((node) => {\n // 父节点的 display 状态影响子节点的显示状态\n const innerTreeRowData = {\n display: parent.display && parent.expanded,\n level: parent.level + 1,\n expanded: false,\n noLazyChildren: false,\n loading: false,\n }\n const childKey = getRowIdentity(node, rowKey.value)\n if (childKey === undefined || childKey === null) {\n throw new Error('For nested data item, row-key is required.')\n }\n cur = { ...treeData.value[childKey] }\n // 对于当前节点,分成有无子节点两种情况。\n // 如果包含子节点的,设置 expanded 属性。\n // 对于它子节点的 display 属性由它本身的 expanded 与 display 共同决定。\n if (cur) {\n innerTreeRowData.expanded = cur.expanded\n // 懒加载的某些节点,level 未知\n cur.level = cur.level || innerTreeRowData.level\n cur.display = !!(cur.expanded && innerTreeRowData.display)\n if (typeof cur.lazy === 'boolean') {\n if (typeof cur.loaded === 'boolean' && cur.loaded) {\n innerTreeRowData.noLazyChildren = !(\n cur.children && cur.children.length\n )\n }\n innerTreeRowData.loading = cur.loading\n }\n }\n i++\n tmp.push(rowRender(node, $index + i, innerTreeRowData))\n if (cur) {\n const nodes =\n lazyTreeNodeMap.value[childKey] ||\n node[childrenColumnName.value]\n traverse(nodes, cur)\n }\n })\n }\n // 对于 root 节点,display 一定为 true\n cur.display = true\n const nodes =\n lazyTreeNodeMap.value[key] || row[childrenColumnName.value]\n traverse(nodes, cur)\n }\n return tmp\n } else {\n return rowRender(row, $index, undefined)\n }\n }\n\n return {\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger,\n }\n}\n\nexport default useRender\n"],"names":[],"mappings":";;;;;AAaA,mBAAsB,OAAmC;AACvD,QAAM,WAAW;AACjB,QAAM,SAAS,SAAS;AACxB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA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UAAU,CAAC,MAAM,YAAY,iBAAiB;AAClD,kBAAI,OAAO,IAAI,SAAS,WAAW;AACjC,oBAAI,OAAO,IAAI,WAAW,aAAa,IAAI,QAAQ;AACjD,mCAAiB,iBAAiB,MAC5B,YAAY,IAAI,SAAS;AAAA;AAGjC,iCAAiB,UAAU,IAAI;AAAA;AAAA;AAGnC;AACA,gBAAI,KAAK,UAAU,MAAM,SAAS,GAAG;AACrC,gBAAI,KAAK;AACP,oBAAM,SACJ,gBAAgB,MAAM,aACtB,KAAK,mBAAmB;AAC1B,uBAAS,QAAO;AAAA;AAAA;AAAA;AAKtB,YAAI,UAAU;AACd,cAAM,QACJ,gBAAgB,MAAM,QAAQ,IAAI,mBAAmB;AACvD,iBAAS,OAAO;AAAA;AAElB,aAAO;AAAA,WACF;AACL,aAAO,UAAU,KAAK,QAAQ;AAAA;AAAA;AAIlC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA;AAAA;;;;"}
|
|
@@ -95,7 +95,7 @@ var TableHeader = defineComponent({
|
|
|
95
95
|
key: `${column.id}-thead`,
|
|
96
96
|
rowSpan: column.rowSpan,
|
|
97
97
|
style: this.getHeaderCellStyle(rowIndex, cellIndex, subColumns, column),
|
|
98
|
-
widget: column.widget
|
|
98
|
+
widget: `table-column:header:${column.widget.split(":")[1]}`
|
|
99
99
|
}, [
|
|
100
100
|
h("div", {
|
|
101
101
|
class: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../packages/components/table/src/table-header/index.ts"],"sourcesContent":["import {\n defineComponent,\n getCurrentInstance,\n computed,\n onMounted,\n nextTick,\n ref,\n h,\n} from 'vue'\nimport PsCheckbox from '@element-ps/components/checkbox'\nimport FilterPanel from '../filter-panel.vue'\nimport useLayoutObserver from '../layout-observer'\nimport { hColgroup } from '../h-helper'\nimport useStyle from './style.helper'\nimport useUtils from './utils-helper'\n\nimport type { ComponentInternalInstance, Ref, PropType } from 'vue'\nimport type { DefaultRow, Sort, Table } from '../table/defaults'\nimport type { Store } from '../store'\nexport interface TableHeader extends ComponentInternalInstance {\n state: {\n onColumnsChange\n onScrollableChange\n }\n filterPanels: Ref<unknown>\n}\nexport interface TableHeaderProps<T> {\n fixed: string\n store: Store<T>\n border: boolean\n defaultSort: Sort\n}\n\nexport default defineComponent({\n name: 'PsTableHeader',\n components: {\n PsCheckbox,\n },\n props: {\n fixed: {\n type: String,\n default: '',\n },\n store: {\n required: true,\n type: Object as PropType<TableHeaderProps<DefaultRow>['store']>,\n },\n border: Boolean,\n defaultSort: {\n type: Object as PropType<TableHeaderProps<DefaultRow>['defaultSort']>,\n default: () => {\n return {\n prop: '',\n order: '',\n }\n },\n },\n },\n setup(props) {\n const instance = getCurrentInstance() as TableHeader\n const parent = instance.parent as Table<unknown>\n const storeData = parent.store.states\n const filterPanels = ref({})\n const { tableLayout, onColumnsChange, onScrollableChange } =\n useLayoutObserver(parent)\n const hasGutter = computed(() => {\n return !props.fixed && tableLayout.gutterWidth\n })\n onMounted(() => {\n nextTick(() => {\n const { prop, order } = props.defaultSort\n const init = true\n parent.store.commit('sort', { prop, order, init })\n })\n })\n const {\n getHeaderRowStyle,\n getHeaderRowClass,\n getHeaderCellStyle,\n getHeaderCellClass,\n } = useStyle(props as TableHeaderProps<unknown>)\n const { isGroup, toggleAllSelection, columnRows } = useUtils(\n props as TableHeaderProps<unknown>\n )\n\n instance.state = {\n onColumnsChange,\n onScrollableChange,\n }\n // eslint-disable-next-line\n instance.filterPanels = filterPanels\n\n return {\n columns: storeData.columns,\n filterPanels,\n hasGutter,\n onColumnsChange,\n onScrollableChange,\n columnRows,\n getHeaderRowClass,\n getHeaderRowStyle,\n getHeaderCellClass,\n getHeaderCellStyle,\n isGroup,\n toggleAllSelection,\n }\n },\n render() {\n return h(\n 'table',\n {\n border: '0',\n cellpadding: '0',\n cellspacing: '0',\n class: 'el-table__header',\n },\n [\n hColgroup(this.columns, this.hasGutter),\n h(\n 'thead',\n {\n class: { 'is-group': this.isGroup, 'has-gutter': this.hasGutter },\n },\n this.columnRows.map((subColumns, rowIndex) =>\n h(\n 'tr',\n {\n class: this.getHeaderRowClass(rowIndex),\n key: rowIndex,\n style: this.getHeaderRowStyle(rowIndex),\n },\n subColumns.map((column, cellIndex) =>\n h(\n 'th',\n {\n class: this.getHeaderCellClass(\n rowIndex,\n cellIndex,\n subColumns,\n column\n ),\n colspan: column.colSpan,\n key: `${column.id}-thead`,\n rowSpan: column.rowSpan,\n style: this.getHeaderCellStyle(\n rowIndex,\n cellIndex,\n subColumns,\n column\n ),\n widget: column.widget
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../../packages/components/table/src/table-header/index.ts"],"sourcesContent":["import {\n defineComponent,\n getCurrentInstance,\n computed,\n onMounted,\n nextTick,\n ref,\n h,\n} from 'vue'\nimport PsCheckbox from '@element-ps/components/checkbox'\nimport FilterPanel from '../filter-panel.vue'\nimport useLayoutObserver from '../layout-observer'\nimport { hColgroup } from '../h-helper'\nimport useStyle from './style.helper'\nimport useUtils from './utils-helper'\n\nimport type { ComponentInternalInstance, Ref, PropType } from 'vue'\nimport type { DefaultRow, Sort, Table } from '../table/defaults'\nimport type { Store } from '../store'\nexport interface TableHeader extends ComponentInternalInstance {\n state: {\n onColumnsChange\n onScrollableChange\n }\n filterPanels: Ref<unknown>\n}\nexport interface TableHeaderProps<T> {\n fixed: string\n store: Store<T>\n border: boolean\n defaultSort: Sort\n}\n\nexport default defineComponent({\n name: 'PsTableHeader',\n components: {\n PsCheckbox,\n },\n props: {\n fixed: {\n type: String,\n default: '',\n },\n store: {\n required: true,\n type: Object as PropType<TableHeaderProps<DefaultRow>['store']>,\n },\n border: Boolean,\n defaultSort: {\n type: Object as PropType<TableHeaderProps<DefaultRow>['defaultSort']>,\n default: () => {\n return {\n prop: '',\n order: '',\n }\n },\n },\n },\n setup(props) {\n const instance = getCurrentInstance() as TableHeader\n const parent = instance.parent as Table<unknown>\n const storeData = parent.store.states\n const filterPanels = ref({})\n const { tableLayout, onColumnsChange, onScrollableChange } =\n useLayoutObserver(parent)\n const hasGutter = computed(() => {\n return !props.fixed && tableLayout.gutterWidth\n })\n onMounted(() => {\n nextTick(() => {\n const { prop, order } = props.defaultSort\n const init = true\n parent.store.commit('sort', { prop, order, init })\n })\n })\n const {\n getHeaderRowStyle,\n getHeaderRowClass,\n getHeaderCellStyle,\n getHeaderCellClass,\n } = useStyle(props as TableHeaderProps<unknown>)\n const { isGroup, toggleAllSelection, columnRows } = useUtils(\n props as TableHeaderProps<unknown>\n )\n\n instance.state = {\n onColumnsChange,\n onScrollableChange,\n }\n // eslint-disable-next-line\n instance.filterPanels = filterPanels\n\n return {\n columns: storeData.columns,\n filterPanels,\n hasGutter,\n onColumnsChange,\n onScrollableChange,\n columnRows,\n getHeaderRowClass,\n getHeaderRowStyle,\n getHeaderCellClass,\n getHeaderCellStyle,\n isGroup,\n toggleAllSelection,\n }\n },\n render() {\n return h(\n 'table',\n {\n border: '0',\n cellpadding: '0',\n cellspacing: '0',\n class: 'el-table__header',\n },\n [\n hColgroup(this.columns, this.hasGutter),\n h(\n 'thead',\n {\n class: { 'is-group': this.isGroup, 'has-gutter': this.hasGutter },\n },\n this.columnRows.map((subColumns, rowIndex) =>\n h(\n 'tr',\n {\n class: this.getHeaderRowClass(rowIndex),\n key: rowIndex,\n style: this.getHeaderRowStyle(rowIndex),\n },\n subColumns.map((column, cellIndex) =>\n h(\n 'th',\n {\n class: this.getHeaderCellClass(\n rowIndex,\n cellIndex,\n subColumns,\n column\n ),\n colspan: column.colSpan,\n key: `${column.id}-thead`,\n rowSpan: column.rowSpan,\n style: this.getHeaderCellStyle(\n rowIndex,\n cellIndex,\n subColumns,\n column\n ),\n widget: `table-column:header:${column.widget.split(':')[1]}`,\n },\n [\n h(\n 'div',\n {\n class: [\n 'cell',\n column.filteredValue &&\n column.filteredValue.length > 0\n ? 'highlight'\n : '',\n column.labelClassName,\n ],\n },\n [\n column.renderHeader\n ? column.renderHeader({\n column,\n $index: cellIndex,\n store: this.store,\n _self: this.$parent,\n })\n : column.label,\n column.sortable &&\n h(\n 'span',\n {\n class: 'caret-wrapper',\n },\n [\n h('i', {\n class: 'sort-caret ascending',\n }),\n h('i', {\n class: 'sort-caret descending',\n }),\n ]\n ),\n column.filterable &&\n h(FilterPanel, {\n store: this.$parent.store,\n placement: column.filterPlacement || 'bottom-start',\n column,\n upDataColumn: (key, value) => {\n column[key] = value\n },\n }),\n ]\n ),\n ]\n )\n )\n )\n )\n ),\n ]\n )\n },\n})\n"],"names":["FilterPanel"],"mappings":";;;;;;;;;AAiCA,kBAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA;AAAA,EAEF,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX,OAAO;AAAA,MACL,UAAU;AAAA,MACV,MAAM;AAAA;AAAA,IAER,QAAQ;AAAA,IACR,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS,MAAM;AACb,eAAO;AAAA,UACL,MAAM;AAAA,UACN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKf,MAAM,OAAO;AACX,UAAM,WAAW;AACjB,UAAM,SAAS,SAAS;AACxB,UAAM,YAAY,OAAO,MAAM;AAC/B,UAAM,eAAe,IAAI;AACzB,UAAM,EAAE,aAAa,iBAAiB,uBACpC,kBAAkB;AACpB,UAAM,YAAY,SAAS,MAAM;AAC/B,aAAO,CAAC,MAAM,SAAS,YAAY;AAAA;AAErC,cAAU,MAAM;AACd,eAAS,MAAM;AACb,cAAM,EAAE,MAAM,UAAU,MAAM;AAC9B,cAAM,OAAO;AACb,eAAO,MAAM,OAAO,QAAQ,EAAE,MAAM,OAAO;AAAA;AAAA;AAG/C,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE,SAAS;AACb,UAAM,EAAE,SAAS,oBAAoB,eAAe,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E,KAAK;AAAA,cACL,OAAO;AAAA;AAAA,YAET,EAAE,KAAK;AAAA,cACL,OAAO;AAAA;AAAA;AAAA,UAIf,OAAO,cACL,EAAEA,QAAa;AAAA,YACb,OAAO,KAAK,QAAQ;AAAA,YACpB,WAAW,OAAO,mBAAmB;AAAA,YACrC;AAAA,YACA,cAAc,CAAC,KAAK,UAAU;AAC5B,qBAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;"}
|
package/es/utils/util.d.ts
CHANGED
|
@@ -31,4 +31,4 @@ export declare function deduplicate<T>(arr: T[]): T[];
|
|
|
31
31
|
export declare function $<T>(ref: Ref<T>): T;
|
|
32
32
|
export declare function addUnit(value: string | number): string;
|
|
33
33
|
export declare function isEqualWithFunction(obj: any, other: any): boolean;
|
|
34
|
-
export declare const refAttacher: <T extends
|
|
34
|
+
export declare const refAttacher: <T extends ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | HTMLElement>(ref: Ref<T>) => (val: T) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const PsAlert: import("../../utils/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
2
|
readonly title: import("../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
3
3
|
readonly description: import("../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
4
|
-
readonly type: import("../../utils/props").BuildPropReturn<StringConstructor, "info", unknown, "success" | "warning" | "
|
|
4
|
+
readonly type: import("../../utils/props").BuildPropReturn<StringConstructor, "info", unknown, "success" | "warning" | "error" | "info", unknown>;
|
|
5
5
|
readonly closable: import("../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
6
6
|
readonly closeText: import("../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
7
7
|
readonly showIcon: BooleanConstructor;
|
|
@@ -23,7 +23,7 @@ export declare const PsAlert: import("../../utils/types").SFCWithInstall<import(
|
|
|
23
23
|
readonly center?: unknown;
|
|
24
24
|
readonly effect?: unknown;
|
|
25
25
|
} & {
|
|
26
|
-
type: import("../../utils/props").BuildPropType<StringConstructor, "success" | "warning" | "
|
|
26
|
+
type: import("../../utils/props").BuildPropType<StringConstructor, "success" | "warning" | "error" | "info", unknown>;
|
|
27
27
|
description: string;
|
|
28
28
|
center: boolean;
|
|
29
29
|
title: string;
|
|
@@ -32,7 +32,7 @@ export declare const PsAlert: import("../../utils/types").SFCWithInstall<import(
|
|
|
32
32
|
effect: import("../../utils/props").BuildPropType<StringConstructor, "dark" | "light", unknown>;
|
|
33
33
|
showIcon: boolean;
|
|
34
34
|
} & {}>, {
|
|
35
|
-
type: import("../../utils/props").BuildPropType<StringConstructor, "success" | "warning" | "
|
|
35
|
+
type: import("../../utils/props").BuildPropType<StringConstructor, "success" | "warning" | "error" | "info", unknown>;
|
|
36
36
|
description: string;
|
|
37
37
|
center: boolean;
|
|
38
38
|
title: string;
|
|
@@ -3,7 +3,7 @@ export declare type AlertEffect = 'light' | 'dark';
|
|
|
3
3
|
export declare const alertProps: {
|
|
4
4
|
readonly title: import("element-ps/es/utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
5
5
|
readonly description: import("element-ps/es/utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
6
|
-
readonly type: import("element-ps/es/utils/props").BuildPropReturn<StringConstructor, "info", unknown, "success" | "warning" | "
|
|
6
|
+
readonly type: import("element-ps/es/utils/props").BuildPropReturn<StringConstructor, "info", unknown, "success" | "warning" | "error" | "info", unknown>;
|
|
7
7
|
readonly closable: import("element-ps/es/utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
8
8
|
readonly closeText: import("element-ps/es/utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
9
9
|
readonly showIcon: BooleanConstructor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
readonly title: import("../../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
3
3
|
readonly description: import("../../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
4
|
-
readonly type: import("../../../utils/props").BuildPropReturn<StringConstructor, "info", unknown, "success" | "warning" | "
|
|
4
|
+
readonly type: import("../../../utils/props").BuildPropReturn<StringConstructor, "info", unknown, "success" | "warning" | "error" | "info", unknown>;
|
|
5
5
|
readonly closable: import("../../../utils/props").BuildPropReturn<BooleanConstructor, true, unknown, unknown, unknown>;
|
|
6
6
|
readonly closeText: import("../../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
7
7
|
readonly showIcon: BooleanConstructor;
|
|
@@ -23,7 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
23
|
readonly center?: unknown;
|
|
24
24
|
readonly effect?: unknown;
|
|
25
25
|
} & {
|
|
26
|
-
type: import("../../../utils/props").BuildPropType<StringConstructor, "success" | "warning" | "
|
|
26
|
+
type: import("../../../utils/props").BuildPropType<StringConstructor, "success" | "warning" | "error" | "info", unknown>;
|
|
27
27
|
description: string;
|
|
28
28
|
center: boolean;
|
|
29
29
|
title: string;
|
|
@@ -32,7 +32,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
effect: import("../../../utils/props").BuildPropType<StringConstructor, "dark" | "light", unknown>;
|
|
33
33
|
showIcon: boolean;
|
|
34
34
|
} & {}>, {
|
|
35
|
-
type: import("../../../utils/props").BuildPropType<StringConstructor, "success" | "warning" | "
|
|
35
|
+
type: import("../../../utils/props").BuildPropType<StringConstructor, "success" | "warning" | "error" | "info", unknown>;
|
|
36
36
|
description: string;
|
|
37
37
|
center: boolean;
|
|
38
38
|
title: string;
|
|
@@ -5,7 +5,7 @@ declare const _Autocomplete: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5
5
|
default: string;
|
|
6
6
|
};
|
|
7
7
|
modelValue: {
|
|
8
|
-
type: (
|
|
8
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
11
|
debounce: {
|
|
@@ -112,7 +112,7 @@ export declare const PsAutocomplete: SFCWithInstall<import("vue").DefineComponen
|
|
|
112
112
|
default: string;
|
|
113
113
|
};
|
|
114
114
|
modelValue: {
|
|
115
|
-
type: (
|
|
115
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
116
116
|
default: string;
|
|
117
117
|
};
|
|
118
118
|
debounce: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const PsAvatar: import("../../utils/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
-
readonly size: import("../../utils/props").BuildPropReturn<readonly [NumberConstructor, StringConstructor], "large", unknown, "small" | "
|
|
2
|
+
readonly size: import("../../utils/props").BuildPropReturn<readonly [NumberConstructor, StringConstructor], "large", unknown, "small" | "medium" | "large", number>;
|
|
3
3
|
readonly shape: import("../../utils/props").BuildPropReturn<StringConstructor, "circle", unknown, "circle" | "square", unknown>;
|
|
4
4
|
readonly icon: import("../../utils/props").BuildPropReturn<import("../../utils/props").PropWrapper<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, unknown, unknown, unknown, unknown>;
|
|
5
5
|
readonly src: import("../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
@@ -20,7 +20,7 @@ export declare const PsAvatar: import("../../utils/types").SFCWithInstall<import
|
|
|
20
20
|
readonly srcSet?: unknown;
|
|
21
21
|
readonly fit?: unknown;
|
|
22
22
|
} & {
|
|
23
|
-
size: import("../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], "small" | "
|
|
23
|
+
size: import("../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], "small" | "medium" | "large", number>;
|
|
24
24
|
shape: import("../../utils/props").BuildPropType<StringConstructor, "circle" | "square", unknown>;
|
|
25
25
|
src: string;
|
|
26
26
|
fit: import("../../utils/props").BuildPropType<import("../../utils/props").PropWrapper<import("csstype").ObjectFitProperty>, unknown, unknown>;
|
|
@@ -29,7 +29,7 @@ export declare const PsAvatar: import("../../utils/types").SFCWithInstall<import
|
|
|
29
29
|
alt?: string | undefined;
|
|
30
30
|
srcSet?: string | undefined;
|
|
31
31
|
}>, {
|
|
32
|
-
size: import("../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], "small" | "
|
|
32
|
+
size: import("../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], "small" | "medium" | "large", number>;
|
|
33
33
|
icon: import("../../utils/props").BuildPropType<import("../../utils/props").PropWrapper<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, unknown, unknown>;
|
|
34
34
|
shape: import("../../utils/props").BuildPropType<StringConstructor, "circle" | "square", unknown>;
|
|
35
35
|
src: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExtractPropTypes, Component } from 'vue';
|
|
2
2
|
import type { ObjectFitProperty } from 'csstype';
|
|
3
3
|
export declare const avatarProps: {
|
|
4
|
-
readonly size: import("element-ps/es/utils/props").BuildPropReturn<readonly [NumberConstructor, StringConstructor], "large", unknown, "small" | "
|
|
4
|
+
readonly size: import("element-ps/es/utils/props").BuildPropReturn<readonly [NumberConstructor, StringConstructor], "large", unknown, "small" | "medium" | "large", number>;
|
|
5
5
|
readonly shape: import("element-ps/es/utils/props").BuildPropReturn<StringConstructor, "circle", unknown, "circle" | "square", unknown>;
|
|
6
6
|
readonly icon: import("element-ps/es/utils/props").BuildPropReturn<import("element-ps/es/utils/props").PropWrapper<string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, unknown, unknown, unknown, unknown>;
|
|
7
7
|
readonly src: import("element-ps/es/utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties } from 'vue';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
readonly size: import("../../../utils/props").BuildPropReturn<readonly [NumberConstructor, StringConstructor], "large", unknown, "small" | "
|
|
3
|
+
readonly size: import("../../../utils/props").BuildPropReturn<readonly [NumberConstructor, StringConstructor], "large", unknown, "small" | "medium" | "large", number>;
|
|
4
4
|
readonly shape: import("../../../utils/props").BuildPropReturn<StringConstructor, "circle", unknown, "circle" | "square", unknown>;
|
|
5
5
|
readonly icon: import("../../../utils/props").BuildPropReturn<import("../../../utils/props").PropWrapper<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, unknown, unknown, unknown, unknown>;
|
|
6
6
|
readonly src: import("../../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
@@ -21,7 +21,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
21
|
readonly srcSet?: unknown;
|
|
22
22
|
readonly fit?: unknown;
|
|
23
23
|
} & {
|
|
24
|
-
size: import("../../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], "small" | "
|
|
24
|
+
size: import("../../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], "small" | "medium" | "large", number>;
|
|
25
25
|
shape: import("../../../utils/props").BuildPropType<StringConstructor, "circle" | "square", unknown>;
|
|
26
26
|
src: string;
|
|
27
27
|
fit: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<import("csstype").ObjectFitProperty>, unknown, unknown>;
|
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
30
|
alt?: string | undefined;
|
|
31
31
|
srcSet?: string | undefined;
|
|
32
32
|
}>, {
|
|
33
|
-
size: import("../../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], "small" | "
|
|
33
|
+
size: import("../../../utils/props").BuildPropType<readonly [NumberConstructor, StringConstructor], "small" | "medium" | "large", number>;
|
|
34
34
|
icon: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, unknown, unknown>;
|
|
35
35
|
shape: import("../../../utils/props").BuildPropType<StringConstructor, "circle" | "square", unknown>;
|
|
36
36
|
src: string;
|
|
@@ -3,7 +3,7 @@ export declare const PsBadge: import("../../utils/types").SFCWithInstall<import(
|
|
|
3
3
|
readonly max: import("../../utils/props").BuildPropReturn<NumberConstructor, 99, unknown, unknown, unknown>;
|
|
4
4
|
readonly isDot: BooleanConstructor;
|
|
5
5
|
readonly hidden: BooleanConstructor;
|
|
6
|
-
readonly type: import("../../utils/props").BuildPropReturn<StringConstructor, "danger", unknown, "
|
|
6
|
+
readonly type: import("../../utils/props").BuildPropReturn<StringConstructor, "danger", unknown, "success" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
7
7
|
}, {
|
|
8
8
|
content: import("vue").ComputedRef<string>;
|
|
9
9
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
@@ -13,13 +13,13 @@ export declare const PsBadge: import("../../utils/types").SFCWithInstall<import(
|
|
|
13
13
|
readonly hidden?: unknown;
|
|
14
14
|
readonly type?: unknown;
|
|
15
15
|
} & {
|
|
16
|
-
type: import("../../utils/props").BuildPropType<StringConstructor, "
|
|
16
|
+
type: import("../../utils/props").BuildPropType<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
17
17
|
hidden: boolean;
|
|
18
18
|
value: import("../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
19
19
|
max: number;
|
|
20
20
|
isDot: boolean;
|
|
21
21
|
} & {}>, {
|
|
22
|
-
type: import("../../utils/props").BuildPropType<StringConstructor, "
|
|
22
|
+
type: import("../../utils/props").BuildPropType<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
23
23
|
hidden: boolean;
|
|
24
24
|
value: import("../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
25
25
|
max: number;
|
|
@@ -4,6 +4,6 @@ export declare const badgeProps: {
|
|
|
4
4
|
readonly max: import("element-ps/es/utils/props").BuildPropReturn<NumberConstructor, 99, unknown, unknown, unknown>;
|
|
5
5
|
readonly isDot: BooleanConstructor;
|
|
6
6
|
readonly hidden: BooleanConstructor;
|
|
7
|
-
readonly type: import("element-ps/es/utils/props").BuildPropReturn<StringConstructor, "danger", unknown, "
|
|
7
|
+
readonly type: import("element-ps/es/utils/props").BuildPropReturn<StringConstructor, "danger", unknown, "success" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
8
8
|
};
|
|
9
9
|
export declare type BadgeProps = ExtractPropTypes<typeof badgeProps>;
|