删除无用代码

2.0
咬轮猫 4 years ago
parent eec9c89ff6
commit a9632846cd

@ -1,31 +0,0 @@
<template>
<component :is="svgtype"
:svg_color= svg_color></component>
</template>
<script>
let importComponents = {};
export default {
props: ['svgInfoData','svg_color','svgtype'],
data () {
return {
componentTag: ''
}
},
components: importComponents,
methods: {
},
created () {
this.svgInfoData.forEach(f => {
console.log(111);
let componentInfo = {
template: f.template,
props: f.props
}
importComponents[f.type] = componentInfo;
})
}
}
</script>
<style scoped>
</style>

@ -1,48 +0,0 @@
<template>
<div style="padding: 30px">
<button @click="change('1')">1</button>
<button @click="change('2')">2</button>
<button @click="change('3')">3</button>
<component :is="componentTag"
:color=color
:translate=translate></component>
</div>
</template>
<script>
var componentA = {
template: "<div style=\"color:red\">我是 {{color}}</div>",
props: ["color"]
}
var componentB = {
template: `<polygon points="0,-8 5,0 10,-8" :fill="color" :stroke="color" stroke-width="2" :transform="translate"></polygon>`
, props: ['color', 'translate']
}
var componentC = {
template: `<div style="color:rebeccapurple">我是 componentC</div>`
}
export default {
components: { componentA, componentB, componentC },
data () {
return {
componentTag: '',
color: '测试颜色',
translate: '测试坐标'
}
},
methods: {
change (index) {
console.log(111);
if (index == 1) {
this.componentTag = 'componentA'
}
else {
this.componentTag = 'componentB'
}
},
}
}
</script>
<style scoped>
</style>

@ -7,9 +7,9 @@
accordion>
<a-collapse-panel key="1"
header="基本形状">
<ul class="svg-nav-list">
<li v-for="item in svgInfoData" :key="item">
<li v-for="item in svgInfoData"
:key="item">
<div class="title">{{item.title}}</div>
<img :title="item.title"
@mousedown="Mousedown(item.type,item.title,item.default_color)"
@ -17,164 +17,11 @@
draggable="true">
</li>
</ul>
<!-- <ul class="svg-nav-list">
<li>
<div class="title">断路器</div><img title="断路器"
@mousedown="Mousedown('CircuitBreakerSvg','断路器','#00FF00',40,0,'',2)"
src="../assets/CircuitBreakerSvg.png"
draggable="true">
</li>
<li>
<div class="title">竖线</div><img title="竖线"
@mousedown="Mousedown('VerticalLineSvg','竖线','#FF0000',150,0,'',2)"
src="../assets/VerticalLineSvg.png"
draggable="true">
</li>
<li>
<div class="title">文字</div><img title="文字"
@mousedown="Mousedown('TextSvg','文字','#FF0000',0,50,'文字')"
src="../assets/TextSvg.png"
draggable="true">
</li>
<li>
<div class="title">隔离开关</div><img title="隔离开关"
@mousedown="Mousedown('IsolatingSwitchSvg','隔离开关','#00FF00',20,0,'',2)"
src="../assets/IsolatingSwitchSvg.png"
draggable="true">
</li>
<li>
<div class="title">避雷器</div><img title="避雷器"
@mousedown="Mousedown('LightningArresterSvg','避雷器','#FF0000',7,0,'',2)"
src="../assets/LightningArresterSvg.png"
draggable="true">
</li>
<li>
<div class="title">标准电容器</div><img title="标准电容器"
@mousedown="Mousedown('StandardCapacitorSvg','标准电容器','#FF0000',3,0,'',2)"
src="../assets/StandardCapacitorSvg.png"
draggable="true">
</li>
<li>
<div class="title">电线开关</div><img title="电线开关"
@mousedown="Mousedown('WireBreakOffSvg','电线开关','#00FF00',5,0,'',2)"
src="../assets/WireBreakOffSvg.png"
draggable="true">
</li>
<li>
<div class="title">表格</div><img title="表格"
@mousedown="Mousedown('TableSvg','表格','#CCCC33')"
src="../assets/TableSvg.png"
draggable="true">
</li>
<li>
<div class="title">横线</div><img title="横线"
@mousedown="Mousedown('HorizontalLineSvg','横线','#FF0000',150,0,'',2)"
src="../assets/HorizontalLineSvg.png"
draggable="true">
</li>
<li>
<div class="title">多段向上折线</div><img title="多段向上折线"
@mousedown="Mousedown('PolylineUpSvg','多段向上折线','#FF0000',7,0,'',2)"
src="../assets/PolylineUpSvg.png"
draggable="true">
</li>
<li>
<div class="title">多段向下折线</div><img title="多段向下折线"
@mousedown="Mousedown('PolylineDownSvg','多段向下折线','#FF0000',7,0,'',2)"
src="../assets/PolylineDownSvg.png"
draggable="true">
</li>
<li>
<div class="title">箭头向上</div><img title="箭头向上"
@mousedown="Mousedown('ArrowUpSvg','箭头向上','#FF0000',2,0,'',2)"
src="../assets/ArrowUpSvg.png"
draggable="true">
</li>
<li>
<div class="title">箭头向下</div><img title="箭头向下"
@mousedown="Mousedown('ArrowDownSvg','箭头向下','#FF0000',2,0,'',2)"
src="../assets/ArrowDownSvg.png"
draggable="true">
</li>
<li>
<div class="title">接地灰白</div><img title="接地灰白"
@mousedown="Mousedown('GroundGraySvg','接地灰白','#CCCCCC',3,0,'',2)"
src="../assets/GroundGraySvg.png"
draggable="true">
</li>
<li>
<div class="title">信号灯</div><img title="信号灯"
@mousedown="Mousedown('SignalLamp','信号灯','#FF0000',3,0,'',2)"
src="../assets/SignalLamp.png"
draggable="true">
</li>
<li>
<div class="title">长方形</div><img title="长方形"
@mousedown="Mousedown('RectSvg','长方形','#FF0000',30,0,'',2)"
src="../assets/RectSvg.png"
draggable="true">
</li>
<li>
<div class="title">双圆</div><img title="双圆"
@mousedown="Mousedown('TwoCircleSvg','双圆','#FF0000',3,0,'',2)"
src="../assets/TwoCircleSvg.png"
draggable="true">
</li>
<li>
<div class="title">电流互感器y</div><img title="电流互感器y"
@mousedown="Mousedown('TransformerYSvg','电流互感器y','#FF0000',5,0,'',2)"
src="../assets/TransformerY.png"
draggable="true">
</li>
<li>
<div class="title">三相互感器开口</div><img title="三相互感器开口"
@mousedown="Mousedown('TransformerTriphaseOpenSvg','三相互感器开口','#FF0000',2,0,'',2)"
src="../assets/TransformerTriphaseOpen.png"
draggable="true">
</li>
<li>
<div class="title">双绕组变压器</div><img title="双绕组变压器"
@mousedown="Mousedown('DoubleWindingSvg','双绕组变压器','#FF0000',5,0,'',2)"
src="../assets/DoubleWindingSvg.png"
draggable="true">
</li>
<li>
<div class="title">双绕组变压器B</div><img title="双绕组变压器B"
@mousedown="Mousedown('DoubleWindingSvgB','双绕组变压器B','#FF0000',5,0,'',2)"
src="../assets/DoubleWindingSvgB.png"
draggable="true">
</li>
<li>
<div class="title">电容柜</div><img title="电容柜"
@mousedown="Mousedown('GGJSvg','电容柜','#FF6600',1,0,'',2)"
src="../assets/GGJ.png"
draggable="true">
</li>
<li>
<div class="title">标准电抗</div><img title="标准电抗"
@mousedown="Mousedown('StandardReactanceSvg','标准电抗','#CCCC00',3,0,'',2)"
src="../assets/StandardReactance.png"
draggable="true">
</li>
<li>
<div class="title">发电机</div><img title="发电机"
@mousedown="Mousedown('AlternatorSvg','发电机','#FF0000',5,0,'',2)"
src="../assets/Alternator.png"
draggable="true">
</li>
</ul> -->
</a-collapse-panel>
<a-collapse-panel key="2"
header="拓扑图"
:disabled="false">
<!-- <ul class="svg-nav-list two-item">
<li>
<div class="title">智慧终端</div><img title="智慧终端"
@mousedown="Mousedown('SmartTerminalSvg','智慧终端','',140,0,'',0)"
src="../assets/SmartTerminalSvg.png"
draggable="true">
</li>
</ul> -->
<p>{{ text }}</p>
</a-collapse-panel>
<a-collapse-panel key="3"
header="物联网">
@ -194,16 +41,11 @@ export default {
};
},
methods: {
Mousedown (type, title, color, height, fontSize, text, width) {
Mousedown (type, title, color) {
global.CurrentlySelectedToolBarType = type;
global.CurrentlySelectedToolBarTypeName = title;
global.CurrentlySelectedToolBarTitle = title;
global.CurrentlySelectedToolBarColor = color;
global.CurrentlySelectedToolBarHeight = height;
global.CurrentlySelectedToolBarFontSize = fontSize;
global.CurrentlySelectedToolBarText = text;
global.CurrentlySelectedToolBarWidth = width;
// alert(this.$UCore.GenUUid());
},
}
};

