Skip to content

Commit

Permalink
fix: preview cover image should show
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Jun 3, 2023
1 parent 7ffccf8 commit 507c0ef
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/drawer/text-base-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import {
} from 'naive-ui'
import { JSONParseReturnOriginal } from 'utils/json'
import type { PropType } from 'vue'

import type { Image } from '@mx-space/api-client'

import { ImageDetailSection } from './components/image-detail-section'
import { JSONEditor } from './components/json-editor'

Expand Down Expand Up @@ -277,9 +275,17 @@ const ImageCoverItem = defineComponent({

props.onChange(value)
}
const show = ref(false)
return () => (
<NFormItem label="文章缩略图" labelAlign="left">
<NPopover placement="left">
<NPopover
placement="left"
show={show.value}
onUpdateShow={(newValue) => {
if (newValue && !props.value) return
show.value = newValue
}}
>
{{
trigger() {
return props.images.length > 0 ? (
Expand Down

0 comments on commit 507c0ef

Please sign in to comment.