gi-component 0.0.50 → 0.0.52

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.
Files changed (30) hide show
  1. package/dist/components/dialog/index.d.ts +1 -1
  2. package/dist/components/dialog/index.d.ts.map +1 -1
  3. package/dist/components/dialog/src/create-dialog.d.ts +27 -0
  4. package/dist/components/dialog/src/create-dialog.d.ts.map +1 -0
  5. package/dist/components/dialog/src/dialog.d.ts +28 -26
  6. package/dist/components/dialog/src/dialog.d.ts.map +1 -1
  7. package/dist/components/drawer/index.d.ts +1 -1
  8. package/dist/components/drawer/index.d.ts.map +1 -1
  9. package/dist/components/drawer/src/create-drawer.d.ts +19 -0
  10. package/dist/components/drawer/src/create-drawer.d.ts.map +1 -0
  11. package/dist/components/drawer/src/drawer.d.ts +46 -17
  12. package/dist/components/drawer/src/drawer.d.ts.map +1 -1
  13. package/dist/components/form/index.d.ts +30 -3
  14. package/dist/components/form/index.d.ts.map +1 -1
  15. package/dist/components/form/src/type.d.ts +57 -4
  16. package/dist/components/form/src/type.d.ts.map +1 -1
  17. package/dist/components/page-layout/src/page-layout.d.ts +6 -6
  18. package/dist/components/table/index.d.ts +20 -4
  19. package/dist/components/table/index.d.ts.map +1 -1
  20. package/dist/components/table/src/table-column.d.ts +12 -2
  21. package/dist/components/table/src/table-column.d.ts.map +1 -1
  22. package/dist/components/table/src/type.d.ts +221 -6
  23. package/dist/components/table/src/type.d.ts.map +1 -1
  24. package/dist/components/tree-transfer/src/tree-transfer.d.ts +1 -1
  25. package/dist/gi.css +1 -1
  26. package/dist/index.es.js +300 -298
  27. package/dist/index.es.js.map +1 -1
  28. package/dist/index.umd.js +1 -1
  29. package/dist/index.umd.js.map +1 -1
  30. package/package.json +4 -3
package/dist/index.es.js CHANGED
@@ -2261,120 +2261,84 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2261
2261
  __name: "form",
2262
2262
  props: {
2263
2263
  modelValue: {},
2264
- columns: {
2265
- default: () => []
2266
- },
2267
- fc: {
2268
- default: () => ({})
2269
- },
2264
+ columns: { default: () => [] },
2265
+ fc: { default: () => ({}) },
2270
2266
  gridProps: {},
2271
- gridItemProps: {
2272
- default: () => ({
2273
- span: {
2274
- xs: 24,
2275
- sm: 24,
2276
- md: 12
2277
- }
2278
- })
2279
- },
2280
- search: {
2281
- type: Boolean,
2282
- default: false
2283
- },
2284
- searchText: {
2285
- default: "查询"
2286
- },
2287
- hideFoldBtn: {
2288
- type: Boolean,
2289
- default: false
2290
- },
2291
- defaultCollapsed: {
2292
- type: Boolean,
2293
- default: void 0
2294
- },
2295
- suffix: {
2296
- type: Boolean,
2297
- default: true
2298
- },
2299
- model: {},
2267
+ gridItemProps: { default: () => ({ span: { xs: 24, sm: 24, md: 12 } }) },
2268
+ search: { type: Boolean, default: false },
2269
+ searchText: { default: "查询" },
2270
+ hideFoldBtn: { type: Boolean, default: false },
2271
+ defaultCollapsed: { type: Boolean, default: void 0 },
2272
+ suffix: { type: Boolean, default: true },
2273
+ size: {},
2274
+ disabled: { type: Boolean },
2300
2275
  rules: {},
2301
2276
  labelPosition: {},
2302
2277
  requireAsteriskPosition: {},
2303
- labelWidth: {
2304
- default: "auto"
2305
- },
2278
+ labelWidth: { default: "auto" },
2306
2279
  labelSuffix: {},
2307
- inline: {
2308
- type: Boolean
2309
- },
2310
- inlineMessage: {
2311
- type: Boolean
2312
- },
2313
- statusIcon: {
2314
- type: Boolean
2315
- },
2316
- showMessage: {
2317
- type: Boolean,
2318
- default: true
2319
- },
2320
- validateOnRuleChange: {
2321
- type: Boolean
2322
- },
2323
- hideRequiredAsterisk: {
2324
- type: Boolean
2325
- },
2326
- scrollToError: {
2327
- type: Boolean,
2328
- default: true
2329
- },
2330
- scrollIntoViewOptions: {},
2331
- size: {},
2332
- disabled: {
2333
- type: Boolean
2334
- }
2280
+ inline: { type: Boolean },
2281
+ inlineMessage: { type: Boolean },
2282
+ statusIcon: { type: Boolean },
2283
+ showMessage: { type: Boolean, default: true },
2284
+ validateOnRuleChange: { type: Boolean },
2285
+ hideRequiredAsterisk: { type: Boolean },
2286
+ scrollToError: { type: Boolean, default: true },
2287
+ scrollIntoViewOptions: { type: Boolean }
2335
2288
  },