@ -21,7 +21,7 @@
<input type="color" v-model="selectSvgInfo.svgColor">
</a-form-item>
<a-form-item label="大小">
<a-input-number v-model:value="selectSvgInfo.height" :min="1" :max="3000"/>
<a-input-number v-model:value="selectSvgInfo.size" :min="1" :max="3000"/>
</a-form-item>
<a-form-item label="旋转">
<a-input-number v-model:value="selectSvgInfo.angle" :min="0" :max="360"/>

@ -1,63 +1,31 @@
<!-- 箭头向下svg组件 -->
<template>
<CircuitBreakerSvg :height = height :color= color :width= width v-if="type=='CircuitBreakerSvg'"></CircuitBreakerSvg>
<VerticalLineSvg :height = height :color= color :width= width v-else-if="type=='VerticalLineSvg'"></VerticalLineSvg>
<TextSvg :fontSize= fontSize :color= color :text= svgText v-else-if="type=='TextSvg'"></TextSvg>
<IsolatingSwitchSvg :height = height :color= color :width= width v-else-if="type=='IsolatingSwitchSvg'"></IsolatingSwitchSvg>
<LightningArresterSvg :height = height :color= color :width= width v-else-if="type=='LightningArresterSvg'"></LightningArresterSvg>
<StandardCapacitorSvg :height = height :color= color :width= width v-else-if="type=='StandardCapacitorSvg'"></StandardCapacitorSvg>
<WireConnectionSvg :height = height :color= color :width= width v-else-if="type=='WireConnectionSvg'"></WireConnectionSvg>
<WireBreakOffSvg :height = height :color= color :width= width v-else-if="type=='WireBreakOffSvg'"></WireBreakOffSvg>
<TableSvg :tableDataList = tableData :editable= editable v-else-if="type=='TableSvg'"></TableSvg>
<HorizontalLineSvg :height = height :color= color :width= width v-else-if="type=='HorizontalLineSvg'"></HorizontalLineSvg>
<PolylineUpSvg :height = height :color= color :width= width v-else-if="type=='PolylineUpSvg'"></PolylineUpSvg>
<PolylineDownSvg :height = height :color= color :width= width v-else-if="type=='PolylineDownSvg'"></PolylineDownSvg>
<ArrowUpSvg :height = height :color= color :width= width v-else-if="type=='ArrowUpSvg'"></ArrowUpSvg>
<ArrowDownSvg :height = height :color= color :width= width v-else-if="type=='ArrowDownSvg'"></ArrowDownSvg>
<GroundGraySvg :height = height :color= color :width= width v-else-if="type=='GroundGraySvg'"></GroundGraySvg>
<SignalLamp :height = height :color= color :width= width v-else-if="type=='SignalLamp'"></SignalLamp>
<RectSvg :height = height :color= color :width= width v-else-if="type=='RectSvg'"></RectSvg>
<TwoCircleSvg :height = height :color= color :width= width v-else-if="type=='TwoCircleSvg'"></TwoCircleSvg>
<TransformerY :height = height :color= color :width= width v-else-if="type=='TransformerYSvg'"></TransformerY>
<TransformerTriphaseOpen :height = height :color= color :width= width v-else-if="type=='TransformerTriphaseOpenSvg'"></TransformerTriphaseOpen>
<DoubleWindingSvg :height = height :color= color :width= width v-else-if="type=='DoubleWindingSvg'"></DoubleWindingSvg>
<DoubleWindingSvgB :height = height :color= color :width= width v-else-if="type=='DoubleWindingSvgB'"></DoubleWindingSvgB>
<GGJ :height = height :color= color :width= width v-else-if="type=='GGJSvg'"></GGJ>
<StandardReactance :height = height :color= color :width= width v-else-if="type=='StandardReactanceSvg'"></StandardReactance>
<Alternator :height = height :color= color :width= width v-else-if="type=='AlternatorSvg'"></Alternator>
<!-- <SmartTerminalSvg :height = height :color= color :width= width v-else-if="type=='SmartTerminalSvg'"></SmartTerminalSvg> -->
<component :is="svgtype"
:svg_color= svg_color></component>
</template>
<script>
import CircuitBreakerSvg from '@/components/svgCpt/CircuitBreakerSvg.vue';//svg
import VerticalLineSvg from '@/components/svgCpt/VerticalLineSvg.vue';//线svg
import TextSvg from '@/components/svgCpt/TextSvg.vue';//svg
import IsolatingSwitchSvg from '@/components/svgCpt/IsolatingSwitchSvg.vue';//svg
import LightningArresterSvg from '@/components/svgCpt/LightningArresterSvg.vue';//svg
import StandardCapacitorSvg from '@/components/svgCpt/StandardCapacitorSvg.vue';//svg
import WireConnectionSvg from '@/components/svgCpt/WireConnectionSvg.vue';//线svg
import WireBreakOffSvg from '@/components/svgCpt/WireBreakOffSvg.vue';//线svg
import TableSvg from '@/components/svgCpt/TableSvg.vue';//svg
import HorizontalLineSvg from '@/components/svgCpt/HorizontalLineSvg.vue';//线svg
import PolylineUpSvg from '@/components/svgCpt/PolylineUpSvg.vue';//线
import PolylineDownSvg from '@/components/svgCpt/PolylineDownSvg.vue';//线
import ArrowUpSvg from '@/components/svgCpt/ArrowUpSvg.vue';//
import ArrowDownSvg from '@/components/svgCpt/ArrowDownSvg.vue';//
import GroundGraySvg from '@/components/svgCpt/GroundGraySvg.vue';//
import SignalLamp from '@/components/svgCpt/SignalLamp.vue';//
import RectSvg from '@/components/svgCpt/RectSvg.vue';//
import TwoCircleSvg from '@/components/svgCpt/TwoCircleSvg.vue';//
import TransformerY from '@/components/svgCpt/TransformerY.vue';//y
import TransformerTriphaseOpen from '@/components/svgCpt/TransformerTriphaseOpen.vue';//
import DoubleWindingSvg from '@/components/svgCpt/DoubleWindingSvg.vue';//
import DoubleWindingSvgB from '@/components/svgCpt/DoubleWindingSvgB.vue';//
import GGJ from '@/components/svgCpt/GGJ.vue';//
import StandardReactance from '@/components/svgCpt/StandardReactance.vue';//
import Alternator from '@/components/svgCpt/Alternator.vue';//
// import SmartTerminalSvg from '@/components/svgCpt/SmartTerminalSvg.vue';//
let importComponents = {};
export default {
props: ['height','color','width','type','fontSize','tableData','svgText','editable'],
components: {CircuitBreakerSvg ,VerticalLineSvg,TextSvg,IsolatingSwitchSvg,LightningArresterSvg,StandardCapacitorSvg,WireConnectionSvg,WireBreakOffSvg,TableSvg
,HorizontalLineSvg,PolylineUpSvg,PolylineDownSvg,ArrowUpSvg,ArrowDownSvg,GroundGraySvg,SignalLamp,RectSvg,TwoCircleSvg,TransformerY,TransformerTriphaseOpen,DoubleWindingSvg,DoubleWindingSvgB,GGJ
,StandardReactance,Alternator},
};
props: ['svgInfoData','svg_color','svgtype'],
data () {
return {
componentTag: ''
}
},
components: importComponents,
methods: {
},
created () {
this.svgInfoData.forEach(f => {
console.log(111);
let componentInfo = {
template: f.template,
props: f.props
}
importComponents[f.type] = componentInfo;
})
}
}
</script>
<style scoped>
</style>

