sun-card-design 1.1.48 → 1.2.1

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.
Files changed (43) hide show
  1. package/README.md +20 -2
  2. package/dist/mobile/sun-card-design-mobile.es18.js +5 -4
  3. package/dist/mobile/sun-card-design-mobile.es21.js +2 -2
  4. package/dist/mobile/sun-card-design-mobile.es23.js +2 -2
  5. package/dist/mobile/sun-card-design-mobile.es25.js +6 -6
  6. package/dist/mobile/sun-card-design-mobile.es32.js +4 -2
  7. package/dist/mobile/sun-card-design-mobile.es55.js +226 -0
  8. package/dist/mobile/sun-card-design-mobile.es56.js +64 -0
  9. package/dist/mobile/sun-card-design-mobile.es57.js +65 -204
  10. package/dist/mobile/sun-card-design-mobile.es58.js +81 -47
  11. package/dist/mobile/sun-card-design-mobile.es59.js +123 -48
  12. package/dist/mobile/sun-card-design-mobile.es6.js +2 -2
  13. package/dist/mobile/sun-card-design-mobile.es60.js +116 -52
  14. package/dist/mobile/sun-card-design-mobile.es61.js +116 -52
  15. package/dist/pc/sun-card-design-pc.es18.js +5 -4
  16. package/dist/pc/sun-card-design-pc.es21.js +2 -2
  17. package/dist/pc/sun-card-design-pc.es23.js +2 -2
  18. package/dist/pc/sun-card-design-pc.es25.js +6 -6
  19. package/dist/pc/sun-card-design-pc.es32.js +4 -2
  20. package/dist/pc/sun-card-design-pc.es55.js +226 -0
  21. package/dist/pc/sun-card-design-pc.es56.js +45 -207
  22. package/dist/pc/sun-card-design-pc.es57.js +70 -47
  23. package/dist/pc/sun-card-design-pc.es58.js +20 -9
  24. package/dist/pc/sun-card-design-pc.es59.js +116 -52
  25. package/dist/pc/sun-card-design-pc.es6.js +2 -2
  26. package/dist/pc/sun-card-design-pc.es60.js +116 -52
  27. package/dist/public/sun-card-design.css +1 -1
  28. package/package.json +3 -2
  29. package/dist/assets/cardDesigner.png +0 -0
  30. package/dist/assets/img.png +0 -0
  31. package/dist/assets/pic1.jpg +0 -0
  32. package/dist/assets/picsl1.jpg +0 -0
  33. package/dist/assets/song.mp3 +0 -0
  34. package/dist/assets/tmCard1.jpg +0 -0
  35. package/dist/assets/tmCard2.jpg +0 -0
  36. package/dist/assets/tmList1.jpg +0 -0
  37. package/dist/assets/video.mp4 +0 -0
  38. package/dist/mobile/sun-card-design-mobile.es51.js +0 -4
  39. package/dist/mobile/sun-card-design-mobile.es62.js +0 -98
  40. package/dist/pc/sun-card-design-pc.es51.js +0 -4
  41. package/dist/pc/sun-card-design-pc.es61.js +0 -98
  42. /package/dist/mobile/{sun-card-design-mobile.es66.js → sun-card-design-mobile.es65.js} +0 -0
  43. /package/dist/pc/{sun-card-design-pc.es66.js → sun-card-design-pc.es65.js} +0 -0
@@ -1,64 +1,98 @@
1
- import { markRaw, defineComponent, h, computed, createElementBlock, openBlock, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent } from "vue";
2
- import * as Icons from "@ant-design/icons-vue";
3
- import { customIcon } from "./sun-card-design-mobile.es66.js";
1
+ import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, Fragment, renderList, createBlock, createElementVNode } from "vue";
2
+ import FormItem from "./sun-card-design-mobile.es25.js";
4
3
  /* empty css */
5
4
  import _export_sfc from "./sun-card-design-mobile.es28.js";
