@maxax/ui 1.1.20 → 1.1.22

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/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { camelize, isNumber, isString, removeClass, addClass, pascalCase, isClient as isClient$1, hasClass, withInstall, guid, isFunction, isElement, isObject as isObject$1, isUndefined, downloadFileStatic, downloadFileByResponseData, attrAccept as attrAccept$1, isBoolean, getSlot, isArray, deepMerge, cloneDeep as cloneDeep$2, classNames, call, isNull, getValueKey, tryConstructArray, isNil, tryDeconstructArray, tryDeconstructObject, isEmpty, isPascalCase, mergeArray, getStyle as getStyle$1, kebabCase, findNodeAll, calculate } from "@maxax/utils";
2
- import { shallowRef, shallowReadonly, onUnmounted, onMounted, nextTick, getCurrentScope, onScopeDispose, toValue, getCurrentInstance, watch, computed, unref, Fragment, isVNode, Comment, Text, watchEffect, onBeforeUnmount, inject, ref, isRef, toRaw, defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, h, useAttrs, mergeProps, createBlock, createCommentVNode, withCtx, createTextVNode, toDisplayString, createVNode, useSlots, createSlots, provide, reactive, toRefs, resolveComponent, Transition, withDirectives, withModifiers, normalizeStyle, withKeys, resolveDynamicComponent, vShow, render as render$1, useTemplateRef, renderList, triggerRef, TransitionGroup, toRef, normalizeProps, guardReactiveProps, vModelText, createApp, mergeDefaults, toHandlers } from "vue";
2
+ import { shallowRef, shallowReadonly, onUnmounted, onMounted, nextTick, getCurrentScope, onScopeDispose, toValue, getCurrentInstance, watch, computed, unref, Fragment, isVNode, Comment, Text, watchEffect, onBeforeUnmount, inject, ref, isRef, toRaw, defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, h, useAttrs, mergeProps, createBlock, createCommentVNode, withCtx, createTextVNode, toDisplayString, createVNode, useSlots, createSlots, provide, reactive, toRefs, resolveComponent, Transition, withDirectives, withModifiers, normalizeStyle, withKeys, resolveDynamicComponent, vShow, render as render$1, useTemplateRef, renderList, triggerRef, TransitionGroup, toRef, normalizeProps, guardReactiveProps, vModelText, createApp, toHandlers, mergeDefaults } from "vue";
3
3
  import BScroll from "@better-scroll/core";
4
4
  import { NTooltip, NButton, NInput, NButtonGroup, NDropdown, NProgress, NModal, NSwitch, NCard, NCascader, NDatePicker, NDrawer, NDrawerContent, NSelect, NInputNumber, NUpload, NAutoComplete, NDynamicTags, NTreeSelect, NTimePicker, NCheckbox, NCheckboxGroup, NRadio, NRadioButton, NRadioGroup, NSlider, NTransfer, NDivider, NColorPicker, NRate, NCol, NFormItem, NForm, NRow, NPopover, NTabs, NTabPane, NScrollbar, NEmpty, NPagination, NSpin } from "naive-ui";
5
5
  import { b as buildLocaleContext, z as zhCN } from "./utils-Doo526pz.js";
@@ -22438,11 +22438,40 @@ function handleFieldColumn(columns) {
22438
22438
  column.field || (column.field = column.type || "");
22439
22439
  });
22440
22440
  }
