Commit d8b883c7 by chenwq

富文本excludeMenus做可配置

1 parent 825818e0
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<slot :name="item.suffixSlot" :scope="item"></slot> <slot :name="item.suffixSlot" :scope="item"></slot>
</template> </template>
<!-- 图文编辑器 --> <!-- 图文编辑器 -->
<textBox v-else-if="item.type === 'textBox'" :ref="item.name + 'TextBox'" @change="e => handleTextBoxChange(e, item)" @focus="handleTextBoxFocus(item)"></textBox> <textBox v-else-if="item.type === 'textBox'" :ref="item.name + 'TextBox'" :excludeMenus="item.excludeMenus || ['code']" @change="e => handleTextBoxChange(e, item)" @focus="handleTextBoxFocus(item)"></textBox>
<!-- 地图 --> <!-- 地图 -->
<div v-else-if="item.type === 'map'" class="flex"> <div v-else-if="item.type === 'map'" class="flex">
<Province ref="provinceForm" :subdistrict="subdistrict" :isDisabled="item.isDisabled" @selectProvince="e => handleSelectProvince(e, item)" @selectCity="e => handleSelectCity(e, item)"></Province> <Province ref="provinceForm" :subdistrict="subdistrict" :isDisabled="item.isDisabled" @selectProvince="e => handleSelectProvince(e, item)" @selectCity="e => handleSelectCity(e, item)"></Province>
......
...@@ -15,6 +15,12 @@ export default { ...@@ -15,6 +15,12 @@ export default {
editorOption: {} editorOption: {}
} }
}, },
props: {
excludeMenus: {
type: Array,
default: () => ['code']
}
},
mounted() { mounted() {
this.getEdit() this.getEdit()
}, },
...@@ -27,7 +33,7 @@ export default { ...@@ -27,7 +33,7 @@ export default {
this.editor.config.menuTooltipPosition = 'down' this.editor.config.menuTooltipPosition = 'down'
this.editor.config.height = 400 this.editor.config.height = 400
this.editor.config.width = 500 this.editor.config.width = 500
this.editor.config.excludeMenus = ['code'] this.editor.config.excludeMenus = this.excludeMenus
this.editor.config.onchange = html => { this.editor.config.onchange = html => {
// console.log(html); // console.log(html);
this.content = html // 绑定当前逐渐地值 this.content = html // 绑定当前逐渐地值
......
...@@ -574,7 +574,8 @@ export default { ...@@ -574,7 +574,8 @@ export default {
label: '活动详情', label: '活动详情',
name: 'activityDetail', name: 'activityDetail',
tips: '展示活动的详细内容', tips: '展示活动的详细内容',
type: 'textBox' type: 'textBox',
excludeMenus: ['video', 'code']
}, },
{ {
label: '音乐文件', label: '音乐文件',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!