ソースを参照

1、数据组配置详情样式修改,操作栏修改宽度,按钮添加提示

lhy 1 年間 前
コミット
d6fb812fa1

+ 7 - 3
industry-admin/src/components/UmyTable/index.vue

@@ -8,11 +8,11 @@
         <u-table-column align="left" :prop="item.propName" :label="item.labelName" :width="item.width"
             v-for="(item, index) in tableHeaderTitle" :key="index" :formatter="item.formatter">
         </u-table-column>
-        <u-table-column v-if="tableOperate && tableOperate.length !== 0" label="操作" align="left">
+        <u-table-column v-if="tableOperate && tableOperate.length !== 0" label="操作" align="left" :width="tableOperateWidth">
             <template slot-scope="scope">
                 <template v-for="(operate, index) in tableOperate">
                     <el-button v-if="(!operate.hidden) || (operate.hidden && operate.hidden(scope.row))" :size="operate.size" type="text"
-                        :style="operate.style" :icon="operate.icon"
+                        :style="operate.style" :icon="operate.icon" title=""
                         @click="operateMethod(scope.row, operate.methodName)">
                         {{ operate.btnName }}
                     </el-button>
@@ -55,7 +55,11 @@ export default {
         tableOperate: {
             type: Array,
             default: [],
-        }
+        },
+      tableOperateWidth:{
+        type:String,
+        default:'300'
+      }
     },
     methods: {
         // 勾选以后,要把勾选的这一行的数据传递给父组件,以供使用

+ 1 - 1
industry-admin/src/views/source/itemGroup/item.vue

@@ -18,7 +18,7 @@
             </div>
             <!-- 点位实时数据 -->
             <UmyTable ref="readTimeData" :tableHeaderTitle="tableHeaderTitle" :tableData="tableData"
-                :isShowCheckbox="isShowCheckbox" :isShowIndex="isShowIndex" :tableOperate="tableOperate"
+                :isShowCheckbox="isShowCheckbox" :isShowIndex="isShowIndex" :tableOperate="tableOperate" tableOperateWidth="240"
                 @receiveCheckedData="receiveCheckedData" @alarmConfig="alarmConfig" @alarmLog="alarmLog"
                 @updateItem="updateItem" @deleteItem="deleteItem">
             </UmyTable>