Commit b7035df8 authored by shangtx's avatar shangtx

feat: 图片类系统参数

parent 49f0cbf3
...@@ -10,6 +10,14 @@ ...@@ -10,6 +10,14 @@
> >
<a-form> <a-form>
<a-row> <a-row>
<a-col v-if="param.type == 4" :span="24">
<ImageUpload
:label="param.name"
decoration="image"
:formItemLayout="null"
ref="image"
/>
</a-col>
<a-col v-if="param.type == 3" :span="24"> <a-col v-if="param.type == 3" :span="24">
<a-form-item :label="param.name" v-bind="formItemLayout"> <a-form-item :label="param.name" v-bind="formItemLayout">
<RichText ref="RichText" :height="600" /> <RichText ref="RichText" :height="600" />
...@@ -58,6 +66,9 @@ export default { ...@@ -58,6 +66,9 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (row.type == 3) { if (row.type == 3) {
this.$refs.RichText.setContent(row.value) this.$refs.RichText.setContent(row.value)
}
if (row.type == 4) {
this.$refs.image.setValue([row.value])
} else { } else {
this.value = row.value this.value = row.value
} }
...@@ -72,6 +83,8 @@ export default { ...@@ -72,6 +83,8 @@ export default {
let value = null let value = null
if (this.param.type == 3) { if (this.param.type == 3) {
value = this.$refs.RichText.getContent() value = this.$refs.RichText.getContent()
} else if (this.param.type == 4) {
value = this.$refs.image.getValue()[0]
} else { } else {
value = this.value value = this.value
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment