perf: Close editor save content
This commit is contained in:
parent
7f6c528291
commit
dd047747f6
@ -25,7 +25,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed, watch } from 'vue'
|
||||||
defineOptions({ name: 'MdEditorMagnify' })
|
defineOptions({ name: 'MdEditorMagnify' })
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
title: String
|
title: String
|
||||||
@ -40,8 +40,13 @@ const data = computed({
|
|||||||
return props.modelValue
|
return props.modelValue
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
|
watch(dialogVisible, (bool) => {
|
||||||
|
if (!bool) {
|
||||||
|
emit('submitDialog', cloneContent.value)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const cloneContent = ref('')
|
const cloneContent = ref('')
|
||||||
const footers: any = [null, '=', 0]
|
const footers: any = [null, '=', 0]
|
||||||
function openDialog() {
|
function openDialog() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user