update
This commit is contained in:
parent
f6a41d722f
commit
2bba341755
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch, defineComponent, h, type PropType, type VNode, type Component } from 'vue'
|
||||
import { Close, FullScreen, CopyDocument, Plus, Delete, Promotion } from '@element-plus/icons-vue'
|
||||
import { Close, FullScreen, CopyDocument, Plus, Delete, Promotion, UploadFilled } from '@element-plus/icons-vue'
|
||||
import {
|
||||
ElFormItem, ElInput, ElInputNumber, ElSwitch, ElButton,
|
||||
ElCollapse, ElCollapseItem, ElIcon, ElMessage
|
||||
|
|
@ -289,7 +289,7 @@ const NodeEditor: Component = defineComponent({
|
|||
lang: { type: String, default: '' },
|
||||
zhParent: { type: Object as PropType<any>, default: undefined },
|
||||
},
|
||||
setup(p) {
|
||||
setup(p: any) {
|
||||
return () => {
|
||||
const value = p.parent[p.fieldKey]
|
||||
const key = p.fieldKey
|
||||
|
|
@ -344,11 +344,19 @@ const NodeEditor: Component = defineComponent({
|
|||
},
|
||||
})
|
||||
}
|
||||
const inputNode = h(ElInput, {
|
||||
const inputNode = [
|
||||
h(ElInput, {
|
||||
modelValue: value,
|
||||
...({ type: 'textarea', autosize: { minRows: 1, maxRows: 6 } }),
|
||||
'onUpdate:modelValue': (v: string) => { p.parent[key] = v },
|
||||
})
|
||||
style: { width: '90%', marginRight: '5px' },
|
||||
}),
|
||||
p.parent[key] === '' && h(ElButton, {
|
||||
size: 'small', type: 'primary',
|
||||
title: '切换为图片上传框',
|
||||
onClick: () => p.parent[key] = '1.png',
|
||||
}, () => h(ElIcon, { size: 14 }, () => h(UploadFilled))),
|
||||
]
|
||||
|
||||
const wangEditor = h(WangEditor, {
|
||||
content: value,
|
||||
|
|
|
|||
Loading…
Reference in New Issue