2336
2289
  emits: ["update:modelValue", "search", "reset"],
2337
- setup(__props, {
2338
- expose: __expose,
2339
- emit: __emit
2340
- }) {
2290
+ setup(__props, { expose: __expose, emit: __emit }) {
2341
2291
  const props = __props;
2342
2292
  const emit = __emit;
2343
2293
  const attrs = useAttrs();
2344
- const {
2345
- b
2346
- } = useBemClass();
2294
+ const { b } = useBemClass();
2347
2295
  const collapsed = ref((props == null ? void 0 : props.defaultCollapsed) ?? props.search);
2348
2296
  const instance = getCurrentInstance();
2349
2297
  const globalConfig = instance == null ? void 0 : instance.appContext.config.globalProperties.$config;
2350
2298
  const clearable2 = (globalConfig == null ? void 0 : globalConfig.clearable) ?? false;
2351
2299
  const dictData = ref({});
2352
- const STATIC_PROPS = /* @__PURE__ */ new Map([["input", {
2353
- clearable: clearable2,
2354
- maxlength: 20
2355
- }], ["textarea", {
2356
- clearable: clearable2,
2357
- type: "textarea",
2358
- maxlength: 200,
2359
- showWordLimit: true
2360
- }], ["input-number", {}], ["input-tag", {
2361
- clearable: clearable2
2362
- }], ["select", {
2363
- clearable: clearable2
2364
- }], ["select-v2", {
2365
- clearable: clearable2
2366
- }], ["tree-select", {
2367
- clearable: clearable2
2368
- }], ["cascader", {
2369
- clearable: clearable2
2370
- }], ["slider", {}], ["switch", {}], ["rate", {}], ["checkbox-group", {}], ["checkbox", {}], ["radio-group", {}], ["radio", {}], ["date-picker", {
2371
- clearable: clearable2
2372
- }], ["time-picker", {
2373
- clearable: clearable2
2374
- }], ["time-select", {
2375
- clearable: clearable2
2376
- }], ["color-picker", {}], ["transfer", {}], ["autocomplete", {}], ["upload", {}], ["title", {}]]);
2377
- const PLACEHOLDER_MAP = /* @__PURE__ */ new Map([["input", (label) => `请输入${label}`], ["input-number", (label) => `请输入${label}`], ["input-tag", (label) => `请输入${label}`], ["textarea", (label) => `请填写${label}`], ["select", (label) => `请选择${label}`], ["select-v2", (label) => `请选择${label}`], ["tree-select", (label) => `请选择${label}`], ["cascader", (label) => `请选择${label}`], ["time-select", (label) => `请选择${label}`], ["input-search", (label) => `请选择${label}`], ["date-picker", () => "请选择日期"], ["time-picker", () => "请选择时间"]]);
2300
+ const STATIC_PROPS = /* @__PURE__ */ new Map([
2301
+ ["input", { clearable: clearable2, maxlength: 20 }],
2302
+ [
2303
+ "textarea",
2304
+ { clearable: clearable2, type: "textarea", maxlength: 200, showWordLimit: true }
2305
+ ],
2306
+ ["input-number", {}],
2307
+ ["input-tag", { clearable: clearable2 }],
2308
+ ["select", { clearable: clearable2 }],
2309
+ ["select-v2", { clearable: clearable2 }],
2310
+ ["tree-select", { clearable: clearable2 }],
2311
+ ["cascader", { clearable: clearable2 }],
2312
+ ["slider", {}],
2313
+ ["switch", {}],
2314
+ ["rate", {}],
2315
+ ["checkbox-group", {}],
2316
+ ["checkbox", {}],
2317
+ ["radio-group", {}],
2318
+ ["radio", {}],
2319
+ ["date-picker", { clearable: clearable2 }],
2320
+ ["time-picker", { clearable: clearable2 }],
2321
+ ["time-select", { clearable: clearable2 }],
2322
+ ["color-picker", {}],
2323
+ ["transfer", {}],
2324
+ ["autocomplete", {}],
2325
+ ["upload", {}],
2326
+ ["title", {}]
2327
+ ]);
2328
+ const PLACEHOLDER_MAP = /* @__PURE__ */ new Map([
2329
+ ["input", (label) => `请输入${label}`],
2330
+ ["input-number", (label) => `请输入${label}`],
2331
+ ["input-tag", (label) => `请输入${label}`],
2332
+ ["textarea", (label) => `请填写${label}`],
2333
+ ["select", (label) => `请选择${label}`],
2334
+ ["select-v2", (label) => `请选择${label}`],
2335
+ ["tree-select", (label) => `请选择${label}`],
2336
+ ["cascader", (label) => `请选择${label}`],
2337
+ ["time-select", (label) => `请选择${label}`],
2338
+ ["input-search", (label) => `请选择${label}`],
2339
+ ["date-picker", () => "请选择日期"],
2340
+ ["time-picker", () => "请选择时间"]
2341
+ ]);
2378
2342
  const loadDictData = async () => {
2379
2343
  var _a;
2380
2344
  const dictCodes = (_a = props.columns) == null ? void 0 : _a.filter((item) => item.dictCode).map((item) => item.dictCode).filter((code, index2, arr) => arr.indexOf(code) === index2);
@@ -2384,20 +2348,15 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2384
2348
  return;
2385
2349
  }
2386
2350
  try {
2387
- const dictResponses = await Promise.all(dictCodes.map((code) => globalConfig.dictRequest(code).then((response) => ({
2388
- code,
2389
- response
2390
- })).catch((error) => {
2391
- console.error(`获取字典 ${code} 失败:`, error);
2392
- return {
2393
- code,
2394
- response: []
2395
- };
2396
- })));
2397
- dictResponses.forEach(({
2398
- code,
2399
- response
2400
- }) => {
2351
+ const dictResponses = await Promise.all(
2352
+ dictCodes.map(
2353
+ (code) => globalConfig.dictRequest(code).then((response) => ({ code, response })).catch((error) => {
2354
+ console.error(`获取字典 ${code} 失败:`, error);
2355
+ return { code, response: [] };
2356
+ })
2357
+ )
2358
+ );
2359
+ dictResponses.forEach(({ code, response }) => {
2401
2360
  dictData.value[code] = response;
2402
2361
  });
2403
2362
  } catch (error) {
@@ -2415,9 +2374,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2415
2374
  };
2416
2375
  function getComponentBindProps(item) {
2417
2376
  var _a;
2418
- const defaultProps = {
2419
- ...STATIC_PROPS.get(item.type) || {}
2420
- };
2377
+ const defaultProps = { ...STATIC_PROPS.get(item.type) || {} };
2421
2378
  const placeholder = getPlaceholder(item);
2422
2379
  if (placeholder) {
2423
2380
  defaultProps.placeholder = placeholder;
@@ -2428,10 +2385,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2428
2385
  if (item.dictCode && dictData.value[item.dictCode]) {
2429
2386
  defaultProps.options = dictData.value[item.dictCode];
2430
2387
  }
2431
- return {
2432
- ...defaultProps,
2433
- ...(item == null ? void 0 : item.props) || {}
2434
- };
2388
+ return { ...defaultProps, ...(item == null ? void 0 : item.props) || {} };
2435
2389
  }
2436
2390
  const formProps = computed(() => {
2437
2391
  const {
@@ -2446,10 +2400,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2446
2400
  fc,
2447
2401
  ...restProps
2448
2402
  } = props;
2449
- return {
2450
- ...attrs,
2451
- ...restProps
2452
- };
2403
+ return { ...attrs, ...restProps };
2453
2404
  });
2454
2405
  const getClass = computed(() => {
2455
2406
  const arr = [b("form")];
@@ -2490,16 +2441,19 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2490
2441
  const rules = Array.isArray(item.rules) ? item.rules : [];
2491
2442
  const requiredMessage = `${item.label}为必填项`;
2492
2443
  if (item.required) {
2493
- return [{
2494
- required: true,
2495
- message: requiredMessage
2496
- }, ...rules];
2444
+ return [
2445
+ { required: true, message: requiredMessage },
2446
+ ...rules
2447
+ ];
2497
2448
  }
2498
2449
  if ((_b = (_a = props.fc) == null ? void 0 : _a[item.field]) == null ? void 0 : _b.required) {
2499
- return [{
2500
- required: props.fc[item.field].required,
2501
- message: requiredMessage
2502
- }, ...rules];
2450
+ return [
2451
+ {
2452
+ required: props.fc[item.field].required,
2453
+ message: requiredMessage
2454
+ },
2455
+ ...rules
2456
+ ];
2503
2457
  }
2504
2458
  return item.rules;
2505
2459
  }
@@ -2519,14 +2473,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2519
2473
  return false;
2520
2474
  }
2521
2475
  function updateModelValue(value, item) {
2522
- emit("update:modelValue", {
2523
- ...props.modelValue,
2524
- [item.field]: value
2525
- });
2476
+ emit("update:modelValue", { ...props.modelValue, [item.field]: value });
2526
2477
  }
2527
- __expose({
2528
- formRef
2529
- });
2478
+ __expose({ formRef });
2530
2479
  return (_ctx, _cache) => {
2531
2480
  const _component_el_alert = resolveComponent("el-alert");
2532
2481
  return openBlock(), createBlock(unref(ElForm), mergeProps({
@@ -2536,148 +2485,179 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2536
2485
  }, formProps.value, {
2537
2486
  model: props.modelValue
2538
2487
  }), {
2539
- default: withCtx(() => [createVNode(unref(Grid), mergeProps({
2540
- class: "w-full",
2541
- "col-gap": 12
2542
- }, props.gridProps, {
2543
- collapsed: collapsed.value
2544
- }), {
2545
- default: withCtx(() => {
2546
- var _a;
2547
- return [(openBlock(true), createElementBlock(Fragment, null, renderList(props.columns, (item, index2) => {
2548
- var _a2, _b;
2549
- return openBlock(), createElementBlock(Fragment, null, [item.type === "title" ? (openBlock(), createBlock(unref(GridItem), {
2550
- key: `title${index2}`,
2551
- span: 24
2552
- }, {
2553
- default: withCtx(() => [createVNode(unref(ElFormItem), {
2554
- "label-width": "0"
2555
- }, {
2556
- default: withCtx(() => [createVNode(_component_el_alert, {
2557
- class: normalizeClass(unref(b)("form-item__title")),
2558
- title: typeof item.label === "string" ? item.label : "",
2559
- type: "info",
2560
- closable: false
2561
- }, null, 8, ["class", "title"])]),
2562
- _: 2
2563
- }, 1024)]),
2564
- _: 2
2565
- }, 1024)) : (openBlock(), createElementBlock(Fragment, {
2566
- key: 1
2567
- }, [!isHide(item) ? (openBlock(), createBlock(unref(GridItem), mergeProps({
2568
- key: item.field + index2
2569
- }, {
2570
- ref_for: true
2571
- }, item.gridItemProps || props.gridItemProps, {
2572
- span: item.span || ((_a2 = item.gridItemProps) == null ? void 0 : _a2.span) || ((_b = props == null ? void 0 : props.gridItemProps) == null ? void 0 : _b.span)
2573
- }), {
2574
- default: withCtx(() => [(openBlock(), createBlock(unref(ElFormItem), mergeProps({
2575
- key: item.field + index2,
2576
- prop: item.field,
2577
- label: item.label,
2578
- rules: getFormItemRules(item)
2579
- }, {
2580
- ref_for: true
2581
- }, item.formItemProps), createSlots({
2582
- default: withCtx(() => [item.type === "slot" ? (openBlock(), createElementBlock("div", _hoisted_1$2, [renderSlot(_ctx.$slots, item.field, {
2583
- item
2584
- }, void 0, true)])) : (openBlock(), createElementBlock("div", {
2585
- key: 1,
2586
- class: normalizeClass(unref(b)("form-item__content"))
2587
- }, [createElementVNode("div", {
2588
- class: normalizeClass(unref(b)("form-item__component"))
2589
- }, [(openBlock(), createBlock(resolveDynamicComponent(CompMap[item.type] || item.type), mergeProps({
2590
- disabled: isDisabled(item),
2591
- class: "w-full"
2592
- }, {
2593
- ref_for: true
2594
- }, getComponentBindProps(item), {
2595
- "model-value": props.modelValue[item.fieldName || item.field],
2596
- "onUpdate:modelValue": ($event) => updateModelValue($event, item)
2597
- }), createSlots({
2598
- _: 2
2599
- }, [renderList((item == null ? void 0 : item.slots) || {}, (slotValue, slotKey) => {
2600
- return {
2601
- name: slotKey,
2602
- fn: withCtx((scope) => [typeof slotValue === "string" ? (openBlock(), createElementBlock(Fragment, {
2603
- key: 0
2604
- }, [createTextVNode(toDisplayString(slotValue), 1)], 64)) : slotValue ? (openBlock(), createBlock(resolveDynamicComponent(slotValue(scope)), {
2605
- key: 1
2606
- })) : createCommentVNode("", true)])
2607
- };
2608
- })]), 1040, ["disabled", "model-value", "onUpdate:modelValue"])), item.tip ? (openBlock(), createBlock(unref(ElText), {
2609
- key: 0,
2610
- class: normalizeClass(unref(b)("form-item__tip")),
2611
- type: "info",
2612
- size: "small"
2613
- }, {
2614
- default: withCtx(() => [createTextVNode(toDisplayString(item.tip), 1)]),
2615
- _: 2
2616
- }, 1032, ["class"])) : createCommentVNode("", true)], 2), item.extra ? (openBlock(), createElementBlock("div", {
2617
- key: 0,
2618
- class: normalizeClass(unref(b)("form-item__extra"))
2619
- }, [typeof item.extra === "string" ? (openBlock(), createBlock(unref(ElText), {
2620
- key: 0,
2621
- type: "info",
2622
- size: "small"
2623
- }, {
2624
- default: withCtx(() => [createTextVNode(toDisplayString(item.extra), 1)]),
2625
- _: 2
2626
- }, 1024)) : item.extra ? (openBlock(), createBlock(resolveDynamicComponent(item.extra), {
2627
- key: 1
2628
- })) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)], 2))]),
2629
- _: 2
2630
- }, [(item == null ? void 0 : item.labelRender) ? {
2631
- name: "label",
2632
- fn: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(item.labelRender)))]),
2633
- key: "0"
2634
- } : void 0]), 1040, ["prop", "label", "rules"]))]),
2635
- _: 2
2636
- }, 1040, ["span"])) : createCommentVNode("", true)], 64))], 64);
2637
- }), 256)), props.search ? (openBlock(), createBlock(unref(GridItem), {
2638
- key: 0,
2639
- suffix: props.suffix && props.search,
2640
- span: (_a = props == null ? void 0 : props.gridItemProps) == null ? void 0 : _a.span
2641
- }, {
2642
- default: withCtx(() => [createVNode(unref(ElSpace), {
2643
- class: normalizeClass(unref(b)("form__search-btns"))
2644
- }, {
2645
- default: withCtx(() => [createVNode(unref(ElButton), {
2646
- type: "primary",
2647
- onClick: _cache[0] || (_cache[0] = ($event) => emit("search"))
2648
- }, {
2649
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.searchText), 1)]),
2650
- _: 1
2651
- }), createVNode(unref(ElButton), {
2652
- onClick: _cache[1] || (_cache[1] = ($event) => emit("reset"))
2653
- }, {
2654
- default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" 重置 ", -1)])]),
2655
- _: 1
2656
- }), !props.hideFoldBtn ? (openBlock(), createBlock(unref(ElButton), {
2488
+ default: withCtx(() => [
2489
+ createVNode(unref(Grid), mergeProps({
2490
+ class: "w-full",
2491
+ "col-gap": 12
2492
+ }, props.gridProps, { collapsed: collapsed.value }), {
2493
+ default: withCtx(() => {
2494
+ var _a;
2495
+ return [
2496
+ (openBlock(true), createElementBlock(Fragment, null, renderList(props.columns, (item, index2) => {
2497
+ var _a2, _b;
2498
+ return openBlock(), createElementBlock(Fragment, null, [
2499
+ item.type === "title" ? (openBlock(), createBlock(unref(GridItem), {
2500
+ key: `title${index2}`,
2501
+ span: 24
2502
+ }, {
2503
+ default: withCtx(() => [
2504
+ createVNode(unref(ElFormItem), { "label-width": "0" }, {
2505
+ default: withCtx(() => [
2506
+ createVNode(_component_el_alert, {
2507
+ class: normalizeClass(unref(b)("form-item__title")),
2508
+ title: typeof item.label === "string" ? item.label : "",
2509
+ type: "info",
2510
+ closable: false
2511
+ }, null, 8, ["class", "title"])
2512
+ ]),
2513
+ _: 2
2514
+ }, 1024)
2515
+ ]),
2516
+ _: 2
2517
+ }, 1024)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2518
+ !isHide(item) ? (openBlock(), createBlock(unref(GridItem), mergeProps({
2519
+ key: item.field + index2
2520
+ }, { ref_for: true }, item.gridItemProps || props.gridItemProps, {
2521
+ span: item.span || ((_a2 = item.gridItemProps) == null ? void 0 : _a2.span) || ((_b = props == null ? void 0 : props.gridItemProps) == null ? void 0 : _b.span)
2522
+ }), {
2523
+ default: withCtx(() => [
2524
+ (openBlock(), createBlock(unref(ElFormItem), mergeProps({
2525
+ key: item.field + index2,
2526
+ prop: item.field,
2527
+ label: item.label,
2528
+ rules: getFormItemRules(item)
2529
+ }, { ref_for: true }, item.formItemProps), createSlots({
2530
+ default: withCtx(() => [
2531
+ item.type === "slot" ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
2532
+ renderSlot(_ctx.$slots, item.field, { item }, void 0, true)
2533
+ ])) : (openBlock(), createElementBlock("div", {
2534
+ key: 1,
2535
+ class: normalizeClass(unref(b)("form-item__content"))
2536
+ }, [
2537
+ createElementVNode("div", {
2538
+ class: normalizeClass(unref(b)("form-item__component"))
2539
+ }, [
2540
+ (openBlock(), createBlock(resolveDynamicComponent(CompMap[item.type] || item.type), mergeProps({
2541
+ disabled: isDisabled(item),
2542
+ class: "w-full"
2543
+ }, { ref_for: true }, getComponentBindProps(item), {
2544
+ "model-value": props.modelValue[item.fieldName || item.field],
2545
+ "onUpdate:modelValue": ($event) => updateModelValue($event, item)
2546
+ }), createSlots({ _: 2 }, [
2547
+ renderList((item == null ? void 0 : item.slots) || {}, (slotValue, slotKey) => {
2548
+ return {
2549
+ name: slotKey,
2550
+ fn: withCtx((scope) => [
2551
+ typeof slotValue === "string" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2552
+ createTextVNode(toDisplayString(slotValue), 1)
2553
+ ], 64)) : slotValue ? (openBlock(), createBlock(resolveDynamicComponent(slotValue(scope)), { key: 1 })) : createCommentVNode("", true)
2554
+ ])
2555
+ };
2556
+ })
2557
+ ]), 1040, ["disabled", "model-value", "onUpdate:modelValue"])),
2558
+ item.tip ? (openBlock(), createBlock(unref(ElText), {
2559
+ key: 0,
2560
+ class: normalizeClass(unref(b)("form-item__tip")),
2561
+ type: "info",
2562
+ size: "small"
2563
+ }, {
2564
+ default: withCtx(() => [
2565
+ createTextVNode(toDisplayString(item.tip), 1)
2566
+ ]),
2567
+ _: 2
2568
+ }, 1032, ["class"])) : createCommentVNode("", true)
2569
+ ], 2),
2570
+ item.extra ? (openBlock(), createElementBlock("div", {
2571
+ key: 0,
2572
+ class: normalizeClass(unref(b)("form-item__extra"))
2573
+ }, [
2574
+ typeof item.extra === "string" ? (openBlock(), createBlock(unref(ElText), {
2575
+ key: 0,
2576
+ type: "info",
2577
+ size: "small"
2578
+ }, {
2579
+ default: withCtx(() => [
2580
+ createTextVNode(toDisplayString(item.extra), 1)
2581
+ ]),
2582
+ _: 2
2583
+ }, 1024)) : item.extra ? (openBlock(), createBlock(resolveDynamicComponent(item.extra), { key: 1 })) : createCommentVNode("", true)
2584
+ ], 2)) : createCommentVNode("", true)
2585
+ ], 2))
2586
+ ]),
2587
+ _: 2
2588
+ }, [
2589
+ (item == null ? void 0 : item.labelRender) ? {
2590
+ name: "label",
2591
+ fn: withCtx(() => [
2592
+ (openBlock(), createBlock(resolveDynamicComponent(item.labelRender)))
2593
+ ]),
2594
+ key: "0"
2595
+ } : void 0
2596
+ ]), 1040, ["prop", "label", "rules"]))
2597
+ ]),
2598
+ _: 2
2599
+ }, 1040, ["span"])) : createCommentVNode("", true)
2600
+ ], 64))
2601
+ ], 64);
2602
+ }), 256)),
2603
+ props.search ? (openBlock(), createBlock(unref(GridItem), {
2657
2604
  key: 0,
2658
- class: "form__fold-btn",
2659
- type: "primary",
2660
- icon: collapsed.value ? unref(arrow_down_default) : unref(arrow_up_default),
2661
- text: "",
2662
- size: "small",
2663
- onClick: _cache[2] || (_cache[2] = ($event) => collapsed.value = !collapsed.value)
2605
+ suffix: props.suffix && props.search,
2606
+ span: (_a = props == null ? void 0 : props.gridItemProps) == null ? void 0 : _a.span
2664
2607
  }, {
2665
- default: withCtx(() => [createTextVNode(toDisplayString(collapsed.value ? "展开" : "收起"), 1)]),
2608
+ default: withCtx(() => [
2609
+ createVNode(unref(ElSpace), {
2610
+ class: normalizeClass(unref(b)("form__search-btns"))
2611
+ }, {
2612
+ default: withCtx(() => [
2613
+ createVNode(unref(ElButton), {
2614
+ type: "primary",
2615
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("search"))
2616
+ }, {
2617
+ default: withCtx(() => [
2618
+ createTextVNode(toDisplayString(_ctx.searchText), 1)
2619
+ ]),
2620
+ _: 1
2621
+ }),
2622
+ createVNode(unref(ElButton), {
2623
+ onClick: _cache[1] || (_cache[1] = ($event) => emit("reset"))
2624
+ }, {
2625
+ default: withCtx(() => [..._cache[3] || (_cache[3] = [
2626
+ createTextVNode(" 重置 ", -1)
2627
+ ])]),
2628
+ _: 1
2629
+ }),
2630
+ !props.hideFoldBtn ? (openBlock(), createBlock(unref(ElButton), {
2631
+ key: 0,
2632
+ class: "form__fold-btn",
2633
+ type: "primary",
2634
+ icon: collapsed.value ? unref(arrow_down_default) : unref(arrow_up_default),
2635
+ text: "",
2636
+ size: "small",
2637
+ onClick: _cache[2] || (_cache[2] = ($event) => collapsed.value = !collapsed.value)
2638
+ }, {
2639
+ default: withCtx(() => [
2640
+ createTextVNode(toDisplayString(collapsed.value ? "展开" : "收起"), 1)
2641
+ ]),
2642
+ _: 1
2643
+ }, 8, ["icon"])) : createCommentVNode("", true)
2644
+ ]),
2645
+ _: 1
2646
+ }, 8, ["class"])
2647
+ ]),
2666
2648
  _: 1
2667
- }, 8, ["icon"])) : createCommentVNode("", true)]),
2668
- _: 1
2669
- }, 8, ["class"])]),
2670
- _: 1
2671
- }, 8, ["suffix", "span"])) : createCommentVNode("", true)];
2672
- }),
2673
- _: 3
2674
- }, 16, ["collapsed"])]),
2649
+ }, 8, ["suffix", "span"])) : createCommentVNode("", true)
2650
+ ];
2651
+ }),
2652
+ _: 3
2653
+ }, 16, ["collapsed"])
2654
+ ]),
2675
2655
  _: 3
