Browse Source

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

pull/173/head v2.3.3
小诺 1 year ago committed by 俞宝山
parent
commit
8928183a3f
  1. 2
      snowy-admin-web/src/components/Editor/index.vue
  2. 5
      snowy-admin-web/src/layout/components/panel-search/index.vue

2
snowy-admin-web/src/components/Editor/index.vue

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

5
snowy-admin-web/src/layout/components/panel-search/index.vue

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

Loading…
Cancel
Save