perf: Close editor save content

This commit is contained in:
wangdan-fit2cloud 2025-02-18 14:54:12 +08:00 committed by GitHub
parent 7f6c528291
commit dd047747f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,7 +25,7 @@
</template>
<script setup lang="ts">
import { ref, computed } from 'vue'
import { ref, computed, watch } from 'vue'
defineOptions({ name: 'MdEditorMagnify' })
const props = defineProps<{
title: String
@ -40,8 +40,13 @@ const data = computed({
return props.modelValue
}
})
const dialogVisible = ref(false)
watch(dialogVisible, (bool) => {
if (!bool) {
emit('submitDialog', cloneContent.value)
}
})
const cloneContent = ref('')
const footers: any = [null, '=', 0]
function openDialog() {