@ -1,10 +0,0 @@
<!-- 发电机类型svg组件 -->
<template>
<ellipse id="c1" cx="50" cy="50" rx="35" ry="35" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-10*height)+','+(-10*height)+') scale('+height/5+')'"></ellipse>
<path id="l1" d="M30,50 C30,44 34,40 40,40 46,40 50,44 50,50 M50,50 C50,56 54,60 60,60 66,60 70,56 70,50 " fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-10*height)+','+(-10*height)+')scale('+height/5+')'"></path>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,9 +0,0 @@
<!-- 箭头向下svg组件 -->
<template>
<polygon points="0,-8 5,0 10,-8" :fill="color" :stroke="color" :stroke-width="height" :transform="'translate('+(-5)+','+0+')'"></polygon>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,9 +0,0 @@
<!-- 箭头向上svg组件 -->
<template>
<polygon points="0,8 5,0 10,8" :fill="color" :stroke="color" :stroke-width="height" :transform="'translate('+(-5)+','+0+')'"></polygon>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,9 +0,0 @@
<!-- 充电站svg组件 -->
<template>
<image :x="-height/4" :y="-height/2" :width="height/2" :height="height" xlink:href="../../assets/ChargingStationSvg.png"></image>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,9 +0,0 @@
<!-- 断路器svg组件 -->
<template>
<rect :x="-(height/4)" :y="-(height/2)" :width="height/2" :height="height" :fill="color" stroke="#000000" :stroke-width="width" ></rect>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,15 +0,0 @@
<!-- 双绕组变压器svg组件 -->
<template>
<ellipse cx="0" :cy="-height*4" :rx="height*5" :ry="height*5" fill="none" :stroke="color" :stroke-width="width" ></ellipse>
<ellipse cx="0" :cy="height*4" :rx="height*5" :ry="height*5" fill="none" :stroke="color" :stroke-width="width" ></ellipse>
<polygon :points="height*2+','+(-(height*6))+' '+0+','+(-height*2)+' '+(-height*2)+','+(-height*6)" fill="none" :stroke="color" :stroke-width="width"></polygon>
<line x1="0" :y1="height*4" x2="0" :y2="height*7" fill="none" :stroke="color" :stroke-width="width"></line>
<line x1="0" :y1="height*4" :x2="-(height*2)" :y2="height*2" fill="none" :stroke="color" :stroke-width="width"></line>
<line x1="0" :y1="height*4" :x2="height*2" :y2="height*2" fill="none" :stroke="color" :stroke-width="width"></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,15 +0,0 @@
<!-- 双绕组变压器B类型svg组件 -->
<template>
<ellipse cx="0" :cy="-height*4" :rx="height*5" :ry="height*5" fill="none" :stroke="color" :stroke-width="width" ></ellipse>
<ellipse cx="0" :cy="height*4" :rx="height*5" :ry="height*5" fill="none" :stroke="color" :stroke-width="width" ></ellipse>
<polygon :points="height*2+','+height*6+' '+0+','+height*2 +''+(-height*2)+','+height*6" fill="none" :stroke="color" :stroke-width="width" ></polygon>
<line x1="0" :y1="-height*4" x2="0" :y2="-height*7" fill="none" :stroke="color" :stroke-width="width" ></line>
<line x1="0" :y1="-height*4" :x2="height*2" :y2="-height*2" fill="none" :stroke="color" :stroke-width="width" ></line>
<line x1="0" :y1="-height*4" :x2="-height*2" :y2="-height*2" fill="none" :stroke="color" :stroke-width="width" ></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,20 +0,0 @@
<!-- 电容柜类型svg组件 -->
<template>
<line :x1="0.5*height" :y1="-25*height" :x2="-9.5*height" :y2="-13*height" fill="none" :stroke="color" :stroke-width="width" ></line>
<line :x1="-0.5*height" :y1="-26*height" :x2="9.5*height" :y2="-13*height" fill="none" :stroke="color" :stroke-width="width" ></line>
<line :x1="-12*height" :y1="-17*height" :x2="-6*height" :y2="-8*height" fill="none" :stroke="color" :stroke-width="width"></line>
<line :x1="-15*height" :y1="-12*height" :x2="-11*height" :y2="-3*height" fill="none" :stroke="color" :stroke-width="width"></line>
<polyline :points="(-13*height)+','+(-8*height)+' '+(-22*height)+','+(3*height)+' '+(-22*height)+','+(5*height)" fill="none" :stroke="color" :stroke-width="width" ></polyline>
<line :x1="-21*height" :y1="4*height" :x2="-4*height" :y2="4*height" fill="none" :stroke="color" :stroke-width="width" ></line>
<line :x1="-5*height" :y1="-2*height" :x2="-5*height" :y2="11*height" fill="none" :stroke="color" :stroke-width="width" ></line>
<line :x1="3*height" :y1="-2*height" :x2="3*height" :y2="11*height" fill="none" :stroke="color" :stroke-width="width" ></line>
<line :x1="4*height" :y1="4*height" :x2="21*height" :y2="4*height" fill="none" :stroke="color" :stroke-width="width" ></line>
<polyline :points="(13*height)+','+(-8*height)+' '+(22*height)+','+(3*height)+' '+(22*height)+','+(5*height)" fill="none" :stroke="color" :stroke-width="width" ></polyline>
<line :x1="14*height" :y1="-12*height" :x2="8*height" :y2="-3*height" fill="none" :stroke="color" :stroke-width="width"></line>
<line :x1="12*height" :y1="-17*height" :x2="6*height" :y2="-8*height" fill="none" :stroke="color" :stroke-width="width"></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,12 +0,0 @@
<!-- 接地灰白svg组件 -->
<template>
<line :x1="3*height" :y1="3*height" :x2="3*height" y2="0" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-height*3)+','+(-height*2)+')'"></line>
<line x1="0" :y1="3*height" :x2="6*height" :y2="3*height" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-height*3)+','+(-height*2)+')'"></line>
<line :x1="height" :y1="5*height" :x2="5*height" :y2="5*height" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-height*3)+','+(-height*2)+')'"></line>
<line :x1="2*height" :y1="7*height" :x2="4*height" :y2="7*height" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-height*3)+','+(-height*2)+')'"></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,9 +0,0 @@
<!-- 横线svg组件 -->
<template>
<line :x1="-height/2" :y1="0" :x2="(height)-height/2" :y2="0" fill="none" :stroke="color" :stroke-width="width"></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,12 +0,0 @@
<!-- 隔离开关svg组件 -->
<template>
<line :x1="0" :y1="0-(height)" :x2="0" :y2="0" fill="none" :stroke="color" :stroke-width="width" ></line>
<line :x1="0-(height/2)" :y1="0" :x2="height/3" :y2="0" fill="none" :stroke="color" :stroke-width="width" ></line>
<line :x1="0" :y1="height" :x2="-(height/2)" :y2="height/4" fill="none" :stroke="color" :stroke-width="width"></line>
<line :x1="0" :y1="height*2" :x2="0" :y2="height" fill="none" :stroke="color" :stroke-width="width" ></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,12 +0,0 @@
<!-- 避雷器svg组件 -->
<template>
<rect :x="-height" :y="-(height*2)" :width="(height*2+1)" :height="height*5" fill="none" :stroke="color" :stroke-width="width" />
<line :x1="0" :y1="-(height*3)" :x2="0" :y2="0" fill="none" :stroke="color" :stroke-width="width" />
<line :x1="0" :y1="(height*3)" :x2="0" :y2="(4*height)" fill="none" :stroke="color" :stroke-width="width" />
<polyline :points="(-1)+','+(-7)+' '+(0)+','+(0)+' '+(1)+','+(-7)" fill="none" :stroke="color" :stroke-width="width"/>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,10 +0,0 @@
<!-- 多段线向下svg组件 -->
<template>
<polyline :points="'0,'+height+' '+(2*height-1)+','+(3*height+1)+' '+(4*height-2)+','+height" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-(2*height-1))+','+0+')'" ></polyline>
<polyline :points="'0,'+height+' '+(2*height-1)+','+(3*height+1)+' '+(4*height-2)+','+height" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-(2*height-1))+','+(height+1)+')'" ></polyline>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,10 +0,0 @@
<!-- 多段线向上svg组件 -->
<template>
<polyline :points="'0,'+height+' '+(2*height-1)+','+(-height)+' '+(4*height-2)+','+height" fill="none" :stroke="color" :stroke-width="width" :transform ="'translate('+(-(2*height-1))+','+0+')'"></polyline>
<polyline :points="'0,'+height+' '+(2*height-1)+','+(-height)+' '+(4*height-2)+','+height" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-(2*height-1))+','+(height+1)+')'"></polyline>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,9 +0,0 @@
<!-- 长方形svg组件 -->
<template>
<rect :x="-(height/6)" :y="-(height/2)" :width="height/3" :height="height" fill="none" :stroke="color" :stroke-width="width" stroke-linecap="round"></rect>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,11 +0,0 @@
<!-- 信号灯svg组件 -->
<template>
<ellipse :cx="2*height+1" :cy="7*height+1" :rx="4*height" :ry="4*height" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-(2*height+1))+','+(-(7*height+1))+')'" ></ellipse>
<line :x1="(-height+3)" :y1="10*height" :x2="5*height" :y2="5*height" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-(2*height+1))+','+(-(7*height+1))+')'" ></line>
<line :x1="5*height" :y1="10*height" :x2="(-height+3)" :y2="5*height" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-(2*height+1))+','+(-(7*height+1))+')'"></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,9 +0,0 @@
// <!-- svg -->
// <template>
// <image :x="-height/4" :y="-height/2" :width="height/2" :height="height" xlink:href="../../assets/SmartTerminalSvg.png"></image>
// </template>
// <script>
// export default {
// props: ['height','color','width'],
// };
// </script>

