openatc-components 0.2.40 → 0.2.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,16 +30,16 @@
30
30
  :Height="'40'" /> -->
31
31
  <xdr-dir-selector :Width="dirWidth" :Height="dirHeight" :Widths="dirWidths" :Heights="dirHeights" :Data="showStyle" :Datas="showStyles" :showlist="dirListSetTheme(item)"></xdr-dir-selector>
32
32
  <div style="display:flex;flex-direction:row;justify-content:center;align-items:end;" :style="{height: StageHeight}">
33
- <div class="current-stage-num" style="width:20%;" :style="{color: themeColor}">{{index + 1}}</div>
33
+ <div class="current-stage-num" style="width:20%;" :style="{color: themeColor, fontSize: numSize}">{{index + 1}}</div>
34
34
  <div style="width:70%;">
35
- <i class="iconfont icon-feijidongche" :style="{color: themeColor}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 6"></i>
36
- <i class="iconfont icon-lukouzhilu" :style="{color: themeColor2}" style="font-size:16PX;color:#454545;margin-left:10PX" v-if="item[item.length-1].controltype === 1"></i>
37
- <i class="iconfont icon-BRT" :style="{color: themeColor2}" style="font-size:11PX;color:#454545;margin-left:10PX" v-if="item[item.length-1].controltype === 4"></i>
35
+ <i class="iconfont icon-feijidongche" :style="{color: themeColor, fontSize: iconSize}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 6"></i>
36
+ <i class="iconfont icon-lukouzhilu" :style="{color: themeColor2, fontSize: iconSize2}" style="font-size:16PX;color:#454545;margin-left:10PX" v-if="item[item.length-1].controltype === 1"></i>
37
+ <i class="iconfont icon-BRT" :style="{color: themeColor2, fontSize: iconSize}" style="font-size:11PX;color:#454545;margin-left:10PX" v-if="item[item.length-1].controltype === 4"></i>
38
38
  <div style="transform:scale(0.65);margin-left:10PX">
39
39
  <i class="iconfont icon-xuxiangwei-xin" :style="{color: themeColor2}" style="font-size:5PX;color:#454545;" v-if="item[item.length-1].controltype === 99"></i>
40
40
  </div>
41
- <i class="iconfont icon-gongjiaoche" :style="{color: themeColor}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 3"></i>
42
- <i class="iconfont icon-youguidianche" :style="{color: themeColor}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 5"></i>
41
+ <i class="iconfont icon-gongjiaoche" :style="{color: themeColor, fontSize: iconSize}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 3"></i>
42
+ <i class="iconfont icon-youguidianche" :style="{color: themeColor, fontSize: iconSize}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 5"></i>
43
43
  <div v-if="presetStageIndex === index + 1" style="color:red;width:50px;position:absolute;right:0px;bottom:5px;font-size:11px;">{{presetText}}</div>
44
44
  </div>
45
45
  </div>
@@ -122,17 +122,23 @@ export default {
122
122
  type: String,
123
123
  default: '65PX'
124
124
  },
125
- },
126
- data () {
127
- return {
128
- showStyle:{
125
+ showStyle: {
126
+ type: Object,
127
+ default: () => ({
129
128
  top:'7PX',
130
129
  left:'13px'
131
- },
132
- showStyles:{
130
+ })
131
+ },
132
+ showStyles: {
133
+ type: Object,
134
+ default: () => ({
133
135
  top:'5PX',
134
136
  left:'12px'
135
- },
137
+ })
138
+ }
139
+ },
140
+ data () {
141
+ return {
136
142
  presetStageIndex: -1,
137
143
  side: {key: 'pedphase1653818707546719', phaseid: 1, id: 1, name: '东人行横道'},
138
144
  // stagesList: [],
@@ -166,6 +172,23 @@ export default {
166
172
  return {
167
173
  zoom: this.zoom
168
174
  }
175
+ },
176
+ iconSize () {
177
+ const fontsize = parseInt(this.dirWidth.replace(/px$/, ""));
178
+ return fontsize / 75 * 11 + 'px'
179
+ },
180
+ iconSize2 () {
181
+ const fontsize = parseInt(this.dirWidth.replace(/px$/, ""));
182
+ return fontsize / 75 * 16 + 'px'
183
+ },
184
+ numSize () {
185
+ const fontsize = parseInt(this.dirWidth.replace(/px$/, ""));
186
+ const newfontsize = fontsize / 75 * 12
187
+ if (newfontsize < 10) {
188
+ return 10 + 'px'
189
+ } else {
190
+ return newfontsize + 'px'
191
+ }
169
192
  }
170
193
  },
171
194
  watch: {