fix:修复中文下 topology不显示的bug

This commit is contained in:
zhangyu
2021-03-05 16:56:24 +08:00
parent 35f1e1a020
commit 0b9a258821

View File

@@ -50,7 +50,7 @@
<div class="flex middle special-select mb10"
style="width: 75px;height: 28px;display: inline-block;margin: 0 40px 0 20px;background: #fff">
<div class="full pr10">
<el-select v-model="lineName" :placeholder="$t('el.select.placeholder')" size="small"
<el-select v-model="lineName" size="small"
:popper-append-to-body="false"
@change="changeTopologyOpt(lineName,'lineName')">
<div slot="prefix">
@@ -58,7 +58,7 @@
<svg>
<g fill="none" stroke="black" stroke-width="1">
<path
:d="penLineType.find((item,i)=>item.name==lineName).d"
:d="penLineType.find((item,i)=>item.id==lineName).d"
>
</path>
</g>
@@ -66,7 +66,7 @@
</div>
</div>
<el-option :disabled="true" :value="false">{{$t('project.topology.defaultLineType')}}</el-option>
<el-option v-for="(item,index) in penLineType" :value="item.name" :key="index">
<el-option v-for="(item,index) in penLineType" :value="item.id" :key="index">
<div class="icon-item" style="position: relative;width: 100%;padding: 0">
<svg>
<g fill="none" :stroke="(lineName==item.name)?'#ee9d3f':'black'" stroke-width="1">
@@ -521,9 +521,9 @@
chartData:{},
chartGetData:[],
penLineType:[
{d:'M5 19 a50,100 0 0,1 40,0',"stroke-dasharray":"",name:this.$t('project.topology.curve')},
{d:'M5 8 l20 0 l0 12 l20 0',"stroke-dasharray":"",name:this.$t('project.topology.polyline')},
{d:'M5 14 l40 0',"stroke-dasharray":"",name:this.$t('project.topology.line')},
{d:'M5 19 a50,100 0 0,1 40,0',"stroke-dasharray":"",name:this.$t('project.topology.curve'),id:'curve'},
{d:'M5 8 l20 0 l0 12 l20 0',"stroke-dasharray":"",name:this.$t('project.topology.polyline'),id:'polyline'},
{d:'M5 14 l40 0',"stroke-dasharray":"",name:this.$t('project.topology.line'),id:'line'},
// {d:'M5 20 C0,8 50,0 85,0',"stroke-dasharray":"",name:'mind'},
],
lineName:'curve',