2676
2656
  }, 16, ["class", "model"]);
2677
2657
  };
2678
2658
  }
2679
2659
  });
2680
- const Form = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-85d6c1a1"]]);
2660
+ const _Form = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-5ba30556"]]);
2681
2661
  const _hoisted_1$1 = ["data-value", "onClick"];
2682
2662
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2683
2663
  __name: "nav-tabs",
@@ -3049,6 +3029,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3049
3029
  });
3050
3030
  const PageLayout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-0ed9c74a"]]);
3051
3031
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3032
+ ...{
3033
+ name: "TableColumn"
3034
+ },
3052
3035
  __name: "table-column",
3053
3036
  props: {
3054
3037
  column: {}
@@ -3060,11 +3043,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3060
3043
  return restProps;
3061
3044
  });
3062
3045
  return (_ctx, _cache) => {
3046
+ const _component_TableColumn = resolveComponent("TableColumn", true);
3063
3047
  const _directive_slots = resolveDirective("slots");
3064
3048
  return openBlock(), createBlock(unref(ElTableColumn), normalizeProps(guardReactiveProps(columnProps.value)), createSlots({
3065
3049
  default: withCtx(() => [
3066
3050
  _ctx.column.children && _ctx.column.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.column.children, (child) => {
3067
- return withDirectives((openBlock(), createBlock(_sfc_main$4, {
3051
+ return withDirectives((openBlock(), createBlock(_component_TableColumn, {
3068
3052
  key: child.prop || child.label,
3069
3053
  column: child
3070
3054
  }, null, 8, ["column"])), [
@@ -3096,22 +3080,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3096
3080
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3097
3081
  __name: "table",
3098
3082
  props: {
3099
- data: { default: () => [] },
3100
3083
  columns: { default: () => [] },
3101
3084
  pagination: { type: [Object, Boolean], default: () => ({}) },
3102
- size: {},
3103
- width: {},
3085
+ data: { default: () => [] },
3104
3086
  height: {},
3105
3087
  maxHeight: {},
3106
- fit: { type: Boolean, default: true },
3107
3088
  stripe: { type: Boolean },
3108
3089
  border: { type: Boolean },
3109
- rowKey: {},
3110
- context: {},
3090
+ size: {},
3091
+ fit: { type: Boolean, default: true },
3111
3092
  showHeader: { type: Boolean, default: true },
3112
- showSummary: { type: Boolean },
3113
- sumText: {},
3114
- summaryMethod: {},
3093
+ highlightCurrentRow: { type: Boolean },
3094
+ currentRowKey: {},
3115
3095
  rowClassName: {},
3116
3096
  rowStyle: {},
3117
3097
  cellClassName: {},
@@ -3120,30 +3100,52 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3120
3100
  headerRowStyle: {},
3121
3101
  headerCellClassName: {},
3122
3102
  headerCellStyle: {},
3123
- highlightCurrentRow: { type: Boolean },
3124
- currentRowKey: {},
3103
+ rowKey: {},
3125
3104
  emptyText: {},
3126
- expandRowKeys: {},
3127
3105
  defaultExpandAll: { type: Boolean },
3106
+ expandRowKeys: {},
3128
3107
  defaultSort: {},
3129
3108
  tooltipEffect: {},
3130
3109
  tooltipOptions: {},
3110
+ appendFilterPanelTo: {},
3111
+ showSummary: { type: Boolean },
3112
+ sumText: {},
3113
+ summaryMethod: {},
3131
3114
  spanMethod: {},
3132
3115
  selectOnIndeterminate: { type: Boolean, default: true },
3133
3116
  indent: {},
3134
- treeProps: {},
3135
3117
  lazy: { type: Boolean },
3136
3118
  load: {},
3137
- className: {},
3138
- style: {},
3119
+ treeProps: {},
3139
3120
  tableLayout: {},
3140
3121
  scrollbarAlwaysOn: { type: Boolean },
3141
- flexible: { type: Boolean },
3142
3122
  showOverflowTooltip: { type: [Boolean, Object] },
3143
- tooltipFormatter: {},
3144
- appendFilterPanelTo: {},
3123
+ flexible: { type: Boolean },
3145
3124
  scrollbarTabindex: {},
3146
- nativeScrollbar: { type: Boolean }
3125
+ allowDragLastColumn: { type: Boolean },
3126
+ tooltipFormatter: {},
3127
+ preserveExpandedContent: { type: Boolean },
3128
+ nativeScrollbar: { type: Boolean },
3129
+ rowExpandable: {},
3130
+ onSelect: {},
3131
+ onSelectAll: {},
3132
+ onSelectionChange: {},
3133
+ onCellMouseEnter: {},
3134
+ onCellMouseLeave: {},
3135
+ onCellClick: {},
3136
+ onCellDblclick: {},
3137
+ onCellContextmenu: {},
3138
+ onRowClick: {},
3139
+ onRowContextmenu: {},
3140
+ onRowDblclick: {},
3141
+ onHeaderClick: {},
3142
+ onHeaderContextmenu: {},
3143
+ onSortChange: {},
3144
+ onFilterChange: {},
3145
+ onCurrentChange: {},
3146
+ onHeaderDragend: {},
3147
+ onExpandChange: {},
3148
+ onScroll: {}
3147
3149
  },
3148
3150
  setup(__props, { expose: __expose }) {
3149
3151
  const props = __props;
@@ -3214,7 +3216,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3214
3216
  };
3215
3217
  }
3216
3218
  });
3217
- const Table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-3f5ec8bc"]]);
3219
+ const _Table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-42ae2dfb"]]);
3218
3220
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3219
3221
  __name: "tabs",
3220
3222
  props: /* @__PURE__ */ mergeModels({
@@ -9168,11 +9170,11 @@ const components = {
9168
9170
  Flex,
9169
9171
  Grid,
9170
9172
  GridItem,
9171
- Form,
9173
+ Form: _Form,
9172
9174
  PageLayout,
9173
9175
  Dialog: _sfc_main$i,
9174
9176
  EditTable,
9175
- Table,
9177
+ Table: _Table,
9176
9178
  Tag,
9177
9179
  TreeTransfer
9178
9180
  };
@@ -9188,11 +9190,11 @@ const GiNavTabs = NavTabs;
9188
9190
  const GiFlex = Flex;
9189
9191
  const GiGrid = Grid;
9190
9192
  const GiGridItem = GridItem;
9191
- const GiForm = Form;
9193
+ const GiForm = _Form;
9192
9194
  const GiPageLayout = PageLayout;
9193
9195
  const GiDialog = _sfc_main$i;
9194
9196
  const GiEditTable = EditTable;
9195
- const GiTable = Table;
9197
+ const GiTable = _Table;
9196
9198
  const GiTag = Tag;
9197
9199
  const GiTreeTransfer = TreeTransfer;
9198
9200
  function capitalizeWord(word) {