jonbo 3 months ago
parent
commit
e8c7c0e203

+ 3 - 2
src/views/mis/common/misTable/RenderColumn.vue

@@ -11,8 +11,9 @@ export default {
     }
   },
   render(h) {
-    const { row, column, value, colIndex } = this.scope;
-    return this.renderer(h, row, column, value, colIndex);
+    const { row, column, value, index } = this.scope;
+    console.log(column);
+    return this.renderer(h, row, column, value, index);
   }
 }
 </script>

+ 1 - 1
src/views/mis/common/misTable/index.vue

@@ -44,7 +44,7 @@
             </template>
             <template v-else-if="item.renderer">
               <render-column :renderer="item.renderer"
-                :scope="{ row, column: item.prop, value: row[item.prop], colIndex }" />
+                :scope="{ row, column: item.prop, value: row[item.prop], index: colIndex }" />
             </template>
             <template v-else>
               <!-- 添加百分比格式 -->