|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<el-dialog
|
|
|
custom-class="full-text-settings"
|
|
|
- width="470px"
|
|
|
+ width="570px"
|
|
|
:close-on-click-modal="false"
|
|
|
:visible="visible"
|
|
|
:before-close="handleClose"
|
|
|
@@ -23,6 +23,9 @@
|
|
|
<el-button type="primary" class="row-button" @click="applySingleAttrToSelectedComponents('font')">
|
|
|
应用选中组件
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" class="row-button" @click="applySingleAttrToAllComponents('font')">
|
|
|
+ 应用整页
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="字号">
|
|
|
<el-select v-model="unified_attrib.font_size" placeholder="请选择字号">
|
|
|
@@ -31,6 +34,9 @@
|
|
|
<el-button type="primary" class="row-button" @click="applySingleAttrToSelectedComponents('font_size')">
|
|
|
应用选中组件
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" class="row-button" @click="applySingleAttrToAllComponents('font_size')">
|
|
|
+ 应用整页
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="拼音字号">
|
|
|
<el-select v-model="unified_attrib.pinyin_size" placeholder="请选择拼音字号">
|
|
|
@@ -39,18 +45,27 @@
|
|
|
<el-button type="primary" class="row-button" @click="applySingleAttrToSelectedComponents('pinyin_size')">
|
|
|
应用选中组件
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" class="row-button" @click="applySingleAttrToAllComponents('pinyin_size')">
|
|
|
+ 应用整页
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="行距">
|
|
|
<el-input-number v-model="unified_attrib.line_height" :min="0" :max="20" :step="0.1" />
|
|
|
<el-button type="primary" class="row-button" @click="applySingleAttrToSelectedComponents('line_height')">
|
|
|
应用选中组件
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" class="row-button" @click="applySingleAttrToAllComponents('line_height')">
|
|
|
+ 应用整页
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="文字颜色">
|
|
|
<el-color-picker v-model="unified_attrib.text_color" />
|
|
|
<el-button type="primary" class="row-button" @click="applySingleAttrToSelectedComponents('text_color')">
|
|
|
应用选中组件
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" class="row-button" @click="applySingleAttrToAllComponents('text_color')">
|
|
|
+ 应用整页
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="对齐方式">
|
|
|
<el-select v-model="unified_attrib.align" placeholder="请选择对齐方式">
|
|
|
@@ -61,12 +76,18 @@
|
|
|
<el-button type="primary" class="row-button" @click="applySingleAttrToSelectedComponents('align')">
|
|
|
应用选中组件
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" class="row-button" @click="applySingleAttrToAllComponents('align')">
|
|
|
+ 应用整页
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="拼音">
|
|
|
<el-switch v-model="unified_attrib.view_pinyin" active-value="true" inactive-value="false" />
|
|
|
<el-button type="primary" class="row-button" @click="applySingleAttrToSelectedComponents('view_pinyin')">
|
|
|
应用选中组件
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" class="row-button" @click="applySingleAttrToAllComponents('view_pinyin')">
|
|
|
+ 应用整页
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="拼音位置">
|
|
|
<el-radio-group v-model="unified_attrib.pinyin_position" :disabled="!isEnable(unified_attrib.view_pinyin)">
|
|
|
@@ -82,6 +103,14 @@
|
|
|
>
|
|
|
应用选中组件
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :disabled="!isEnable(unified_attrib.view_pinyin)"
|
|
|
+ class="row-button"
|
|
|
+ @click="applySingleAttrToAllComponents('pinyin_position')"
|
|
|
+ >
|
|
|
+ 应用整页
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
@@ -167,13 +196,21 @@ export default {
|
|
|
this.$emit('applyToSelectedComponents', this.unified_attrib);
|
|
|
},
|
|
|
/**
|
|
|
- * 仅应用单个属性到选中组件
|
|
|
+ * 应用单个属性到选中组件
|
|
|
* @param {String} attr - 属性名
|
|
|
*/
|
|
|
applySingleAttrToSelectedComponents(attr) {
|
|
|
this.$emit('update:visible', false);
|
|
|
this.$emit('applySingleAttrToSelectedComponents', { attr, value: this.unified_attrib[attr] });
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 应用单个属性到所有组件
|
|
|
+ * @param {String} attr - 属性名
|
|
|
+ */
|
|
|
+ applySingleAttrToAllComponents(attr) {
|
|
|
+ this.$emit('update:visible', false);
|
|
|
+ this.$emit('applySingleAttrToAllComponents', { attr, value: this.unified_attrib[attr] });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|