5
+ const _hoisted_1 = ["onClick"];
6
6
  const _sfc_main = {
7
- __name: "sunIconComp",
8
- props: ["record"],
9
- emits: ["clickEvent"],
7
+ __name: "multipleColumn",
8
+ props: ["record", "recordData", "columnsIndex"],
9
+ emits: ["clickEvent", "clickColumnsEvent", "fileUpdateEvent"],
10
10
  setup(__props, { emit: __emit }) {
11
11
  const props = __props;
12
12
  const emit = __emit;
13
- const customIconComponents = Object.entries(customIcon || {}).reduce((acc, [key, svg]) => {
14
- const normalized = svg.replace(/fill="#000000"/gi, 'fill="currentColor"');
15
- acc[key] = markRaw(
16
- defineComponent({
17
- name: `CustomIcon${key}`,
18
- setup() {
19
- return () => h("span", { innerHTML: normalized });
20
- }
21
- })
22
- );
23
- return acc;
24
- }, {});
25
- const iconMap = { ...Icons, ...customIconComponents };
26
- const iconComponent = computed(() => {
27
- const name = props?.record?.options?.style?.iconName || "CheckCircleOutlined";
28
- return iconMap[name] || Icons["CheckCircleOutlined"];
29
- });
30
- const iconStyle = computed(() => {
31
- const color = props?.record?.options?.style?.color || "#000000";
32
- const justifyContent = props?.record?.options?.style?.justifyContent || "flex-start";
33
- return {
34
- color,
35
- display: "flex",
36
- justifyContent,
37
- alignItems: "center",
38
- width: "100%"
39
- };
40
- });
41
- function onClick() {
42
- if (props.record.options.clickEvent) {
43
- emit("clickEvent", props.record);
13
+ const getIndex = (index) => {
14
+ if (index !== void 0) {
15
+ return index;
44
16
  }
17
+ return props.columnsIndex;
18
+ };
19
+ const onClick = (record) => {
20
+ emit("clickEvent", record);
21
+ };
22
+ const onUpdate = (record) => {
23
+ emit("fileUpdateEvent", record);
24
+ };
25
+ const onClickColumns = (record) => {
26
+ if (!record.options.clickEvent) return;
27
+ emit("clickColumnsEvent", record);
28
+ };
29
+ const getBackground = () => {
30
+ if (isGradientColor(props.recordData.config.background)) {
31
+ return "none";
32
+ }
33
+ return props.recordData.config.background;
34
+ };
35
+ function isGradientColor(color) {
36
+ return /^(linear|radial)-gradient\(.*\)$/.test(color);
45
37
  }
46
38
  return (_ctx, _cache) => {
39
+ const _component_a_col = resolveComponent("a-col");
40
+ const _component_a_row = resolveComponent("a-row");
47
41
  return openBlock(), createElementBlock("div", {
48
- class: "main-icon",
49
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
42
+ class: "main-grid",
43
+ style: normalizeStyle({ background: getBackground() })
50
44
  }, [
51
- createElementVNode("span", {
52
- style: normalizeStyle(iconStyle.value),
53
- onClick
54
- }, [
55
- (openBlock(), createBlock(resolveDynamicComponent(iconComponent.value), { style: { "height": "18px", "width": "18px" } }))
56
- ], 4)
45
+ createVNode(_component_a_row, {
46
+ gutter: [props.record.options.style.lrGutter, props.record.options.style.tbGutter]
47
+ }, {
48
+ default: withCtx(() => [
49
+ (openBlock(true), createElementBlock(Fragment, null, renderList(props.record.columns, (item, index) => {
50
+ return openBlock(), createBlock(_component_a_col, {
51
+ key: index.toString(),
52
+ flex: props.record.columns[index]?.flex,
53
+ span: 24,
54
+ style: normalizeStyle({
55
+ flex: props.record.columns[index]?.flex
56
+ })
57
+ }, {
58
+ default: withCtx(() => [
59
+ createElementVNode("div", {
60
+ class: "box",
61
+ style: normalizeStyle({
62
+ background: props.record.options.style?.background,
63
+ border: props.record.options.style?.borderColor === "none" ? "none" : "1px solid " + (props.record.options.style?.borderColor || "transparent"),
64
+ borderRadius: props.record.options.style?.borderRadius + "px",
65
+ padding: props.record.options.style?.tbPadding + "px " + props.record.options.style?.lrPadding + "px",
66
+ justifyContent: props.record.options.style?.alignItems || "start",
67
+ minHeight: props.record.options.style?.minHeight + "px" || "48px",
68
+ boxShadow: props.record.options.style?.boxShadow || null
69
+ }),
70
+ onClick: ($event) => onClickColumns(item)
71
+ }, [
72
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (element, index2) => {
73
+ return openBlock(), createBlock(FormItem, {
74
+ record: element,
75
+ key: index2,
76
+ recordData: props.recordData,
77
+ columnsIndex: getIndex(item.index),
78
+ onClickEvent: onClick,
79
+ onFileUpdateEvent: onUpdate,
80
+ onClickColumnsEvent: onClickColumns
81
+ }, null, 8, ["record", "recordData", "columnsIndex"]);
82
+ }), 128))
83
+ ], 12, _hoisted_1)
84
+ ]),
85
+ _: 2
86
+ }, 1032, ["flex", "style"]);
87
+ }), 128))
88
+ ]),
89
+ _: 1
90
+ }, 8, ["gutter"])
57
91
  ], 4);
58
92
  };
59
93
  }
