@funcho/ui 1.1.34 → 1.1.35

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.
@@ -152,12 +152,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
152
152
  const getIndex = (i) => {
153
153
  return (pagination.value.currentPage - 1) * pagination.value.pageSize + i + 1;
154
154
  };
155
- const tableData = vue.ref([]);
156
- const displayData = vue.computed(() => {
155
+ const requestTableData = vue.ref([]);
156
+ const tableData = vue.computed(() => {
157
157
  if (props.data !== void 0) {
158
158
  return props.data || [];
159
159
  }
160
- return tableData.value;
160
+ return requestTableData.value;
161
161
  });
162
162
  const tableLoading = vue.ref(false);
163
163
  const loadData = async () => {
@@ -171,7 +171,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
171
171
  const { data } = await props.request(
172
172
  props.isPagination ? { ...params, page: pagination.value.currentPage, size: pagination.value.pageSize } : params
173
173
  );
174
- tableData.value = Array.isArray(data) ? data : data.list || [];
174
+ requestTableData.value = Array.isArray(data) ? data : data.list || [];
175
175
  pagination.value.total = Array.isArray(data) ? data.length : data.total || 0;
176
176
  } catch (error) {
177
177
  console.log("获取数据失败", error);
@@ -223,7 +223,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
223
223
  }, vue.createSlots({
224
224
  body: vue.withCtx(({ height: bodyHeight }) => [
225
225
  vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index.FcTable), vue.mergeProps(_ctx.$attrs, {
226
- data: displayData.value,
226
+ data: tableData.value,
227
227
  border: "",
228
228
  "max-height": bodyHeight,
229
229
  onSelectionChange: handleSelectionChange
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const version = "1.1.34";
5
+ const version = "1.1.35";
6
6
 
7
7
  exports.version = version;
@@ -148,12 +148,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
148
148
  const getIndex = (i) => {
149
149
  return (pagination.value.currentPage - 1) * pagination.value.pageSize + i + 1;
150
150
  };
151
- const tableData = ref([]);
152
- const displayData = computed(() => {
151
+ const requestTableData = ref([]);
152
+ const tableData = computed(() => {
153
153
  if (props.data !== void 0) {
154
154
  return props.data || [];
155
155
  }
156
- return tableData.value;
156
+ return requestTableData.value;
157
157
  });
158
158
  const tableLoading = ref(false);
159
159
  const loadData = async () => {
@@ -167,7 +167,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
167
167
  const { data } = await props.request(
168
168
  props.isPagination ? { ...params, page: pagination.value.currentPage, size: pagination.value.pageSize } : params
169
169
  );
170
- tableData.value = Array.isArray(data) ? data : data.list || [];
170
+ requestTableData.value = Array.isArray(data) ? data : data.list || [];
171
171
  pagination.value.total = Array.isArray(data) ? data.length : data.total || 0;
172
172
  } catch (error) {
173
173
  console.log("获取数据失败", error);
@@ -219,7 +219,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
219
219
  }, createSlots({
220
220
  body: withCtx(({ height: bodyHeight }) => [
221
221
  withDirectives((openBlock(), createBlock(unref(FcTable), mergeProps(_ctx.$attrs, {
222
- data: displayData.value,
222
+ data: tableData.value,
223
223
  border: "",
224
224
  "max-height": bodyHeight,
225
225
  onSelectionChange: handleSelectionChange
@@ -1,3 +1,3 @@
1
- const version = "1.1.34";
1
+ const version = "1.1.35";
2
2
 
3
3
  export { version };
@@ -1471,7 +1471,7 @@ declare function __VLS_template(): {
1471
1471
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
1472
1472
  declare const __VLS_component: import('vue').DefineComponent<TFcProDataTableProps, {
1473
1473
  loadData: () => Promise<void>;
1474
- tableData: import('vue').Ref<any[], any[]>;
1474
+ tableData: import('vue').ComputedRef<any[]>;
1475
1475
  reload: () => void;
1476
1476
  resetSearch: () => void;
1477
1477
  selectedRows: import('vue').Ref<any[], any[]>;
@@ -1,7 +1,7 @@
1
1
  export declare const FcProDataTable: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./DataTable.types').TFcProDataTableProps> & Readonly<{}>, {
3
3
  loadData: () => Promise<void>;
4
- tableData: import('vue').Ref<any[], any[]>;
4
+ tableData: import('vue').ComputedRef<any[]>;
5
5
  reload: () => void;
6
6
  resetSearch: () => void;
7
7
  selectedRows: import('vue').Ref<any[], any[]>;
@@ -1492,7 +1492,7 @@ export declare const FcProDataTable: {
1492
1492
  Defaults: {};
1493
1493
  }, Readonly<import('./DataTable.types').TFcProDataTableProps> & Readonly<{}>, {
1494
1494
  loadData: () => Promise<void>;
1495
- tableData: import('vue').Ref<any[], any[]>;
1495
+ tableData: import('vue').ComputedRef<any[]>;
1496
1496
  reload: () => void;
1497
1497
  resetSearch: () => void;
1498
1498
  selectedRows: import('vue').Ref<any[], any[]>;
@@ -1519,7 +1519,7 @@ export declare const FcProDataTable: {
1519
1519
  __isSuspense?: never;
1520
1520
  } & import('vue').ComponentOptionsBase<Readonly<import('./DataTable.types').TFcProDataTableProps> & Readonly<{}>, {
1521
1521
  loadData: () => Promise<void>;
1522
- tableData: import('vue').Ref<any[], any[]>;
1522
+ tableData: import('vue').ComputedRef<any[]>;
1523
1523
  reload: () => void;
1524
1524
  resetSearch: () => void;
1525
1525
  selectedRows: import('vue').Ref<any[], any[]>;
@@ -1535,7 +1535,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
1535
1535
  $el: any;
1536
1536
  $options: import('vue').ComponentOptionsBase<Readonly<import('..').TFcProDataTableProps> & Readonly<{}>, {
1537
1537
  loadData: () => Promise<void>;
1538
- tableData: import('vue').Ref<any[], any[]>;
1538
+ tableData: import('vue').ComputedRef<any[]>;
1539
1539
  reload: () => void;
1540
1540
  resetSearch: () => void;
1541
1541
  selectedRows: import('vue').Ref<any[], any[]>;
@@ -1595,7 +1595,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
1595
1595
  actionsWidth: number;
1596
1596
  }> & Omit<Readonly<import('..').TFcProDataTableProps> & Readonly<{}>, "loadData" | "tableData" | "reload" | "resetSearch" | "selectedRows" | ("data" | "height" | "fields" | "tools" | "columns" | "selectable" | "hasIndex" | "isPagination" | "request" | "actions" | "actionsWidth")> & import('vue').ShallowUnwrapRef<{
1597
1597
  loadData: () => Promise<void>;
1598
- tableData: import('vue').Ref<any[], any[]>;
1598
+ tableData: import('vue').ComputedRef<any[]>;
1599
1599
  reload: () => void;
1600
1600
  resetSearch: () => void;
1601
1601
  selectedRows: import('vue').Ref<any[], any[]>;
@@ -1535,7 +1535,7 @@ export declare const FcProDataTableDialog: {
1535
1535
  $el: any;
1536
1536
  $options: import('vue').ComponentOptionsBase<Readonly<import('..').TFcProDataTableProps> & Readonly<{}>, {
1537
1537
  loadData: () => Promise<void>;
1538
- tableData: import('vue').Ref<any[], any[]>;
1538
+ tableData: import('vue').ComputedRef<any[]>;
1539
1539
  reload: () => void;
1540
1540
  resetSearch: () => void;
1541
1541
  selectedRows: import('vue').Ref<any[], any[]>;
@@ -1595,7 +1595,7 @@ export declare const FcProDataTableDialog: {
1595
1595
  actionsWidth: number;
1596
1596
  }> & Omit<Readonly<import('..').TFcProDataTableProps> & Readonly<{}>, "loadData" | "tableData" | "reload" | "resetSearch" | "selectedRows" | ("data" | "height" | "fields" | "tools" | "columns" | "selectable" | "hasIndex" | "isPagination" | "request" | "actions" | "actionsWidth")> & import('vue').ShallowUnwrapRef<{
1597
1597
  loadData: () => Promise<void>;
1598
- tableData: import('vue').Ref<any[], any[]>;
1598
+ tableData: import('vue').ComputedRef<any[]>;
1599
1599
  reload: () => void;
1600
1600
  resetSearch: () => void;
1601
1601
  selectedRows: import('vue').Ref<any[], any[]>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funcho/ui",
3
3
  "description": "@funcho ui library",
4
- "version": "1.1.34",
4
+ "version": "1.1.35",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.mjs",