Преглед на файлове

修复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>()