【更新】文本编辑器跟搜索功能细节优化

This commit is contained in:
小诺
2023-10-12 00:56:54 +08:00
committed by 俞宝山
parent 0cae772eb2
commit 8928183a3f
2 changed files with 4 additions and 3 deletions

View File

@@ -3,7 +3,6 @@
</template>
<script setup name="Editor">
import fileApi from '@/api/dev/fileApi'
import Editor from '@tinymce/tinymce-vue'
import tinymce from 'tinymce/tinymce'
import 'tinymce/themes/silver'
@@ -90,6 +89,7 @@
})
const contentValue = ref()
watch(props, (newValue) => {
contentValue.value = newValue.modelValue
emit('update:modelValue', newValue.modelValue)
})
watch(contentValue, (newValue) => {

View File

@@ -234,9 +234,10 @@
}
// 关闭搜索面板
const searchPanelClose = () => {
if (searchActive.value) {
setActive(false)
if (!searchActive.value) {
return false
}
setActive(false)
results.value = []
if (inputRef.value.activated) {
inputRef.value.activated = false