|
|
@@ -3,7 +3,18 @@
|
|
|
v-if="isDisplay"
|
|
|
class="c-dynamic-item"
|
|
|
>
|
|
|
- <span class="l-flex__none c-dynamic-item__name u-font-size--xs">{{ attrName }}</span>
|
|
|
+ <div class="l-flex__none c-dynamic-item__name">
|
|
|
+ <span class="c-sibling-item--v u-font-size--xs">{{ attrName }}</span>
|
|
|
+ <el-button
|
|
|
+ v-if="isTextAreaButton"
|
|
|
+ class="c-sibling-item--v"
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="onChooseEdit"
|
|
|
+ >
|
|
|
+ 设置
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
<el-input-number
|
|
|
v-if="isNumber"
|
|
|
v-model="node[attrKey]"
|
|
|
@@ -197,6 +208,9 @@ export default {
|
|
|
isTextArea () {
|
|
|
return this.attrType === 'textarea'
|
|
|
},
|
|
|
+ isTextAreaButton () {
|
|
|
+ return this.isTextArea && this.attr.options?.button
|
|
|
+ },
|
|
|
isSelect () {
|
|
|
return this.attrType === 'select'
|
|
|
},
|
|
|
@@ -266,6 +280,9 @@ export default {
|
|
|
onChoose () {
|
|
|
this.$emit('choose', this.attr)
|
|
|
},
|
|
|
+ onChooseEdit () {
|
|
|
+ this.$emit('choose-edit', this.attr)
|
|
|
+ },
|
|
|
onFit (strat) {
|
|
|
strat.callback?.(this.node, this.root)
|
|
|
},
|