@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
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.1.52",
7
+ "version": "0.1.53",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -323,7 +323,6 @@ const ruleOptions = (inputType: string) => (value: any) => {
323
323
  </form-table>
324
324
  </v-col>
325
325
  <v-col cols="12">
326
- {{optionData}}
327
326
  <form-table v-model="optionData.items"
328
327
  hide-default-footer
329
328
  :importable="false"
@@ -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
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramathibodi/nuxt-commons",
3
- "version": "0.1.52",
3
+ "version": "0.1.53",
4
4
  "description": "Ramathibodi Nuxt modules for common components",
5
5
  "repository": {
6
6
  "type": "git",