浏览代码

修复protable tabelConfig失去响应式的bug

tongshangming 2 年之前
父节点
当前提交
c3e27cda0b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/components/ProTable.vue

+ 2 - 2
src/components/ProTable.vue

@@ -71,13 +71,13 @@ const tableData = ref([])
 const total = ref(0)
 const curPage = ref(1)
 const loading = ref(false)
-const tableConfig = ref<CustomTable>({
+const tableConfig = computed<CustomTable>(() => ({
   showOperate: true,
   showEdit: true,
   showDelete: true,
   operateWidth: 140,
   ...props.tableConfig
-})
+}))
 
 const xTable = ref<any>()
 const xToolbar = ref<any>()