|
@@ -1,8 +1,9 @@
|
|
|
<template>
|
|
|
- <Vue3DraggableResizable :initW="initW" :initH="initH" v-model:x="top" v-model:y="left" v-model:w="w" v-model:h="h"
|
|
|
- :active="active" :handles="sticks" :draggable="true" :resizable="true" :prevent-deactivation="true"
|
|
|
- @drag-start="print('drag-start')" @resize-start="print('resize-start')" @dragging="print('dragging')"
|
|
|
- @resizing="print('resizing')" @drag-end="print('drag-end')" @resize-end="print('resize-end')">
|
|
|
+ <Vue3DraggableResizable :prevent-deactivation="true" classNameActive="active" :initW="initW" :initH="initH"
|
|
|
+ v-model:x="top" v-model:y="left" v-model:w="w" v-model:h="h" v-model:active="active" :handles="sticks"
|
|
|
+ :draggable="true" :resizable="true" @drag-start="print('drag-start')" @resize-start="print('resize-start')"
|
|
|
+ @dragging="print('dragging')" @resizing="print('resizing')" @drag-end="print('drag-end')"
|
|
|
+ @resize-end="print('resize-end')">
|
|
|
<component :is="getWidget(currentItem.type)" :config="currentItem"></component>
|
|
|
</Vue3DraggableResizable>
|
|
|
</template>
|
|
@@ -24,7 +25,6 @@ const isResizable = ref(false)
|
|
|
const sticks = ref([])
|
|
|
const active = ref(true)
|
|
|
const currentItem: any = ref({})
|
|
|
-
|
|
|
const porps = defineProps({
|
|
|
dargData: {
|
|
|
type: Object,
|
|
@@ -43,7 +43,7 @@ console.log(initW.value, initH.value, w.value, h.value, top.value, left.value, '
|
|
|
|
|
|
isResizable.value = arrData.config.isResizable
|
|
|
sticks.value = arrData.config.sticks
|
|
|
-// active.value = arrData.active
|
|
|
+active.value = arrData.active
|
|
|
|
|
|
function print(val) {
|
|
|
currentItem.value.css.width = w.value
|
|
@@ -58,8 +58,4 @@ const getWidget = (name: string) => {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
-:deep(.vdr-container.active) {
|
|
|
- overflow: hidden;
|
|
|
-}
|
|
|
-</style>
|
|
|
+<style lang="scss" scoped></style>
|