60
94
  };
61
- const SunIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4b920fa7"]]);
95
+ const MultipleColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-20b79e7a"]]);
62
96
  export {
63
- SunIcon as default
97
+ MultipleColumn as default
64
98
  };
@@ -1,14 +1,58 @@
1
- import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, Fragment, renderList, createBlock, createElementVNode } from "vue";
1
+ import { ref, computed, watch, resolveComponent, createElementBlock, openBlock, normalizeStyle, createElementVNode, createVNode, withCtx, TransitionGroup, Fragment, renderList, createBlock, Transition, createCommentVNode } from "vue";
2
2
  import FormItem from "./sun-card-design-mobile.es25.js";
3
3
  /* empty css */
4
4
  import _export_sfc from "./sun-card-design-mobile.es28.js";
5
+ const _hoisted_1 = { class: "expand-list-container" };
6
+ const _hoisted_2 = ["onClick"];
5
7
  const _sfc_main = {
6
- __name: "singleColumn",
8
+ __name: "multipleLine",
7
9
  props: ["record", "recordData", "columnsIndex"],
8
10
  emits: ["clickEvent", "clickColumnsEvent", "fileUpdateEvent"],
9
11
  setup(__props, { emit: __emit }) {
10
12
  const props = __props;
11
13
  const emit = __emit;
14
+ const currentDisplayCount = ref(0);
15
+ const collapse = computed(() => props.record.options?.style?.collapse ?? false);
16
+ const collapseLine = computed(() => props.record.options?.style?.collapseLine ?? 2);
17
+ const expandType = computed(() => props.record.options?.style?.expandType || "noRepeat");
18
+ const expandLine = computed(() => props.record.options?.style?.expandLine ?? 2);
19
+ const totalColumns = computed(() => props.record.columns?.length || 0);
20
+ watch([collapse, collapseLine, totalColumns], () => {
21
+ if (collapse.value) {
22
+ currentDisplayCount.value = Math.min(collapseLine.value, totalColumns.value);
23
+ } else {
24
+ currentDisplayCount.value = totalColumns.value;
25
+ }
26
+ if (currentDisplayCount.value > totalColumns.value) {
27
+ currentDisplayCount.value = totalColumns.value;
28
+ }
29
+ }, { immediate: true });
30
+ const displayedColumns = computed(() => {
31
+ if (!collapse.value) {
32
+ return props.record.columns || [];
33
+ }
34
+ return (props.record.columns || []).slice(0, currentDisplayCount.value);
35
+ });
36
+ const showExpandMore = computed(() => {
37
+ if (!collapse.value) return false;
38
+ return currentDisplayCount.value < totalColumns.value;
39
+ });
40
+ const handleExpandMore = () => {
41
+ if (expandType.value === "noRepeat") {
42
+ currentDisplayCount.value = totalColumns.value;
43
+ } else if (expandType.value === "repeat") {
44
+ currentDisplayCount.value = Math.min(
45
+ currentDisplayCount.value + expandLine.value,
46
+ totalColumns.value
47
+ );
48
+ }
49
+ };
50
+ const getIndex = (index) => {
51
+ if (index !== void 0) {
52
+ return index;
53
+ }
54
+ return props.columnsIndex;
55
+ };
12
56
  const onClick = (record) => {
13
57
  emit("clickEvent", record);
14
58
  };
@@ -19,69 +63,100 @@ const _sfc_main = {
19
63
  if (!record.options.clickEvent) return;
20
64
  emit("clickColumnsEvent", record);
21
65
  };
22
- const getBackground = () => {
66
+ function isGradientColor(color) {
67
+ return /^(linear|radial)-gradient\(.*\)$/.test(color);
68
+ }
69
+ const getBackground = computed(() => {
70
+ if (!props.recordData?.config?.background) {
71
+ return "transparent";
72
+ }
23
73
  if (isGradientColor(props.recordData.config.background)) {
24
74
  return "none";
25
75
  }
26
76
  return props.recordData.config.background;
27
- };
28
- function isGradientColor(color) {
29
- return /^(linear|radial)-gradient\(.*\)$/.test(color);
30
- }
77
+ });
31
78
  return (_ctx, _cache) => {
32
79
  const _component_a_col = resolveComponent("a-col");
33
80
  const _component_a_row = resolveComponent("a-row");
34
81
  return openBlock(), createElementBlock("div", {
35
- class: "main-singleColumn",
36
- style: normalizeStyle({ background: getBackground() })
82
+ class: "main-grid",
83
+ style: normalizeStyle({ background: getBackground.value })
37
84
  }, [
38
- createVNode(_component_a_row, {
39
- gutter: [props.record.options.style.lrGutter, props.record.options.style.tbGutter]
40
- }, {
41
- default: withCtx(() => [
42
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.record.columns, (item, index) => {
43
- return openBlock(), createBlock(_component_a_col, {
44
- key: index.toString(),
45
- flex: props.record.columns[index]?.flex,
46
- span: 24
85
+ createElementVNode("div", _hoisted_1, [
86
+ createVNode(_component_a_row, {
87
+ gutter: [props.record.options.style.lrGutter, props.record.options.style.tbGutter]
88
+ }, {
89
+ default: withCtx(() => [
90
+ createVNode(TransitionGroup, {
91
+ name: "expand-list",
92
+ tag: "div",
93
+ class: "expand-list-group"
47
94
  }, {
48
95
  default: withCtx(() => [
49
- createElementVNode("div", {
50
- class: "box",
51
- style: normalizeStyle({
52
- background: props.record.options.style?.background,
53
- border: props.record.options.style?.borderColor === "none" ? "none" : "1px solid " + (props.record.options.style?.borderColor || "transparent"),
54
- borderRadius: props.record.options.style?.borderRadius + "px",
55
- padding: props.record.options.style?.tbPadding + "px " + props.record.options.style?.lrPadding + "px",
56
- justifyContent: props.record.options.style?.alignItems || "start",
57
- minHeight: props.record.options.style?.minHeight + "px" || "48px",
58
- boxShadow: props.record.options.style?.boxShadow || null
59
- })
60
- }, [
61
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (element, index2) => {
62
- return openBlock(), createBlock(FormItem, {
63
- record: element,
64
- key: index2,
65
- recordData: props.recordData,
66
- columnsIndex: props.columnsIndex,
67
- onClickEvent: onClick,
68
- onFileUpdateEvent: onUpdate,
69
- onClickColumnsEvent: onClickColumns
70
- }, null, 8, ["record", "recordData", "columnsIndex"]);
71
- }), 128))
72
- ], 4)
96
+ (openBlock(true), createElementBlock(Fragment, null, renderList(displayedColumns.value, (item, index) => {
97
+ return openBlock(), createBlock(_component_a_col, {
98
+ key: item.uuid || `col-${index}`,
99
+ flex: item.flex,
100
+ span: 24,
101
+ style: normalizeStyle({
102
+ flex: _ctx.none
103
+ }),
104
+ class: "expand-col-item"
105
+ }, {
106
+ default: withCtx(() => [
107
+ createElementVNode("div", {
108
+ class: "box",
109
+ style: normalizeStyle({
110
+ background: props.record.options.style?.background,
111
+ border: props.record.options.style?.borderColor === "none" ? "none" : "1px solid " + (props.record.options.style?.borderColor || "transparent"),
112
+ borderRadius: props.record.options.style?.borderRadius + "px",
113
+ padding: props.record.options.style?.tbPadding + "px " + props.record.options.style?.lrPadding + "px",
114
+ justifyContent: props.record.options.style?.alignItems || "start",
115
+ minHeight: props.record.options.style?.minHeight + "px" || "48px",
116
+ boxShadow: props.record.options.style?.boxShadow || null
117
+ }),
118
+ onClick: ($event) => onClickColumns(item)
119
+ }, [
120
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (element, index2) => {
121
+ return openBlock(), createBlock(FormItem, {
122
+ record: element,
123
+ key: index2,
124
+ recordData: props.recordData,
125
+ columnsIndex: getIndex(item.index),
126
+ onClickEvent: onClick,
127
+ onFileUpdateEvent: onUpdate,
128
+ onClickColumnsEvent: onClickColumns
129
+ }, null, 8, ["record", "recordData", "columnsIndex"]);
130
+ }), 128))
131
+ ], 12, _hoisted_2)
132
+ ]),
133
+ _: 2
134
+ }, 1032, ["flex", "style"]);
135
+ }), 128))
73
136
  ]),
74
- _: 2
75
- }, 1032, ["flex"]);
76
- }), 128))
137
+ _: 1
138
+ })
139
+ ]),
140
+ _: 1
141
+ }, 8, ["gutter"])
142
+ ]),
143
+ createVNode(Transition, { name: "fade" }, {
144
+ default: withCtx(() => [
145
+ showExpandMore.value ? (openBlock(), createElementBlock("div", {
146
+ key: 0,
147
+ class: "expand-more",
148
+ onClick: handleExpandMore
149
+ }, [..._cache[0] || (_cache[0] = [
150
+ createElementVNode("span", null, "展开更多", -1)
151
+ ])])) : createCommentVNode("", true)
77
152
  ]),
78
153
  _: 1
79
- }, 8, ["gutter"])
154
+ })
80
155
  ], 4);
