@vue-ui-kit/ant 2.5.7 → 2.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-ui-kit/ant",
3
- "version": "2.5.7",
3
+ "version": "2.5.9",
4
4
  "description": "Vue3 UI Kit based on Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
@@ -108,6 +108,10 @@
108
108
  }
109
109
  : false,
110
110
  );
111
+ // 必须用 .value:模板里 pageConfig?.pageSizes 会因可选链绕过 Ref 解包,读到 undefined
112
+ const pageSizeOptions = computed(() =>
113
+ (pageConfig.value?.pageSizes ?? [10, 20, 50, 100]).map(String),
114
+ );
111
115
 
112
116
  const fc = computed(() => omit({ labelCol: defaultLabelCol, ...formConfig.value }, ['items']));
113
117
  const loading = reactive({
@@ -686,9 +690,7 @@
686
690
  size="small"
687
691
  :current="pagination.page"
688
692
  :page-size="pagination.size"
689
- :page-size-options="
690
- (pageConfig?.pageSizes ?? [10, 20, 50, 100]).map(String)
691
- "
693
+ :page-size-options="pageSizeOptions"
692
694
  :show-size-changer="pageConfig?.showSizeChanger ?? true"
693
695
  :show-quick-jumper="pageConfig?.showQuickJumper"
694
696
  :show-total="(total: number) => `共${total}条数据`"