|
@@ -1,4 +1,4 @@
|
|
|
-import { reactive, ref, computed, /*getCurrentInstance,*/ unref, watch, nextTick } from 'vue'
|
|
|
+import {reactive, ref, computed, /*getCurrentInstance,*/ unref, watch, nextTick, shallowRef} from 'vue'
|
|
|
import { $log } from '@/utils'
|
|
|
// import { ObjectOpts } from '@/components/FormConfig/formConfig.types.ts'
|
|
|
import { LeTableColumnProps, LeTableProps, SearchParams } from '@/components/Table'
|
|
@@ -57,7 +57,7 @@ export const useTablePage = (tableProps: Partial<LeTableProps> = {}, config: Par
|
|
|
const searchData = ref<SearchData>({
|
|
|
...config.searchData
|
|
|
})
|
|
|
- const checkedColumns = ref([])
|
|
|
+ const checkedColumns = shallowRef(tableOpts.columns)
|
|
|
const activeColumns = computed(() => {
|
|
|
const _checkedColumns = unref(checkedColumns) as LeTableColumnProps[]
|
|
|
if (!_checkedColumns.length) return tableOpts.columns
|