@ramathibodi/nuxt-commons 0.1.52 → 0.1.53
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/module.json
CHANGED
|
@@ -43,8 +43,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
43
43
|
stringFields: ()=>[],
|
|
44
44
|
})
|
|
45
45
|
|
|
46
|
-
const emit = defineEmits(['update:modelValue'])
|
|
47
|
-
|
|
46
|
+
const emit = defineEmits(['update:modelValue','open:dialog','close:dialog'])
|
|
48
47
|
const attrs = useAttrs()
|
|
49
48
|
const plainAttrs = computed(() => {
|
|
50
49
|
return omit(attrs, ['modelValue', 'onUpdate:modelValue'])
|
|
@@ -175,6 +174,7 @@ function openDialog(item?: object) {
|
|
|
175
174
|
currentItem.value = item
|
|
176
175
|
nextTick(() => {
|
|
177
176
|
isDialogOpen.value = true
|
|
177
|
+
emit('open:dialog',item)
|
|
178
178
|
})
|
|
179
179
|
}
|
|
180
180
|
}
|
|
@@ -325,6 +325,7 @@ defineExpose({
|
|
|
325
325
|
:form-data="currentItem"
|
|
326
326
|
@create="createItem"
|
|
327
327
|
@update="updateItem"
|
|
328
|
+
@afterLeave="emit('close:dialog')"
|
|
328
329
|
:saveAndStay="saveAndStay"
|
|
329
330
|
v-if="!props.inputPadOnly"
|
|
330
331
|
>
|
|
@@ -46,6 +46,7 @@ const props = withDefaults(defineProps<Props & GraphqlModelProps>(), {
|
|
|
46
46
|
onlyOwnerEdit: false,
|
|
47
47
|
})
|
|
48
48
|
|
|
49
|
+
const emit = defineEmits(['open:dialog','close:dialog'])
|
|
49
50
|
const attrs = useAttrs()
|
|
50
51
|
const plainAttrs = computed(() => {
|
|
51
52
|
const returnAttrs = clone(attrs)
|
|
@@ -75,6 +76,7 @@ function openDialog(item?: object) {
|
|
|
75
76
|
currentItem.value = item
|
|
76
77
|
nextTick(() => {
|
|
77
78
|
isDialogOpen.value = true
|
|
79
|
+
emit('open:dialog' , item)
|
|
78
80
|
})
|
|
79
81
|
}
|
|
80
82
|
|
|
@@ -83,6 +85,7 @@ function openDialogReadonly(item?: object) {
|
|
|
83
85
|
currentItem.value = item
|
|
84
86
|
nextTick(() => {
|
|
85
87
|
isDialogOpen.value = true
|
|
88
|
+
emit('open:dialog' , item)
|
|
86
89
|
})
|
|
87
90
|
}
|
|
88
91
|
|
|
@@ -289,6 +292,7 @@ defineExpose({ reload,operation })
|
|
|
289
292
|
:form-data="currentItem"
|
|
290
293
|
@create="createItem"
|
|
291
294
|
@update="updateItem"
|
|
295
|
+
@afterLeave="emit('close:dialog')"
|
|
292
296
|
:saveAndStay="saveAndStay"
|
|
293
297
|
:readonly="isDialogReadonly"
|
|
294
298
|
>
|