81
156
  };
82
157
  }
83
158
  };
84
- const SingleColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1fc2bfb4"]]);
159
+ const MultipleLine = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dad6f574"]]);
85
160
  export {
86
- SingleColumn as default
161
+ MultipleLine as default
87
162
  };
@@ -1,6 +1,6 @@
1
1
  import { ref, watch, createElementBlock, openBlock, normalizeStyle, createElementVNode } from "vue";
2
2
  import { renderTextByVariables } from "./sun-card-design-mobile.es26.js";
3
- import IMG from "./sun-card-design-mobile.es32.js";
3
+ import { IMG } from "./sun-card-design-mobile.es32.js";
4
4
  /* empty css */
5
5
  import _export_sfc from "./sun-card-design-mobile.es28.js";
6
6
  const _sfc_main = {
@@ -91,7 +91,7 @@ const _sfc_main = {
91
91
  };
92
92
  }
93
93
  };
94
- const Picture = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-de06c2bc"]]);
94
+ const Picture = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b7f1d53f"]]);
95
95
  export {
96
96
  Picture as default
97
97
  };
@@ -1,15 +1,52 @@
1
- import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, Fragment, renderList, createBlock, createElementVNode } from "vue";
1
+ import { ref, computed, watch, resolveComponent, createElementBlock, openBlock, normalizeStyle, createElementVNode, createVNode, withCtx, TransitionGroup, Fragment, renderList, createBlock, Transition, createCommentVNode } from "vue";
2
2
  import FormItem from "./sun-card-design-mobile.es25.js";
