Sfoglia il codice sorgente

refactor(product): table style

Casper Dai 3 anni fa
parent
commit
8775b65abc

+ 11 - 5
src/views/realm/device/Product.vue

@@ -114,12 +114,18 @@ export default {
           { key: 'productTypeId', type: 'select', placeholder: '全部类型', ...productTypeSelectSchema }
         ],
         cols: [
-          { prop: 'name', label: '产品名称' },
-          { prop: 'productTypeName', label: '类型' },
-          { label: '分辨率', render ({ wide, high }) { return `${wide}x${high}` } },
-          { prop: 'remark', label: '备注' },
+          { prop: 'name', label: '产品名称', 'min-width': 60 },
+          { prop: 'productTypeName', label: '类型', 'min-width': 60 },
+          { prop: 'resolutionRatio', label: '分辨率', 'min-width': 60 },
+          { label: '分割器', type: 'tag', width: 100, render ({ fpga }) {
+            return {
+              type: fpga ? 'success' : 'danger',
+              label: fpga ? '有' : '无'
+            }
+          } },
+          { prop: 'remark', label: '备注', 'min-width': 80 },
           {
-            type: 'invoke', render: [
+            type: 'invoke', width: 120, render: [
               { label: '编辑', on: this.onEdit },
               { label: '删除', on: this.onDel }
             ]

+ 2 - 2
src/views/realm/device/ProductType.vue

@@ -55,10 +55,10 @@ export default {
           { type: 'add', on: this.onAdd }
         ],
         cols: [
-          { prop: 'name', label: '产品类型名称' },
+          { prop: 'name', label: '类型名称' },
           { prop: 'remark', label: '备注' },
           {
-            type: 'invoke', render: [
+            type: 'invoke', width: 180, render: [
               { label: '编辑', on: this.onEdit },
               { label: '删除', on: this.onDel }
             ]