polarvo-layout 1.0.65 → 1.0.67
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/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
@mousedown.stop="sectionMode == 'free' ? addElementToFree($event, item) : addElementToGrid(item)"
|
|
8
8
|
>
|
|
9
9
|
<img :src="item.imgurl" alt="" class="w-24 h-auto rounded" />
|
|
10
|
-
<h4 class="text-sm">{{ item.
|
|
10
|
+
<h4 class="text-sm">{{ item.label }}</h4>
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
@@ -79,6 +79,19 @@ function getPropsDefaults(props) {
|
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
function formatElDate(createdAt) {
|
|
83
|
+
if (!createdAt) return null;
|
|
84
|
+
|
|
85
|
+
const d = new Date(createdAt);
|
|
86
|
+
const yy = String(d.getFullYear()).slice(-2);
|
|
87
|
+
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
|
88
|
+
const dd = String(d.getDate()).padStart(2, '0');
|
|
89
|
+
const hh = String(d.getHours()).padStart(2, '0');
|
|
90
|
+
const min = String(d.getMinutes()).padStart(2, '0');
|
|
91
|
+
|
|
92
|
+
return `${yy}${mm}${dd}_${hh}:${min}`;
|
|
93
|
+
}
|
|
94
|
+
|
|
82
95
|
// 기본 요소 목록에서 제외할 컴포넌트
|
|
83
96
|
const EXCLUDED_ELEMENTS = [
|
|
84
97
|
'button',
|
|
@@ -104,7 +117,7 @@ function buildDefaultElements() {
|
|
|
104
117
|
const imgKey = `/src/assets/el_img/${elName}.${ext}`;
|
|
105
118
|
|
|
106
119
|
return {
|
|
107
|
-
|
|
120
|
+
label: elName,
|
|
108
121
|
elName,
|
|
109
122
|
propDefaults: getPropsDefaults(modules[path].default?.props),
|
|
110
123
|
imgurl: imageModules[imgKey]?.default ?? '',
|
|
@@ -120,11 +133,12 @@ function buildCustomElements() {
|
|
|
120
133
|
const imgurl = imageModules['/src/assets/el_img/customDefault.png']?.default ?? '';
|
|
121
134
|
|
|
122
135
|
cachedCustomElements = props.customElements.map((el) => {
|
|
123
|
-
const { elName, mode, position, size, section, isLocked, ...propDefaults } = el;
|
|
136
|
+
const { elName, type, mode, position, size, section, isLocked, createdAt, ...propDefaults } = el;
|
|
137
|
+
const elDate = formatElDate(createdAt);
|
|
124
138
|
|
|
125
139
|
return {
|
|
126
|
-
|
|
127
|
-
elName,
|
|
140
|
+
label: elDate ? `${type}_${elDate}` : type,
|
|
141
|
+
elName: type,
|
|
128
142
|
propDefaults,
|
|
129
143
|
imgurl,
|
|
130
144
|
};
|