diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue index 97ac4b741d..04281743e1 100644 --- a/frontend/src/components/canvas/components/TextAttr.vue +++ b/frontend/src/components/canvas/components/TextAttr.vue @@ -41,6 +41,14 @@ + + + + +
+ +
+
@@ -79,6 +87,7 @@ export default { }, data() { return { + innerOpacity: 0, textAlignOptions: [ { icon: 'iconfont icon-juzuo', @@ -97,8 +106,19 @@ export default { } ] } }, + watch: { + innerOpacity: { + handler(oldVal, newVal) { + this.styleInfo['opacity'] = this.innerOpacity / 100 + } + } + }, + mounted() { + if (this.styleInfo['opacity']) { + this.innerOpacity = this.styleInfo['opacity'] * 100 + } + }, computed: { - letterDivColor() { const style = { height: '2px', @@ -153,7 +173,7 @@ export default { ps = x + 60 } // 防止toolbar超出边界 - const xGap = ps + 395 - this.canvasWidth + const xGap = ps + 495 - this.canvasWidth // console.log('canvasWidth:' + this.canvasWidth + ';xGap:' + xGap) if (xGap > 0) { return ps - xGap @@ -185,7 +205,7 @@ export default { .el-card-main { height: 34px; z-index: 10; - width: 450px; + width: 550px; position: absolute; }