hbchen 9 tháng trước cách đây
mục cha
commit
a5bc2cc473
2 tập tin đã thay đổi với 25 bổ sung1 xóa
  1. 24 0
      src/views/sandbox_manage/sandFlowNew/index.vue
  2. 1 1
      src/vuex/modules/sand.js

+ 24 - 0
src/views/sandbox_manage/sandFlowNew/index.vue

@@ -187,6 +187,30 @@
               />
             </el-tooltip>
           </div>
+          <div class="sand-tool-item">
+            <el-dropdown trigger="click" @command="(e)=>toolClickOptions('changeLineHeight',nodeTextDisable,e)" 
+              placement="bottom">
+              <div :class="nodeTextDisable?'tool-disabled':''" class="dropdown-box">
+                <el-tooltip content="文本行高" placement="top" :open-delay="250">
+                  <div class="dropdown-content"  >
+                    <img :src="nodeTextDisable? 
+                      require('@/assets/img/sand_new/tools/line-height-disabled.png'):
+                      require('@/assets/img/sand_new/tools/line-height.png')" 
+                      style="vertical-align: middle;"/>
+                  </div>
+                </el-tooltip>
+                <el-tooltip content="文本行高" placement="top" :open-delay="250">
+                  <span v-show="nodeTextDisable" class="disabled-item" @click.stop="()=>{}"></span>
+                </el-tooltip>
+              </div>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item v-for="s in lineHeightOptions" :command="s" :key="s"
+                :class="styleOptions.lineHeight==s?'style-acitve':''">
+                    {{ s }}
+                </el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </div>
           <div class="sand-tool-item">
             <el-dropdown trigger="click" @command="(e)=>toolClickOptions('changeTextAlign',nodeTextDisable,e)" 
               placement="bottom">

+ 1 - 1
src/vuex/modules/sand.js

@@ -44,7 +44,7 @@ const setSandboxToolStatus=(state,payload)=>{
 				fontStyleSet.add(attrs.text.fontStyle)
 				textDecorationSet.add(attrs.text.textDecoration)
 				colorSet.add(attrs.text.fill)
-				lineHeightSet.add(Math.round((attrs.text.lineHeight/attrs.text.fontSize)*10)/10)
+				lineHeightSet.add(Math.round((attrs.text.lineHeight/attrs.text.fontSize)*100)/100)
 				textAlignSet.add(attrs.text.textAnchor)
 				if(!(element.data) || element.data.key!='text'){
 					// console.log('不是text');