Sfoglia il codice sorgente

feat: 设备家具展示组件添加坐标值显隐开关;优化固件版本为最新时,不展示升级下拉功能;

liujia 3 settimane fa
parent
commit
b19501efc9

+ 0 - 1
components.d.ts

@@ -29,7 +29,6 @@ declare module 'vue' {
     AInput: typeof import('ant-design-vue/es')['Input']
     AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
     AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
-    AInputSearch: typeof import('ant-design-vue/es')['InputSearch']
     ALayout: typeof import('ant-design-vue/es')['Layout']
     ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
     ALayoutFooter: typeof import('ant-design-vue/es')['LayoutFooter']

+ 14 - 3
src/components/RadarView/index.vue

@@ -78,11 +78,17 @@
       >,<span style="color: blue">Y轴 {{ yArrow }}</span>
     </div>
 
-    <div v-if="areaWidth > 50 && areaHeight > 50" class="info-toggle" @click="showInfo = !showInfo">
-      <QuestionCircleOutlined />
+    <div v-if="areaWidth > 50 && areaHeight > 50" class="info-toggle">
+      <a-switch
+        v-model:checked="showAxis"
+        size="small"
+        checked-children="展示坐标"
+        un-checked-children="隐藏坐标"
+      />
+      <QuestionCircleOutlined @click="showInfo = !showInfo" />
     </div>
 
-    <div class="full-coordinate-axes">
+    <div class="full-coordinate-axes" v-if="showAxis">
       <div class="axis-line x-axis" :style="getFullAxisStyle('x')"> </div>
       <div class="axis-line y-axis" :style="getFullAxisStyle('y')"> </div>
     </div>
@@ -192,6 +198,7 @@ const areaStyle = computed(() => ({
 
 // 区域信息展示开关(点击问号按钮切换)
 const showInfo = ref(false)
+const showAxis = ref(false)
 
 const northArrow = computed(() => {
   switch (angle.value) {
@@ -342,6 +349,10 @@ function getAxisDotStyle(axis: 'x' | 'y') {
     transition: background 0.2s;
     font-size: 14px;
     opacity: 0.5;
+    display: flex;
+    align-items: center;
+    gap: 4px;
+    background: rgba(255, 255, 255, 0.8);
 
     &:hover {
       background: rgba(0, 0, 0, 0.1);

+ 10 - 2
src/views/device/detail/components/DeviceUpgrade/index.vue

@@ -1,7 +1,12 @@
 <template>
   <div class="deviceUpgrade">
-    <div class="version">{{ currentVersion }}</div>
-    <div class="action">
+    <div class="version">
+      <a-badge v-if="otaList && otaList.length" dot title="有新版本">
+        {{ currentVersion }}
+      </a-badge>
+      <template v-else> {{ currentVersion }}</template>
+    </div>
+    <div v-if="otaList && otaList.length" class="action">
       <a-select
         v-model:value="selectValue"
         placeholder="请选择"
@@ -14,6 +19,9 @@
         >升级</a-button
       >
     </div>
+    <div v-else>
+      <a-tag :bordered="false" color="green">已是最新版</a-tag>
+    </div>
   </div>
 </template>