Browse Source

修复protable tabelConfig失去响应式的bug

tongshangming 2 years ago
parent
commit
c3e27cda0b
1 changed files with 2 additions and 2 deletions
  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>()