@ -1,12 +0,0 @@
<!-- 标准电容器svg组件 -->
<template>
<line :x1="0" :y1="-(height*4)" :x2="0" :y2="-height" fill="none" :stroke="color" :stroke-width="width" />
<line :x1="-(height*3)" :y1="-height" :x2="height*3" :y2="-height" fill="none" :stroke="color" :stroke-width="width" />
<line :x1="-(height*3)" :y1="height" :x2="height*3" :y2="height" fill="none" :stroke="color" :stroke-width="width" />
<line :x1="0" :y1="(height*4)" :x2="0" :y2="height" fill="none" :stroke="color" :stroke-width="width" />
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,9 +0,0 @@
<!-- 标准电抗类型svg组件 -->
<template>
<path d="M18,63 V36 H33 C33,42 27,51 18,51 9,51 3,42 3,36 3,27 9,21 18,21 V6 V21" fill="none" :stroke="color" :stroke-width="width" :transform="'translate('+(-6*height)+','+(-12*height)+') scale('+height/3+')'"></path>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,86 +0,0 @@
<!-- 表格svg组件 -->
<template>
<foreignObject :x="0" :y="0">
<div id="divtable" class="svgfont" :style="editable?'':'display:none'">&#xe633;</div>
<table border="0" cellpadding="0" cellspacing="0" style="pointer-events: none">
<tr v-for="(tableDataRowItem,index) in tableDataList" :key="index" >
<td v-for="(tableDataColItem) in tableDataRowItem.cols " :key="tableDataColItem.id" class="tdsvg">
<div class="add-tag">
<span>{{ tableDataColItem.val }}</span>
<a-input :disabled="!editable" v-model:value="tableDataColItem.val" class="ainput" size="small"/>
</div>
</td>
</tr>
</table>
</foreignObject>
</template>
<script>
export default {
props: ['tableDataList','x','y','editable'],
methods:{
}
};
</script>
<style lang="less" scoped>
foreignObject{
width: 0px;
height: 0px;
// position:absolute;
overflow: visible;
cursor: pointer;
}
.add-tag {
color: #333;
padding: 0;
position: relative;
span {
display: inline-block;
height: 100%;
padding: 0 32px;
}
.ainput {
pointer-events: auto;
display: inline-block;
position: absolute;
left: 0;
width: 100%;
height: 100%;
caret-color: #426BF2;
::-webkit-input-placeholder {
color: #aaa;
}
border-style: none;
padding: 0 32px;
color: rgb(255, 255, 0);
background-color: black;
}
}
foreignObject #divtable{
position: absolute;
left: 0;
top: 0;
line-height: 20px;
z-index: 111;
color: #fff;
// pointer-events: auto;
display: none;
cursor: pointer;
font-size: 20px;
}
foreignObject:hover #divtable {
pointer-events: none;
display:block;
}
.tdsvg{
border:1px solid rgb(255, 255, 0);
white-space:nowrap;
background:#fff;
color:#999;
text-align:center;
font-size:16px;
background-color: lawngreen;
}
</style>

