@element-plus/nightly 0.0.20220718 → 0.0.20220721
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 +322 -322
- package/dist/index.full.min.js +14 -14
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +321 -322
- 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/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/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +67 -32
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +32 -67
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-date-table.mjs +21 -8
- package/es/components/date-picker/src/date-picker-com/basic-date-table.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +5 -2
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +5 -2
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +5 -2
- package/es/components/date-picker/src/panel-utils.d.ts +10 -4
- package/es/components/descriptions/index.d.ts +82 -54
- package/es/components/descriptions/index.mjs +2 -1
- package/es/components/descriptions/index.mjs.map +1 -1
- package/es/components/descriptions/src/description.d.ts +15 -0
- package/es/components/descriptions/src/description.mjs +32 -0
- package/es/components/descriptions/src/description.mjs.map +1 -0
- package/es/components/descriptions/src/description.vue.d.ts +106 -0
- package/es/components/descriptions/src/description2.mjs +127 -0
- package/es/components/descriptions/src/description2.mjs.map +1 -0
- package/es/components/descriptions/src/descriptions-cell.mjs +4 -4
- package/es/components/descriptions/src/descriptions-cell.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row.d.ts +3 -0
- package/es/components/descriptions/src/descriptions-row.mjs +7 -71
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row.vue.d.ts +28 -7
- package/es/components/descriptions/src/descriptions-row2.mjs +69 -0
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -0
- package/es/components/descriptions/src/token.d.ts +1 -1
- package/es/components/descriptions/src/token.mjs +2 -2
- package/es/components/descriptions/src/token.mjs.map +1 -1
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/index.mjs +3 -2
- package/es/components/index.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +3 -3
- package/es/components/menu/src/menu.mjs +16 -8
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +2 -1
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/select/src/option.mjs +4 -4
- package/es/components/select/src/option.mjs.map +1 -1
- package/es/components/table/src/table-header/event-helper.mjs +5 -9
- package/es/components/table/src/table-header/event-helper.mjs.map +1 -1
- package/es/components/table/src/util.d.ts +1 -1
- package/es/components/table/src/util.mjs +2 -8
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs +3 -3
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +43 -70
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +70 -43
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/upload/src/use-handlers.mjs +1 -1
- package/es/components/upload/src/use-handlers.mjs.map +1 -1
- package/es/directives/repeat-click/index.d.ts +2 -2
- package/es/directives/repeat-click/index.mjs +13 -13
- package/es/directives/repeat-click/index.mjs.map +1 -1
- package/es/index.mjs +3 -2
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +67 -33
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +33 -67
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.js +21 -8
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +5 -2
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +5 -2
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +5 -2
- package/lib/components/date-picker/src/panel-utils.d.ts +10 -4
- package/lib/components/descriptions/index.d.ts +82 -54
- package/lib/components/descriptions/index.js +4 -2
- package/lib/components/descriptions/index.js.map +1 -1
- package/lib/components/descriptions/src/description.d.ts +15 -0
- package/lib/components/descriptions/src/description.js +36 -0
- package/lib/components/descriptions/src/description.js.map +1 -0
- package/lib/components/descriptions/src/description.vue.d.ts +106 -0
- package/lib/components/descriptions/src/description2.js +131 -0
- package/lib/components/descriptions/src/description2.js.map +1 -0
- package/lib/components/descriptions/src/descriptions-cell.js +3 -3
- package/lib/components/descriptions/src/descriptions-cell.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row.d.ts +3 -0
- package/lib/components/descriptions/src/descriptions-row.js +7 -71
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row.vue.d.ts +28 -7
- package/lib/components/descriptions/src/descriptions-row2.js +73 -0
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -0
- package/lib/components/descriptions/src/token.d.ts +1 -1
- package/lib/components/descriptions/src/token.js +2 -2
- package/lib/components/descriptions/src/token.js.map +1 -1
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/index.js +4 -2
- package/lib/components/index.js.map +1 -1
- package/lib/components/menu/src/menu.js +17 -9
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/rate/src/rate2.js +2 -1
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/select/src/option.js +4 -4
- package/lib/components/select/src/option.js.map +1 -1
- package/lib/components/table/src/table-header/event-helper.js +5 -9
- package/lib/components/table/src/table-header/event-helper.js.map +1 -1
- package/lib/components/table/src/util.d.ts +1 -1
- package/lib/components/table/src/util.js +2 -8
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +43 -70
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +70 -43
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/upload/src/use-handlers.js +1 -1
- package/lib/components/upload/src/use-handlers.js.map +1 -1
- package/lib/directives/repeat-click/index.d.ts +2 -2
- package/lib/directives/repeat-click/index.js +13 -13
- package/lib/directives/repeat-click/index.js.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- 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
- package/es/components/descriptions/src/index.mjs +0 -160
- package/es/components/descriptions/src/index.mjs.map +0 -1
- package/es/components/descriptions/src/index.vue.d.ts +0 -80
- package/lib/components/descriptions/src/index.js +0 -164
- package/lib/components/descriptions/src/index.js.map +0 -1
- package/lib/components/descriptions/src/index.vue.d.ts +0 -80
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var descriptionsRow = require('./descriptions-row2.js');
|
|
8
|
+
var token = require('./token.js');
|
|
9
|
+
var description = require('./description.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
|
+
var index$1 = require('../../../hooks/use-common-props/index.js');
|
|
13
|
+
|
|
14
|
+
const __default__ = {
|
|
15
|
+
name: "ElDescriptions"
|
|
16
|
+
};
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: description.descriptionProps,
|
|
20
|
+
setup(__props) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const ns = index.useNamespace("descriptions");
|
|
23
|
+
const descriptionsSize = index$1.useSize();
|
|
24
|
+
const slots = vue.useSlots();
|
|
25
|
+
vue.provide(token.descriptionsKey, props);
|
|
26
|
+
const descriptionKls = vue.computed(() => [ns.b(), ns.m(descriptionsSize.value)]);
|
|
27
|
+
const flattedChildren = (children) => {
|
|
28
|
+
const temp = Array.isArray(children) ? children : [children];
|
|
29
|
+
const res = [];
|
|
30
|
+
temp.forEach((child) => {
|
|
31
|
+
if (Array.isArray(child.children)) {
|
|
32
|
+
res.push(...flattedChildren(child.children));
|
|
33
|
+
} else {
|
|
34
|
+
res.push(child);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return res;
|
|
38
|
+
};
|
|
39
|
+
const filledNode = (node, span, count, isLast = false) => {
|
|
40
|
+
if (!node.props) {
|
|
41
|
+
node.props = {};
|
|
42
|
+
}
|
|
43
|
+
if (span > count) {
|
|
44
|
+
node.props.span = count;
|
|
45
|
+
}
|
|
46
|
+
if (isLast) {
|
|
47
|
+
node.props.span = span;
|
|
48
|
+
}
|
|
49
|
+
return node;
|
|
50
|
+
};
|
|
51
|
+
const getRows = () => {
|
|
52
|
+
var _a;
|
|
53
|
+
const children = flattedChildren((_a = slots.default) == null ? void 0 : _a.call(slots)).filter((node) => {
|
|
54
|
+
var _a2;
|
|
55
|
+
return ((_a2 = node == null ? void 0 : node.type) == null ? void 0 : _a2.name) === "ElDescriptionsItem";
|
|
56
|
+
});
|
|
57
|
+
const rows = [];
|
|
58
|
+
let temp = [];
|
|
59
|
+
let count = props.column;
|
|
60
|
+
let totalSpan = 0;
|
|
61
|
+
children.forEach((node, index) => {
|
|
62
|
+
var _a2;
|
|
63
|
+
const span = ((_a2 = node.props) == null ? void 0 : _a2.span) || 1;
|
|
64
|
+
if (index < children.length - 1) {
|
|
65
|
+
totalSpan += span > count ? count : span;
|
|
66
|
+
}
|
|
67
|
+
if (index === children.length - 1) {
|
|
68
|
+
const lastSpan = props.column - totalSpan % props.column;
|
|
69
|
+
temp.push(filledNode(node, lastSpan, count, true));
|
|
70
|
+
rows.push(temp);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (span < count) {
|
|
74
|
+
count -= span;
|
|
75
|
+
temp.push(node);
|
|
76
|
+
} else {
|
|
77
|
+
temp.push(filledNode(node, span, count));
|
|
78
|
+
rows.push(temp);
|
|
79
|
+
count = props.column;
|
|
80
|
+
temp = [];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
return rows;
|
|
84
|
+
};
|
|
85
|
+
return (_ctx, _cache) => {
|
|
86
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
87
|
+
class: vue.normalizeClass(vue.unref(descriptionKls))
|
|
88
|
+
}, [
|
|
89
|
+
_ctx.title || _ctx.extra || _ctx.$slots.title || _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
90
|
+
key: 0,
|
|
91
|
+
class: vue.normalizeClass(vue.unref(ns).e("header"))
|
|
92
|
+
}, [
|
|
93
|
+
vue.createElementVNode("div", {
|
|
94
|
+
class: vue.normalizeClass(vue.unref(ns).e("title"))
|
|
95
|
+
}, [
|
|
96
|
+
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
97
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
98
|
+
])
|
|
99
|
+
], 2),
|
|
100
|
+
vue.createElementVNode("div", {
|
|
101
|
+
class: vue.normalizeClass(vue.unref(ns).e("extra"))
|
|
102
|
+
}, [
|
|
103
|
+
vue.renderSlot(_ctx.$slots, "extra", {}, () => [
|
|
104
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.extra), 1)
|
|
105
|
+
])
|
|
106
|
+
], 2)
|
|
107
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
108
|
+
vue.createElementVNode("div", {
|
|
109
|
+
class: vue.normalizeClass(vue.unref(ns).e("body"))
|
|
110
|
+
}, [
|
|
111
|
+
vue.createElementVNode("table", {
|
|
112
|
+
class: vue.normalizeClass([vue.unref(ns).e("table"), vue.unref(ns).is("bordered", _ctx.border)])
|
|
113
|
+
}, [
|
|
114
|
+
vue.createElementVNode("tbody", null, [
|
|
115
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(getRows(), (row, index) => {
|
|
116
|
+
return vue.openBlock(), vue.createBlock(descriptionsRow["default"], {
|
|
117
|
+
key: index,
|
|
118
|
+
row
|
|
119
|
+
}, null, 8, ["row"]);
|
|
120
|
+
}), 128))
|
|
121
|
+
])
|
|
122
|
+
], 2)
|
|
123
|
+
], 2)
|
|
124
|
+
], 2);
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
var Descriptions = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/description.vue"]]);
|
|
129
|
+
|
|
130
|
+
exports["default"] = Descriptions;
|
|
131
|
+
//# sourceMappingURL=description2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description2.js","sources":["../../../../../../packages/components/descriptions/src/description.vue"],"sourcesContent":["<template>\n <div :class=\"descriptionKls\">\n <div\n v-if=\"title || extra || $slots.title || $slots.extra\"\n :class=\"ns.e('header')\"\n >\n <div :class=\"ns.e('title')\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div :class=\"ns.e('extra')\">\n <slot name=\"extra\">{{ extra }}</slot>\n </div>\n </div>\n\n <div :class=\"ns.e('body')\">\n <table :class=\"[ns.e('table'), ns.is('bordered', border)]\">\n <tbody>\n <template v-for=\"(row, index) in getRows()\" :key=\"index\">\n <el-descriptions-row :row=\"row\" />\n </template>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n// @ts-nocheck\nimport { computed, provide, useSlots } from 'vue'\nimport { useNamespace, useSize } from '@element-plus/hooks'\nimport ElDescriptionsRow from './descriptions-row.vue'\nimport { descriptionsKey } from './token'\nimport { descriptionProps } from './description'\n\ndefineOptions({\n name: 'ElDescriptions',\n})\n\nconst props = defineProps(descriptionProps)\n\nconst ns = useNamespace('descriptions')\n\nconst descriptionsSize = useSize()\n\nconst slots = useSlots()\n\nprovide(descriptionsKey, props)\n\nconst descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)])\n\nconst flattedChildren = (children) => {\n const temp = Array.isArray(children) ? children : [children]\n const res = []\n temp.forEach((child) => {\n if (Array.isArray(child.children)) {\n res.push(...flattedChildren(child.children))\n } else {\n res.push(child)\n }\n })\n return res\n}\n\nconst filledNode = (node, span, count, isLast = false) => {\n if (!node.props) {\n node.props = {}\n }\n if (span > count) {\n node.props.span = count\n }\n if (isLast) {\n // set the last span\n node.props.span = span\n }\n return node\n}\n\nconst getRows = () => {\n const children = flattedChildren(slots.default?.()).filter(\n (node) => node?.type?.name === 'ElDescriptionsItem'\n )\n const rows = []\n let temp = []\n let count = props.column\n let totalSpan = 0 // all spans number of item\n\n children.forEach((node, index) => {\n const span = node.props?.span || 1\n\n if (index < children.length - 1) {\n totalSpan += span > count ? count : span\n }\n\n if (index === children.length - 1) {\n // calculate the last item span\n const lastSpan = props.column - (totalSpan % props.column)\n temp.push(filledNode(node, lastSpan, count, true))\n rows.push(temp)\n return\n }\n\n if (span < count) {\n count -= span\n temp.push(node)\n } else {\n temp.push(filledNode(node, span, count))\n rows.push(temp)\n count = props.column\n temp = []\n }\n })\n\n return rows\n}\n</script>\n"],"names":["useNamespace","useSize","useSlots","provide","descriptionsKey","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCA,IAAA,MAAA,EAAA,GAAAA,mBAAA,cAAA,CAAA,CAAA;AAEA,IAAA,MAAA,mBAAAC,eAAA,EAAA,CAAA;AAEA,IAAA,MAAA,QAAAC,YAAA,EAAA,CAAA;AAEA,IAAAC,WAAA,CAAAC,uBAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAA,cAAA,GAAAC,YAAA,CAAA,MAAA,CAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,CAAA,gBAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AAEA,IAAA,MAAA,eAAA,GAAA,CAAA,QAAA,KAAA;AACA,MAAA,MAAA,OAAA,KAAA,CAAA,OAAA,CAAA,QAAA,CAAA,GAAA,QAAA,GAAA,CAAA,QAAA,CAAA,CAAA;AACA,MAAA,MAAA,MAAA,EAAA,CAAA;AACA,MAAA,IAAA,CAAA,OAAA,CAAA,CAAA,KA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10,7 @@ var vnode = require('../../../utils/vue/vnode.js');
|
|
|
10
10
|
var style = require('../../../utils/dom/style.js');
|
|
11
11
|
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var ElDescriptionsCell = vue.defineComponent({
|
|
14
14
|
name: "ElDescriptionsCell",
|
|
15
15
|
props: {
|
|
16
16
|
cell: {
|
|
@@ -24,7 +24,7 @@ var DescriptionsCell = vue.defineComponent({
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
setup() {
|
|
27
|
-
const descriptions = vue.inject(token.
|
|
27
|
+
const descriptions = vue.inject(token.descriptionsKey, {});
|
|
28
28
|
return {
|
|
29
29
|
descriptions
|
|
30
30
|
};
|
|
@@ -90,5 +90,5 @@ var DescriptionsCell = vue.defineComponent({
|
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
exports["default"] =
|
|
93
|
+
exports["default"] = ElDescriptionsCell;
|
|
94
94
|
//# sourceMappingURL=descriptions-cell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptions-cell.js","sources":["../../../../../../packages/components/descriptions/src/descriptions-cell.ts"],"sourcesContent":["// @ts-nocheck\nimport { defineComponent, h, inject } from 'vue'\nimport { addUnit, getNormalizedProps } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport {
|
|
1
|
+
{"version":3,"file":"descriptions-cell.js","sources":["../../../../../../packages/components/descriptions/src/descriptions-cell.ts"],"sourcesContent":["// @ts-nocheck\nimport { defineComponent, h, inject } from 'vue'\nimport { addUnit, getNormalizedProps } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { descriptionsKey } from './token'\n\nimport type { VNode } from 'vue'\nimport type {\n IDescriptionsInject,\n IDescriptionsItemInject,\n} from './descriptions.type'\n\nexport default defineComponent({\n name: 'ElDescriptionsCell',\n props: {\n cell: {\n type: Object,\n },\n tag: {\n type: String,\n },\n type: {\n type: String,\n },\n },\n setup() {\n const descriptions = inject(descriptionsKey, {} as IDescriptionsInject)\n\n return {\n descriptions,\n }\n },\n render() {\n const item = getNormalizedProps(\n this.cell as VNode\n ) as IDescriptionsItemInject\n\n const { border, direction } = this.descriptions\n const isVertical = direction === 'vertical'\n const label = this.cell?.children?.label?.() || item.label\n const content = this.cell?.children?.default?.()\n const span = item.span\n const align = item.align ? `is-${item.align}` : ''\n const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : '' || align\n const className = item.className\n const labelClassName = item.labelClassName\n const style = {\n width: addUnit(item.width),\n minWidth: addUnit(item.minWidth),\n }\n const ns = useNamespace('descriptions')\n\n switch (this.type) {\n case 'label':\n return h(\n this.tag,\n {\n style,\n class: [\n ns.e('cell'),\n ns.e('label'),\n ns.is('bordered-label', border),\n ns.is('vertical-label', isVertical),\n labelAlign,\n labelClassName,\n ],\n colSpan: isVertical ? span : 1,\n },\n label\n )\n case 'content':\n return h(\n this.tag,\n {\n style,\n class: [\n ns.e('cell'),\n ns.e('content'),\n ns.is('bordered-content', border),\n ns.is('vertical-content', isVertical),\n align,\n className,\n ],\n colSpan: isVertical ? span : span * 2 - 1,\n },\n content\n )\n default:\n return h(\n 'td',\n {\n style,\n class: [ns.e('cell'), align],\n colSpan: span,\n },\n [\n h(\n 'span',\n {\n class: [ns.e('label'), labelClassName],\n },\n label\n ),\n h(\n 'span',\n {\n class: [ns.e('content'), className],\n },\n content\n ),\n ]\n )\n }\n },\n})\n"],"names":["defineComponent","inject","descriptionsKey","getNormalizedProps","style","addUnit","useNamespace","h"],"mappings":";;;;;;;;;;;;AAIA,yBAAeA,mBAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,oBAAoB;AAC5B,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE;AACV,MAAM,IAAI,EAAE,MAAM;AAClB,KAAK;AACL,IAAI,GAAG,EAAE;AACT,MAAM,IAAI,EAAE,MAAM;AAClB,KAAK;AACL,IAAI,IAAI,EA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C,CAAC,CAAC,MAAM,CAAC;AACxB,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3B,YAAY,EAAE,CAAC,EAAE,CAAC,kBAAkB,EAAE,MAAM,CAAC;AAC7C,YAAY,EAAE,CAAC,EAAE,CAAC,kBAAkB,EAAE,UAAU,CAAC;AACjD,YAAY,KAAK;AACjB,YAAY,SAAS;AACrB,WAAW;AACX,UAAU,OAAO,EAAE,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC;AACnD,SAAS,EAAE,OAAO,CAAC,CAAC;AACpB,MAAM;AACN,QAAQ,OAAOG,KAAC,CAAC,IAAI,EAAE;AACvB,iBAAUH,OAAK;AACf,UAAU,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;AACtC,UAAU,OAAO,EAAE,IAAI;AACvB,SAAS,EAAE;AACX,UAAUG,KAAC,CAAC,MAAM,EAAE;AACpB,YAAY,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;AAClD,WAAW,EAAE,KAAK,CAAC;AACnB,UAAUA,KAAC,CAAC,MAAM,EAAE;AACpB,YAAY,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;AAC/C,WAAW,EAAE,OAAO,CAAC;AACrB,SAAS,CAAC,CAAC;AACX,KAAK;AACL,GAAG;AACH,CAAC,CAAC;;;;"}
|
|
@@ -2,79 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
var token = require('./token.js');
|
|
8
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
9
7
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
props: {
|
|
16
|
-
row: {
|
|
17
|
-
type: Array
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
setup() {
|
|
21
|
-
const descriptions = vue.inject(token.elDescriptionsKey, {});
|
|
22
|
-
return {
|
|
23
|
-
descriptions
|
|
24
|
-
};
|
|
8
|
+
const descriptionsRowProps = runtime.buildProps({
|
|
9
|
+
row: {
|
|
10
|
+
type: Array,
|
|
11
|
+
default: () => []
|
|
25
12
|
}
|
|
26
13
|
});
|
|
27
|
-
const _hoisted_1 = { key: 1 };
|
|
28
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
29
|
-
const _component_el_descriptions_cell = vue.resolveComponent("el-descriptions-cell");
|
|
30
|
-
return _ctx.descriptions.direction === "vertical" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
31
|
-
vue.createElementVNode("tr", null, [
|
|
32
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.row, (cell, index) => {
|
|
33
|
-
return vue.openBlock(), vue.createBlock(_component_el_descriptions_cell, {
|
|
34
|
-
key: `tr1-${index}`,
|
|
35
|
-
cell,
|
|
36
|
-
tag: "th",
|
|
37
|
-
type: "label"
|
|
38
|
-
}, null, 8, ["cell"]);
|
|
39
|
-
}), 128))
|
|
40
|
-
]),
|
|
41
|
-
vue.createElementVNode("tr", null, [
|
|
42
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.row, (cell, index) => {
|
|
43
|
-
return vue.openBlock(), vue.createBlock(_component_el_descriptions_cell, {
|
|
44
|
-
key: `tr2-${index}`,
|
|
45
|
-
cell,
|
|
46
|
-
tag: "td",
|
|
47
|
-
type: "content"
|
|
48
|
-
}, null, 8, ["cell"]);
|
|
49
|
-
}), 128))
|
|
50
|
-
])
|
|
51
|
-
], 64)) : (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1, [
|
|
52
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.row, (cell, index) => {
|
|
53
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
54
|
-
key: `tr3-${index}`
|
|
55
|
-
}, [
|
|
56
|
-
_ctx.descriptions.border ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
57
|
-
vue.createVNode(_component_el_descriptions_cell, {
|
|
58
|
-
cell,
|
|
59
|
-
tag: "td",
|
|
60
|
-
type: "label"
|
|
61
|
-
}, null, 8, ["cell"]),
|
|
62
|
-
vue.createVNode(_component_el_descriptions_cell, {
|
|
63
|
-
cell,
|
|
64
|
-
tag: "td",
|
|
65
|
-
type: "content"
|
|
66
|
-
}, null, 8, ["cell"])
|
|
67
|
-
], 64)) : (vue.openBlock(), vue.createBlock(_component_el_descriptions_cell, {
|
|
68
|
-
key: 1,
|
|
69
|
-
cell,
|
|
70
|
-
tag: "td",
|
|
71
|
-
type: "both"
|
|
72
|
-
}, null, 8, ["cell"]))
|
|
73
|
-
], 64);
|
|
74
|
-
}), 128))
|
|
75
|
-
]));
|
|
76
|
-
}
|
|
77
|
-
var DescriptionsRow = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/descriptions-row.vue"]]);
|
|
78
14
|
|
|
79
|
-
exports
|
|
15
|
+
exports.descriptionsRowProps = descriptionsRowProps;
|
|
80
16
|
//# sourceMappingURL=descriptions-row.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptions-row.js","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.
|
|
1
|
+
{"version":3,"file":"descriptions-row.js","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nexport const descriptionsRowProps = buildProps({\n row: {\n type: Array,\n default: () => [],\n },\n} as const)\n"],"names":["buildProps"],"mappings":";;;;;;;AACY,MAAC,oBAAoB,GAAGA,kBAAU,CAAC;AAC/C,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
import type { IDescriptionsInject } from './descriptions.type';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
row:
|
|
4
|
-
type: ArrayConstructor;
|
|
5
|
-
};
|
|
3
|
+
readonly row: import("../../../utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
6
4
|
}, {
|
|
7
5
|
descriptions: IDescriptionsInject;
|
|
6
|
+
ElDescriptionsCell: import("vue").DefineComponent<{
|
|
7
|
+
cell: {
|
|
8
|
+
type: ObjectConstructor;
|
|
9
|
+
};
|
|
10
|
+
tag: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
};
|
|
13
|
+
type: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
descriptions: IDescriptionsInject;
|
|
18
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
cell: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
};
|
|
22
|
+
tag: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
};
|
|
25
|
+
type: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
28
|
+
}>>, {}>;
|
|
8
29
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
-
row:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
30
|
+
readonly row: import("../../../utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
31
|
+
}>>, {
|
|
32
|
+
readonly row: unknown[];
|
|
33
|
+
}>;
|
|
13
34
|
export default _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var descriptionsCell = require('./descriptions-cell.js');
|
|
7
|
+
var token = require('./token.js');
|
|
8
|
+
var descriptionsRow = require('./descriptions-row.js');
|
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
+
|
|
11
|
+
const _hoisted_1 = { key: 1 };
|
|
12
|
+
const __default__ = {
|
|
13
|
+
name: "ElDescriptionsRow"
|
|
14
|
+
};
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
16
|
+
...__default__,
|
|
17
|
+
props: descriptionsRow.descriptionsRowProps,
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const descriptions = vue.inject(token.descriptionsKey, {});
|
|
20
|
+
return (_ctx, _cache) => {
|
|
21
|
+
return vue.unref(descriptions).direction === "vertical" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
22
|
+
vue.createElementVNode("tr", null, [
|
|
23
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.row, (cell, index) => {
|
|
24
|
+
return vue.openBlock(), vue.createBlock(vue.unref(descriptionsCell["default"]), {
|
|
25
|
+
key: `tr1-${index}`,
|
|
26
|
+
cell,
|
|
27
|
+
tag: "th",
|
|
28
|
+
type: "label"
|
|
29
|
+
}, null, 8, ["cell"]);
|
|
30
|
+
}), 128))
|
|
31
|
+
]),
|
|
32
|
+
vue.createElementVNode("tr", null, [
|
|
33
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.row, (cell, index) => {
|
|
34
|
+
return vue.openBlock(), vue.createBlock(vue.unref(descriptionsCell["default"]), {
|
|
35
|
+
key: `tr2-${index}`,
|
|
36
|
+
cell,
|
|
37
|
+
tag: "td",
|
|
38
|
+
type: "content"
|
|
39
|
+
}, null, 8, ["cell"]);
|
|
40
|
+
}), 128))
|
|
41
|
+
])
|
|
42
|
+
], 64)) : (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1, [
|
|
43
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.row, (cell, index) => {
|
|
44
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
45
|
+
key: `tr3-${index}`
|
|
46
|
+
}, [
|
|
47
|
+
vue.unref(descriptions).border ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
48
|
+
vue.createVNode(vue.unref(descriptionsCell["default"]), {
|
|
49
|
+
cell,
|
|
50
|
+
tag: "td",
|
|
51
|
+
type: "label"
|
|
52
|
+
}, null, 8, ["cell"]),
|
|
53
|
+
vue.createVNode(vue.unref(descriptionsCell["default"]), {
|
|
54
|
+
cell,
|
|
55
|
+
tag: "td",
|
|
56
|
+
type: "content"
|
|
57
|
+
}, null, 8, ["cell"])
|
|
58
|
+
], 64)) : (vue.openBlock(), vue.createBlock(vue.unref(descriptionsCell["default"]), {
|
|
59
|
+
key: 1,
|
|
60
|
+
cell,
|
|
61
|
+
tag: "td",
|
|
62
|
+
type: "both"
|
|
63
|
+
}, null, 8, ["cell"]))
|
|
64
|
+
], 64);
|
|
65
|
+
}), 128))
|
|
66
|
+
]));
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
var ElDescriptionsRow = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/descriptions-row.vue"]]);
|
|
71
|
+
|
|
72
|
+
exports["default"] = ElDescriptionsRow;
|
|
73
|
+
//# sourceMappingURL=descriptions-row2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptions-row2.js","sources":["../../../../../../packages/components/descriptions/src/descriptions-row.vue"],"sourcesContent":["<template>\n <template v-if=\"descriptions.direction === 'vertical'\">\n <tr>\n <template v-for=\"(cell, index) in row\" :key=\"`tr1-${index}`\">\n <el-descriptions-cell :cell=\"cell\" tag=\"th\" type=\"label\" />\n </template>\n </tr>\n <tr>\n <template v-for=\"(cell, index) in row\" :key=\"`tr2-${index}`\">\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"content\" />\n </template>\n </tr>\n </template>\n <tr v-else>\n <template v-for=\"(cell, index) in row\" :key=\"`tr3-${index}`\">\n <template v-if=\"descriptions.border\">\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"label\" />\n <el-descriptions-cell :cell=\"cell\" tag=\"td\" type=\"content\" />\n </template>\n <el-descriptions-cell v-else :cell=\"cell\" tag=\"td\" type=\"both\" />\n </template>\n </tr>\n</template>\n\n<script lang=\"ts\" setup>\n// @ts-nocheck\nimport { inject } from 'vue'\n\nimport ElDescriptionsCell from './descriptions-cell'\nimport { descriptionsKey } from './token'\nimport { descriptionsRowProps } from './descriptions-row'\n\nimport type { IDescriptionsInject } from './descriptions.type'\n\ndefineOptions({\n name: 'ElDescriptionsRow',\n})\n\ndefineProps(descriptionsRowProps)\n\nconst descriptions = inject(descriptionsKey, {} as IDescriptionsInject)\n</script>\n"],"names":["inject","descriptionsKey"],"mappings":";;;;;;;;;;;;;;;;;;AAwCA,IAAA,MAAA,YAAA,GAAAA,UAAA,CAAAC,qBAAA,EAAA,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const descriptionsKey = "elDescriptions";
|
|
6
6
|
|
|
7
|
-
exports.
|
|
7
|
+
exports.descriptionsKey = descriptionsKey;
|
|
8
8
|
//# sourceMappingURL=token.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.js","sources":["../../../../../../packages/components/descriptions/src/token.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\nimport type { IDescriptionsInject } from './descriptions.type'\n\nexport const
|
|
1
|
+
{"version":3,"file":"token.js","sources":["../../../../../../packages/components/descriptions/src/token.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\nimport type { IDescriptionsInject } from './descriptions.type'\n\nexport const descriptionsKey =\n 'elDescriptions' as any as InjectionKey<IDescriptionsInject>\n"],"names":[],"mappings":";;;;AAAY,MAAC,eAAe,GAAG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-dialog.js","sources":["../../../../../../packages/components/dialog/src/use-dialog.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"use-dialog.js","sources":["../../../../../../packages/components/dialog/src/use-dialog.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n nextTick,\n onMounted,\n ref,\n watch,\n} from 'vue'\nimport { isClient, useTimeoutFn } from '@vueuse/core'\n\nimport {\n defaultNamespace,\n useGlobalConfig,\n useId,\n useLockscreen,\n useZIndex,\n} from '@element-plus/hooks'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { addUnit } from '@element-plus/utils'\n\nimport type { CSSProperties, Ref, SetupContext } from 'vue'\nimport type { DialogEmits, DialogProps } from './dialog'\n\nexport const useDialog = (\n props: DialogProps,\n targetRef: Ref<HTMLElement | undefined>\n) => {\n const instance = getCurrentInstance()!\n const emit = instance.emit as SetupContext<DialogEmits>['emit']\n const { nextZIndex } = useZIndex()\n\n let lastPosition = ''\n const titleId = useId()\n const bodyId = useId()\n const visible = ref(false)\n const closed = ref(false)\n const rendered = ref(false) // when desctroyOnClose is true, we initialize it as false vise versa\n const zIndex = ref(props.zIndex || nextZIndex())\n\n let openTimer: (() => void) | undefined = undefined\n let closeTimer: (() => void) | undefined = undefined\n\n const namespace = useGlobalConfig('namespace', defaultNamespace)\n\n const style = computed<CSSProperties>(() => {\n const style: CSSProperties = {}\n const varPrefix = `--${namespace.value}-dialog` as const\n if (!props.fullscreen) {\n if (props.top) {\n style[`${varPrefix}-margin-top`] = props.top\n }\n if (props.width) {\n style[`${varPrefix}-width`] = addUnit(props.width)\n }\n }\n return style\n })\n\n function afterEnter() {\n emit('opened')\n }\n\n function afterLeave() {\n emit('closed')\n emit(UPDATE_MODEL_EVENT, false)\n if (props.destroyOnClose) {\n rendered.value = false\n }\n }\n\n function beforeLeave() {\n emit('close')\n }\n\n function open() {\n closeTimer?.()\n openTimer?.()\n\n if (props.openDelay && props.openDelay > 0) {\n ;({ stop: openTimer } = useTimeoutFn(() => doOpen(), props.openDelay))\n } else {\n doOpen()\n }\n }\n\n function close() {\n openTimer?.()\n closeTimer?.()\n\n if (props.closeDelay && props.closeDelay > 0) {\n ;({ stop: closeTimer } = useTimeoutFn(() => doClose(), props.closeDelay))\n } else {\n doClose()\n }\n }\n\n function handleClose() {\n function hide(shouldCancel?: boolean) {\n if (shouldCancel) return\n closed.value = true\n visible.value = false\n }\n\n if (props.beforeClose) {\n props.beforeClose(hide)\n } else {\n close()\n }\n }\n\n function onModalClick() {\n if (props.closeOnClickModal) {\n handleClose()\n }\n }\n\n function doOpen() {\n if (!isClient) return\n visible.value = true\n }\n\n function doClose() {\n visible.value = false\n }\n\n function onOpenAutoFocus() {\n emit('openAutoFocus')\n }\n\n function onCloseAutoFocus() {\n emit('closeAutoFocus')\n }\n\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n function onCloseRequested() {\n if (props.closeOnPressEscape) {\n handleClose()\n }\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n if (val) {\n closed.value = false\n open()\n rendered.value = true // enables lazy rendering\n emit('open')\n zIndex.value = props.zIndex ? zIndex.value++ : nextZIndex()\n // this.$el.addEventListener('scroll', this.updatePopper)\n nextTick(() => {\n if (targetRef.value) {\n targetRef.value.scrollTop = 0\n }\n })\n } else {\n // this.$el.removeEventListener('scroll', this.updatePopper\n if (visible.value) {\n close()\n }\n }\n }\n )\n\n watch(\n () => props.fullscreen,\n (val) => {\n if (!targetRef.value) return\n if (val) {\n lastPosition = targetRef.value.style.transform\n targetRef.value.style.transform = ''\n } else {\n targetRef.value.style.transform = lastPosition\n }\n }\n )\n\n onMounted(() => {\n if (props.modelValue) {\n visible.value = true\n rendered.value = true // enables lazy rendering\n open()\n }\n })\n\n return {\n afterEnter,\n afterLeave,\n beforeLeave,\n handleClose,\n onModalClick,\n close,\n doClose,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onCloseRequested,\n titleId,\n bodyId,\n closed,\n style,\n rendered,\n visible,\n zIndex,\n }\n}\n"],"names":["getCurrentInstance","useZIndex","useId","ref","useGlobalConfig","defaultNamespace","style","computed","addUnit","UPDATE_MODEL_EVENT","useTimeoutFn","isClient","useLockscreen","watch","nextTick","onMounted"],"mappings":";;;;;;;;;;;;;;;;;AAkBY,MAAC,SAAS,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK;AAC/C,EAAE,MAAM,QAAQ,GAAGA,sBAAkB,EAAE,CAAC;AACxC,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC7B,EAAE,MAAM,EAAE,UAAU,EAAE,GAAGC,eAAS,EAAE,CAAC;AACrC,EAAE,IAAI,YAAY,GAAG,EAAE,CAAC;AACxB,EAAE,MAAM,OAAO,GAAGC,aAAK,EAAE,CAAC;AAC1B,EAAE,MAAM,MAAM,GAAGA,aAAK,EAAE,CAAC;AACzB,EAAE,MAAM,OAAO,GAAGC,OAA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UAAU;AACd,IAAI,WAAW;AACf,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,KAAK;AACT,IAAI,OAAO;AACX,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,OAAO;AACX,IAAI,MAAM;AACV,IAAI,MAAM;AACV,WAAIT,OAAK;AACT,IAAI,QAAQ;AACZ,IAAI,OAAO;AACX,IAAI,MAAM;AACV,GAAG,CAAC;AACJ;;;;"}
|
package/lib/components/index.js
CHANGED
|
@@ -79,7 +79,7 @@ var index$18 = require('./popover/index.js');
|
|
|
79
79
|
var affix = require('./affix/src/affix.js');
|
|
80
80
|
var alert = require('./alert/src/alert.js');
|
|
81
81
|
var autocomplete = require('./autocomplete/src/autocomplete.js');
|
|
82
|
-
var avatar = require('./avatar/src/
|
|
82
|
+
var avatar = require('./avatar/src/avatar2.js');
|
|
83
83
|
var backtop = require('./backtop/src/backtop.js');
|
|
84
84
|
var badge = require('./badge/src/badge.js');
|
|
85
85
|
var breadcrumb = require('./breadcrumb/src/breadcrumb.js');
|
|
@@ -97,6 +97,7 @@ var col = require('./col/src/col.js');
|
|
|
97
97
|
var collapse = require('./collapse/src/collapse.js');
|
|
98
98
|
var collapseItem = require('./collapse/src/collapse-item.js');
|
|
99
99
|
var configProvider = require('./config-provider/src/config-provider.js');
|
|
100
|
+
var description = require('./descriptions/src/description.js');
|
|
100
101
|
var useDialog = require('./dialog/src/use-dialog.js');
|
|
101
102
|
var dialog = require('./dialog/src/dialog.js');
|
|
102
103
|
var divider = require('./divider/src/divider.js');
|
|
@@ -163,7 +164,7 @@ var constants$1 = require('./time-picker/src/constants.js');
|
|
|
163
164
|
var props = require('./time-picker/src/common/props.js');
|
|
164
165
|
var picker = require('./time-picker/src/common/picker.js');
|
|
165
166
|
var panelTimePick = require('./time-picker/src/time-picker-com/panel-time-pick.js');
|
|
166
|
-
var timelineItem = require('./timeline/src/timeline-
|
|
167
|
+
var timelineItem = require('./timeline/src/timeline-item.js');
|
|
167
168
|
var tooltip = require('./tooltip/src/tooltip.js');
|
|
168
169
|
var tokens$1 = require('./tooltip/src/tokens.js');
|
|
169
170
|
var transfer = require('./transfer/src/transfer.js');
|
|
@@ -330,6 +331,7 @@ exports.emitChangeFn = collapse.emitChangeFn;
|
|
|
330
331
|
exports.collapseItemProps = collapseItem.collapseItemProps;
|
|
331
332
|
exports.configProviderProps = configProvider.configProviderProps;
|
|
332
333
|
exports.messageConfig = configProvider.messageConfig;
|
|
334
|
+
exports.descriptionProps = description.descriptionProps;
|
|
333
335
|
exports.useDialog = useDialog.useDialog;
|
|
334
336
|
exports.dialogEmits = dialog.dialogEmits;
|
|
335
337
|
exports.dialogProps = dialog.dialogProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
-
require('
|
|
7
|
-
var index$
|
|
6
|
+
var core = require('@vueuse/core');
|
|
7
|
+
var index$1 = require('../../icon/index.js');
|
|
8
8
|
var iconsVue = require('@element-plus/icons-vue');
|
|
9
9
|
require('../../../utils/index.js');
|
|
10
10
|
require('../../../hooks/index.js');
|
|
@@ -16,7 +16,6 @@ var runtime = require('../../../utils/vue/props/runtime.js');
|
|
|
16
16
|
var typescript = require('../../../utils/typescript.js');
|
|
17
17
|
var shared = require('@vue/shared');
|
|
18
18
|
var index = require('../../../hooks/use-namespace/index.js');
|
|
19
|
-
var index$1 = require('../../../directives/resize/index.js');
|
|
20
19
|
|
|
21
20
|
const menuProps = runtime.buildProps({
|
|
22
21
|
mode: {
|
|
@@ -151,11 +150,22 @@ var Menu = vue.defineComponent({
|
|
|
151
150
|
}
|
|
152
151
|
updateActiveIndex(currentActive);
|
|
153
152
|
});
|
|
154
|
-
vue.watch(items.value, () =>
|
|
153
|
+
vue.watch(items.value, () => {
|
|
154
|
+
initMenu();
|
|
155
|
+
if (props.mode === "horizontal" && props.ellipsis)
|
|
156
|
+
handleResize();
|
|
157
|
+
});
|
|
155
158
|
vue.watch(() => props.collapse, (value) => {
|
|
156
159
|
if (value)
|
|
157
160
|
openedMenus.value = [];
|
|
158
161
|
});
|
|
162
|
+
let resizeStopper;
|
|
163
|
+
vue.watchEffect(() => {
|
|
164
|
+
if (props.mode === "horizontal" && props.ellipsis)
|
|
165
|
+
resizeStopper = core.useResizeObserver(menu, handleResize).stop;
|
|
166
|
+
else
|
|
167
|
+
resizeStopper == null ? void 0 : resizeStopper();
|
|
168
|
+
});
|
|
159
169
|
{
|
|
160
170
|
const addSubMenu = (item) => {
|
|
161
171
|
subMenus.value[item.index] = item;
|
|
@@ -221,7 +231,6 @@ var Menu = vue.defineComponent({
|
|
|
221
231
|
});
|
|
222
232
|
return result;
|
|
223
233
|
};
|
|
224
|
-
const useVNodeResize = (vnode) => props.mode === "horizontal" ? vue.withDirectives(vnode, [[index$1["default"], handleResize]]) : vnode;
|
|
225
234
|
return () => {
|
|
226
235
|
var _a, _b, _c, _d;
|
|
227
236
|
let slot = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : [];
|
|
@@ -249,7 +258,7 @@ var Menu = vue.defineComponent({
|
|
|
249
258
|
index: "sub-menu-more",
|
|
250
259
|
class: nsSubMenu.e("hide-arrow")
|
|
251
260
|
}, {
|
|
252
|
-
title: () => vue.h(index$
|
|
261
|
+
title: () => vue.h(index$1.ElIcon, {
|
|
253
262
|
class: nsSubMenu.e("icon-more")
|
|
254
263
|
}, { default: () => vue.h(iconsVue.More) }),
|
|
255
264
|
default: () => slotMore
|
|
@@ -257,8 +266,7 @@ var Menu = vue.defineComponent({
|
|
|
257
266
|
}
|
|
258
267
|
}
|
|
259
268
|
const ulStyle = useMenuCssVar.useMenuCssVar(props, 0);
|
|
260
|
-
const
|
|
261
|
-
const vMenu = resizeMenu(vue.h("ul", {
|
|
269
|
+
const vMenu = vue.h("ul", {
|
|
262
270
|
key: String(props.collapse),
|
|
263
271
|
role: "menubar",
|
|
264
272
|
ref: menu,
|
|
@@ -268,7 +276,7 @@ var Menu = vue.defineComponent({
|
|
|
268
276
|
[nsMenu.m(props.mode)]: true,
|
|
269
277
|
[nsMenu.m("collapse")]: props.collapse
|
|
270
278
|
}
|
|
271
|
-
}, [...slot, ...vShowMore])
|
|
279
|
+
}, [...slot, ...vShowMore]);
|
|
272
280
|
if (props.collapseTransition && props.mode === "vertical") {
|
|
273
281
|
return vue.h(menuCollapseTransition["default"], () => vMenu);
|
|
274
282
|
}
|