@element-plus/nightly 0.0.20230625 → 0.0.20230627
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 +53 -42
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +53 -42
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +66 -43
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +43 -66
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +17 -103
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +103 -17
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +22 -68
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +21 -0
- package/es/components/pagination/src/components/sizes2.mjs +68 -22
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/select/index.d.ts +21 -0
- package/es/components/select/src/option.mjs +11 -9
- package/es/components/select/src/option.mjs.map +1 -1
- package/es/components/select/src/option.vue.d.ts +4 -0
- package/es/components/select/src/select.mjs +40 -31
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +13 -0
- package/es/components/time-select/index.d.ts +76 -0
- package/es/components/time-select/src/time-select.vue.d.ts +38 -0
- package/es/components/tree/src/model/useDragNode.mjs +1 -1
- package/es/components/tree/src/model/useDragNode.mjs.map +1 -1
- package/es/components/tree-select/src/tree-select-option.d.ts +24 -0
- package/es/index.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +66 -43
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +43 -66
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +18 -103
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +103 -18
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +22 -68
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +21 -0
- package/lib/components/pagination/src/components/sizes2.js +68 -22
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/select/index.d.ts +21 -0
- package/lib/components/select/src/option.js +10 -8
- package/lib/components/select/src/option.js.map +1 -1
- package/lib/components/select/src/option.vue.d.ts +4 -0
- package/lib/components/select/src/select.js +40 -31
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +13 -0
- package/lib/components/time-select/index.d.ts +76 -0
- package/lib/components/time-select/src/time-select.vue.d.ts +38 -0
- package/lib/components/tree/src/model/useDragNode.js +1 -1
- package/lib/components/tree/src/model/useDragNode.js.map +1 -1
- package/lib/components/tree-select/src/tree-select-option.d.ts +24 -0
- package/lib/index.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1,72 +1,49 @@
|
|
|
1
|
-
import { defineComponent, inject, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
|
|
2
1
|
import '../../../utils/index.mjs';
|
|
3
|
-
import '../../../
|
|
4
|
-
import '
|
|
5
|
-
import { colProps } from './col.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { rowContextKey } from '../../row/src/constants.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { isNumber } from '../../../utils/types.mjs';
|
|
10
|
-
import { isObject } from '@vue/shared';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
+
import { mutable } from '../../../utils/typescript.mjs';
|
|
11
4
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
classes.push(ns.is("guttered"));
|
|
53
|
-
}
|
|
54
|
-
return [ns.b(), classes];
|
|
55
|
-
});
|
|
56
|
-
return (_ctx, _cache) => {
|
|
57
|
-
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
58
|
-
class: normalizeClass(unref(colKls)),
|
|
59
|
-
style: normalizeStyle(unref(style))
|
|
60
|
-
}, {
|
|
61
|
-
default: withCtx(() => [
|
|
62
|
-
renderSlot(_ctx.$slots, "default")
|
|
63
|
-
]),
|
|
64
|
-
_: 3
|
|
65
|
-
}, 8, ["class", "style"]);
|
|
66
|
-
};
|
|
5
|
+
const colProps = buildProps({
|
|
6
|
+
tag: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "div"
|
|
9
|
+
},
|
|
10
|
+
span: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 24
|
|
13
|
+
},
|
|
14
|
+
offset: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 0
|
|
17
|
+
},
|
|
18
|
+
pull: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 0
|
|
21
|
+
},
|
|
22
|
+
push: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0
|
|
25
|
+
},
|
|
26
|
+
xs: {
|
|
27
|
+
type: definePropType([Number, Object]),
|
|
28
|
+
default: () => mutable({})
|
|
29
|
+
},
|
|
30
|
+
sm: {
|
|
31
|
+
type: definePropType([Number, Object]),
|
|
32
|
+
default: () => mutable({})
|
|
33
|
+
},
|
|
34
|
+
md: {
|
|
35
|
+
type: definePropType([Number, Object]),
|
|
36
|
+
default: () => mutable({})
|
|
37
|
+
},
|
|
38
|
+
lg: {
|
|
39
|
+
type: definePropType([Number, Object]),
|
|
40
|
+
default: () => mutable({})
|
|
41
|
+
},
|
|
42
|
+
xl: {
|
|
43
|
+
type: definePropType([Number, Object]),
|
|
44
|
+
default: () => mutable({})
|
|
67
45
|
}
|
|
68
46
|
});
|
|
69
|
-
var Col = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/col/src/col.vue"]]);
|
|
70
47
|
|
|
71
|
-
export {
|
|
48
|
+
export { colProps };
|
|
72
49
|
//# sourceMappingURL=col2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"col2.mjs","sources":["../../../../../../packages/components/col/src/col.
|
|
1
|
+
{"version":3,"file":"col2.mjs","sources":["../../../../../../packages/components/col/src/col.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Col from './col.vue'\n\nexport type ColSizeObject = {\n span?: number\n offset?: number\n pull?: number\n push?: number\n}\nexport type ColSize = number | ColSizeObject\n\nexport const colProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description number of column the grid spans\n */\n span: {\n type: Number,\n default: 24,\n },\n /**\n * @description number of spacing on the left side of the grid\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the left\n */\n pull: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the right\n */\n push: {\n type: Number,\n default: 0,\n },\n /**\n * @description `<768px` Responsive columns or column props object\n */\n xs: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥768px` Responsive columns or column props object\n */\n sm: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥992px` Responsive columns or column props object\n */\n md: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1200px` Responsive columns or column props object\n */\n lg: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1920px` Responsive columns or column props object\n */\n xl: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n} as const)\nexport type ColProps = ExtractPropTypes<typeof colProps>\nexport type ColInstance = InstanceType<typeof Col>\n"],"names":[],"mappings":";;;;AACY,MAAC,QAAQ,GAAG,UAAU,CAAC;AACnC,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,CAAC;;;;"}
|
package/es/components/index.mjs
CHANGED
|
@@ -98,7 +98,7 @@ export { checkTagEmits, checkTagProps } from './check-tag/src/check-tag.mjs';
|
|
|
98
98
|
export { checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group.mjs';
|
|
99
99
|
export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox.mjs';
|
|
100
100
|
export { checkboxGroupContextKey } from './checkbox/src/constants.mjs';
|
|
101
|
-
export { colProps } from './col/src/
|
|
101
|
+
export { colProps } from './col/src/col2.mjs';
|
|
102
102
|
export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
|
|
103
103
|
export { collapseItemProps } from './collapse/src/collapse-item.mjs';
|
|
104
104
|
export { collapseContextKey } from './collapse/src/constants.mjs';
|
|
@@ -135,7 +135,7 @@ export { menuItemEmits, menuItemProps } from './menu/src/menu-item.mjs';
|
|
|
135
135
|
export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
|
|
136
136
|
export { subMenuProps } from './menu/src/sub-menu.mjs';
|
|
137
137
|
export { overlayEmits, overlayProps } from './overlay/src/overlay.mjs';
|
|
138
|
-
export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-
|
|
138
|
+
export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-header.mjs';
|
|
139
139
|
export { paginationEmits, paginationProps } from './pagination/src/pagination.mjs';
|
|
140
140
|
export { elPaginationKey } from './pagination/src/constants.mjs';
|
|
141
141
|
export { popconfirmEmits, popconfirmProps } from './popconfirm/src/popconfirm.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import PageHeader from './src/page-
|
|
3
|
-
export { pageHeaderEmits, pageHeaderProps } from './src/page-
|
|
2
|
+
import PageHeader from './src/page-header2.mjs';
|
|
3
|
+
export { pageHeaderEmits, pageHeaderProps } from './src/page-header.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElPageHeader = withInstall(PageHeader);
|
|
@@ -1,108 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '../../../
|
|
5
|
-
import { pageHeaderProps, pageHeaderEmits } from './page-header2.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { Back } from '@element-plus/icons-vue';
|
|
3
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
9
5
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const slots = useSlots();
|
|
20
|
-
const { t } = useLocale();
|
|
21
|
-
const ns = useNamespace("page-header");
|
|
22
|
-
const kls = computed(() => {
|
|
23
|
-
return [
|
|
24
|
-
ns.b(),
|
|
25
|
-
{
|
|
26
|
-
[ns.m("has-breadcrumb")]: !!slots.breadcrumb,
|
|
27
|
-
[ns.m("has-extra")]: !!slots.extra,
|
|
28
|
-
[ns.is("contentful")]: !!slots.default
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
});
|
|
32
|
-
function handleClick() {
|
|
33
|
-
emit("back");
|
|
34
|
-
}
|
|
35
|
-
return (_ctx, _cache) => {
|
|
36
|
-
return openBlock(), createElementBlock("div", {
|
|
37
|
-
class: normalizeClass(unref(kls))
|
|
38
|
-
}, [
|
|
39
|
-
_ctx.$slots.breadcrumb ? (openBlock(), createElementBlock("div", {
|
|
40
|
-
key: 0,
|
|
41
|
-
class: normalizeClass(unref(ns).e("breadcrumb"))
|
|
42
|
-
}, [
|
|
43
|
-
renderSlot(_ctx.$slots, "breadcrumb")
|
|
44
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
45
|
-
createElementVNode("div", {
|
|
46
|
-
class: normalizeClass(unref(ns).e("header"))
|
|
47
|
-
}, [
|
|
48
|
-
createElementVNode("div", {
|
|
49
|
-
class: normalizeClass(unref(ns).e("left"))
|
|
50
|
-
}, [
|
|
51
|
-
createElementVNode("div", {
|
|
52
|
-
class: normalizeClass(unref(ns).e("back")),
|
|
53
|
-
role: "button",
|
|
54
|
-
tabindex: "0",
|
|
55
|
-
onClick: handleClick
|
|
56
|
-
}, [
|
|
57
|
-
_ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", {
|
|
58
|
-
key: 0,
|
|
59
|
-
"aria-label": _ctx.title || unref(t)("el.pageHeader.title"),
|
|
60
|
-
class: normalizeClass(unref(ns).e("icon"))
|
|
61
|
-
}, [
|
|
62
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
63
|
-
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
64
|
-
default: withCtx(() => [
|
|
65
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
})) : createCommentVNode("v-if", true)
|
|
69
|
-
])
|
|
70
|
-
], 10, _hoisted_1)) : createCommentVNode("v-if", true),
|
|
71
|
-
createElementVNode("div", {
|
|
72
|
-
class: normalizeClass(unref(ns).e("title"))
|
|
73
|
-
}, [
|
|
74
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
75
|
-
createTextVNode(toDisplayString(_ctx.title || unref(t)("el.pageHeader.title")), 1)
|
|
76
|
-
])
|
|
77
|
-
], 2)
|
|
78
|
-
], 2),
|
|
79
|
-
createVNode(unref(ElDivider), { direction: "vertical" }),
|
|
80
|
-
createElementVNode("div", {
|
|
81
|
-
class: normalizeClass(unref(ns).e("content"))
|
|
82
|
-
}, [
|
|
83
|
-
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
84
|
-
createTextVNode(toDisplayString(_ctx.content), 1)
|
|
85
|
-
])
|
|
86
|
-
], 2)
|
|
87
|
-
], 2),
|
|
88
|
-
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
|
89
|
-
key: 0,
|
|
90
|
-
class: normalizeClass(unref(ns).e("extra"))
|
|
91
|
-
}, [
|
|
92
|
-
renderSlot(_ctx.$slots, "extra")
|
|
93
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
94
|
-
], 2),
|
|
95
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
96
|
-
key: 1,
|
|
97
|
-
class: normalizeClass(unref(ns).e("main"))
|
|
98
|
-
}, [
|
|
99
|
-
renderSlot(_ctx.$slots, "default")
|
|
100
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
101
|
-
], 2);
|
|
102
|
-
};
|
|
6
|
+
const pageHeaderProps = buildProps({
|
|
7
|
+
icon: {
|
|
8
|
+
type: iconPropType,
|
|
9
|
+
default: () => Back
|
|
10
|
+
},
|
|
11
|
+
title: String,
|
|
12
|
+
content: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
103
15
|
}
|
|
104
16
|
});
|
|
105
|
-
|
|
17
|
+
const pageHeaderEmits = {
|
|
18
|
+
back: () => true
|
|
19
|
+
};
|
|
106
20
|
|
|
107
|
-
export {
|
|
21
|
+
export { pageHeaderEmits, pageHeaderProps };
|
|
108
22
|
//# sourceMappingURL=page-header.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header.mjs","sources":["../../../../../../packages/components/page-header/src/page-header.
|
|
1
|
+
{"version":3,"file":"page-header.mjs","sources":["../../../../../../packages/components/page-header/src/page-header.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport { Back } from '@element-plus/icons-vue'\nimport type { ExtractPropTypes } from 'vue'\nimport type PageHeader from './page-header.vue'\n\nexport const pageHeaderProps = buildProps({\n /**\n * @description icon component of page header\n */\n icon: {\n type: iconPropType,\n default: () => Back,\n },\n /**\n * @description main title of page header\n */\n title: String,\n /**\n * @description content of page header\n */\n content: {\n type: String,\n default: '',\n },\n} as const)\nexport type PageHeaderProps = ExtractPropTypes<typeof pageHeaderProps>\n\nexport const pageHeaderEmits = {\n back: () => true,\n}\nexport type PageHeaderEmits = typeof pageHeaderEmits\n\nexport type PageHeaderInstance = InstanceType<typeof PageHeader>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,MAAM,IAAI;AACvB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB;;;;"}
|
|
@@ -1,22 +1,108 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent, useSlots, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createCommentVNode, createElementVNode, createBlock, withCtx, resolveDynamicComponent, createTextVNode, toDisplayString, createVNode } from 'vue';
|
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
3
|
+
import { ElDivider } from '../../divider/index.mjs';
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import { pageHeaderProps, pageHeaderEmits } from './page-header.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
5
9
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
const _hoisted_1 = ["aria-label"];
|
|
11
|
+
const __default__ = defineComponent({
|
|
12
|
+
name: "ElPageHeader"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: pageHeaderProps,
|
|
17
|
+
emits: pageHeaderEmits,
|
|
18
|
+
setup(__props, { emit }) {
|
|
19
|
+
const slots = useSlots();
|
|
20
|
+
const { t } = useLocale();
|
|
21
|
+
const ns = useNamespace("page-header");
|
|
22
|
+
const kls = computed(() => {
|
|
23
|
+
return [
|
|
24
|
+
ns.b(),
|
|
25
|
+
{
|
|
26
|
+
[ns.m("has-breadcrumb")]: !!slots.breadcrumb,
|
|
27
|
+
[ns.m("has-extra")]: !!slots.extra,
|
|
28
|
+
[ns.is("contentful")]: !!slots.default
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
});
|
|
32
|
+
function handleClick() {
|
|
33
|
+
emit("back");
|
|
34
|
+
}
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return openBlock(), createElementBlock("div", {
|
|
37
|
+
class: normalizeClass(unref(kls))
|
|
38
|
+
}, [
|
|
39
|
+
_ctx.$slots.breadcrumb ? (openBlock(), createElementBlock("div", {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: normalizeClass(unref(ns).e("breadcrumb"))
|
|
42
|
+
}, [
|
|
43
|
+
renderSlot(_ctx.$slots, "breadcrumb")
|
|
44
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
45
|
+
createElementVNode("div", {
|
|
46
|
+
class: normalizeClass(unref(ns).e("header"))
|
|
47
|
+
}, [
|
|
48
|
+
createElementVNode("div", {
|
|
49
|
+
class: normalizeClass(unref(ns).e("left"))
|
|
50
|
+
}, [
|
|
51
|
+
createElementVNode("div", {
|
|
52
|
+
class: normalizeClass(unref(ns).e("back")),
|
|
53
|
+
role: "button",
|
|
54
|
+
tabindex: "0",
|
|
55
|
+
onClick: handleClick
|
|
56
|
+
}, [
|
|
57
|
+
_ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", {
|
|
58
|
+
key: 0,
|
|
59
|
+
"aria-label": _ctx.title || unref(t)("el.pageHeader.title"),
|
|
60
|
+
class: normalizeClass(unref(ns).e("icon"))
|
|
61
|
+
}, [
|
|
62
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
63
|
+
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
64
|
+
default: withCtx(() => [
|
|
65
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
})) : createCommentVNode("v-if", true)
|
|
69
|
+
])
|
|
70
|
+
], 10, _hoisted_1)) : createCommentVNode("v-if", true),
|
|
71
|
+
createElementVNode("div", {
|
|
72
|
+
class: normalizeClass(unref(ns).e("title"))
|
|
73
|
+
}, [
|
|
74
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
75
|
+
createTextVNode(toDisplayString(_ctx.title || unref(t)("el.pageHeader.title")), 1)
|
|
76
|
+
])
|
|
77
|
+
], 2)
|
|
78
|
+
], 2),
|
|
79
|
+
createVNode(unref(ElDivider), { direction: "vertical" }),
|
|
80
|
+
createElementVNode("div", {
|
|
81
|
+
class: normalizeClass(unref(ns).e("content"))
|
|
82
|
+
}, [
|
|
83
|
+
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
84
|
+
createTextVNode(toDisplayString(_ctx.content), 1)
|
|
85
|
+
])
|
|
86
|
+
], 2)
|
|
87
|
+
], 2),
|
|
88
|
+
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: normalizeClass(unref(ns).e("extra"))
|
|
91
|
+
}, [
|
|
92
|
+
renderSlot(_ctx.$slots, "extra")
|
|
93
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
94
|
+
], 2),
|
|
95
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
96
|
+
key: 1,
|
|
97
|
+
class: normalizeClass(unref(ns).e("main"))
|
|
98
|
+
}, [
|
|
99
|
+
renderSlot(_ctx.$slots, "default")
|
|
100
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
101
|
+
], 2);
|
|
102
|
+
};
|
|
15
103
|
}
|
|
16
104
|
});
|
|
17
|
-
|
|
18
|
-
back: () => true
|
|
19
|
-
};
|
|
105
|
+
var PageHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/page-header/src/page-header.vue"]]);
|
|
20
106
|
|
|
21
|
-
export {
|
|
107
|
+
export { PageHeader as default };
|
|
22
108
|
//# sourceMappingURL=page-header2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header2.mjs","sources":["../../../../../../packages/components/page-header/src/page-header.
|
|
1
|
+
{"version":3,"file":"page-header2.mjs","sources":["../../../../../../packages/components/page-header/src/page-header.vue"],"sourcesContent":["<template>\n <div :class=\"kls\">\n <div v-if=\"$slots.breadcrumb\" :class=\"ns.e('breadcrumb')\">\n <slot name=\"breadcrumb\" />\n </div>\n <div :class=\"ns.e('header')\">\n <div :class=\"ns.e('left')\">\n <div\n :class=\"ns.e('back')\"\n role=\"button\"\n tabindex=\"0\"\n @click=\"handleClick\"\n >\n <div\n v-if=\"icon || $slots.icon\"\n :aria-label=\"title || t('el.pageHeader.title')\"\n :class=\"ns.e('icon')\"\n >\n <slot name=\"icon\">\n <el-icon v-if=\"icon\">\n <component :is=\"icon\" />\n </el-icon>\n </slot>\n </div>\n <div :class=\"ns.e('title')\">\n <slot name=\"title\">{{ title || t('el.pageHeader.title') }}</slot>\n </div>\n </div>\n <el-divider direction=\"vertical\" />\n <div :class=\"ns.e('content')\">\n <slot name=\"content\">{{ content }}</slot>\n </div>\n </div>\n\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\" />\n </div>\n </div>\n\n <div v-if=\"$slots.default\" :class=\"ns.e('main')\">\n <slot />\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, useSlots } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ElDivider } from '@element-plus/components/divider'\n\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { pageHeaderEmits, pageHeaderProps } from './page-header'\n\ndefineOptions({\n name: 'ElPageHeader',\n})\n\ndefineProps(pageHeaderProps)\nconst emit = defineEmits(pageHeaderEmits)\nconst slots = useSlots()\n\nconst { t } = useLocale()\nconst ns = useNamespace('page-header')\nconst kls = computed(() => {\n return [\n ns.b(),\n {\n [ns.m('has-breadcrumb')]: !!slots.breadcrumb,\n [ns.m('has-extra')]: !!slots.extra,\n [ns.is('contentful')]: !!slots.default,\n },\n ]\n})\n\nfunction handleClick() {\n emit('back')\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;mCAoDc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,aAAa,CAAA,CAAA;AACrC,IAAM,MAAA,GAAA,GAAM,SAAS,MAAM;AACzB,MAAO,OAAA;AAAA,QACL,GAAG,CAAE,EAAA;AAAA,QACL;AAAA,UACE,CAAC,EAAG,CAAA,CAAA,CAAE,gBAAgB,CAAI,GAAA,CAAC,CAAC,KAAM,CAAA,UAAA;AAAA,UAClC,CAAC,EAAG,CAAA,CAAA,CAAE,WAAW,CAAI,GAAA,CAAC,CAAC,KAAM,CAAA,KAAA;AAAA,UAC7B,CAAC,EAAG,CAAA,EAAA,CAAG,YAAY,CAAI,GAAA,CAAC,CAAC,KAAM,CAAA,OAAA;AAAA,SACjC;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAuB,SAAA,WAAA,GAAA;AACrB,MAAA,IAAA,CAAK,MAAM,CAAA,CAAA;AAAA,KACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,73 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import '../../../../
|
|
5
|
-
import {
|
|
6
|
-
import { paginationSizesProps } from './sizes2.mjs';
|
|
7
|
-
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
-
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
|
|
9
|
-
import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../../utils/index.mjs';
|
|
2
|
+
import '../../../../constants/index.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { mutable } from '../../../../utils/typescript.mjs';
|
|
5
|
+
import { componentSizes } from '../../../../constants/size.mjs';
|
|
10
6
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (Array.isArray(newVal)) {
|
|
28
|
-
const pageSize = newVal.includes(props.pageSize) ? props.pageSize : props.pageSizes[0];
|
|
29
|
-
emit("page-size-change", pageSize);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
watch(() => props.pageSize, (newVal) => {
|
|
33
|
-
innerPageSize.value = newVal;
|
|
34
|
-
});
|
|
35
|
-
const innerPageSizes = computed(() => props.pageSizes);
|
|
36
|
-
function handleChange(val) {
|
|
37
|
-
var _a;
|
|
38
|
-
if (val !== innerPageSize.value) {
|
|
39
|
-
innerPageSize.value = val;
|
|
40
|
-
(_a = pagination.handleSizeChange) == null ? void 0 : _a.call(pagination, Number(val));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return (_ctx, _cache) => {
|
|
44
|
-
return openBlock(), createElementBlock("span", {
|
|
45
|
-
class: normalizeClass(unref(ns).e("sizes"))
|
|
46
|
-
}, [
|
|
47
|
-
createVNode(unref(ElSelect), {
|
|
48
|
-
"model-value": innerPageSize.value,
|
|
49
|
-
disabled: _ctx.disabled,
|
|
50
|
-
"popper-class": _ctx.popperClass,
|
|
51
|
-
size: _ctx.size,
|
|
52
|
-
"validate-event": false,
|
|
53
|
-
onChange: handleChange
|
|
54
|
-
}, {
|
|
55
|
-
default: withCtx(() => [
|
|
56
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(innerPageSizes), (item) => {
|
|
57
|
-
return openBlock(), createBlock(unref(ElOption), {
|
|
58
|
-
key: item,
|
|
59
|
-
value: item,
|
|
60
|
-
label: item + unref(t)("el.pagination.pagesize")
|
|
61
|
-
}, null, 8, ["value", "label"]);
|
|
62
|
-
}), 128))
|
|
63
|
-
]),
|
|
64
|
-
_: 1
|
|
65
|
-
}, 8, ["model-value", "disabled", "popper-class", "size"])
|
|
66
|
-
], 2);
|
|
67
|
-
};
|
|
7
|
+
const paginationSizesProps = buildProps({
|
|
8
|
+
pageSize: {
|
|
9
|
+
type: Number,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
pageSizes: {
|
|
13
|
+
type: definePropType(Array),
|
|
14
|
+
default: () => mutable([10, 20, 30, 40, 50, 100])
|
|
15
|
+
},
|
|
16
|
+
popperClass: {
|
|
17
|
+
type: String
|
|
18
|
+
},
|
|
19
|
+
disabled: Boolean,
|
|
20
|
+
size: {
|
|
21
|
+
type: String,
|
|
22
|
+
values: componentSizes
|
|
68
23
|
}
|
|
69
24
|
});
|
|
70
|
-
var Sizes = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/sizes.vue"]]);
|
|
71
25
|
|
|
72
|
-
export {
|
|
26
|
+
export { paginationSizesProps };
|
|
73
27
|
//# sourceMappingURL=sizes.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sizes.mjs","sources":["../../../../../../../packages/components/pagination/src/components/sizes.
|
|
1
|
+
{"version":3,"file":"sizes.mjs","sources":["../../../../../../../packages/components/pagination/src/components/sizes.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type Sizes from './sizes.vue'\n\nexport const paginationSizesProps = buildProps({\n pageSize: {\n type: Number,\n required: true,\n },\n pageSizes: {\n type: definePropType<number[]>(Array),\n default: () => mutable([10, 20, 30, 40, 50, 100] as const),\n },\n popperClass: {\n type: String,\n },\n disabled: Boolean,\n size: {\n type: String,\n values: componentSizes,\n },\n} as const)\n\nexport type PaginationSizesProps = ExtractPropTypes<typeof paginationSizesProps>\n\nexport type SizesInstance = InstanceType<typeof Sizes>\n"],"names":[],"mappings":";;;;;;AAEY,MAAC,oBAAoB,GAAG,UAAU,CAAC;AAC/C,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;AACrD,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,cAAc;AAC1B,GAAG;AACH,CAAC;;;;"}
|