@ -1,10 +0,0 @@
<!-- 文字svg组件 -->
<template>
<text :x="0-(fontSize*text.length/2)" :y="fontSize/2" :font-size="fontSize" :fill="color">{{text}}</text>
</template>
<script>
export default {
props: ['fontSize','color','text'],
};
</script>

@ -1,12 +0,0 @@
<!-- 电流互感器三相开口 svg组件 -->
<template>
<ellipse cx="0" cy="0" :rx="height*5" :ry="height*5" fill="none" :stroke="color" :stroke-width="width" ></ellipse>
<line :x1="-height" :y1="-height*3" :x2="-height" :y2="height*3" fill="none" :stroke="color" :stroke-width="width"></line>
<line :x1="-height" :y1="-height*3" :x2="height*2" y2="0" fill="none" :stroke="color" :stroke-width="width"></line>
<line :x1="height*2" :y1="height" :x2="-height" :y2="height*3" fill="none" :stroke="color" :stroke-width="width"></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,12 +0,0 @@
<!-- 电流互感器y svg组件 -->
<template>
<ellipse cx="0" cy="0" :rx="height*2" :ry="height*2" fill="none" :stroke="color" :stroke-width="width" ></ellipse>
<line :x1="height" :y1="-height" x2="0" y2="0" fill="none" :stroke="color" :stroke-width="width" ></line>
<line :x1="-height" :y1="-height" x2="0" y2="0" fill="none" :stroke="color" :stroke-width="width" ></line>
<line x1="0" y1="0" x2="0" :y2="height" fill="none" :stroke="color" :stroke-width="width" ></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,10 +0,0 @@
<!-- 双圆svg组件 -->
<template>
<ellipse cx="0" :cy="-height-(height/2)" :rx="height*2" :ry="height*2" fill="none" :stroke="color" :stroke-width="width"></ellipse>
<ellipse cx="0" :cy="height+height/2" :rx="height*2" :ry="height*2" fill="none" :stroke="color" :stroke-width="width"></ellipse>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,9 +0,0 @@
<!-- 竖线svg组件 -->
<template>
<line x1="0" :y1="0-height/2" x2="0" :y2="(0+height)-height/2" fill="none" :stroke="color" :stroke-width="width" />
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,11 +0,0 @@
<!-- 电线断开svg组件 -->
<template>
<line :x1="0" :y1="-(height*8)" :x2="0" :y2="-(3*height)" fill="none" stroke="#00ff00" :stroke-width="width"></line>
<line :x1="0" :y1="3*height" :x2="-(2*height)" :y2="-(3*height)" fill="none" stroke="#00ff00" :stroke-width="width"></line>
<line :x1="0" :y1="9*height" :x2="0" :y2="3*height" fill="none" stroke="#00ff00" :stroke-width="width"></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

