|
@@ -18,7 +18,7 @@
|
|
|
v-else
|
|
v-else
|
|
|
:key="'tag-' + i"
|
|
:key="'tag-' + i"
|
|
|
closable
|
|
closable
|
|
|
- :style="getTagStyle(tag)"
|
|
|
|
|
|
|
+ :style="{ color: tag.color }"
|
|
|
class="dynamic-tag"
|
|
class="dynamic-tag"
|
|
|
@close="handleClose(i)"
|
|
@close="handleClose(i)"
|
|
|
@dblclick.native="handleEdit(i)"
|
|
@dblclick.native="handleEdit(i)"
|
|
@@ -406,55 +406,6 @@ export default {
|
|
|
console.error(e);
|
|
console.error(e);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- // 样式调整
|
|
|
|
|
- getTagStyle(tag) {
|
|
|
|
|
- const style = { color: tag.color };
|
|
|
|
|
-
|
|
|
|
|
- if (this.data.unified_attrib) {
|
|
|
|
|
- if (this.data.unified_attrib.font_size) {
|
|
|
|
|
- style['font-size'] = this.data.unified_attrib.font_size;
|
|
|
|
|
- }
|
|
|
|
|
- if (this.data.unified_attrib.font) {
|
|
|
|
|
- style['font-family'] = this.data.unified_attrib.font;
|
|
|
|
|
- }
|
|
|
|
|
- // if (this.data.unified_attrib.text_color) {
|
|
|
|
|
- // style['color'] = this.data.unified_attrib.text_color;
|
|
|
|
|
- // }
|
|
|
|
|
- // if (this.data.unified_attrib.line_height) {
|
|
|
|
|
- // style['line-height'] = this.data.unified_attrib.line_height;
|
|
|
|
|
- // }
|
|
|
|
|
- if (this.data.unified_attrib.font_weight) {
|
|
|
|
|
- style['font-weight'] = this.data.unified_attrib.font_weight;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return style;
|
|
|
|
|
- },
|
|
|
|
|
- setRichFormat(type, val) {
|
|
|
|
|
- if (!this.data.unified_attrib) {
|
|
|
|
|
- this.$set(this.data, 'unified_attrib', {});
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- switch (type) {
|
|
|
|
|
- case 'fontSize':
|
|
|
|
|
- this.$set(this.data.unified_attrib, 'font_size', val);
|
|
|
|
|
- break;
|
|
|
|
|
- case 'fontFamily':
|
|
|
|
|
- this.$set(this.data.unified_attrib, 'font', val);
|
|
|
|
|
- break;
|
|
|
|
|
- // case 'color':
|
|
|
|
|
- // this.$set(this.data.unified_attrib, 'text_color', val);
|
|
|
|
|
- // break;
|
|
|
|
|
- // case 'lineHeight':
|
|
|
|
|
- // this.$set(this.data.unified_attrib, 'line_height', parseFloat(val));
|
|
|
|
|
- // break;
|
|
|
|
|
- case 'bold':
|
|
|
|
|
- this.$set(this.data.unified_attrib, 'font_weight', val ? 'bold' : 'normal');
|
|
|
|
|
- break;
|
|
|
|
|
- default:
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
@@ -468,7 +419,7 @@ export default {
|
|
|
:deep .el-tag {
|
|
:deep .el-tag {
|
|
|
height: 32px;
|
|
height: 32px;
|
|
|
padding: 0 10px;
|
|
padding: 0 10px;
|
|
|
- line-height: 31px;
|
|
|
|
|
|
|
+ line-height: 30px;
|
|
|
color: var(--color1);
|
|
color: var(--color1);
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
border-color: var(--color1);
|
|
border-color: var(--color1);
|