element-ps 1.0.9 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +56 -58
- 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 +56 -58
- package/es/index.mjs +6 -6
- package/es/packages/components/button/index.mjs +3 -3
- package/es/packages/components/button/src/button-group.mjs +7 -5
- package/es/packages/components/button/src/button-group.mjs.map +1 -1
- package/es/packages/components/button/src/button-group.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/button/src/button-group2.mjs +5 -7
- package/es/packages/components/button/src/button-group2.mjs.map +1 -1
- package/es/packages/components/button/src/button.mjs +5 -46
- package/es/packages/components/button/src/button.mjs.map +1 -1
- package/es/packages/components/button/src/button.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/button/src/button2.mjs +46 -5
- package/es/packages/components/button/src/button2.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/cascader-panel/src/config.mjs +1 -1
- package/es/packages/components/cascader-panel/src/index.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/cascader-panel/src/menu.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/cascader-panel/src/node.mjs +72 -5
- package/es/packages/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/packages/components/cascader-panel/src/node2.mjs +5 -72
- package/es/packages/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/packages/components/cascader-panel/src/store.mjs +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 +3 -3
- 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/divider/index.mjs +2 -2
- package/es/packages/components/divider/src/divider.mjs +15 -5
- package/es/packages/components/divider/src/divider.mjs.map +1 -1
- package/es/packages/components/divider/src/divider.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/divider/src/divider2.mjs +5 -15
- package/es/packages/components/divider/src/divider2.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 +2 -2
- 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 +5 -12
- 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 +12 -5
- 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/icon/index.mjs +2 -2
- package/es/packages/components/icon/src/icon.mjs +11 -5
- package/es/packages/components/icon/src/icon.mjs.map +1 -1
- package/es/packages/components/icon/src/icon.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/icon/src/icon2.mjs +5 -11
- package/es/packages/components/icon/src/icon2.mjs.map +1 -1
- package/es/packages/components/index.mjs +6 -6
- package/es/packages/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/packages/components/table/src/table.vue_vue&type=script&lang.mjs.map +1 -1
- package/es/packages/components/table/src/table.vue_vue&type=template&id=4a1660ad&lang.mjs +4 -8
- package/es/packages/components/table/src/table.vue_vue&type=template&id=4a1660ad&lang.mjs.map +1 -1
- package/es/packages/components/tag/index.mjs +2 -2
- package/es/packages/components/tag/src/tag.mjs +26 -5
- package/es/packages/components/tag/src/tag.mjs.map +1 -1
- package/es/packages/components/tag/src/tag.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/tag/src/tag2.mjs +5 -26
- package/es/packages/components/tag/src/tag2.mjs.map +1 -1
- package/lib/index.js +6 -6
- package/lib/packages/components/button/index.js +3 -3
- package/lib/packages/components/button/src/button-group.js +6 -5
- package/lib/packages/components/button/src/button-group.js.map +1 -1
- package/lib/packages/components/button/src/button-group.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/button/src/button-group2.js +5 -6
- package/lib/packages/components/button/src/button-group2.js.map +1 -1
- package/lib/packages/components/button/src/button.js +5 -49
- package/lib/packages/components/button/src/button.js.map +1 -1
- package/lib/packages/components/button/src/button.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/button/src/button2.js +49 -5
- package/lib/packages/components/button/src/button2.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/cascader-panel/src/config.js +1 -1
- package/lib/packages/components/cascader-panel/src/index.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/cascader-panel/src/menu.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/cascader-panel/src/node.js +71 -5
- package/lib/packages/components/cascader-panel/src/node.js.map +1 -1
- package/lib/packages/components/cascader-panel/src/node2.js +5 -71
- package/lib/packages/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/packages/components/cascader-panel/src/store.js +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 +3 -3
- 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/divider/index.js +2 -2
- package/lib/packages/components/divider/src/divider.js +14 -5
- package/lib/packages/components/divider/src/divider.js.map +1 -1
- package/lib/packages/components/divider/src/divider.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/divider/src/divider2.js +5 -14
- package/lib/packages/components/divider/src/divider2.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 +2 -2
- 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 +6 -12
- 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 +12 -6
- 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/icon/index.js +2 -2
- package/lib/packages/components/icon/src/icon.js +10 -5
- package/lib/packages/components/icon/src/icon.js.map +1 -1
- package/lib/packages/components/icon/src/icon.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/icon/src/icon2.js +5 -10
- package/lib/packages/components/icon/src/icon2.js.map +1 -1
- package/lib/packages/components/index.js +6 -6
- package/lib/packages/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/packages/components/table/src/table.vue_vue&type=script&lang.js.map +1 -1
- package/lib/packages/components/table/src/table.vue_vue&type=template&id=4a1660ad&lang.js +4 -8
- package/lib/packages/components/table/src/table.vue_vue&type=template&id=4a1660ad&lang.js.map +1 -1
- package/lib/packages/components/tag/index.js +2 -2
- package/lib/packages/components/tag/src/tag.js +25 -5
- package/lib/packages/components/tag/src/tag.js.map +1 -1
- package/lib/packages/components/tag/src/tag.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/tag/src/tag2.js +5 -25
- package/lib/packages/components/tag/src/tag2.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
package/es/packages/components/drawer/src/index.vue_vue&type=template&id=052d0d8e&lang.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue_vue&type=template&id=052d0d8e&lang.mjs","sources":["../../../../../../../packages/components/drawer/src/index.vue?vue&type=template&id=052d0d8e&lang.js"],"sourcesContent":["<template>\n <teleport to=\"body\" :disabled=\"!appendToBody\">\n <ps-overlay\n v-show=\"visible\"\n :mask=\"modal\"\n :overlay-class=\"(modalClass || '') + (widget ? ` ps--drawer-widget-class` : '')\"\n :z-index=\"zIndex\"\n >\n <div class=\"el-overlay-drawer\">\n <div\n ref=\"drawerRef\"\n aria-modal=\"true\"\n aria-labelledby=\"el-drawer__title\"\n :aria-label=\"title\"\n :class=\"['el-drawer', direction, visible && 'open', customClass]\"\n :style=\"\n isHorizontal ? 'width: ' + drawerSize : 'height: ' + drawerSize\n \"\n role=\"dialog\"\n @click.stop\n :widget=\"widget\"\n >\n <header\n v-if=\"withHeader\"\n id=\"el-drawer__title\"\n class=\"el-drawer__header\"\n :widget=\"`drawer:title:${widget.split(':')}`\"\n >\n <slot name=\"title\">\n <span role=\"heading\" :title=\"title\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n :aria-label=\"'close ' + (title || 'drawer')\"\n class=\"el-drawer__close-btn\"\n type=\"button\"\n >\n <ps-icon class=\"el-drawer__close\"><close /></ps-icon>\n </button>\n </header>\n <template v-if=\"rendered\">\n <section class=\"el-drawer__body\" :widget=\"`drawer:default:${widget.split(':')}`\">\n <slot></slot>\n </section>\n </template>\n </div>\n </div>\n </ps-overlay>\n </teleport>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, computed, ref } from 'vue'\nimport { PsOverlay } from '@element-ps/components/overlay'\nimport {\n useDialog,\n dialogProps,\n} from '@element-ps/components/dialog'\nimport type { PropType, SetupContext } from 'vue'\nimport PsIcon from '@element-ps/components/icon'\nimport { Close } from '@element-plus/icons'\n\ntype DrawerDirection = 'ltr' | 'rtl' | 'ttb' | 'btt'\n\nexport default defineComponent({\n name: 'PsDrawer',\n components: {\n PsOverlay,\n PsIcon,\n Close,\n },\n props: {\n ...dialogProps,\n direction: {\n type: String as PropType<DrawerDirection>,\n default: 'rtl',\n validator: (val: DrawerDirection) => {\n return ['ltr', 'rtl', 'ttb', 'btt'].indexOf(val) !== -1\n },\n },\n size: {\n type: [String, Number],\n default: '30%',\n },\n withHeader: {\n type: Boolean,\n default: true,\n },\n modalFade: {\n type: Boolean,\n default: true,\n },\n widget: {\n type: String,\n },\n },\n\n setup(props, ctx) {\n const drawerRef = ref<HTMLElement>(null)\n return {\n ...useDialog(props, ctx as SetupContext, drawerRef),\n drawerRef,\n isHorizontal: computed(\n () => props.direction === 'rtl' || props.direction === 'ltr',\n ),\n drawerSize: computed(() =>\n typeof props.size === 'number' ? `${props.size}px` : props.size,\n ),\n }\n },\n})\n</script>\n"],"names":["_createBlock","_createVNode","_createElementVNode","_createElementBlock","_renderSlot"],"mappings":";;qBAQW,OAAM;;;;;;;;;;sBAPfA;IAAU,IAAG;AAAA,IAAQ,WAAW;;mBAC9BC;MAEG,MAAM;MACN,iBAAgB;MAChB,WAAS;;uBAEV;QAAAC,0BAAA;UACEA;YACE,KAAI;AAAA,YACJ,cAAW;AAAA,YACX,mBAAgB;AAAA,YACf,cAAY;YACZ,oCAAqB,gBAAW,wBAAmB;YACnD;YAGD,MAAK;AAAA,YACJ,iDAAD;;YACC,QAAQ;;YAGD,gCADRC;;cAEE,IAAG;AAAA,cACH,OAAM;AAAA,cACL,wBAAwB,YAAO;;cAEhCC,qCAAA;gBACEF;kBAAM,MAAK;AAAA,kBAAW,OAAO;mCACxB;;cAIC,+BADRC;;gBAEG;gBACD,OAAM;AAAA,gBACN,MAAK;AAAA;gBAELF,kCAAS,OAAM;mCAAmB;oBAAAA,YAAS;AAAA;AAAA;;;;YAG/B,8BACdE;;cAAS,OAAM;AAAA,cAAmB,0BAA0B,YAAO;;cACjEC;;;;;;;cAzCA;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.vue_vue&type=template&id=052d0d8e&lang.mjs","sources":["../../../../../../../packages/components/drawer/src/index.vue?vue&type=template&id=052d0d8e&lang.js"],"sourcesContent":["<template>\n <teleport to=\"body\" :disabled=\"!appendToBody\">\n <ps-overlay\n v-show=\"visible\"\n :mask=\"modal\"\n :overlay-class=\"(modalClass || '') + (widget ? ` ps--drawer-widget-class` : '')\"\n :z-index=\"zIndex\"\n >\n <div class=\"el-overlay-drawer\">\n <div\n ref=\"drawerRef\"\n aria-modal=\"true\"\n aria-labelledby=\"el-drawer__title\"\n :aria-label=\"title\"\n :class=\"['el-drawer', direction, visible && 'open', customClass]\"\n :style=\"\n isHorizontal ? 'width: ' + drawerSize : 'height: ' + drawerSize\n \"\n role=\"dialog\"\n @click.stop\n :widget=\"widget\"\n >\n <header\n v-if=\"withHeader\"\n id=\"el-drawer__title\"\n class=\"el-drawer__header\"\n :widget=\"`drawer:title:${widget.split(':')[1]}`\"\n >\n <slot name=\"title\">\n <span role=\"heading\" :title=\"title\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n :aria-label=\"'close ' + (title || 'drawer')\"\n class=\"el-drawer__close-btn\"\n type=\"button\"\n >\n <ps-icon class=\"el-drawer__close\"><close /></ps-icon>\n </button>\n </header>\n <template v-if=\"rendered\">\n <section class=\"el-drawer__body\" :widget=\"`drawer:default:${widget.split(':')[1]}`\">\n <slot></slot>\n </section>\n </template>\n </div>\n </div>\n </ps-overlay>\n </teleport>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, computed, ref } from 'vue'\nimport { PsOverlay } from '@element-ps/components/overlay'\nimport {\n useDialog,\n dialogProps,\n} from '@element-ps/components/dialog'\nimport type { PropType, SetupContext } from 'vue'\nimport PsIcon from '@element-ps/components/icon'\nimport { Close } from '@element-plus/icons'\n\ntype DrawerDirection = 'ltr' | 'rtl' | 'ttb' | 'btt'\n\nexport default defineComponent({\n name: 'PsDrawer',\n components: {\n PsOverlay,\n PsIcon,\n Close,\n },\n props: {\n ...dialogProps,\n direction: {\n type: String as PropType<DrawerDirection>,\n default: 'rtl',\n validator: (val: DrawerDirection) => {\n return ['ltr', 'rtl', 'ttb', 'btt'].indexOf(val) !== -1\n },\n },\n size: {\n type: [String, Number],\n default: '30%',\n },\n withHeader: {\n type: Boolean,\n default: true,\n },\n modalFade: {\n type: Boolean,\n default: true,\n },\n widget: {\n type: String,\n },\n },\n\n setup(props, ctx) {\n const drawerRef = ref<HTMLElement>(null)\n return {\n ...useDialog(props, ctx as SetupContext, drawerRef),\n drawerRef,\n isHorizontal: computed(\n () => props.direction === 'rtl' || props.direction === 'ltr',\n ),\n drawerSize: computed(() =>\n typeof props.size === 'number' ? `${props.size}px` : props.size,\n ),\n }\n },\n})\n</script>\n"],"names":["_createBlock","_createVNode","_createElementVNode","_createElementBlock","_renderSlot"],"mappings":";;qBAQW,OAAM;;;;;;;;;;sBAPfA;IAAU,IAAG;AAAA,IAAQ,WAAW;;mBAC9BC;MAEG,MAAM;MACN,iBAAgB;MAChB,WAAS;;uBAEV;QAAAC,0BAAA;UACEA;YACE,KAAI;AAAA,YACJ,cAAW;AAAA,YACX,mBAAgB;AAAA,YACf,cAAY;YACZ,oCAAqB,gBAAW,wBAAmB;YACnD;YAGD,MAAK;AAAA,YACJ,iDAAD;;YACC,QAAQ;;YAGD,gCADRC;;cAEE,IAAG;AAAA,cACH,OAAM;AAAA,cACL,wBAAwB,YAAO;;cAEhCC,qCAAA;gBACEF;kBAAM,MAAK;AAAA,kBAAW,OAAO;mCACxB;;cAIC,+BADRC;;gBAEG;gBACD,OAAM;AAAA,gBACN,MAAK;AAAA;gBAELF,kCAAS,OAAM;mCAAmB;oBAAAA,YAAS;AAAA;AAAA;;;;YAG/B,8BACdE;;cAAS,OAAM;AAAA,cAAmB,0BAA0B,YAAO;;cACjEC;;;;;;;cAzCA;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../../utils/with-install.mjs';
|
|
2
|
-
import './src/
|
|
3
|
-
export { emptyProps } from './src/
|
|
2
|
+
import './src/empty.mjs';
|
|
3
|
+
export { emptyProps } from './src/empty2.mjs';
|
|
4
4
|
import script from './src/empty.vue_vue&type=script&lang.mjs';
|
|
5
5
|
|
|
6
6
|
const PsEmpty = withInstall(script);
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
default: ""
|
|
5
|
-
},
|
|
6
|
-
imageSize: Number,
|
|
7
|
-
description: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: ""
|
|
10
|
-
}
|
|
11
|
-
};
|
|
1
|
+
import script from './empty.vue_vue&type=script&lang.mjs';
|
|
2
|
+
export { default } from './empty.vue_vue&type=script&lang.mjs';
|
|
3
|
+
import { render } from './empty.vue_vue&type=template&id=10d211eb&lang.mjs';
|
|
12
4
|
|
|
13
|
-
|
|
5
|
+
script.render = render;
|
|
6
|
+
script.__file = "packages/components/empty/src/empty.vue";
|
|
14
7
|
//# sourceMappingURL=empty.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"empty.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed } from 'vue';
|
|
2
2
|
import '../../../hooks/index.mjs';
|
|
3
3
|
import './img-empty.mjs';
|
|
4
|
-
import { emptyProps } from './
|
|
4
|
+
import { emptyProps } from './empty2.mjs';
|
|
5
5
|
import script$1 from './img-empty.vue_vue&type=script&lang.mjs';
|
|
6
6
|
import { useLocaleInject } from '../../../hooks/use-locale/index.mjs';
|
|
7
7
|
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const emptyProps = {
|
|
2
|
+
image: {
|
|
3
|
+
type: String,
|
|
4
|
+
default: ""
|
|
5
|
+
},
|
|
6
|
+
imageSize: Number,
|
|
7
|
+
description: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
}
|
|
11
|
+
};
|
|
4
12
|
|
|
5
|
-
|
|
6
|
-
script.__file = "packages/components/empty/src/empty.vue";
|
|
13
|
+
export { emptyProps };
|
|
7
14
|
//# sourceMappingURL=empty2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty2.mjs","sources":["../../../../../../../packages/components/empty/src/empty.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const emptyProps = {\n image: {\n type: String,\n default: '',\n },\n imageSize: Number,\n description: {\n type: String,\n default: '',\n },\n} as const\nexport type EmptyProps = ExtractPropTypes<typeof emptyProps>\n"],"names":[],"mappings":"MAEa,aAAa;AAAA,EACxB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,WAAW;AAAA,EACX,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA;AAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-item.vue_vue&type=script&lang.mjs","sources":["../../../../../../../packages/components/form/src/form-item.vue"],"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=script&lang.mjs","sources":["../../../../../../../packages/components/form/src/form-item.vue"],"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":[],"mappings":";;;;;;;AAkEA,aAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,eAAe;AAAA,EACf,YAAY;AAAA,IACV;AAAA;AAAA,EAEF,OAAO;AAAA,IACL,OAAO;AAAA,IACP,YAAY;AAAA,MACV,MAAM,CAAC,QAAQ;AAAA,MACf,SAAS;AAAA;AAAA,IAEX,MAAM;AAAA,IACN,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX,OAAO,CAAC,QAAQ;AAAA,IAChB,OAAO;AAAA,IACP,gBAAgB;AAAA,IAChB,KAAK;AAAA,IACL,eAAe;AAAA,MACb,MAAM,CAAC,QAAQ;AAAA,MACf,SAAS;AAAA;AAAA,IAEX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,WAAW;AAAA;AAAA,IAEb,QAAQ;AAAA,MACN,MAAM;AAAA;AAAA;AAAA,EAGV,MAAM,OAAO,EAAE,SAAS;AACtB,UAAM,WAAW;AAEjB,UAAM,SAAS,OAAO,WAAW;AACjC,UAAM,gBAAgB,IAAI;AAC1B,UAAM,kBAAkB,IAAI;AAE5B,UAAM,qBAAqB,IAAI;AAE/B,UAAM,cAAc;AAEpB,UAAM,KAAK;AACX,UAAM,WAAW,SAAS,MAAM;AAC9B,UAAI,SAAS,GAAG;AAChB,aAAO,UAAU,OAAO,KAAK,SAAS,UAAU;AAC9C,YAAI,OAAO,KAAK,SAAS,cAAc;AACrC,iBAAO;AAAA;AAET,iBAAS,OAAO;AAAA;AAElB,aAAO;AAAA;AAGT,QAAI,eAAe;AAEnB,UAAM,WAAW,SAAS,MAAM,MAAM,OAAO,MAAM;AACnD,UAAM,aAAa,SAAS,MAAM;AAChC,YAAM,MAAqB;AAC3B,UAAI,OAAO,kBAAkB;AAAO,eAAO;AAC3C,YAAM,aAAa,QAAQ,MAAM,cAAc,OAAO;AACtD,UAAI,YAAY;AACd,YAAI,QAAQ;AAAA;AAEd,aAAO;AAAA;AAET,UAAM,eAAe,SAAS,MAAM;AAClC,YAAM,MAAqB;AAC3B,UAAI,OAAO,kBAAkB,SAAS,OAAO,QAAQ;AACnD,eAAO;AAAA;AAET,UAAI,CAAC,MAAM,SAAS,CAAC,MAAM,cAAc,SAAS,OAAO;AACvD,eAAO;AAAA;AAET,YAAM,aAAa,QAAQ,MAAM,cAAc,OAAO;AACtD,UAAI,CAAC,MAAM,SAAS,CAAC,MAAM,OAAO;AAChC,YAAI,aAAa;AAAA;AAEnB,aAAO;AAAA;AAET,UAAM,aAAa,SAAS,MAAM;AAChC,YAAM,QAAQ,OAAO;AACrB,UAAI,CAAC,SAAS,CAAC,MAAM,MAAM;AACzB;AAAA;AAGF,UAAI,OAAO,MAAM;AACjB,UAAI,KAAK,QAAQ,SAAS,IAAI;AAC5B,eAAO,KAAK,QAAQ,KAAK;AAAA;AAG3B,aAAO,cAAc,OAAO,MAAM,MAAM;AAAA;AAE1C,UAAM,aAAa,SAAS,MAAM;AAChC,YAAM,QAAQ;AACd,UAAI,WAAW;AAEf,UAAI,SAAS,MAAM,QAAQ;AACzB,cAAM,MAAM,CAAC,SAAS;AACpB,cAAI,KAAK,UAAU;AACjB,uBAAW;AACX,mBAAO;AAAA;AAET,iBAAO;AAAA;AAAA;AAGX,aAAO;AAAA;AAET,UAAM,iBAAiB,SAAS,MAAM,MAAM,QAAQ,OAAO;AAC3D,UAAM,YAAY,SAAwB,MAAM;AAC9C,aAAO,eAAe,SAAS,SAAS;AAAA;AAG1C,UAAM,WAAW,MAAM;AACrB,YAAM,YAAY,OAAO;AACzB,YAAM,YAAY,MAAM;AACxB,YAAM,eACJ,MAAM,aAAa,SAAY,EAAE,UAAU,CAAC,CAAC,MAAM,aAAa;AAElE,YAAM,OAAO,cAAc,WAAW,MAAM,QAAQ,IAAI;AACxD,YAAM,iBAAiB,YAAY,KAAK,EAAE,MAAM,QAAQ,OAAO,KAAK,IAAI;AAExE,aAAO,GAAG,OAAO,aAAa,kBAAkB,IAAI,OAAO;AAAA;AAG7D,UAAM,2BAA2B,CAAC,UAA2B;AAC3D,yBAAmB,QAAQ,QAAQ,GAAG,YAAY;AAAA;AAGpD,UAAM,aAAa,SAAS;AAAA,SACvB,OAAO;AAAA,MACV,MAAM;AAAA,MACN,KAAK;AAAA,MACL;AAAA;AAGF,cAAU,MAAM;AACd,UAAI,MAAM,MAAM;AACd,cAAM,QAAQ,WAAW;AACzB,uBAAgB,MAAM,QAAQ,SAAS,CAAC,GAAG,SAAS;AAAA;AAAA;AAIxD,YAAQ,eAAe;AAEvB,UAAM,gBAAgB,SAAS,MAAM;AAAA,MACnC;AAAA,QACE,0BAA0B,OAAO;AAAA,QACjC,YAAY,cAAc,UAAU;AAAA,QACpC,iBAAiB,cAAc,UAAU;AAAA,QACzC,cAAc,cAAc,UAAU;AAAA,QACtC,eAAe,WAAW,SAAS,MAAM;AAAA,QACzC,kBAAkB,OAAO;AAAA;AAAA,MAE3B,UAAU,QAAQ,iBAAiB,UAAU,UAAU;AAAA;AAGzD,UAAM,kBAAkB,SAAS,MAAM;AACrC,aACE,cAAc,UAAU,WACxB,MAAM,eACN,OAAO;AAAA;AAIX,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA;AAAA;;;;"}
|
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 { iconProps } from './src/
|
|
2
|
+
import './src/icon2.mjs';
|
|
3
|
+
export { iconProps } from './src/icon.mjs';
|
|
4
4
|
import script from './src/icon.vue_vue&type=script&lang.mjs';
|
|
5
5
|
|
|
6
6
|
const PsIcon = withInstall(script);
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { default } from './icon.vue_vue&type=script&lang.mjs';
|
|
3
|
-
import { render } from './icon.vue_vue&type=template&id=89b755b6&lang.mjs';
|
|
1
|
+
import { buildProps, definePropType } from '../../../utils/props.mjs';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const iconProps = buildProps({
|
|
4
|
+
size: {
|
|
5
|
+
type: definePropType([Number, String])
|
|
6
|
+
},
|
|
7
|
+
color: {
|
|
8
|
+
type: String
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export { iconProps };
|
|
7
13
|
//# sourceMappingURL=icon.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icon.mjs","sources":["../../../../../../../packages/components/icon/src/icon.ts"],"sourcesContent":["import { definePropType, buildProps } from '@element-ps/utils/props'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const iconProps = buildProps({\n size: {\n type: definePropType<number | string>([Number, String]),\n },\n color: {\n type: String,\n },\n} as const)\nexport type IconProps = ExtractPropTypes<typeof iconProps>\n"],"names":[],"mappings":";;MAGa,YAAY,WAAW;AAAA,EAClC,MAAM;AAAA,IACJ,MAAM,eAAgC,CAAC,QAAQ;AAAA;AAAA,EAEjD,OAAO;AAAA,IACL,MAAM;AAAA;AAAA;;;;"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import script from './icon.vue_vue&type=script&lang.mjs';
|
|
2
|
+
export { default } from './icon.vue_vue&type=script&lang.mjs';
|
|
3
|
+
import { render } from './icon.vue_vue&type=template&id=89b755b6&lang.mjs';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type: definePropType([Number, String])
|
|
6
|
-
},
|
|
7
|
-
color: {
|
|
8
|
-
type: String
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export { iconProps };
|
|
5
|
+
script.render = render;
|
|
6
|
+
script.__file = "packages/components/icon/src/icon.vue";
|
|
13
7
|
//# sourceMappingURL=icon2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon2.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"icon2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -73,17 +73,17 @@ export { backtopProps } from './backtop/src/backtop.mjs';
|
|
|
73
73
|
export { badgeProps } from './badge/src/badge.mjs';
|
|
74
74
|
export { breadcrumbProps } from './breadcrumb/src/breadcrumb.mjs';
|
|
75
75
|
export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item.mjs';
|
|
76
|
-
export { buttonEmits, buttonNativeType, buttonProps, buttonSize, buttonType } from './button/src/
|
|
77
|
-
export { cardProps } from './card/src/
|
|
76
|
+
export { buttonEmits, buttonNativeType, buttonProps, buttonSize, buttonType } from './button/src/button2.mjs';
|
|
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';
|
|
81
81
|
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
|
-
export { dividerProps } from './divider/src/
|
|
85
|
-
export { emptyProps } from './empty/src/
|
|
86
|
-
export { iconProps } from './icon/src/
|
|
84
|
+
export { dividerProps } from './divider/src/divider.mjs';
|
|
85
|
+
export { emptyProps } from './empty/src/empty2.mjs';
|
|
86
|
+
export { iconProps } from './icon/src/icon.mjs';
|
|
87
87
|
export { imageEmits, imageProps } from './image/src/image.mjs';
|
|
88
88
|
export { imageViewerProps } from './image-viewer/src/image-viewer.mjs';
|
|
89
89
|
export { inputProps } from './input/src/input.mjs';
|
|
@@ -107,7 +107,7 @@ export { selectGroupKey, selectKey } from './select/src/token.mjs';
|
|
|
107
107
|
export { selectV2InjectionKey } from './select-v2/src/token.mjs';
|
|
108
108
|
export { spaceProps } from './space/src/space.mjs';
|
|
109
109
|
export { useSpace } from './space/src/use-space.mjs';
|
|
110
|
-
export { tagProps } from './tag/src/
|
|
110
|
+
export { tagProps } from './tag/src/tag.mjs';
|
|
111
111
|
export { extractDateFormat, extractTimeFormat, rangeArr } from './time-picker/src/common/date-utils.mjs';
|
|
112
112
|
export { DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME } from './time-picker/src/common/constant.mjs';
|
|
113
113
|
export { timePickerDefaultProps } from './time-picker/src/common/props.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.vue_vue&type=script&lang.mjs","sources":["../../../../../../../packages/components/table/src/table.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n {\n 'el-table--fit': fit,\n 'el-table--striped': stripe,\n 'el-table--border': border || isGroup,\n 'el-table--hidden': isHidden,\n 'el-table--group': isGroup,\n 'el-table--fluid-height': maxHeight,\n 'el-table--scrollable-x': layout.scrollX.value,\n 'el-table--scrollable-y': layout.scrollY.value,\n 'el-table--enable-row-hover': !store.states.isComplex.value,\n 'el-table--enable-row-transition':\n (store.states.data.value || []).length !== 0 &&\n (store.states.data.value || []).length < 100,\n },\n tableSize ? `el-table--${tableSize}` : '',\n className,\n 'el-table',\n ]\"\n :style=\"style\"\n >\n <div ref=\"hiddenColumns\" class=\"hidden-columns\">\n <slot></slot>\n </div>\n <div v-if=\"showHeader\" ref=\"headerWrapper\" class=\"el-table__header-wrapper\">\n <table-header\n ref=\"tableHeader\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"{\n width: layout.bodyWidth.value ? layout.bodyWidth.value + 'px' : '',\n }\"\n />\n </div>\n <div ref=\"bodyWrapper\" :style=\"[bodyHeight]\" class=\"el-table__body-wrapper\">\n <table-body\n :context=\"context\"\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n />\n <div\n v-if=\"isEmpty\"\n ref=\"emptyBlock\"\n :style=\"emptyBlockStyle\"\n class=\"el-table__empty-block\"\n >\n <span class=\"el-table__empty-text\">\n <slot name=\"empty\">{{ emptyText || t('el.table.emptyText') }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.append\"\n ref=\"appendWrapper\"\n class=\"el-table__append-wrapper\"\n >\n <slot name=\"append\"></slot>\n </div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"footerWrapper\"\n class=\"el-table__footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"{\n width: layout.bodyWidth.value ? layout.bodyWidth.value + 'px' : '',\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n />\n </div>\n <div\n v-if=\"store.states.fixedColumns.value.length > 0\"\n ref=\"fixedWrapper\"\n :style=\"[\n {\n width: layout.fixedWidth.value ? layout.fixedWidth.value + 'px' : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"fixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"fixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n />\n </div>\n <div\n ref=\"fixedBodyWrapper\"\n :style=\"[\n {\n top: layout.headerHeight.value + 'px',\n },\n fixedBodyHeight,\n ]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"fixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"left\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedWrapper\"\n :style=\"[\n {\n width: layout.rightFixedWidth.value\n ? layout.rightFixedWidth.value + 'px'\n : '',\n right: layout.scrollY.value\n ? (border ? layout.gutterWidth : layout.gutterWidth || 0) + 'px'\n : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed-right\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"rightFixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"rightFixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n />\n </div>\n <div\n ref=\"rightFixedBodyWrapper\"\n :style=\"[{ top: layout.headerHeight.value + 'px' }, fixedBodyHeight]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"rightFixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"right\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedPatch\"\n :style=\"{\n width: layout.scrollY.value ? layout.gutterWidth + 'px' : '0',\n height: layout.headerHeight.value + 'px',\n }\"\n class=\"el-table__fixed-right-patch\"\n ></div>\n <div\n v-show=\"resizeProxyVisible\"\n ref=\"resizeProxy\"\n class=\"el-table__column-resize-proxy\"\n ></div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, getCurrentInstance, computed } from 'vue'\nimport debounce from 'lodash/debounce'\nimport { useLocaleInject } from '@element-ps/hooks'\nimport { createStore } from './store/helper'\nimport TableLayout from './table-layout'\nimport TableHeader from './table-header'\nimport TableBody from './table-body'\nimport TableFooter from './table-footer'\nimport useUtils from './table/utils-helper'\nimport useStyle from './table/style-helper'\nimport defaultProps from './table/defaults'\n\nimport type { Table } from './table/defaults'\n\nlet tableIdSeed = 1\nexport default defineComponent({\n name: 'PsTable',\n components: {\n TableHeader,\n TableBody,\n TableFooter,\n },\n props: defaultProps,\n setup(props) {\n type Row = typeof props.data[number]\n const { t } = useLocaleInject()\n const table = getCurrentInstance() as Table<Row>\n const store = createStore<Row>(table, props)\n table.store = store\n const layout = new TableLayout<Row>({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader,\n })\n table.layout = layout\n\n const isEmpty = computed(() => (store.states.data.value || []).length === 0)\n\n /**\n * open functions\n */\n const {\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n } = useUtils<Row>(store)\n const {\n isHidden,\n renderExpanded,\n isGroup,\n tableSize,\n bodyHeight,\n emptyBlockStyle,\n fixedHeight,\n fixedBodyHeight,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n } = useStyle<Row>(props, layout, store, table)\n\n const debouncedUpdateLayout = debounce(doLayout, 50)\n\n const tableId = `el-table_${tableIdSeed++}`\n table.tableId = tableId\n table.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout,\n }\n return {\n layout,\n store,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n bodyHeight,\n emptyBlockStyle,\n debouncedUpdateLayout,\n fixedHeight,\n fixedBodyHeight,\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n doLayout,\n sort,\n t,\n context: table,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAqQA,IAAI,cAAc;AAClB,aAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA;AAAA,EAEF,OAAO;AAAA,EACP,MAAM,OAAO;AAEX,UAAM,EAAE,MAAM;AACd,UAAM,QAAQ;AACd,UAAM,QAAQ,YAAiB,OAAO;AACtC,UAAM,QAAQ;AACd,UAAM,SAAS,IAAI,YAAiB;AAAA,MAClC,OAAO,MAAM;AAAA,MACb;AAAA,MACA,KAAK,MAAM;AAAA,MACX,YAAY,MAAM;AAAA;AAEpB,UAAM,SAAS;AAEf,UAAM,UAAU,SAAS,MAAO,OAAM,OAAO,KAAK,SAAS,IAAI,WAAW;AAK1E,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE,SAAc;AAClB,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE,SAAc,OAAO,QAAQ,OAAO;AAExC,UAAM,wBAAwB,SAAS,UAAU;AAEjD,UAAM,UAAU,YAAY;AAC5B,UAAM,UAAU;AAChB,UAAM,QAAQ;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAEF,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS;AAAA;AAAA;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"table.vue_vue&type=script&lang.mjs","sources":["../../../../../../../packages/components/table/src/table.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n {\n 'el-table--fit': fit,\n 'el-table--striped': stripe,\n 'el-table--border': border || isGroup,\n 'el-table--hidden': isHidden,\n 'el-table--group': isGroup,\n 'el-table--fluid-height': maxHeight,\n 'el-table--scrollable-x': layout.scrollX.value,\n 'el-table--scrollable-y': layout.scrollY.value,\n 'el-table--enable-row-hover': !store.states.isComplex.value,\n 'el-table--enable-row-transition':\n (store.states.data.value || []).length !== 0 &&\n (store.states.data.value || []).length < 100,\n },\n tableSize ? `el-table--${tableSize}` : '',\n className,\n 'el-table',\n ]\"\n :style=\"style\"\n >\n <div ref=\"hiddenColumns\" class=\"hidden-columns\">\n <slot></slot>\n </div>\n <div v-if=\"showHeader\" ref=\"headerWrapper\" class=\"el-table__header-wrapper\">\n <table-header\n ref=\"tableHeader\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n style=\"width: 100%\"\n />\n </div>\n <div ref=\"bodyWrapper\" :style=\"[bodyHeight]\" class=\"el-table__body-wrapper\">\n <table-body\n :context=\"context\"\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n style=\"width: 100%\"\n />\n <div\n v-if=\"isEmpty\"\n ref=\"emptyBlock\"\n :style=\"emptyBlockStyle\"\n class=\"el-table__empty-block\"\n >\n <span class=\"el-table__empty-text\">\n <slot name=\"empty\">{{ emptyText || t('el.table.emptyText') }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.append\"\n ref=\"appendWrapper\"\n class=\"el-table__append-wrapper\"\n >\n <slot name=\"append\"></slot>\n </div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"footerWrapper\"\n class=\"el-table__footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"{\n width: layout.bodyWidth.value ? layout.bodyWidth.value + 'px' : '',\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n />\n </div>\n <div\n v-if=\"store.states.fixedColumns.value.length > 0\"\n ref=\"fixedWrapper\"\n :style=\"[\n {\n width: layout.fixedWidth.value ? layout.fixedWidth.value + 'px' : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"fixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"fixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n />\n </div>\n <div\n ref=\"fixedBodyWrapper\"\n :style=\"[\n {\n top: layout.headerHeight.value + 'px',\n },\n fixedBodyHeight,\n ]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"fixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"left\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedWrapper\"\n :style=\"[\n {\n width: layout.rightFixedWidth.value\n ? layout.rightFixedWidth.value + 'px'\n : '',\n right: layout.scrollY.value\n ? (border ? layout.gutterWidth : layout.gutterWidth || 0) + 'px'\n : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed-right\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"rightFixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"rightFixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n />\n </div>\n <div\n ref=\"rightFixedBodyWrapper\"\n :style=\"[{ top: layout.headerHeight.value + 'px' }, fixedBodyHeight]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"rightFixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"right\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedPatch\"\n :style=\"{\n width: layout.scrollY.value ? layout.gutterWidth + 'px' : '0',\n height: layout.headerHeight.value + 'px',\n }\"\n class=\"el-table__fixed-right-patch\"\n ></div>\n <div\n v-show=\"resizeProxyVisible\"\n ref=\"resizeProxy\"\n class=\"el-table__column-resize-proxy\"\n ></div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, getCurrentInstance, computed } from 'vue'\nimport debounce from 'lodash/debounce'\nimport { useLocaleInject } from '@element-ps/hooks'\nimport { createStore } from './store/helper'\nimport TableLayout from './table-layout'\nimport TableHeader from './table-header'\nimport TableBody from './table-body'\nimport TableFooter from './table-footer'\nimport useUtils from './table/utils-helper'\nimport useStyle from './table/style-helper'\nimport defaultProps from './table/defaults'\n\nimport type { Table } from './table/defaults'\n\nlet tableIdSeed = 1\nexport default defineComponent({\n name: 'PsTable',\n components: {\n TableHeader,\n TableBody,\n TableFooter,\n },\n props: defaultProps,\n setup(props) {\n type Row = typeof props.data[number]\n const { t } = useLocaleInject()\n const table = getCurrentInstance() as Table<Row>\n const store = createStore<Row>(table, props)\n table.store = store\n const layout = new TableLayout<Row>({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader,\n })\n table.layout = layout\n\n const isEmpty = computed(() => (store.states.data.value || []).length === 0)\n\n /**\n * open functions\n */\n const {\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n } = useUtils<Row>(store)\n const {\n isHidden,\n renderExpanded,\n isGroup,\n tableSize,\n bodyHeight,\n emptyBlockStyle,\n fixedHeight,\n fixedBodyHeight,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n } = useStyle<Row>(props, layout, store, table)\n\n const debouncedUpdateLayout = debounce(doLayout, 50)\n\n const tableId = `el-table_${tableIdSeed++}`\n table.tableId = tableId\n table.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout,\n }\n return {\n layout,\n store,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n bodyHeight,\n emptyBlockStyle,\n debouncedUpdateLayout,\n fixedHeight,\n fixedBodyHeight,\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n doLayout,\n sort,\n t,\n context: table,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAiQA,IAAI,cAAc;AAClB,aAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA;AAAA,EAEF,OAAO;AAAA,EACP,MAAM,OAAO;AAEX,UAAM,EAAE,MAAM;AACd,UAAM,QAAQ;AACd,UAAM,QAAQ,YAAiB,OAAO;AACtC,UAAM,QAAQ;AACd,UAAM,SAAS,IAAI,YAAiB;AAAA,MAClC,OAAO,MAAM;AAAA,MACb;AAAA,MACA,KAAK,MAAM;AAAA,MACX,YAAY,MAAM;AAAA;AAEpB,UAAM,SAAS;AAEf,UAAM,UAAU,SAAS,MAAO,OAAM,OAAO,KAAK,SAAS,IAAI,WAAW;AAK1E,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE,SAAc;AAClB,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE,SAAc,OAAO,QAAQ,OAAO;AAExC,UAAM,wBAAwB,SAAS,UAAU;AAEjD,UAAM,UAAU,YAAY;AAC5B,UAAM,UAAU;AAChB,UAAM,QAAQ;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAEF,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS;AAAA;AAAA;AAAA;;;;"}
|
|
@@ -77,10 +77,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
77
77
|
border: _ctx.border,
|
|
78
78
|
"default-sort": _ctx.defaultSort,
|
|
79
79
|
store: _ctx.store,
|
|
80
|
-
style:
|
|
81
|
-
|
|
82
|
-
})
|
|
83
|
-
}, null, 8, ["border", "default-sort", "store", "style"])
|
|
80
|
+
style: { "width": "100%" }
|
|
81
|
+
}, null, 8, ["border", "default-sort", "store"])
|
|
84
82
|
], 512)) : createCommentVNode("v-if", true),
|
|
85
83
|
createElementVNode("div", {
|
|
86
84
|
ref: "bodyWrapper",
|
|
@@ -95,10 +93,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
95
93
|
"row-style": _ctx.rowStyle,
|
|
96
94
|
store: _ctx.store,
|
|
97
95
|
stripe: _ctx.stripe,
|
|
98
|
-
style:
|
|
99
|
-
|
|
100
|
-
})
|
|
101
|
-
}, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "row-style", "store", "stripe", "style"]),
|
|
96
|
+
style: { "width": "100%" }
|
|
97
|
+
}, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "row-style", "store", "stripe"]),
|
|
102
98
|
_ctx.isEmpty ? (openBlock(), createElementBlock("div", {
|
|
103
99
|
key: 0,
|
|
104
100
|
ref: "emptyBlock",
|
package/es/packages/components/table/src/table.vue_vue&type=template&id=4a1660ad&lang.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.vue_vue&type=template&id=4a1660ad&lang.mjs","sources":["../../../../../../../packages/components/table/src/table.vue?vue&type=template&id=4a1660ad&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"[\n {\n 'el-table--fit': fit,\n 'el-table--striped': stripe,\n 'el-table--border': border || isGroup,\n 'el-table--hidden': isHidden,\n 'el-table--group': isGroup,\n 'el-table--fluid-height': maxHeight,\n 'el-table--scrollable-x': layout.scrollX.value,\n 'el-table--scrollable-y': layout.scrollY.value,\n 'el-table--enable-row-hover': !store.states.isComplex.value,\n 'el-table--enable-row-transition':\n (store.states.data.value || []).length !== 0 &&\n (store.states.data.value || []).length < 100,\n },\n tableSize ? `el-table--${tableSize}` : '',\n className,\n 'el-table',\n ]\"\n :style=\"style\"\n >\n <div ref=\"hiddenColumns\" class=\"hidden-columns\">\n <slot></slot>\n </div>\n <div v-if=\"showHeader\" ref=\"headerWrapper\" class=\"el-table__header-wrapper\">\n <table-header\n ref=\"tableHeader\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"{\n width: layout.bodyWidth.value ? layout.bodyWidth.value + 'px' : '',\n }\"\n />\n </div>\n <div ref=\"bodyWrapper\" :style=\"[bodyHeight]\" class=\"el-table__body-wrapper\">\n <table-body\n :context=\"context\"\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n />\n <div\n v-if=\"isEmpty\"\n ref=\"emptyBlock\"\n :style=\"emptyBlockStyle\"\n class=\"el-table__empty-block\"\n >\n <span class=\"el-table__empty-text\">\n <slot name=\"empty\">{{ emptyText || t('el.table.emptyText') }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.append\"\n ref=\"appendWrapper\"\n class=\"el-table__append-wrapper\"\n >\n <slot name=\"append\"></slot>\n </div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"footerWrapper\"\n class=\"el-table__footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"{\n width: layout.bodyWidth.value ? layout.bodyWidth.value + 'px' : '',\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n />\n </div>\n <div\n v-if=\"store.states.fixedColumns.value.length > 0\"\n ref=\"fixedWrapper\"\n :style=\"[\n {\n width: layout.fixedWidth.value ? layout.fixedWidth.value + 'px' : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"fixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"fixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n />\n </div>\n <div\n ref=\"fixedBodyWrapper\"\n :style=\"[\n {\n top: layout.headerHeight.value + 'px',\n },\n fixedBodyHeight,\n ]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"fixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"left\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedWrapper\"\n :style=\"[\n {\n width: layout.rightFixedWidth.value\n ? layout.rightFixedWidth.value + 'px'\n : '',\n right: layout.scrollY.value\n ? (border ? layout.gutterWidth : layout.gutterWidth || 0) + 'px'\n : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed-right\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"rightFixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"rightFixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n />\n </div>\n <div\n ref=\"rightFixedBodyWrapper\"\n :style=\"[{ top: layout.headerHeight.value + 'px' }, fixedBodyHeight]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"rightFixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"right\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedPatch\"\n :style=\"{\n width: layout.scrollY.value ? layout.gutterWidth + 'px' : '0',\n height: layout.headerHeight.value + 'px',\n }\"\n class=\"el-table__fixed-right-patch\"\n ></div>\n <div\n v-show=\"resizeProxyVisible\"\n ref=\"resizeProxy\"\n class=\"el-table__column-resize-proxy\"\n ></div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, getCurrentInstance, computed } from 'vue'\nimport debounce from 'lodash/debounce'\nimport { useLocaleInject } from '@element-ps/hooks'\nimport { createStore } from './store/helper'\nimport TableLayout from './table-layout'\nimport TableHeader from './table-header'\nimport TableBody from './table-body'\nimport TableFooter from './table-footer'\nimport useUtils from './table/utils-helper'\nimport useStyle from './table/style-helper'\nimport defaultProps from './table/defaults'\n\nimport type { Table } from './table/defaults'\n\nlet tableIdSeed = 1\nexport default defineComponent({\n name: 'PsTable',\n components: {\n TableHeader,\n TableBody,\n TableFooter,\n },\n props: defaultProps,\n setup(props) {\n type Row = typeof props.data[number]\n const { t } = useLocaleInject()\n const table = getCurrentInstance() as Table<Row>\n const store = createStore<Row>(table, props)\n table.store = store\n const layout = new TableLayout<Row>({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader,\n })\n table.layout = layout\n\n const isEmpty = computed(() => (store.states.data.value || []).length === 0)\n\n /**\n * open functions\n */\n const {\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n } = useUtils<Row>(store)\n const {\n isHidden,\n renderExpanded,\n isGroup,\n tableSize,\n bodyHeight,\n emptyBlockStyle,\n fixedHeight,\n fixedBodyHeight,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n } = useStyle<Row>(props, layout, store, table)\n\n const debouncedUpdateLayout = debounce(doLayout, 50)\n\n const tableId = `el-table_${tableIdSeed++}`\n table.tableId = tableId\n table.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout,\n }\n return {\n layout,\n store,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n bodyHeight,\n emptyBlockStyle,\n debouncedUpdateLayout,\n fixedHeight,\n fixedBodyHeight,\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n doLayout,\n sort,\n t,\n context: table,\n }\n },\n})\n</script>\n"],"names":["_createElementBlock","_createElementVNode","_renderSlot","_createVNode"],"mappings":";;;EAuBS,KAAI;AAAA,EAAgB,OAAM;AAAA;;;EAGR,KAAI;AAAA,EAAgB,OAAM;AAAA;qBA8BvC,OAAM;;;EAMZ,KAAI;AAAA,EACJ,OAAM;AAAA;;;EAQR,KAAI;AAAA,EACJ,OAAM;AAAA;;;EA0BJ,KAAI;AAAA,EACJ,OAAM;AAAA;;;EA2CN,KAAI;AAAA,EACJ,OAAM;AAAA;;;EAgCN,KAAI;AAAA,EACJ,OAAM;AAAA;;;EAsCN,KAAI;AAAA,EACJ,OAAM;AAAA;;EAyBR,KAAI;AAAA,EACJ,OAAM;AAAA;;;;;sBAhPVA;IACG;;;;;;;;;;;;;;;;;IAmBA,sBAAO;;IAERC,0BAAA;MACEC;;IAES,gCAAXF,0BAAA;MACEG;QACE,KAAI;AAAA,QACH,QAAQ;QACR,gBAAc;QACd,OAAO;QACP;;;;;IAKLF;MAAK,KAAI;AAAA,MAAe,uBAAQ;MAAa,OAAM;AAAA;MACjDE;QACG,SAAS;QACT,WAAW;QACX,kBAAgB;QAChB,kBAAgB;QAChB,aAAW;QACX,OAAO;QACP,QAAQ;QACR;;;;MAKK,6BADRH;;QAEE,KAAI;AAAA,QACH,sBAAO;QACR,OAAM;AAAA;QAENC,2BAAA;UACEC,qCAAA;4CAAsB,kBAAa;;;;MAI/B,YAAO,uBADfF,0BAAA;QAKEE;;;IAII,gDADRF,0BAAA;MAMEG;QACG,QAAQ;QACR,gBAAc;QACd,OAAO;QACP;;;QAGA,YAAU,gBAAW;QACrB,kBAAgB;;;eAZV;;IAgBH,WAAM,OAAO,aAAa,MAAM,2BADxCH;;MAEE,KAAI;AAAA,MACH;;;;;;MAMD,OAAM;AAAA;MAGE,gCADRA,0BAAA;QAKEG;UACE,KAAI;AAAA,UACH,QAAQ;UACR,OAAO;UACP;;;UAGD,OAAM;AAAA;;MAGVF;QACE,KAAI;AAAA,QACH;;;;;;QAMD,OAAM;AAAA;QAENE;UACG,WAAW;UACX,kBAAgB;UAChB,kBAAgB;UAChB,aAAW;UACX,OAAO;UACP,QAAQ;UACR;;;UAGD,OAAM;AAAA;QAGA,YAAO,uBADfH;;UAEG,gCAAiB,YAAO,aAAa;UACtC,OAAM;AAAA;;MAIF,gDADRA,0BAAA;QAMEG;UACG,QAAQ;UACR,OAAO;UACP;;;UAGA,YAAU,gBAAW;UACrB,kBAAgB;UACjB,OAAM;AAAA;;iBAZC;;;IAiBL,WAAM,OAAO,kBAAkB,MAAM,2BAD7CH;;MAEE,KAAI;AAAA,MACH;;;;;;;MAWD,OAAM;AAAA;MAGE,gCADRA,0BAAA;QAKEG;UACE,KAAI;AAAA,UACH,QAAQ;UACR,OAAO;UACP;;;UAGD,OAAM;AAAA;;MAGVF;QACE,KAAI;AAAA,QACH,8BAAe,YAAO,aAAa,gBAAgB;QACpD,OAAM;AAAA;QAENE;UACG,WAAW;UACX,kBAAgB;UAChB,kBAAgB;UAChB,aAAW;UACX,OAAO;UACP,QAAQ;UACR;;;UAGD,OAAM;AAAA;QAGA,YAAO,uBADfH;;UAEG,gCAAiB,YAAO,aAAa;UACtC,OAAM;AAAA;;MAIF,gDADRA,0BAAA;QAMEG;UACG,QAAQ;UACR,OAAO;UACP;;;UAGA,YAAU,gBAAW;UACrB,kBAAgB;UACjB,OAAM;AAAA;;iBAZC;;;IAiBL,WAAM,OAAO,kBAAkB,MAAM,2BAD7CH;;MAEE,KAAI;AAAA,MACH;;;;MAID,OAAM;AAAA;mBAERC,0BAAA;cACU;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"table.vue_vue&type=template&id=4a1660ad&lang.mjs","sources":["../../../../../../../packages/components/table/src/table.vue?vue&type=template&id=4a1660ad&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"[\n {\n 'el-table--fit': fit,\n 'el-table--striped': stripe,\n 'el-table--border': border || isGroup,\n 'el-table--hidden': isHidden,\n 'el-table--group': isGroup,\n 'el-table--fluid-height': maxHeight,\n 'el-table--scrollable-x': layout.scrollX.value,\n 'el-table--scrollable-y': layout.scrollY.value,\n 'el-table--enable-row-hover': !store.states.isComplex.value,\n 'el-table--enable-row-transition':\n (store.states.data.value || []).length !== 0 &&\n (store.states.data.value || []).length < 100,\n },\n tableSize ? `el-table--${tableSize}` : '',\n className,\n 'el-table',\n ]\"\n :style=\"style\"\n >\n <div ref=\"hiddenColumns\" class=\"hidden-columns\">\n <slot></slot>\n </div>\n <div v-if=\"showHeader\" ref=\"headerWrapper\" class=\"el-table__header-wrapper\">\n <table-header\n ref=\"tableHeader\"\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n style=\"width: 100%\"\n />\n </div>\n <div ref=\"bodyWrapper\" :style=\"[bodyHeight]\" class=\"el-table__body-wrapper\">\n <table-body\n :context=\"context\"\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n style=\"width: 100%\"\n />\n <div\n v-if=\"isEmpty\"\n ref=\"emptyBlock\"\n :style=\"emptyBlockStyle\"\n class=\"el-table__empty-block\"\n >\n <span class=\"el-table__empty-text\">\n <slot name=\"empty\">{{ emptyText || t('el.table.emptyText') }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.append\"\n ref=\"appendWrapper\"\n class=\"el-table__append-wrapper\"\n >\n <slot name=\"append\"></slot>\n </div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"footerWrapper\"\n class=\"el-table__footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :default-sort=\"defaultSort\"\n :store=\"store\"\n :style=\"{\n width: layout.bodyWidth.value ? layout.bodyWidth.value + 'px' : '',\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n />\n </div>\n <div\n v-if=\"store.states.fixedColumns.value.length > 0\"\n ref=\"fixedWrapper\"\n :style=\"[\n {\n width: layout.fixedWidth.value ? layout.fixedWidth.value + 'px' : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"fixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"fixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n />\n </div>\n <div\n ref=\"fixedBodyWrapper\"\n :style=\"[\n {\n top: layout.headerHeight.value + 'px',\n },\n fixedBodyHeight,\n ]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"left\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"fixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"left\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedWrapper\"\n :style=\"[\n {\n width: layout.rightFixedWidth.value\n ? layout.rightFixedWidth.value + 'px'\n : '',\n right: layout.scrollY.value\n ? (border ? layout.gutterWidth : layout.gutterWidth || 0) + 'px'\n : '',\n },\n fixedHeight,\n ]\"\n class=\"el-table__fixed-right\"\n >\n <div\n v-if=\"showHeader\"\n ref=\"rightFixedHeaderWrapper\"\n class=\"el-table__fixed-header-wrapper\"\n >\n <table-header\n ref=\"rightFixedTableHeader\"\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n />\n </div>\n <div\n ref=\"rightFixedBodyWrapper\"\n :style=\"[{ top: layout.headerHeight.value + 'px' }, fixedBodyHeight]\"\n class=\"el-table__fixed-body-wrapper\"\n >\n <table-body\n :highlight=\"highlightCurrentRow\"\n :row-class-name=\"rowClassName\"\n :tooltip-effect=\"tooltipEffect\"\n :row-style=\"rowStyle\"\n :store=\"store\"\n :stripe=\"stripe\"\n :style=\"{\n width: bodyWidth,\n }\"\n fixed=\"right\"\n />\n <div\n v-if=\"$slots.append\"\n :style=\"{ height: layout.appendHeight.value + 'px' }\"\n class=\"el-table__append-gutter\"\n ></div>\n </div>\n <div\n v-if=\"showSummary\"\n v-show=\"!isEmpty\"\n ref=\"rightFixedFooterWrapper\"\n class=\"el-table__fixed-footer-wrapper\"\n >\n <table-footer\n :border=\"border\"\n :store=\"store\"\n :style=\"{\n width: bodyWidth,\n }\"\n :sum-text=\"sumText || t('el.table.sumText')\"\n :summary-method=\"summaryMethod\"\n fixed=\"right\"\n />\n </div>\n </div>\n <div\n v-if=\"store.states.rightFixedColumns.value.length > 0\"\n ref=\"rightFixedPatch\"\n :style=\"{\n width: layout.scrollY.value ? layout.gutterWidth + 'px' : '0',\n height: layout.headerHeight.value + 'px',\n }\"\n class=\"el-table__fixed-right-patch\"\n ></div>\n <div\n v-show=\"resizeProxyVisible\"\n ref=\"resizeProxy\"\n class=\"el-table__column-resize-proxy\"\n ></div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, getCurrentInstance, computed } from 'vue'\nimport debounce from 'lodash/debounce'\nimport { useLocaleInject } from '@element-ps/hooks'\nimport { createStore } from './store/helper'\nimport TableLayout from './table-layout'\nimport TableHeader from './table-header'\nimport TableBody from './table-body'\nimport TableFooter from './table-footer'\nimport useUtils from './table/utils-helper'\nimport useStyle from './table/style-helper'\nimport defaultProps from './table/defaults'\n\nimport type { Table } from './table/defaults'\n\nlet tableIdSeed = 1\nexport default defineComponent({\n name: 'PsTable',\n components: {\n TableHeader,\n TableBody,\n TableFooter,\n },\n props: defaultProps,\n setup(props) {\n type Row = typeof props.data[number]\n const { t } = useLocaleInject()\n const table = getCurrentInstance() as Table<Row>\n const store = createStore<Row>(table, props)\n table.store = store\n const layout = new TableLayout<Row>({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader,\n })\n table.layout = layout\n\n const isEmpty = computed(() => (store.states.data.value || []).length === 0)\n\n /**\n * open functions\n */\n const {\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort,\n } = useUtils<Row>(store)\n const {\n isHidden,\n renderExpanded,\n isGroup,\n tableSize,\n bodyHeight,\n emptyBlockStyle,\n fixedHeight,\n fixedBodyHeight,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n } = useStyle<Row>(props, layout, store, table)\n\n const debouncedUpdateLayout = debounce(doLayout, 50)\n\n const tableId = `el-table_${tableIdSeed++}`\n table.tableId = tableId\n table.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout,\n }\n return {\n layout,\n store,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n bodyHeight,\n emptyBlockStyle,\n debouncedUpdateLayout,\n fixedHeight,\n fixedBodyHeight,\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n doLayout,\n sort,\n t,\n context: table,\n }\n },\n})\n</script>\n"],"names":["_createElementBlock","_createElementVNode","_renderSlot","_createVNode"],"mappings":";;;EAuBS,KAAI;AAAA,EAAgB,OAAM;AAAA;;;EAGR,KAAI;AAAA,EAAgB,OAAM;AAAA;qBA0BvC,OAAM;;;EAMZ,KAAI;AAAA,EACJ,OAAM;AAAA;;;EAQR,KAAI;AAAA,EACJ,OAAM;AAAA;;;EA0BJ,KAAI;AAAA,EACJ,OAAM;AAAA;;;EA2CN,KAAI;AAAA,EACJ,OAAM;AAAA;;;EAgCN,KAAI;AAAA,EACJ,OAAM;AAAA;;;EAsCN,KAAI;AAAA,EACJ,OAAM;AAAA;;EAyBR,KAAI;AAAA,EACJ,OAAM;AAAA;;;;;sBA5OVA;IACG;;;;;;;;;;;;;;;;;IAmBA,sBAAO;;IAERC,0BAAA;MACEC;;IAES,gCAAXF,0BAAA;MACEG;QACE,KAAI;AAAA,QACH,QAAQ;QACR,gBAAc;QACd,OAAO;QACR,OAAA;;;IAGJF;MAAK,KAAI;AAAA,MAAe,uBAAQ;MAAa,OAAM;AAAA;MACjDE;QACG,SAAS;QACT,WAAW;QACX,kBAAgB;QAChB,kBAAgB;QAChB,aAAW;QACX,OAAO;QACP,QAAQ;QACT,OAAA;;MAGM,6BADRH;;QAEE,KAAI;AAAA,QACH,sBAAO;QACR,OAAM;AAAA;QAENC,2BAAA;UACEC,qCAAA;4CAAsB,kBAAa;;;;MAI/B,YAAO,uBADfF,0BAAA;QAKEE;;;IAII,gDADRF,0BAAA;MAMEG;QACG,QAAQ;QACR,gBAAc;QACd,OAAO;QACP;;;QAGA,YAAU,gBAAW;QACrB,kBAAgB;;;eAZV;;IAgBH,WAAM,OAAO,aAAa,MAAM,2BADxCH;;MAEE,KAAI;AAAA,MACH;;;;;;MAMD,OAAM;AAAA;MAGE,gCADRA,0BAAA;QAKEG;UACE,KAAI;AAAA,UACH,QAAQ;UACR,OAAO;UACP;;;UAGD,OAAM;AAAA;;MAGVF;QACE,KAAI;AAAA,QACH;;;;;;QAMD,OAAM;AAAA;QAENE;UACG,WAAW;UACX,kBAAgB;UAChB,kBAAgB;UAChB,aAAW;UACX,OAAO;UACP,QAAQ;UACR;;;UAGD,OAAM;AAAA;QAGA,YAAO,uBADfH;;UAEG,gCAAiB,YAAO,aAAa;UACtC,OAAM;AAAA;;MAIF,gDADRA,0BAAA;QAMEG;UACG,QAAQ;UACR,OAAO;UACP;;;UAGA,YAAU,gBAAW;UACrB,kBAAgB;UACjB,OAAM;AAAA;;iBAZC;;;IAiBL,WAAM,OAAO,kBAAkB,MAAM,2BAD7CH;;MAEE,KAAI;AAAA,MACH;;;;;;;MAWD,OAAM;AAAA;MAGE,gCADRA,0BAAA;QAKEG;UACE,KAAI;AAAA,UACH,QAAQ;UACR,OAAO;UACP;;;UAGD,OAAM;AAAA;;MAGVF;QACE,KAAI;AAAA,QACH,8BAAe,YAAO,aAAa,gBAAgB;QACpD,OAAM;AAAA;QAENE;UACG,WAAW;UACX,kBAAgB;UAChB,kBAAgB;UAChB,aAAW;UACX,OAAO;UACP,QAAQ;UACR;;;UAGD,OAAM;AAAA;QAGA,YAAO,uBADfH;;UAEG,gCAAiB,YAAO,aAAa;UACtC,OAAM;AAAA;;MAIF,gDADRA,0BAAA;QAMEG;UACG,QAAQ;UACR,OAAO;UACP;;;UAGA,YAAU,gBAAW;UACrB,kBAAgB;UACjB,OAAM;AAAA;;iBAZC;;;IAiBL,WAAM,OAAO,kBAAkB,MAAM,2BAD7CH;;MAEE,KAAI;AAAA,MACH;;;;MAID,OAAM;AAAA;mBAERC,0BAAA;cACU;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../../utils/with-install.mjs';
|
|
2
|
-
import './src/
|
|
3
|
-
export { tagProps } from './src/
|
|
2
|
+
import './src/tag2.mjs';
|
|
3
|
+
export { tagProps } from './src/tag.mjs';
|
|
4
4
|
import script from './src/tag.vue_vue&type=script&lang.mjs';
|
|
5
5
|
|
|
6
6
|
const PsTag = withInstall(script);
|
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { default } from './tag.vue_vue&type=script&lang.mjs';
|
|
3
|
-
import { render } from './tag.vue_vue&type=template&id=525996c5&lang.mjs';
|
|
1
|
+
import { buildProps } from '../../../utils/props.mjs';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const tagProps = buildProps({
|
|
4
|
+
closable: Boolean,
|
|
5
|
+
type: {
|
|
6
|
+
type: String,
|
|
7
|
+
values: ["success", "info", "warning", "danger", ""],
|
|
8
|
+
default: ""
|
|
9
|
+
},
|
|
10
|
+
hit: Boolean,
|
|
11
|
+
disableTransitions: Boolean,
|
|
12
|
+
color: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
type: String,
|
|
18
|
+
values: ["large", "medium", "small", "mini"]
|
|
19
|
+
},
|
|
20
|
+
effect: {
|
|
21
|
+
type: String,
|
|
22
|
+
values: ["dark", "light", "plain"],
|
|
23
|
+
default: "light"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export { tagProps };
|
|
7
28
|
//# sourceMappingURL=tag.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tag.mjs","sources":["../../../../../../../packages/components/tag/src/tag.ts"],"sourcesContent":["import { buildProps } from '@element-ps/utils/props'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const tagProps = buildProps({\n closable: Boolean,\n type: {\n type: String,\n values: ['success', 'info', 'warning', 'danger', ''],\n default: '',\n },\n hit: Boolean,\n disableTransitions: Boolean,\n color: {\n type: String,\n default: '',\n },\n size: {\n type: String,\n values: ['large', 'medium', 'small', 'mini'],\n },\n effect: {\n type: String,\n values: ['dark', 'light', 'plain'],\n default: 'light',\n },\n} as const)\nexport type TagProps = ExtractPropTypes<typeof tagProps>\n"],"names":[],"mappings":";;MAIa,WAAW,WAAW;AAAA,EACjC,UAAU;AAAA,EACV,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,CAAC,WAAW,QAAQ,WAAW,UAAU;AAAA,IACjD,SAAS;AAAA;AAAA,EAEX,KAAK;AAAA,EACL,oBAAoB;AAAA,EACpB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ,CAAC,SAAS,UAAU,SAAS;AAAA;AAAA,EAEvC,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,QAAQ,CAAC,QAAQ,SAAS;AAAA,IAC1B,SAAS;AAAA;AAAA;;;;"}
|
|
@@ -2,7 +2,7 @@ import { defineComponent, computed } from 'vue';
|
|
|
2
2
|
import { PsIcon } from '../../icon/index.mjs';
|
|
3
3
|
import { useGlobalConfig } from '../../../utils/util.mjs';
|
|
4
4
|
import { Close } from '@element-plus/icons';
|
|
5
|
-
import { tagProps } from './
|
|
5
|
+
import { tagProps } from './tag.mjs';
|
|
6
6
|
|
|
7
7
|
var script = defineComponent({
|
|
8
8
|
name: "PsTag",
|