@ -1,11 +0,0 @@
<!-- 电线连接svg组件 -->
<template>
<line :x1="0" :y1="-(height*8)" :x2="0" :y2="-(3*height)" fill="none" :stroke="color" :stroke-width="width"></line>
<line :x1="0" :y1="height*3" :x2="0" :y2="-(3*height)" fill="none" :stroke="color" :stroke-width="width"></line>
<line :x1="0" :y1="height*9" :x2="0" :y2="3*height" fill="none" :stroke="color" :stroke-width="width"></line>
</template>
<script>
export default {
props: ['height','color','width'],
};
</script>

File diff suppressed because one or more lines are too long

@ -5,16 +5,25 @@
<a-layout>
<!-- {{tableDefaultData}} -->
<a-layout-header>
<a-button type="primary"
<!-- <a-button type="primary"
@click="testD">导出数据</a-button>
<a-button type="primary"
@click="testE">载入模板</a-button>
@click="testE">载入模板</a-button> -->
<a-button type="primary"
@click="testH">预览</a-button>
<a style="margin-left:20px"
href="https://svgv1.yaolunmao.top">
<a-button type="primary">1.0版本</a-button>
</a>
<a style="margin-left:20px"
href="https://svgedit.yaolunmao.top">
<a-button type="primary">在线绘图</a-button>
</a>
<a style="margin-left:20px"
href="https://github.com/yaolunmao/vue-webtopo-svgeditor">
<a-button type="primary">帮助</a-button>
</a>
</a-layout-header>
<span v-if="shrink"
@click="fullScreen"
class="icon-shrink svgfont">&#xe648;</span>
<span v-if="!shrink"
@click="exitFullscreen"
class="icon-shrink svgfont">&#xe62b;</span>
@ -56,11 +65,10 @@
:id=item.id
@mousedown="MousedownSvg(item.id,index,item.svgPositionX,item.svgPositionY,$event)"
:title=item.title
:transform="'translate('+(item.svgPositionX)+','+(item.svgPositionY)+')' +'rotate('+item.angle+')' +'scale('+item.height+')'">
<DynamicTest :svg_color=item.svgColor
:transform="'translate('+(item.svgPositionX)+','+(item.svgPositionY)+')' +'rotate('+item.angle+')' +'scale('+item.size+')'">
<SvgComponents :svg_color=item.svgColor
:svgtype=item.type
:svgInfoData=svgInfoData></DynamicTest>
<!-- <SvgComponents :color= item.svgColor :width= item.width :type= item.type :tableData= item.tableData :fontSize= item.fontSize :svgText= item.svgText :editable= editable></SvgComponents> -->
:svgInfoData=svgInfoData></SvgComponents>
</g>
</svg>
</div>
@ -79,9 +87,9 @@ import LeftToolBar from '@/components/LeftToolBar.vue';
import RightToolBar from '@/components/RightToolBar.vue';
// import SvgComponents from '@/components/SvgComponents.vue';
import global from '@/global/global.js';//
import DynamicTest from '@/components/DynamicTest.vue';
import SvgComponents from '@/components/SvgComponents.vue';
export default {
components: { LeftToolBar, RightToolBar, DynamicTest },
components: { LeftToolBar, RightToolBar, SvgComponents },
data () {
return {
svgInfoData: [],//
@ -100,11 +108,6 @@ export default {
TypeName: '',//svg
Title: '',//svg
Color: '',//svg
Height: '',//svg
FontSize: '',//svg
Text: '',//svg
Width: '',//svg
Angle: '',//svg
},
selectSvg: {
ID: '',//svg
@ -119,93 +122,28 @@ export default {
selectSvgInfo: '',
tableRowCount: 2,//
tableColCount: 2,//
tableDefaultData: [],
editable: true
tableDefaultData: []
}
},
methods: {
//
fullScreen () {
let _this = this
this.shrink = !this.shrink
let element = document.documentElement;
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
}
// esc
window.onresize = function () {
if (!checkFull()) {
_this.shrink = !_this.shrink
}
}
function checkFull () {
var isFull =
document.fullscreenElement ||
document.mozFullScreenElement ||
document.webkitFullscreenElement
if (isFull === undefined) isFull = false
return isFull
}
},
//退
exitFullscreen () {
// this.shrink = !this.shrink
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
},
MouseMove (e) {
let _this = this;
// if (e.offsetX == -1) {
// return;
// }
// if (e.target.nodeName == 'INPUT') {
// return;
// }
// if (e.offsetY == -1) {
// return;
// }
// if (this.selectSvg.ID == '') {
// return;
// }
if (this.selectSvg.mouseStatus == 0) {
return;
}
const { clientX, clientY } = e
console.log("当前:" + clientX + " " + clientY);
// this.mousePosition.positionX += (clientX-this.selectSvg.mPositionX);
// this.mousePosition.positionY += (clientY-this.selectSvg.mPositionY);
// if (this.mousePosition.positionX < 1) {
// this.mousePosition.positionX = 10;
// }
// if (this.mousePosition.positionY < 1) {
// this.mousePosition.positionY = 10;
// }
let svgID = this.svgLists[this.selectSvg.Index].id;
//svg
let anyPositionList = this.svgLists.filter(function (list) {
return list.id != svgID
});
console.log("点击:" + this.selectSvg.mPositionX + " " + this.selectSvg.mPositionY);
//
let svgPositionX = this.selectSvg.pointX;
let svgPositionY = this.selectSvg.pointY;
svgPositionX += (clientX - this.selectSvg.mPositionX);
svgPositionY += (clientY - this.selectSvg.mPositionY);
console.log("计算:" + (clientX - this.selectSvg.mPositionX) + " " + (clientY - this.selectSvg.mPositionY));
console.log("结果:" + svgPositionX + " " + svgPositionY);
setTimeout(function () {
//
//x10
@ -252,7 +190,7 @@ export default {
//console.log('');
},
MousedownSvg (id, index,pointX,pointY, e) {
MousedownSvg (id, index, pointX, pointY, e) {
this.CurrentlySelectedToolBar.Type = global.CurrentlySelectedToolBarType = '';
this.CurrentlySelectedToolBar.Title = global.CurrentlySelectedToolBarTitle = '';
//index
@ -289,10 +227,12 @@ export default {
}
e.preventDefault();
// -100 100
let svgZoom = e.deltaY == "-100" ? "5" : "-5";
selectSvgInfo.height += parseInt(svgZoom);
if (selectSvgInfo.height < 1) {
selectSvgInfo.height = 1;
let svgZoom = e.deltaY <0 ? 0.1 : -0.1;
console.log(e.deltaY);
selectSvgInfo.size += svgZoom;
selectSvgInfo.size =parseFloat(selectSvgInfo.size.toFixed(1));
if (selectSvgInfo.size < 1) {
selectSvgInfo.size = 1;
}
},
DblClick () {
@ -365,51 +305,23 @@ export default {
_this.CurrentlySelectedToolBar.TypeName = global.CurrentlySelectedToolBarTypeName;
_this.CurrentlySelectedToolBar.Color = global.CurrentlySelectedToolBarColor;
_this.CurrentlySelectedToolBar.Height = global.CurrentlySelectedToolBarHeight;
_this.CurrentlySelectedToolBar.FontSize = global.CurrentlySelectedToolBarFontSize;
_this.CurrentlySelectedToolBar.Text = global.CurrentlySelectedToolBarText;
_this.CurrentlySelectedToolBar.Width = global.CurrentlySelectedToolBarWidth;
_this.CurrentlySelectedToolBar.Angle = global.CurrentlySelectedToolBarAngle;
}, false);
canvasdiv.addEventListener("drop", function (e) {
e.preventDefault();
if (_this.CurrentlySelectedToolBar.Type == '') {
return;
}
let tableData = [];
if (_this.CurrentlySelectedToolBar.Type == 'TableSvg') {
for (let r = 0; r < _this.tableRowCount; r++) {
let tableColDataList = [];
for (let c = 0; c < _this.tableColCount; c++) {
let tableColData = {
"id": _this.$UCore.GenUUid(),
"val": `${r + 1}${c + 1}`
}
tableColDataList.push(tableColData);
}
let tableRowData = {
"cols": tableColDataList
};
tableData.push(tableRowData)
}
}
//
let svgItem = {
id: _this.$UCore.GenUUid(),
sort: 0,
title: _this.CurrentlySelectedToolBar.Title,
type: _this.CurrentlySelectedToolBar.Type,
typeName: _this.CurrentlySelectedToolBar.TypeName,
svgColor: _this.CurrentlySelectedToolBar.Color,
svgPositionX: e.offsetX,
svgPositionY: e.offsetY,
height: 1,
width: _this.CurrentlySelectedToolBar.Width,
fontSize: _this.CurrentlySelectedToolBar.FontSize,
svgText: _this.CurrentlySelectedToolBar.Text,
tableRowCount: _this.tableRowCount,
tableColCount: _this.tableColCount,
tableData: tableData,
angle: _this.CurrentlySelectedToolBar.Angle
size: 1,
angle: 0
//translate:`translate(${this.mousePosition.positionX},${this.mousePosition.positionY})`
};
_this.svgLists.push(svgItem);

@ -1,104 +1,129 @@
<template>
<div style="overflow:auto;position: relative;">
<div class="svg-contain">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="background-color:#000000" viewBox="0 0 1920 1080" width="100%" height="100%">
<defs/>
<g v-for="item in svgLists" :key="item" :id= item.id :title=item.title :transform="'translate('+(item.svgPositionX)+','+(item.svgPositionY)+')' +'rotate('+item.angle+')'" >
<SvgComponents :height = item.height :color= item.svgColor :width= item.width :type= item.type :tableData= item.tableData :fontSize= item.fontSize :svgText= item.svgText :editable= editable></SvgComponents>
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
style="background-color:#000000"
viewBox="0 0 1920 1080"
width="100%"
height="100%">
<defs />
<g v-for="item in svgLists"
:key="item"
:id=item.id
:title=item.title
:transform="'translate('+(item.svgPositionX)+','+(item.svgPositionY)+')' +'rotate('+item.angle+')'">
<SvgComponents :svg_color=item.svgColor
:svgtype=item.type
:svgInfoData=svgInfoData></SvgComponents>
</g>
</svg>
</div>
<div class="btns-content">
<a-button type="primary" @click="testF"></a-button>
<a-button type="primary" @click="testG"></a-button>
</div>
<!-- <div class="btns-content">
<a-button type="primary"
@click="testF">模拟硬件</a-button>
<a-button type="primary"
@click="testG">取消模拟硬件</a-button>
</div> -->
</div>
</template>
<script>
import SvgComponents from '@/components/SvgComponents.vue';
export default {
components: {SvgComponents},
data(){
return{
svgLists:[],
analogDataTimer:'',//
userInfo:'',
editable:false
}},
methods:{
testF(){
components: { SvgComponents },
data () {
return {
svgLists: [],
svgInfoData:[],
analogDataTimer: '',//
userInfo: '',
editable: false
}
},
methods: {
testF () {
//
let anyCircuitBreakerList=this.svgLists.filter(f=>f.type=='CircuitBreakerSvg');
let anyCircuitBreakerList = this.svgLists.filter(f => f.type == 'CircuitBreakerSvg');
//线
let anyWireBreakList=this.svgLists.filter(f=>f.type=='WireConnectionSvg'||f.type=='WireBreakOffSvg');
let anyWireBreakList = this.svgLists.filter(f => f.type == 'WireConnectionSvg' || f.type == 'WireBreakOffSvg');
//
let anyTable=this.svgLists.filter(f=>f.type=='TableSvg')[0];
let anyTable = this.svgLists.filter(f => f.type == 'TableSvg')[0];
let anyTableList;
if(anyTable=='undefined'||anyTable==null){
anyTableList=[];
if (anyTable == 'undefined' || anyTable == null) {
anyTableList = [];
}
else{
anyTableList=anyTable.tableData.map(m=>m.cols);
else {
anyTableList = anyTable.tableData.map(m => m.cols);
}
this.analogDataTimer= setInterval(function() {
anyCircuitBreakerList.forEach(anyCircuitBreaker=>{
this.analogDataTimer = setInterval(function () {
anyCircuitBreakerList.forEach(anyCircuitBreaker => {
//
let random=Math.round(Math.random()*10);
if(random<5){
anyCircuitBreaker.svgColor='#00FF00';
let random = Math.round(Math.random() * 10);
if (random < 5) {
anyCircuitBreaker.svgColor = '#00FF00';
}
else{
anyCircuitBreaker.svgColor='#FF0000';
else {
anyCircuitBreaker.svgColor = '#FF0000';
}
});
anyWireBreakList.forEach(anyWireBreak=>{
anyWireBreakList.forEach(anyWireBreak => {
//
let random=Math.round(Math.random()*10);
if(random<5){
anyWireBreak.type='WireConnectionSvg';
anyWireBreak.svgColor="#FF0000"
let random = Math.round(Math.random() * 10);
if (random < 5) {
anyWireBreak.type = 'WireConnectionSvg';
anyWireBreak.svgColor = "#FF0000"
}
else{
anyWireBreak.type='WireBreakOffSvg';
else {
anyWireBreak.type = 'WireBreakOffSvg';
}
});
anyTableList.forEach(anyTables=>{
anyTables.forEach(anyTable=>{
if(anyTable.type=='ff85bc7f-3b69-454f-8cf8-21c9f1903dd6'||anyTable.id=='f8271273-d07d-4033-8b6c-6b52c04fe3e5'
||anyTable.id=='dc5931bc-7e8e-47f4-b28e-5bc42fb207da'||anyTable.id=='560f5404-6539-422f-8fb9-77bac641e72b'){
anyTableList.forEach(anyTables => {
anyTables.forEach(anyTable => {
if (anyTable.type == 'ff85bc7f-3b69-454f-8cf8-21c9f1903dd6' || anyTable.id == 'f8271273-d07d-4033-8b6c-6b52c04fe3e5'
|| anyTable.id == 'dc5931bc-7e8e-47f4-b28e-5bc42fb207da' || anyTable.id == '560f5404-6539-422f-8fb9-77bac641e72b') {
//
let random=Math.round(Math.random()*100);
anyTable.val=random;
let random = Math.round(Math.random() * 100);
anyTable.val = random;
}
});
});
},2000)
}, 2000)
},
testG(){
testG () {
clearInterval(this.analogDataTimer);
},
},
created(){
let _this=this;
_this.svgLists=JSON.parse(localStorage.getItem('svginfo'));
created () {
let _this = this;
_this.svgLists = JSON.parse(localStorage.getItem('svginfo'));
//
this.$axios.get('/InterfaceReturn.json')
.then(function (response) {
_this.svgInfoData = response.data;
console.log(response.data);
})
.catch(function (error) {
console.log(error);
});
}
}
</script>
<style scoped lang="less">
.svg-contain{
.svg-contain {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.btns-content{
.btns-content {
position: fixed;
left: 10px;
bottom: 10px;
button{
button {
margin-right: 10px;
}
}

Loading…
Cancel
Save