优化 除了英文字符换行问题
This commit is contained in:
parent
f5083ca420
commit
dfe4c43765
|
|
@ -12,8 +12,8 @@
|
|||
<span
|
||||
:id="textElId"
|
||||
:style="cellInfo.style.text"
|
||||
style="word-break: keep-all; white-space: normal; overflow-wrap: break-word;"
|
||||
v-html="safeHtml(cellInfo.label)">
|
||||
style="word-break: keep-all; white-space: normal; overflow-wrap: break-word;hyphens: auto;"
|
||||
v-html="safeHtml(textShowLabel)">
|
||||
</span>
|
||||
<el-dialog
|
||||
v-model="cellInfo.showInput"
|
||||
|
|
@ -99,7 +99,32 @@ export default defineComponent({
|
|||
targetElement: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
textShowLabel() {
|
||||
// ,​
|
||||
if(this.cellInfo.label){
|
||||
let text = this.cellInfo.label;
|
||||
text = text.replaceAll('"', "“");
|
||||
text = text.replaceAll(',', ",​");
|
||||
text = text.replaceAll('.', ".​");
|
||||
text = text.replaceAll(':', ":​");
|
||||
text = text.replaceAll('!', "!​");
|
||||
text = text.replaceAll('?', "?​");
|
||||
text = text.replaceAll("'", "'​");
|
||||
text = text.replaceAll('-', "-​");
|
||||
text = text.replaceAll('—', "—​");
|
||||
text = text.replaceAll('/', "/​");
|
||||
text = text.replaceAll('(', "(​");
|
||||
text = text.replaceAll(')', ")​");
|
||||
text = text.replaceAll('+', "+​");
|
||||
text = text.replaceAll('=', "=​");
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
return this.cellInfo.label
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const node = (this as any).getNode()
|
||||
this.nodeInfo = node
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
<span
|
||||
:id="textElId"
|
||||
:style="cellInfo.style.text"
|
||||
style="word-break: keep-all; white-space: normal; overflow-wrap: break-word;"
|
||||
v-html="safeHtml(cellInfo.label)">
|
||||
style="word-break: keep-all; white-space: normal; overflow-wrap: break-word;hyphens: auto;"
|
||||
v-html="safeHtml(textShowLabel)">
|
||||
</span>
|
||||
<el-dialog
|
||||
v-model="cellInfo.showInput"
|
||||
|
|
@ -99,7 +99,32 @@ export default defineComponent({
|
|||
targetElement: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
textShowLabel() {
|
||||
// ,​
|
||||
if(this.cellInfo.label){
|
||||
let text = this.cellInfo.label;
|
||||
text = text.replaceAll('"', "“");
|
||||
text = text.replaceAll(',', ",​");
|
||||
text = text.replaceAll('.', ".​");
|
||||
text = text.replaceAll(':', ":​");
|
||||
text = text.replaceAll('!', "!​");
|
||||
text = text.replaceAll('?', "?​");
|
||||
text = text.replaceAll("'", "'​");
|
||||
text = text.replaceAll('-', "-​");
|
||||
text = text.replaceAll('—', "—​");
|
||||
text = text.replaceAll('/', "/​");
|
||||
text = text.replaceAll('(', "(​");
|
||||
text = text.replaceAll(')', ")​");
|
||||
text = text.replaceAll('+', "+​");
|
||||
text = text.replaceAll('=', "=​");
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
return this.cellInfo.label
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const node = (this as any).getNode()
|
||||
this.nodeInfo = node
|
||||
|
|
|
|||
Loading…
Reference in New Issue