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.
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.d.ts.map +1 -1
- package/dist/components/dialog/src/create-dialog.d.ts +27 -0
- package/dist/components/dialog/src/create-dialog.d.ts.map +1 -0
- package/dist/components/dialog/src/dialog.d.ts +28 -26
- package/dist/components/dialog/src/dialog.d.ts.map +1 -1
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.d.ts.map +1 -1
- package/dist/components/drawer/src/create-drawer.d.ts +19 -0
- package/dist/components/drawer/src/create-drawer.d.ts.map +1 -0
- package/dist/components/drawer/src/drawer.d.ts +46 -17
- package/dist/components/drawer/src/drawer.d.ts.map +1 -1
- package/dist/components/form/index.d.ts +30 -3
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/src/type.d.ts +57 -4
- package/dist/components/form/src/type.d.ts.map +1 -1
- package/dist/components/page-layout/src/page-layout.d.ts +6 -6
- package/dist/components/table/index.d.ts +20 -4
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/src/table-column.d.ts +12 -2
- package/dist/components/table/src/table-column.d.ts.map +1 -1
- package/dist/components/table/src/type.d.ts +221 -6
- package/dist/components/table/src/type.d.ts.map +1 -1
- package/dist/components/tree-transfer/src/tree-transfer.d.ts +1 -1
- package/dist/gi.css +1 -1
- package/dist/index.es.js +300 -298
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- 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
|
-
|
|
2266
|
-
},
|
|
2267
|
-
fc: {
|
|
2268
|
-
default: () => ({})
|
|
2269
|
-
},
|
|
2264
|
+
columns: { default: () => [] },
|
|
2265
|
+
fc: { default: () => ({}) },
|
|
2270
2266
|
gridProps: {},
|
|
2271
|
-
gridItemProps: {
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
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
|
-
|
|
2309
|
-
},
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
},
|
|
2313
|
-
|
|
2314
|
-
|
|
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([
|
|
2353
|
-
clearable: clearable2,
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
clearable: clearable2
|
|
2362
|
-
|
|
2363
|
-
clearable: clearable2
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
clearable: clearable2
|
|
2372
|
-
|
|
2373
|
-
clearable: clearable2
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
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(
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
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
|
-
|
|
2496
|
-
|
|
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
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
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(() => [
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
collapsed: collapsed.value
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
},
|
|
2654
|
-
|
|
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
|
-
|
|
2659
|
-
|
|
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(() => [
|
|
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, ["
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
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
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
3110
|
-
|
|
3090
|
+
size: {},
|
|
3091
|
+
fit: { type: Boolean, default: true },
|
|
3111
3092
|
showHeader: { type: Boolean, default: true },
|
|
3112
|
-
|
|
3113
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3138
|
-
style: {},
|
|
3119
|
+
treeProps: {},
|
|
3139
3120
|
tableLayout: {},
|
|
3140
3121
|
scrollbarAlwaysOn: { type: Boolean },
|
|
3141
|
-
flexible: { type: Boolean },
|
|
3142
3122
|
showOverflowTooltip: { type: [Boolean, Object] },
|
|
3143
|
-
|
|
3144
|
-
appendFilterPanelTo: {},
|
|
3123
|
+
flexible: { type: Boolean },
|
|
3145
3124
|
scrollbarTabindex: {},
|
|
3146
|
-
|
|
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
|
|
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 =
|
|
9193
|
+
const GiForm = _Form;
|
|
9192
9194
|
const GiPageLayout = PageLayout;
|
|
9193
9195
|
const GiDialog = _sfc_main$i;
|
|
9194
9196
|
const GiEditTable = EditTable;
|
|
9195
|
-
const GiTable =
|
|
9197
|
+
const GiTable = _Table;
|
|
9196
9198
|
const GiTag = Tag;
|
|
9197
9199
|
const GiTreeTransfer = TreeTransfer;
|
|
9198
9200
|
function capitalizeWord(word) {
|