3
3
  /* empty css */
4
4
  import _export_sfc from "./sun-card-design-mobile.es28.js";
5
- const _hoisted_1 = ["onClick"];
5
+ const _hoisted_1 = { class: "expand-list-container" };
6
+ const _hoisted_2 = ["onClick"];
6
7
  const _sfc_main = {
7
- __name: "multipleColumn",
8
+ __name: "gridList",
8
9
  props: ["record", "recordData", "columnsIndex"],
9
10
  emits: ["clickEvent", "clickColumnsEvent", "fileUpdateEvent"],
10
11
  setup(__props, { emit: __emit }) {
11
12
  const props = __props;
12
13
  const emit = __emit;
14
+ const currentDisplayRows = ref(0);
15
+ const collapse = computed(() => props.record.options?.style?.collapse ?? false);
16
+ const collapseLine = computed(() => props.record.options?.style?.collapseLine ?? 2);
17
+ const expandType = computed(() => props.record.options?.style?.expandType || "noRepeat");
18
+ const expandLine = computed(() => props.record.options?.style?.expandLine ?? 2);
19
+ const totalColumns = computed(() => props.record.columns?.length || 0);
20
+ const autoNumber = computed(() => props.record.options?.autoNumber || 2);
21
+ const totalRows = computed(() => Math.ceil(totalColumns.value / autoNumber.value));
22
+ watch([collapse, collapseLine, totalRows], () => {
23
+ if (collapse.value) {
24
+ currentDisplayRows.value = Math.min(collapseLine.value, totalRows.value);
25
+ } else {
26
+ currentDisplayRows.value = totalRows.value;
27
+ }
28
+ }, { immediate: true });
29
+ const displayedColumns = computed(() => {
30
+ if (!collapse.value) {
31
+ return props.record.columns || [];
32
+ }
33
+ const displayCount = currentDisplayRows.value * autoNumber.value;
34
+ return (props.record.columns || []).slice(0, displayCount);
35
+ });
36
+ const showExpandMore = computed(() => {
37
+ if (!collapse.value) return false;
38
+ return currentDisplayRows.value < totalRows.value;
39
+ });
40
+ const handleExpandMore = () => {
41
+ if (expandType.value === "noRepeat") {
42
+ currentDisplayRows.value = totalRows.value;
43
+ } else if (expandType.value === "repeat") {
44
+ currentDisplayRows.value = Math.min(
45
+ currentDisplayRows.value + expandLine.value,
46
+ totalRows.value
47
+ );
48
+ }
49
+ };
13
50
  const getIndex = (index) => {
14
51
  if (index !== void 0) {
15
52
  return index;
@@ -26,73 +63,100 @@ const _sfc_main = {
26
63
  if (!record.options.clickEvent) return;
27
64
  emit("clickColumnsEvent", record);
28
65
  };
29
- const getBackground = () => {
66
+ function isGradientColor(color) {
67
+ return /^(linear|radial)-gradient\(.*\)$/.test(color);
68
+ }
69
+ const getBackground = computed(() => {
70
+ if (!props.recordData?.config?.background) {
71
+ return "transparent";
72
+ }
30
73
  if (isGradientColor(props.recordData.config.background)) {
31
74
  return "none";
32
75
  }
33
76
  return props.recordData.config.background;
34
- };
35
- function isGradientColor(color) {
36
- return /^(linear|radial)-gradient\(.*\)$/.test(color);
37
- }
77
+ });
38
78
  return (_ctx, _cache) => {
39
79
  const _component_a_col = resolveComponent("a-col");
40
80
  const _component_a_row = resolveComponent("a-row");
41
81
  return openBlock(), createElementBlock("div", {
42
82
  class: "main-grid",
43
- style: normalizeStyle({ background: getBackground() })
83
+ style: normalizeStyle({ background: getBackground.value })
44
84
  }, [
45
- createVNode(_component_a_row, {
46
- gutter: [props.record.options.style.lrGutter, props.record.options.style.tbGutter]
47
- }, {
48
- default: withCtx(() => [
49
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.record.columns, (item, index) => {
50
- return openBlock(), createBlock(_component_a_col, {
51
- key: index.toString(),
52
- flex: props.record.columns[index]?.flex,
53
- span: 24,
54
- style: normalizeStyle({
55
- flex: props.record.columns[index]?.flex
56
- })
85
+ createElementVNode("div", _hoisted_1, [
86
+ createVNode(_component_a_row, {
87
+ gutter: [props.record.options.style.lrGutter, props.record.options.style.tbGutter]
88
+ }, {
89
+ default: withCtx(() => [
90
+ createVNode(TransitionGroup, {
91
+ name: "expand-list",
92
+ tag: "div",
93
+ class: "expand-list-group"
57
94
  }, {
58
95
  default: withCtx(() => [
59
- createElementVNode("div", {
60
- class: "box",
61
- style: normalizeStyle({
62
- background: props.record.options.style?.background,
63
- border: props.record.options.style?.borderColor === "none" ? "none" : "1px solid " + (props.record.options.style?.borderColor || "transparent"),
64
- borderRadius: props.record.options.style?.borderRadius + "px",
65
- padding: props.record.options.style?.tbPadding + "px " + props.record.options.style?.lrPadding + "px",
66
- justifyContent: props.record.options.style?.alignItems || "start",
67
- minHeight: props.record.options.style?.minHeight + "px" || "48px",
68
- boxShadow: props.record.options.style?.boxShadow || null
69
- }),
70
- onClick: ($event) => onClickColumns(item)
71
- }, [
72
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (element, index2) => {
73
- return openBlock(), createBlock(FormItem, {
74
- record: element,
75
- key: index2,
76
- recordData: props.recordData,
77
- columnsIndex: getIndex(item.index),
78
- onClickEvent: onClick,
79
- onFileUpdateEvent: onUpdate,
80
- onClickColumnsEvent: onClickColumns
81
- }, null, 8, ["record", "recordData", "columnsIndex"]);
82
- }), 128))
83
- ], 12, _hoisted_1)
96
+ (openBlock(true), createElementBlock(Fragment, null, renderList(displayedColumns.value, (item, index) => {
97
+ return openBlock(), createBlock(_component_a_col, {
98
+ key: item.uuid || `col-${index}`,
99
+ flex: item.flex,
100
+ span: 24 / props.record.options.autoNumber,
101
+ style: normalizeStyle({
102
+ flex: _ctx.none
103
+ }),
104
+ class: "expand-col-item"
105
+ }, {
106
+ default: withCtx(() => [
107
+ createElementVNode("div", {
108
+ class: "box",
109
+ style: normalizeStyle({
110
+ background: props.record.options.style?.background,
111
+ border: props.record.options.style?.borderColor === "none" ? "none" : "1px solid " + (props.record.options.style?.borderColor || "transparent"),
112
+ borderRadius: props.record.options.style?.borderRadius + "px",
113
+ padding: props.record.options.style?.tbPadding + "px " + props.record.options.style?.lrPadding + "px",
114
+ justifyContent: props.record.options.style?.alignItems || "start",
115
+ minHeight: props.record.options.style?.minHeight + "px" || "48px",
116
+ boxShadow: props.record.options.style?.boxShadow || null
117
+ }),
118
+ onClick: ($event) => onClickColumns(item)
119
+ }, [
120
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (element, index2) => {
121
+ return openBlock(), createBlock(FormItem, {
122
+ record: element,
123
+ key: index2,
124
+ recordData: props.recordData,
125
+ columnsIndex: getIndex(item.index),
126
+ onClickEvent: onClick,
127
+ onFileUpdateEvent: onUpdate,
128
+ onClickColumnsEvent: onClickColumns
129
+ }, null, 8, ["record", "recordData", "columnsIndex"]);
130
+ }), 128))
131
+ ], 12, _hoisted_2)
132
+ ]),
133
+ _: 2
134
+ }, 1032, ["flex", "span", "style"]);
135
+ }), 128))
84
136
  ]),
85
- _: 2
86
- }, 1032, ["flex", "style"]);
87
- }), 128))
137
+ _: 1
138
+ })
139
+ ]),
140
+ _: 1
141
+ }, 8, ["gutter"])
142
+ ]),
143
+ createVNode(Transition, { name: "fade" }, {
144
+ default: withCtx(() => [
145
+ showExpandMore.value ? (openBlock(), createElementBlock("div", {
146
+ key: 0,
147
+ class: "expand-more",
148
+ onClick: handleExpandMore
149
+ }, [..._cache[0] || (_cache[0] = [
150
+ createElementVNode("span", null, "展开更多", -1)
151
+ ])])) : createCommentVNode("", true)
88
152
  ]),
89
153
  _: 1
90
- }, 8, ["gutter"])
154
+ })
91
155
  ], 4);
92
156
  };
93
157
  }
94
158
  };
95
- const MultipleColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-20b79e7a"]]);
159
+ const GridList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-159c873b"]]);
96
160
  export {
97
- MultipleColumn as default
161
+ GridList as default
98
162
  };