22441
+ function handleCheckboxColumn(propsRef, columns) {
22442
+ const { showCheckboxColumn } = unref(propsRef);
22443
+ const existIndex = columns.findIndex((column) => column.type === "checkbox");
22444
+ if (showCheckboxColumn) {
22445
+ if (existIndex === -1) {
22446
+ const isFixedLeft = columns.some((item) => item.fixed === "left");
22447
+ columns.unshift({
22448
+ field: "imaxCheckbox",
22449
+ type: "checkbox",
22450
+ width: 50,
22451
+ align: "center",
22452
+ ...isFixedLeft ? { fixed: "left" } : {}
22453
+ });
22454
+ }
22455
+ }
22456
+ }
22457
+ function handleRadioColumn(propsRef, columns) {
22458
+ const { showRadioColumn } = unref(propsRef);
22459
+ const existIndex = columns.findIndex((column) => column.type === "radio");
22460
+ if (showRadioColumn) {
22461
+ if (existIndex === -1) {
22462
+ const isFixedLeft = columns.some((item) => item.fixed === "left");
22463
+ columns.unshift({
22464
+ field: "imaxRadio",
22465
+ type: "radio",
22466
+ width: 50,
22467
+ align: "center",
22468
+ ...isFixedLeft ? { fixed: "left" } : {}
22469
+ });
22470
+ }
22471
+ }
22472
+ }
22441
22473
  function handleIndexColumn(propsRef, getPaginationRef, columns) {
22442
- const {
22443
- showIndexColumn,
22444
- treeConfig
22445
- } = unref(propsRef);
22474
+ const { showIndexColumn, treeConfig } = unref(propsRef);
22446
22475
  let pushIndexColumns = false;
22447
22476
  if (unref(treeConfig)) {
22448
22477
  return;
@@ -22462,23 +22491,16 @@ function handleIndexColumn(propsRef, getPaginationRef, columns) {
22462
22491
  type: "seq",
22463
22492
  width: 68,
22464
22493
  align: "center",
22465
- ...isFixedLeft ? {
22466
- fixed: "left"
22467
- } : {},
22494
+ ...isFixedLeft ? { fixed: "left" } : {},
22468
22495
  slots: {
22469
- default({
22470
- rowIndex
22471
- }) {
22496
+ default({ rowIndex }) {
22472
22497
  const getPagination = unref(getPaginationRef);
22473
22498
  if (isBoolean$1(getPagination)) {
22474
22499
  return `${rowIndex + 1}`;
22475
22500
  }
22476
- const {
22477
- currentPage = 1,
22478
- pageSize = PAGE_SIZE
22479
- } = getPagination;
22501
+ const { currentPage = 1, pageSize = PAGE_SIZE } = getPagination;
22480
22502
  const seq = ((currentPage < 1 ? 1 : currentPage) - 1) * pageSize + rowIndex + 1;
22481
- return createVNode("span", null, [seq]);
22503
+ return h("span", seq);
22482
22504
  }
22483
22505
  }
22484
22506
  });
@@ -22505,6 +22527,8 @@ function useColumns(propsRef, getPaginationRef) {
22505
22527
  const getColumnsRef = computed(() => {
22506
22528
  const columns = cloneDeep$1(unref(columnsRef));
22507
22529
  handleFieldColumn(columns);
22530
+ handleCheckboxColumn(propsRef, columns);
22531
+ handleRadioColumn(propsRef, columns);
22508
22532
  handleIndexColumn(propsRef, getPaginationRef, columns);
22509
22533
  if (!columns) {
22510
22534
  return [];
@@ -22527,11 +22551,14 @@ function useColumns(propsRef, getPaginationRef) {
22527
22551
  const columns = cloneDeep$1(viewColumns);
22528
22552
  return columns.filter((column) => isIfShow(column));
22529
22553
  });
22530
- watch(() => unref(propsRef).columns, (columns) => {
22531
- var _a;
22532
- columnsRef.value = columns || [];
22533
- cacheColumns = (_a = columns == null ? void 0 : columns.filter((item) => !item.type)) != null ? _a : [];
22534
- });
22554
+ watch(
22555
+ () => unref(propsRef).columns,
22556
+ (columns) => {
22557
+ var _a;
22558
+ columnsRef.value = columns || [];
22559
+ cacheColumns = (_a = columns == null ? void 0 : columns.filter((item) => !item.type)) != null ? _a : [];
22560
+ }
22561
+ );
22535
22562
  function setCacheColumnsByField(field, value) {
22536
22563
  if (!field || !value) {
22537
22564
  return;
@@ -22573,10 +22600,7 @@ function useColumns(propsRef, getPaginationRef) {
22573
22600
  }
22574
22601
  }
22575
22602
  function getColumns(opt) {
22576
- const {
22577
- ignoreIndex,
22578
- ignoreAction
22579
- } = opt || {};
22603
+ const { ignoreIndex, ignoreAction } = opt || {};
22580
22604
  let columns = toRaw(unref(getColumnsRef));
22581
22605
  if (ignoreIndex) {
22582
22606
  columns = columns.filter((item) => item.field !== "seq");
@@ -23227,121 +23251,74 @@ function useTableForm(propsRef, { fetch: fetch2, getLoading, setPagination, setS
23227
23251
  handleSearchInfoReload
23228
23252
  };
23229
23253
  }
23230
- const setting = {
23231
- api: null,
23232
- size: DEFAULT_SIZE,
23233
- autoCreateKey: true,
23234
- showIndexColumn: true,
23235
- fetchSetting: () => FETCH_SETTING,
23236
- columns: () => [],
23237
- fit: true,
23238
- padding: false,
23239
- minHeight: 180,
23240
- border: "inner",
23241
- showHeader: true,
23242
- delayHover: 250,
23243
- autoResize: true,
23244
- // maxHeight: 325,
23245
- showOverflow: true,
23246
- showHeaderOverflow: "tooltip",
23247
- showFooterOverflow: "tooltip",
23248
- sortConfig: () => ({
23249
- remote: true
23250
- }),
23251
- resizeConfig: () => ({
23252
- refreshDelay: 250
23253
- }),
23254
- radioConfig: () => ({
23255
- strict: true
23256
- }),
23257
- rowConfig: () => ({
23258
- useKey: true,
23259
- isCurrent: true,
23260
- isHover: true,
23261
- keyField: "_ROW_KEY_"
23262
- }),
23263
- checkboxConfig: () => ({
23264
- strict: true
23265
- }),
23266
- tooltipConfig: () => ({
23267
- enterable: true
23268
- }),
23269
- validConfig: () => ({
23270
- showMessage: true,
23271
- autoClear: true,
23272
- autoPos: true,
23273
- message: "inline",
23274
- msgMode: "single"
23275
- }),
23276
- columnConfig: () => ({
23277
- resizable: true,
23278
- useKey: true,
23279
- maxFixedSize: 4
23280
- }),
23281
- customConfig: () => ({
23282
- mode: "modal"
23283
- }),
23284
- toolbarConfig: () => ({
23285
- custom: true,
23286
- zoom: true
23287
- })
23288
- };
23289
23254
  const _hoisted_1$4 = { class: "max-table-selection-count" };
23290
23255
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
23291
23256
  __name: "BasicTable",
23292
- props: /* @__PURE__ */ mergeDefaults({
23257
+ props: {
23293
23258
  layouts: {},
23294
- columns: {},
23259
+ columns: { default: () => [] },
23295
23260
  pagerConfig: {},
23296
23261
  proxyConfig: {},
23297
- toolbarConfig: {},
23262
+ toolbarConfig: { default: () => ({
23263
+ custom: true,
23264
+ zoom: true
23265
+ }) },
23298
23266
  formConfig: {},
23299
23267
  zoomConfig: {},
23300
- size: {},
23301
- id: { type: [String, Function] },
23268
+ size: { default: DEFAULT_SIZE },
23269
+ id: {},
23302
23270
  data: {},
23303
23271
  height: {},
23304
- minHeight: {},
23272
+ minHeight: { default: 180 },
23305
23273
  maxHeight: {},
23306
23274
  stripe: { type: Boolean },
23307
- padding: { type: Boolean },
23275
+ padding: { type: Boolean, default: false },
23308
23276
  round: { type: Boolean },
23309
- border: { type: [Boolean, String] },
23277
+ border: { type: [Boolean, String], default: "inner" },
23310
23278
  loading: { type: Boolean },
23311
23279
  align: {},
23312
23280
  headerAlign: {},
23313
23281
  footerAlign: {},
23314
- showHeader: { type: Boolean },
23282
+ showHeader: { type: Boolean, default: true },
23315
23283
  showFooter: { type: Boolean },
23316
23284
  footerData: {},
23317
- footerMethod: { type: Function },
23318
- rowClassName: { type: [String, Function] },
23319
- cellClassName: { type: [String, Function] },
23320
- headerRowClassName: { type: [String, Function] },
23321
- headerCellClassName: { type: [String, Function] },
23322
- footerRowClassName: { type: [String, Function] },
23323
- footerCellClassName: { type: [String, Function] },
23324
- cellStyle: { type: [Object, Function] },
23325
- rowStyle: { type: [Object, Function] },
23326
- headerCellStyle: { type: [Object, Function] },
23327
- headerRowStyle: { type: [Object, Function] },
23328
- footerRowStyle: { type: [Object, Function] },
23329
- footerCellStyle: { type: [Object, Function] },
23285
+ footerMethod: {},
23286
+ rowClassName: {},
23287
+ cellClassName: {},
23288
+ headerRowClassName: {},
23289
+ headerCellClassName: {},
23290
+ footerRowClassName: {},
23291
+ footerCellClassName: {},
23292
+ cellStyle: {},
23293
+ rowStyle: {},
23294
+ headerCellStyle: {},
23295
+ headerRowStyle: {},
23296
+ footerRowStyle: {},
23297
+ footerCellStyle: {},
23330
23298
  showCustomHeader: { type: Boolean },
23331
23299
  mergeHeaderCells: {},
23332
23300
  mergeCells: {},
23333
23301
  mergeFooterCells: {},
23334
23302
  mergeFooterItems: {},
23335
- spanMethod: { type: Function },
23336
- footerSpanMethod: { type: Function },
23337
- showOverflow: { type: [Boolean, String, null] },
23338
- showHeaderOverflow: { type: [Boolean, String, null] },
23339
- showFooterOverflow: { type: [Boolean, String, null] },
23303
+ spanMethod: {},
23304
+ footerSpanMethod: {},
23305
+ showOverflow: { type: [Boolean, String, null], default: true },
23306
+ showHeaderOverflow: { type: [Boolean, String, null], default: "tooltip" },
23307
+ showFooterOverflow: { type: [Boolean, String, null], default: "tooltip" },
23340
23308
  keepSource: { type: Boolean },
23341
- autoResize: { type: Boolean },
23309
+ autoResize: { type: Boolean, default: true },
23342
23310
  syncResize: { type: [Boolean, String, Number] },
23343
- columnConfig: {},
23344
- rowConfig: {},
23311
+ columnConfig: { default: () => ({
23312
+ resizable: true,
23313
+ useKey: true,
23314
+ maxFixedSize: 4
23315
+ }) },
23316
+ rowConfig: { default: () => ({
23317
+ useKey: true,
23318
+ isCurrent: true,
23319
+ isHover: true,
23320
+ keyField: "_ROW_KEY_"
23321
+ }) },
23345
23322
  cellConfig: {},
23346
23323
  headerCellConfig: {},
23347
23324
  footerCellConfig: {},
@@ -23352,17 +23329,29 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23352
23329
  dragConfig: {},
23353
23330
  rowDragConfig: {},
23354
23331
  columnDragConfig: {},
23355
- customConfig: {},
23356
- resizeConfig: {},
23332
+ customConfig: { default: () => ({
23333
+ mode: "modal"
23334
+ }) },
23335
+ resizeConfig: { default: () => ({
23336
+ refreshDelay: 250
23337
+ }) },
23357
23338
  resizableConfig: {},
23358
23339
  seqConfig: {},
23359
- sortConfig: {},
23340
+ sortConfig: { default: () => ({
23341
+ remote: true
23342
+ }) },
23360
23343
  filterConfig: {},
23361
23344
  floatingFilterConfig: {},
23362
- radioConfig: {},
23363
- checkboxConfig: {},
23345
+ radioConfig: { default: () => ({
23346
+ strict: true
23347
+ }) },
23348
+ checkboxConfig: { default: () => ({
23349
+ strict: true
23350
+ }) },
23364
23351
  headerTooltipConfig: {},
23365
- tooltipConfig: {},
23352
+ tooltipConfig: { default: () => ({
23353
+ enterable: true
23354
+ }) },
23366
23355
  footerTooltipConfig: {},
23367
23356
  exportConfig: {},
23368
23357
  importConfig: {},
@@ -23376,8 +23365,15 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23376
23365
  keyboardConfig: {},
23377
23366
  clipConfig: {},
23378
23367
  editConfig: {},
23379
- validConfig: {},
23368
+ validConfig: { default: () => ({
23369
+ showMessage: true,
23370
+ autoClear: true,
23371
+ autoPos: true,
23372
+ message: "inline",
23373
+ msgMode: "single"
23374
+ }) },
23380
23375
  editRules: {},
23376
+ undoHistoryConfig: {},
23381
23377
  emptyText: {},
23382
23378
  emptyRender: {},
23383
23379
  loadingConfig: {},
@@ -23396,109 +23392,111 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23396
23392
  columnKey: { type: Boolean },
23397
23393
  rowKey: { type: Boolean },
23398
23394
  rowId: {},
23399
- fit: { type: Boolean },
23395
+ fit: { type: Boolean, default: true },
23400
23396
  animat: { type: Boolean },
23401
- delayHover: {},
23402
- onSelection: { type: Function },
23403
- onReady: { type: Function },
23404
- onInitRendered: { type: Function },
23405
- onDataRendered: { type: Function },
23406
- onKeydownStart: { type: Function },
23407
- onKeydown: { type: Function },
23408
- onKeydownEnd: { type: Function },
23409
- onPaste: { type: Function },
23410
- onCopy: { type: Function },
23411
- onCut: { type: Function },
23412
- onContextMenu: { type: Function },
23413
- onColumnsChange: { type: Function },
23414
- onDataChange: { type: Function },
23415
- onFooterDataChange: { type: Function },
23416
- onCurrentRowChange: { type: Function },
23417
- onCurrentRowDisabled: { type: Function },
23418
- onCurrentColumnChange: { type: Function },
23419
- onCurrentColumnDisabled: { type: Function },
23420
- onRadioChange: { type: Function },
23421
- onCheckboxChange: { type: Function },
23422
- onCheckboxAll: { type: Function },
23423
- onCheckboxRangeStart: { type: Function },
23424
- onCheckboxRangeChange: { type: Function },
23425
- onCheckboxRangeEnd: { type: Function },
23426
- onCheckboxRangeSelect: { type: Function },
23427
- onCellClick: { type: Function },
23428
- onCellDblclick: { type: Function },
23429
- onCellMenu: { type: Function },
23430
- onCellMouseenter: { type: Function },
23431
- onCellMouseleave: { type: Function },
23432
- onHeaderCellClick: { type: Function },
23433
- onHeaderCellDblclick: { type: Function },
23434
- onHeaderCellMenu: { type: Function },
23435
- onFooterCellClick: { type: Function },
23436
- onFooterCellDblclick: { type: Function },
23437
- onFooterCellMenu: { type: Function },
23438
- onSortChange: { type: Function },
23439
- onClearSort: { type: Function },
23440
- onClearAllSort: { type: Function },
23441
- onFilterChange: { type: Function },
23442
- onClearFilter: { type: Function },
23443
- onClearAllFilter: { type: Function },
23444
- onFilterVisible: { type: Function },
23445
- onResizableChange: { type: Function },
23446
- onToggleRowGroupExpand: { type: Function },
23447
- onToggleRowExpand: { type: Function },
23448
- onToggleTreeExpand: { type: Function },
23449
- onMenuClick: { type: Function },
23450
- onEditClosed: { type: Function },
23451
- onEditActivated: { type: Function },
23452
- onEditDisabled: { type: Function },
23453
- onValidError: { type: Function },
23454
- onScroll: { type: Function },
23455
- onScrollBoundary: { type: Function },
23456
- onCustom: { type: Function },
23457
- onRowDragstart: { type: Function },
23458
- onRowDragover: { type: Function },
23459
- onRowDragend: { type: Function },
23460
- onRowRemoveDragend: { type: Function },
23461
- onRowInsertDragend: { type: Function },
23462
- onColumnDragstart: { type: Function },
23463
- onColumnDragover: { type: Function },
23464
- onColumnDragend: { type: Function },
23465
- onEnterAppendRow: { type: Function },
23466
- onProxyQuery: { type: Function },
23467
- onProxyDelete: { type: Function },
23468
- onProxySave: { type: Function },
23469
- onPageChange: { type: Function },
23470
- onFormSubmit: { type: Function },
23471
- onFormSubmitInvalid: { type: Function },
23472
- onFormReset: { type: Function },
23473
- onFormCollapse: { type: Function },
23474
- onToolbarButtonClick: { type: Function },
23475
- onToolbarToolClick: { type: Function },
23476
- onZoom: { type: Function },
23477
- onEditActived: { type: Function },
23397
+ delayHover: { default: 250 },
23398
+ onSelection: {},
23399
+ onReady: {},
23400
+ onInitRendered: {},
23401
+ onDataRendered: {},
23402
+ onKeydownStart: {},
23403
+ onKeydown: {},
23404
+ onKeydownEnd: {},
23405
+ onPaste: {},
23406
+ onCopy: {},
23407
+ onCut: {},
23408
+ onContextMenu: {},
23409
+ onColumnsChange: {},
23410
+ onDataChange: {},
23411
+ onFooterDataChange: {},
23412
+ onCurrentRowChange: {},
23413
+ onCurrentRowDisabled: {},
23414
+ onCurrentColumnChange: {},
23415
+ onCurrentColumnDisabled: {},
23416
+ onRadioChange: {},
23417
+ onCheckboxChange: {},
23418
+ onCheckboxAll: {},
23419
+ onCheckboxRangeStart: {},
23420
+ onCheckboxRangeChange: {},
23421
+ onCheckboxRangeEnd: {},
23422
+ onCheckboxRangeSelect: {},
23423
+ onCellClick: {},
23424
+ onCellDblclick: {},
23425
+ onCellMenu: {},
23426
+ onCellMouseenter: {},
23427
+ onCellMouseleave: {},
23428
+ onHeaderCellClick: {},
23429
+ onHeaderCellDblclick: {},
23430
+ onHeaderCellMenu: {},
23431
+ onFooterCellClick: {},
23432
+ onFooterCellDblclick: {},
23433
+ onFooterCellMenu: {},
23434
+ onSortChange: {},
23435
+ onClearSort: {},
23436
+ onClearAllSort: {},
23437
+ onFilterChange: {},
23438
+ onClearFilter: {},
23439
+ onClearAllFilter: {},
23440
+ onFilterVisible: {},
23441
+ onResizableChange: {},
23442
+ onToggleRowGroupExpand: {},
23443
+ onToggleRowExpand: {},
23444
+ onToggleTreeExpand: {},
23445
+ onMenuClick: {},
23446
+ onEditClosed: {},
23447
+ onEditActivated: {},
23448
+ onEditDisabled: {},
23449
+ onValidError: {},
23450
+ onScroll: {},
23451
+ onScrollBoundary: {},
23452
+ onCustom: {},
23453
+ onRowDragstart: {},
23454
+ onRowDragover: {},
23455
+ onRowDragend: {},
23456
+ onRowRemoveDragend: {},
23457
+ onRowInsertDragend: {},
23458
+ onColumnDragstart: {},
23459
+ onColumnDragover: {},
23460
+ onColumnDragend: {},
23461
+ onEnterAppendRow: {},
23462
+ onProxyQuery: {},
23463
+ onProxyDelete: {},
23464
+ onProxySave: {},
23465
+ onPageChange: {},
23466
+ onFormSubmit: {},
23467
+ onFormSubmitInvalid: {},
23468
+ onFormReset: {},
23469
+ onFormCollapse: {},
23470
+ onToolbarButtonClick: {},
23471
+ onToolbarToolClick: {},
23472
+ onZoom: {},
23473
+ onEditActived: {},
23478
23474
  card: { type: Boolean },
23479
23475
  toolbarFixed: { type: Boolean },
23480
23476
  uid: {},
23481
23477
  immediate: { type: Boolean },
23482
- api: { type: Function },
23483
- dynamicApi: { type: Function },
23484
- beforeFetch: { type: Function },
23485
- afterFetch: { type: Function },
23486
- handleSearchInfoFn: { type: Function },
23487
- fetchSetting: {},
23478
+ api: { type: Function, default: void 0 },
23479
+ dynamicApi: {},
23480
+ beforeFetch: {},
23481
+ afterFetch: {},
23482
+ handleSearchInfoFn: {},
23483
+ fetchSetting: { default: () => FETCH_SETTING },
23488
23484
  defSort: {},
23489
23485
  searchInfo: {},
23490
23486
  useSearchForm: { type: Boolean },
23491
23487
  sumFields: {},
23492
23488
  avgFields: {},
23493
23489
  pagination: { type: [Object, Boolean] },
23494
- autoCreateKey: { type: Boolean },
23495
- rKey: { type: [String, Function] },
23490
+ autoCreateKey: { type: Boolean, default: true },
23491
+ rKey: {},
23496
23492
  showTableSetting: { type: Boolean },
23497
23493
  tableSetting: {},
23498
- showIndexColumn: { type: Boolean },
23494
+ showIndexColumn: { type: Boolean, default: true },
23499
23495
  showSelection: { type: Boolean },
23500
- relationForm: { type: Function }
23501
- }, setting),
23496
+ showCheckboxColumn: { type: Boolean },
23497
+ showRadioColumn: { type: Boolean },
23498
+ relationForm: {}
23499
+ },
23502
23500
  emits: ["fetch-success", "fetch-error", "selection-change", "page-change"],
23503
23501
  setup(__props, { expose: __expose, emit: __emit }) {
23504
23502
  const props = __props;
@@ -23512,7 +23510,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23512
23510
  return { ...props, ...unref(innerPropsRef) };
23513
23511
  });
23514
23512
  const wrapRef = ref(null);
23515
- const tableElRef = ref();
23513
+ const tableElRef = ref(null);
23516
23514
  const tableData = ref([]);
23517
23515
  const getWrapperClass = computed(() => {
23518
23516
  return [b(), { [is("card")]: getProps.value.card }, { [is("toolbar-fixed")]: getProps.value.toolbarFixed }];
@@ -23553,6 +23551,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23553
23551
  };
23554
23552
  return propsData;
23555
23553
  });
23554
+ function getInstance() {
23555
+ return tableElRef.value;
23556
+ }
23556
23557
  const tableAction = {
23557
23558
  emit,
23558
23559
  reload,
@@ -23589,7 +23590,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23589
23590
  handleSearchInfoChange,
23590
23591
  handleSearchInfoReload,
23591
23592
  setSelection,
23592
- instance: () => tableElRef.value
23593
+ instance: getInstance
23593
23594
  };
23594
23595
  createTableContext({ ...tableAction, wrapRef, getBindValues });
23595
23596
  __expose(tableAction);