polarvo-layout 1.0.44 → 1.0.45
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
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
v-bind="item"
|
|
46
46
|
class="hover:opacity-80"
|
|
47
47
|
:class="activeEditMode ? `pointer-events-auto ` : `pointer-events-none`"
|
|
48
|
+
@set:defaultStyle="setDefaultStyle"
|
|
48
49
|
/>
|
|
49
50
|
</div>
|
|
50
51
|
</template>
|
|
@@ -61,7 +62,9 @@ const props = defineProps({
|
|
|
61
62
|
});
|
|
62
63
|
|
|
63
64
|
const { activeId, handles, activeElement } = toRefs(props.polarvo.freeDrop.state);
|
|
65
|
+
const { updateActiveElement } = props.polarvo.layout;
|
|
64
66
|
const { getElementStyle, handleMouseDown, startResize, toggleLock } = props.polarvo.freeDrop;
|
|
67
|
+
|
|
65
68
|
const size = computed(() => (activeElement.value ? activeElement.value.size : { w: 0, h: 0 }));
|
|
66
69
|
|
|
67
70
|
const activeEditMode = inject('activeEditMode');
|
|
@@ -96,6 +99,10 @@ function setRef(el) {
|
|
|
96
99
|
props.polarvo.components.unregister('elements', `${props.sectionKey}-${props.item.id}`);
|
|
97
100
|
}
|
|
98
101
|
}
|
|
102
|
+
|
|
103
|
+
function setDefaultStyle(defaultStyle) {
|
|
104
|
+
updateActiveElement(props.item.id, { customStyle: defaultStyle });
|
|
105
|
+
}
|
|
99
106
|
</script>
|
|
100
107
|
|
|
101
108
|
<style lang="scss" scoped>
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
v-bind="item"
|
|
44
44
|
class="hover:opacity-80"
|
|
45
45
|
:class="activeEditMode ? `pointer-events-auto ` : `pointer-events-none`"
|
|
46
|
+
@set:defaultStyle="setDefaultStyle"
|
|
46
47
|
/>
|
|
47
48
|
|
|
48
49
|
<!-- 오버레이 -->
|
|
@@ -71,6 +72,7 @@ const props = defineProps({
|
|
|
71
72
|
});
|
|
72
73
|
|
|
73
74
|
const { activeId } = toRefs(props.polarvo.gridDrop.state);
|
|
75
|
+
const { updateActiveElement } = props.polarvo.layout;
|
|
74
76
|
const { getElementStyle, toggleLock, handleMouseDown, detectHoverCell, startResize } = props.polarvo.gridDrop;
|
|
75
77
|
|
|
76
78
|
const activeEditMode = inject('activeEditMode');
|
|
@@ -105,4 +107,8 @@ function setRef(el) {
|
|
|
105
107
|
props.polarvo.components.unregister('elements', `${props.sectionKey}-${props.item.id}`);
|
|
106
108
|
}
|
|
107
109
|
}
|
|
110
|
+
|
|
111
|
+
function setDefaultStyle(defaultStyle) {
|
|
112
|
+
updateActiveElement(props.item.id, { customStyle: defaultStyle });
|
|
113
|
+
}
|
|
108
114
|
</script>
|