gi-component 0.0.38 → 0.0.40
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/descriptions/src/descriptions.vue.d.ts +10 -13
- package/dist/components/descriptions/src/type.d.ts +42 -16
- package/dist/components/flex/index.d.ts +4 -0
- package/dist/components/flex/src/flex.vue.d.ts +24 -0
- package/dist/components/flex/src/type.d.ts +14 -0
- package/dist/components/tag/index.d.ts +4 -0
- package/dist/components/tag/src/tag.vue.d.ts +30 -0
- package/dist/components/tag/src/type.d.ts +13 -0
- package/dist/gi.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +307 -124
- 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 +1 -1
- package/packages/components/descriptions/index.ts +5 -0
- package/packages/components/descriptions/src/descriptions.vue +72 -0
- package/packages/components/descriptions/src/type.ts +44 -0
- package/packages/components/tag/index.ts +5 -0
- package/packages/components/tag/src/tag.vue +342 -0
- package/packages/components/tag/src/type.ts +36 -0
- package/packages/components.d.ts +33 -31
- package/packages/index.ts +8 -0
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, useAttrs, computed, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, useSlots, normalizeClass, createCommentVNode, normalizeStyle, createVNode,
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, useAttrs, computed, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, useSlots, normalizeClass, createCommentVNode, normalizeStyle, createVNode, createSlots, Fragment, renderList, mergeModels, useModel, ref, resolveDynamicComponent, resolveComponent, h, createApp, watch, onMounted, onUpdated, onUnmounted, inject, toRefs, watchEffect, reactive, provide, normalizeProps, guardReactiveProps, useTemplateRef } from "vue";
|
|
2
2
|
import * as El from "element-plus";
|
|
3
3
|
import El__default, { ElButton, ElSpace, ElDescriptions, ElDescriptionsItem, ElDialog, ElDrawer, ElInput, ElForm, ElTable, ElTableColumn, ElFormItem, ElText, ElMessage, ElIcon, ElSplitter, ElSplitterPanel, ElRow, ElPagination, ElTabs, ElTabPane, ElCheckbox, ElScrollbar, ElTree, ElCheckboxGroup, ElEmpty } from "element-plus";
|
|
4
4
|
/*! Element Plus Icons Vue v2.3.2 */
|
|
@@ -284,7 +284,7 @@ function useBemClass() {
|
|
|
284
284
|
const b = (name = "") => `${prefix}-${name ? `${name}` : ""}`;
|
|
285
285
|
return { b };
|
|
286
286
|
}
|
|
287
|
-
const _sfc_main$
|
|
287
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
288
288
|
__name: "button",
|
|
289
289
|
props: {
|
|
290
290
|
type: { default: "" },
|
|
@@ -349,7 +349,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
});
|
|
352
|
-
const _sfc_main$
|
|
352
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
353
353
|
__name: "card",
|
|
354
354
|
props: {
|
|
355
355
|
title: { default: "" },
|
|
@@ -434,117 +434,113 @@ const _export_sfc = (sfc, props) => {
|
|
|
434
434
|
}
|
|
435
435
|
return target;
|
|
436
436
|
};
|
|
437
|
-
const Card = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
438
|
-
const
|
|
437
|
+
const Card = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-0733140b"]]);
|
|
438
|
+
const _hoisted_1$5 = { key: 2 };
|
|
439
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
439
440
|
__name: "descriptions",
|
|
440
441
|
props: {
|
|
441
|
-
data: {},
|
|
442
442
|
columns: { default: () => [] },
|
|
443
|
-
|
|
443
|
+
data: { default: () => ({}) },
|
|
444
|
+
border: { type: Boolean, default: false },
|
|
445
|
+
column: { default: 3 },
|
|
446
|
+
direction: { default: "horizontal" },
|
|
447
|
+
size: { default: "default" },
|
|
448
|
+
title: { default: "" },
|
|
449
|
+
extra: { default: "" }
|
|
444
450
|
},
|
|
445
451
|
setup(__props) {
|
|
446
452
|
const props = __props;
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
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);
|
|
455
|
-
if (!(dictCodes == null ? void 0 : dictCodes.length)) return;
|
|
456
|
-
const dictRequest = props.dictRequest || (globalConfig == null ? void 0 : globalConfig.dictRequest);
|
|
457
|
-
if (!dictRequest) {
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
try {
|
|
461
|
-
const dictResponses = await Promise.all(
|
|
462
|
-
dictCodes.map(
|
|
463
|
-
(code) => dictRequest(code).then((response) => ({ code, response })).catch((error) => {
|
|
464
|
-
console.error(`获取字典 ${code} 失败:`, error);
|
|
465
|
-
return { code, response: [] };
|
|
466
|
-
})
|
|
467
|
-
)
|
|
468
|
-
);
|
|
469
|
-
dictResponses.forEach(({ code, response }) => {
|
|
470
|
-
dictData.value[code] = response;
|
|
471
|
-
});
|
|
472
|
-
} catch (error) {
|
|
473
|
-
console.error("获取字典数据失败:", error);
|
|
453
|
+
const NodeRenderer = defineComponent({
|
|
454
|
+
name: "NodeRenderer",
|
|
455
|
+
props: {
|
|
456
|
+
getNode: { type: Function, required: true }
|
|
457
|
+
},
|
|
458
|
+
setup(props2) {
|
|
459
|
+
return () => props2.getNode();
|
|
474
460
|
}
|
|
475
|
-
};
|
|
476
|
-
onMounted(() => {
|
|
477
|
-
loadDictData();
|
|
478
461
|
});
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
if (typeof item.hide === "boolean") return !item.hide;
|
|
482
|
-
if (typeof item.hide === "function") return !item.hide(props.data);
|
|
483
|
-
return true;
|
|
484
|
-
});
|
|
485
|
-
});
|
|
486
|
-
const descriptionsProps = computed(() => {
|
|
487
|
-
const { data, columns, dictRequest, ...restProps } = props;
|
|
488
|
-
return { ...attrs, ...restProps };
|
|
489
|
-
});
|
|
490
|
-
const getClass = computed(() => {
|
|
491
|
-
return [b("descriptions")];
|
|
492
|
-
});
|
|
493
|
-
const getValue = (item) => {
|
|
494
|
-
if (!item.field || !props.data) return "";
|
|
495
|
-
return props.data[item.field] ?? "";
|
|
496
|
-
};
|
|
497
|
-
const getDictValue = (item) => {
|
|
462
|
+
const slots = useSlots();
|
|
463
|
+
const useColumns = computed(() => {
|
|
498
464
|
var _a;
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
465
|
+
return (((_a = props.columns) == null ? void 0 : _a.length) ?? 0) > 0;
|
|
466
|
+
});
|
|
467
|
+
function hasColumnSlot(name) {
|
|
468
|
+
return !!name && !!slots[name];
|
|
469
|
+
}
|
|
470
|
+
function getFieldValue(col) {
|
|
471
|
+
if (!props.data || col.value === void 0 || col.value === null)
|
|
472
|
+
return "";
|
|
473
|
+
return props.data[col.value];
|
|
474
|
+
}
|
|
505
475
|
return (_ctx, _cache) => {
|
|
506
|
-
return openBlock(), createBlock(unref(ElDescriptions),
|
|
476
|
+
return openBlock(), createBlock(unref(ElDescriptions), {
|
|
477
|
+
border: _ctx.border,
|
|
478
|
+
column: _ctx.column,
|
|
479
|
+
direction: _ctx.direction,
|
|
480
|
+
size: _ctx.size,
|
|
481
|
+
title: _ctx.title,
|
|
482
|
+
extra: _ctx.extra
|
|
483
|
+
}, createSlots({
|
|
507
484
|
default: withCtx(() => [
|
|
508
|
-
(openBlock(true), createElementBlock(Fragment,
|
|
509
|
-
return openBlock(), createBlock(unref(ElDescriptionsItem),
|
|
510
|
-
key:
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
485
|
+
useColumns.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.columns, (col, idx) => {
|
|
486
|
+
return openBlock(), createBlock(unref(ElDescriptionsItem), {
|
|
487
|
+
key: col.value ?? idx,
|
|
488
|
+
label: typeof col.label === "string" ? col.label : "",
|
|
489
|
+
span: col.span ?? 1,
|
|
490
|
+
width: col.width,
|
|
491
|
+
"min-width": col.minWidth,
|
|
492
|
+
align: col.align ?? "left",
|
|
493
|
+
"label-align": col.labelAlign,
|
|
494
|
+
"class-name": col.className,
|
|
495
|
+
"label-class-name": col.labelClassName
|
|
496
|
+
}, createSlots({
|
|
516
497
|
default: withCtx(() => [
|
|
517
|
-
|
|
498
|
+
hasColumnSlot(col.value) ? renderSlot(_ctx.$slots, col.value, {
|
|
518
499
|
key: 0,
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
],
|
|
500
|
+
value: getFieldValue(col),
|
|
501
|
+
data: _ctx.data,
|
|
502
|
+
column: col
|
|
503
|
+
}) : col.render && _ctx.data ? (openBlock(), createBlock(unref(NodeRenderer), {
|
|
504
|
+
key: 1,
|
|
505
|
+
"get-node": () => col.render({ value: getFieldValue(col), data: _ctx.data, column: col })
|
|
506
|
+
}, null, 8, ["get-node"])) : (openBlock(), createElementBlock("span", _hoisted_1$5, toDisplayString(getFieldValue(col)), 1))
|
|
526
507
|
]),
|
|
527
508
|
_: 2
|
|
528
509
|
}, [
|
|
529
|
-
|
|
510
|
+
typeof col.label === "function" ? {
|
|
530
511
|
name: "label",
|
|
531
512
|
fn: withCtx(() => [
|
|
532
|
-
(
|
|
513
|
+
createVNode(unref(NodeRenderer), {
|
|
514
|
+
"get-node": () => col.label(col)
|
|
515
|
+
}, null, 8, ["get-node"])
|
|
533
516
|
]),
|
|
534
517
|
key: "0"
|
|
535
518
|
} : void 0
|
|
536
|
-
]),
|
|
537
|
-
}), 128)),
|
|
538
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
519
|
+
]), 1032, ["label", "span", "width", "min-width", "align", "label-align", "class-name", "label-class-name"]);
|
|
520
|
+
}), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
539
521
|
]),
|
|
540
|
-
_:
|
|
541
|
-
},
|
|
522
|
+
_: 2
|
|
523
|
+
}, [
|
|
524
|
+
_ctx.$slots.title ? {
|
|
525
|
+
name: "title",
|
|
526
|
+
fn: withCtx(() => [
|
|
527
|
+
renderSlot(_ctx.$slots, "title")
|
|
528
|
+
]),
|
|
529
|
+
key: "0"
|
|
530
|
+
} : void 0,
|
|
531
|
+
_ctx.$slots.extra ? {
|
|
532
|
+
name: "extra",
|
|
533
|
+
fn: withCtx(() => [
|
|
534
|
+
renderSlot(_ctx.$slots, "extra")
|
|
535
|
+
]),
|
|
536
|
+
key: "1"
|
|
537
|
+
} : void 0
|
|
538
|
+
]), 1032, ["border", "column", "direction", "size", "title", "extra"]);
|
|
542
539
|
};
|
|
543
540
|
}
|
|
544
541
|
});
|
|
545
|
-
const Descriptions = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-621af6b6"]]);
|
|
546
542
|
const _hoisted_1$4 = { key: 0 };
|
|
547
|
-
const _sfc_main$
|
|
543
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
548
544
|
__name: "dialog",
|
|
549
545
|
props: /* @__PURE__ */ mergeModels({
|
|
550
546
|
content: {},
|
|
@@ -703,7 +699,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
703
699
|
}
|
|
704
700
|
});
|
|
705
701
|
const _hoisted_1$3 = { class: "el-message-box__message" };
|
|
706
|
-
const _sfc_main$
|
|
702
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
707
703
|
__name: "dialog-content",
|
|
708
704
|
props: {
|
|
709
705
|
type: { default: "info" },
|
|
@@ -732,7 +728,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
732
728
|
};
|
|
733
729
|
}
|
|
734
730
|
});
|
|
735
|
-
const DialogContent = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
731
|
+
const DialogContent = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-2a6a2293"]]);
|
|
736
732
|
const DEF_OPTIONS$1 = {
|
|
737
733
|
// width: '600px',
|
|
738
734
|
// center: false,
|
|
@@ -755,7 +751,7 @@ function createDialog() {
|
|
|
755
751
|
dialogApp.unmount();
|
|
756
752
|
container.remove();
|
|
757
753
|
};
|
|
758
|
-
return () => h(_sfc_main$
|
|
754
|
+
return () => h(_sfc_main$h, {
|
|
759
755
|
...dialogOptions.value,
|
|
760
756
|
"modelValue": visible.value,
|
|
761
757
|
"onUpdate:modelValue": (val) => visible.value = val,
|
|
@@ -826,7 +822,7 @@ function createDialog() {
|
|
|
826
822
|
}
|
|
827
823
|
const Dialog = createDialog();
|
|
828
824
|
void [Dialog.info, Dialog.success, Dialog.warning, Dialog.error];
|
|
829
|
-
const _sfc_main$
|
|
825
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
830
826
|
__name: "dot",
|
|
831
827
|
props: {
|
|
832
828
|
type: { default: "circle" },
|
|
@@ -866,9 +862,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
866
862
|
};
|
|
867
863
|
}
|
|
868
864
|
});
|
|
869
|
-
const Dot = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
865
|
+
const Dot = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-575d79dc"]]);
|
|
870
866
|
const _hoisted_1$2 = { key: 0 };
|
|
871
|
-
const _sfc_main$
|
|
867
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
872
868
|
__name: "drawer",
|
|
873
869
|
props: /* @__PURE__ */ mergeModels({
|
|
874
870
|
content: {},
|
|
@@ -1044,7 +1040,7 @@ function createDrawer() {
|
|
|
1044
1040
|
drawerApp.unmount();
|
|
1045
1041
|
container.remove();
|
|
1046
1042
|
};
|
|
1047
|
-
return () => h(_sfc_main$
|
|
1043
|
+
return () => h(_sfc_main$e, {
|
|
1048
1044
|
...dialogOptions.value,
|
|
1049
1045
|
"modelValue": visible.value,
|
|
1050
1046
|
"onUpdate:modelValue": (val) => visible.value = val,
|
|
@@ -1078,7 +1074,7 @@ function createDrawer() {
|
|
|
1078
1074
|
return Drawer2;
|
|
1079
1075
|
}
|
|
1080
1076
|
const Drawer = createDrawer();
|
|
1081
|
-
const _sfc_main$
|
|
1077
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
1082
1078
|
__name: "input-group",
|
|
1083
1079
|
setup(__props) {
|
|
1084
1080
|
const { b } = useBemClass();
|
|
@@ -1091,8 +1087,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1091
1087
|
};
|
|
1092
1088
|
}
|
|
1093
1089
|
});
|
|
1094
|
-
const InputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1095
|
-
const _sfc_main$
|
|
1090
|
+
const InputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-edd7f8aa"]]);
|
|
1091
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
1096
1092
|
__name: "input-search",
|
|
1097
1093
|
props: /* @__PURE__ */ mergeModels({
|
|
1098
1094
|
disabled: { type: Boolean, default: false },
|
|
@@ -1146,9 +1142,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
1146
1142
|
};
|
|
1147
1143
|
}
|
|
1148
1144
|
});
|
|
1149
|
-
const InputSearch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1145
|
+
const InputSearch = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-bb801bd6"]]);
|
|
1150
1146
|
const clearable = false;
|
|
1151
|
-
const _sfc_main$
|
|
1147
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
1152
1148
|
__name: "edit-table",
|
|
1153
1149
|
props: {
|
|
1154
1150
|
rowKey: { default: "id" },
|
|
@@ -1333,7 +1329,69 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
1333
1329
|
};
|
|
1334
1330
|
}
|
|
1335
1331
|
});
|
|
1336
|
-
const EditTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1332
|
+
const EditTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-b88099ba"]]);
|
|
1333
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
1334
|
+
__name: "flex",
|
|
1335
|
+
props: {
|
|
1336
|
+
vertical: { type: Boolean, default: false },
|
|
1337
|
+
wrap: { type: [String, Boolean], default: false },
|
|
1338
|
+
justify: { default: "normal" },
|
|
1339
|
+
align: { default: "normal" },
|
|
1340
|
+
flex: { default: "normal" },
|
|
1341
|
+
gap: {}
|
|
1342
|
+
},
|
|
1343
|
+
setup(__props) {
|
|
1344
|
+
const props = __props;
|
|
1345
|
+
const { b } = useBemClass();
|
|
1346
|
+
const classNames = computed(() => [b("flex")]);
|
|
1347
|
+
const gapMap = {
|
|
1348
|
+
small: "8px",
|
|
1349
|
+
middle: "16px",
|
|
1350
|
+
large: "24px"
|
|
1351
|
+
};
|
|
1352
|
+
const resolvedGap = computed(() => {
|
|
1353
|
+
if (props.gap === void 0 || props.gap === null || props.gap === "")
|
|
1354
|
+
return void 0;
|
|
1355
|
+
if (typeof props.gap === "number")
|
|
1356
|
+
return `${props.gap}px`;
|
|
1357
|
+
if (gapMap[props.gap])
|
|
1358
|
+
return gapMap[props.gap];
|
|
1359
|
+
return String(props.gap);
|
|
1360
|
+
});
|
|
1361
|
+
const resolvedWrap = computed(() => {
|
|
1362
|
+
if (typeof props.wrap === "boolean")
|
|
1363
|
+
return props.wrap ? "wrap" : "nowrap";
|
|
1364
|
+
if (props.wrap === "")
|
|
1365
|
+
return "wrap";
|
|
1366
|
+
return props.wrap;
|
|
1367
|
+
});
|
|
1368
|
+
const style = computed(() => {
|
|
1369
|
+
const obj = {
|
|
1370
|
+
display: "flex",
|
|
1371
|
+
flexDirection: props.vertical ? "column" : "row",
|
|
1372
|
+
flexWrap: resolvedWrap.value,
|
|
1373
|
+
justifyContent: props.justify,
|
|
1374
|
+
alignItems: props.align
|
|
1375
|
+
};
|
|
1376
|
+
if (props.flex !== "normal") {
|
|
1377
|
+
obj.flex = props.flex;
|
|
1378
|
+
}
|
|
1379
|
+
if (resolvedGap.value) {
|
|
1380
|
+
obj.gap = resolvedGap.value;
|
|
1381
|
+
}
|
|
1382
|
+
return obj;
|
|
1383
|
+
});
|
|
1384
|
+
return (_ctx, _cache) => {
|
|
1385
|
+
return openBlock(), createElementBlock("div", {
|
|
1386
|
+
class: normalizeClass(classNames.value),
|
|
1387
|
+
style: normalizeStyle(style.value)
|
|
1388
|
+
}, [
|
|
1389
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1390
|
+
], 6);
|
|
1391
|
+
};
|
|
1392
|
+
}
|
|
1393
|
+
});
|
|
1394
|
+
const Flex = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-959cee10"]]);
|
|
1337
1395
|
const GridContextInjectionKey = Symbol(
|
|
1338
1396
|
"GridContextInjectionKey"
|
|
1339
1397
|
);
|
|
@@ -1588,7 +1646,7 @@ function getPrefixCls(name) {
|
|
|
1588
1646
|
const { b } = useBemClass();
|
|
1589
1647
|
return b(name);
|
|
1590
1648
|
}
|
|
1591
|
-
const _sfc_main$
|
|
1649
|
+
const _sfc_main$9 = defineComponent({
|
|
1592
1650
|
name: "GridItem",
|
|
1593
1651
|
props: {
|
|
1594
1652
|
/**
|
|
@@ -1706,8 +1764,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1706
1764
|
renderSlot(_ctx.$slots, "default", { overflow: _ctx.overflow })
|
|
1707
1765
|
], 6);
|
|
1708
1766
|
}
|
|
1709
|
-
const GridItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1710
|
-
const _sfc_main$
|
|
1767
|
+
const GridItem = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1]]);
|
|
1768
|
+
const _sfc_main$8 = defineComponent({
|
|
1711
1769
|
name: "Grid",
|
|
1712
1770
|
props: {
|
|
1713
1771
|
/**
|
|
@@ -1821,12 +1879,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1821
1879
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1822
1880
|
], 6);
|
|
1823
1881
|
}
|
|
1824
|
-
const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1882
|
+
const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render], ["__scopeId", "data-v-6eabaf75"]]);
|
|
1825
1883
|
const _hoisted_1$1 = {
|
|
1826
1884
|
key: 0,
|
|
1827
1885
|
class: "w-full"
|
|
1828
1886
|
};
|
|
1829
|
-
const _sfc_main$
|
|
1887
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1830
1888
|
__name: "form",
|
|
1831
1889
|
props: {
|
|
1832
1890
|
modelValue: {},
|
|
@@ -2246,8 +2304,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2246
2304
|
};
|
|
2247
2305
|
}
|
|
2248
2306
|
});
|
|
2249
|
-
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2250
|
-
const _sfc_main$
|
|
2307
|
+
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-85d6c1a1"]]);
|
|
2308
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
2251
2309
|
__name: "split-button",
|
|
2252
2310
|
props: {
|
|
2253
2311
|
collapsed: { type: Boolean, default: false },
|
|
@@ -2298,8 +2356,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
2298
2356
|
};
|
|
2299
2357
|
}
|
|
2300
2358
|
});
|
|
2301
|
-
const SplitButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2302
|
-
const _sfc_main$
|
|
2359
|
+
const SplitButton = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-ad431228"]]);
|
|
2360
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
2303
2361
|
__name: "page-layout",
|
|
2304
2362
|
props: {
|
|
2305
2363
|
size: { default: 270 },
|
|
@@ -2405,8 +2463,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2405
2463
|
};
|
|
2406
2464
|
}
|
|
2407
2465
|
});
|
|
2408
|
-
const PageLayout = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2409
|
-
const _sfc_main$
|
|
2466
|
+
const PageLayout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-a35bb713"]]);
|
|
2467
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
2410
2468
|
__name: "TableColumn",
|
|
2411
2469
|
props: {
|
|
2412
2470
|
column: {}
|
|
@@ -2421,7 +2479,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2421
2479
|
return openBlock(), createBlock(unref(ElTableColumn), normalizeProps(guardReactiveProps(columnProps.value)), createSlots({
|
|
2422
2480
|
default: withCtx(() => [
|
|
2423
2481
|
_ctx.column.children && _ctx.column.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.column.children, (child) => {
|
|
2424
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2482
|
+
return openBlock(), createBlock(_sfc_main$4, {
|
|
2425
2483
|
key: child.prop || child.label,
|
|
2426
2484
|
column: child
|
|
2427
2485
|
}, createSlots({ _: 2 }, [
|
|
@@ -2457,7 +2515,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2457
2515
|
};
|
|
2458
2516
|
}
|
|
2459
2517
|
});
|
|
2460
|
-
const _sfc_main$
|
|
2518
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2461
2519
|
__name: "table",
|
|
2462
2520
|
props: {
|
|
2463
2521
|
data: { default: () => [] },
|
|
@@ -2544,7 +2602,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2544
2602
|
}), {
|
|
2545
2603
|
default: withCtx(() => [
|
|
2546
2604
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.columns, (item) => {
|
|
2547
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2605
|
+
return openBlock(), createBlock(_sfc_main$4, {
|
|
2548
2606
|
key: item.prop || item.label,
|
|
2549
2607
|
column: item
|
|
2550
2608
|
}, createSlots({ _: 2 }, [
|
|
@@ -2578,7 +2636,126 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2578
2636
|
};
|
|
2579
2637
|
}
|
|
2580
2638
|
});
|
|
2581
|
-
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2639
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-763fcf58"]]);
|
|
2640
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2641
|
+
__name: "tag",
|
|
2642
|
+
props: {
|
|
2643
|
+
type: { default: "light" },
|
|
2644
|
+
status: { default: "primary" },
|
|
2645
|
+
color: { default: "" },
|
|
2646
|
+
size: { default: "small" },
|
|
2647
|
+
closable: { type: Boolean, default: false }
|
|
2648
|
+
},
|
|
2649
|
+
emits: ["click", "close"],
|
|
2650
|
+
setup(__props, { emit: __emit }) {
|
|
2651
|
+
const props = __props;
|
|
2652
|
+
const emit = __emit;
|
|
2653
|
+
const BASE_COLORS = {
|
|
2654
|
+
red: "#FF0000",
|
|
2655
|
+
orangered: "#f77234",
|
|
2656
|
+
orange: "#ff7d00",
|
|
2657
|
+
gold: "#f7ba1e",
|
|
2658
|
+
lime: "#9fdb1d",
|
|
2659
|
+
green: "#00b42a",
|
|
2660
|
+
cyan: "#14c9c9",
|
|
2661
|
+
blue: "#3491fa",
|
|
2662
|
+
purple: "#722ed1",
|
|
2663
|
+
pink: "#f5319d",
|
|
2664
|
+
gray: "#86909c"
|
|
2665
|
+
};
|
|
2666
|
+
function resolveColorToken(input) {
|
|
2667
|
+
return BASE_COLORS[input] || input;
|
|
2668
|
+
}
|
|
2669
|
+
function hexToRgb(hex) {
|
|
2670
|
+
const body = hex.startsWith("#") ? hex.slice(1) : hex;
|
|
2671
|
+
const full = body.length === 3 ? body.split("").map((c) => c + c).join("") : body;
|
|
2672
|
+
return {
|
|
2673
|
+
r: Number.parseInt(full.slice(0, 2), 16),
|
|
2674
|
+
g: Number.parseInt(full.slice(2, 4), 16),
|
|
2675
|
+
b: Number.parseInt(full.slice(4, 6), 16)
|
|
2676
|
+
};
|
|
2677
|
+
}
|
|
2678
|
+
function stylesForType(type, color, rgb) {
|
|
2679
|
+
const { r, g, b } = rgb;
|
|
2680
|
+
const bgTint = `rgba(${r}, ${g}, ${b}, 0.1)`;
|
|
2681
|
+
const borderTint = `rgba(${r}, ${g}, ${b}, 0.2)`;
|
|
2682
|
+
const closeHoverBg = { "--tag-close-hover-bg-color": color };
|
|
2683
|
+
switch (type) {
|
|
2684
|
+
case "dark":
|
|
2685
|
+
return {
|
|
2686
|
+
color: "#fff",
|
|
2687
|
+
backgroundColor: color,
|
|
2688
|
+
"--tag-close-hover-color": color,
|
|
2689
|
+
"--tag-close-hover-bg-color": "rgba(255, 255, 255, 0.9)"
|
|
2690
|
+
};
|
|
2691
|
+
case "outline":
|
|
2692
|
+
return {
|
|
2693
|
+
color,
|
|
2694
|
+
backgroundColor: "transparent",
|
|
2695
|
+
borderColor: color,
|
|
2696
|
+
...closeHoverBg
|
|
2697
|
+
};
|
|
2698
|
+
case "light-outline":
|
|
2699
|
+
return {
|
|
2700
|
+
color,
|
|
2701
|
+
backgroundColor: bgTint,
|
|
2702
|
+
borderColor: borderTint,
|
|
2703
|
+
...closeHoverBg
|
|
2704
|
+
};
|
|
2705
|
+
case "light":
|
|
2706
|
+
default:
|
|
2707
|
+
return {
|
|
2708
|
+
color,
|
|
2709
|
+
backgroundColor: bgTint,
|
|
2710
|
+
...closeHoverBg
|
|
2711
|
+
};
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
const className = computed(
|
|
2715
|
+
() => [
|
|
2716
|
+
"gi-tag",
|
|
2717
|
+
props.type && `gi-tag__type--${props.type}`,
|
|
2718
|
+
props.size && `gi-tag__size--${props.size}`,
|
|
2719
|
+
props.status && `gi-tag__status--${props.status}`
|
|
2720
|
+
].filter(Boolean).join(" ")
|
|
2721
|
+
);
|
|
2722
|
+
const tagStyle = computed(() => {
|
|
2723
|
+
if (!props.color)
|
|
2724
|
+
return {};
|
|
2725
|
+
const color = resolveColorToken(props.color);
|
|
2726
|
+
return stylesForType(props.type ?? "light", color, hexToRgb(color));
|
|
2727
|
+
});
|
|
2728
|
+
function handleClick() {
|
|
2729
|
+
emit("click");
|
|
2730
|
+
}
|
|
2731
|
+
function handleClose(event) {
|
|
2732
|
+
event.stopPropagation();
|
|
2733
|
+
emit("close");
|
|
2734
|
+
}
|
|
2735
|
+
return (_ctx, _cache) => {
|
|
2736
|
+
return openBlock(), createElementBlock("span", {
|
|
2737
|
+
class: normalizeClass(className.value),
|
|
2738
|
+
style: normalizeStyle(tagStyle.value),
|
|
2739
|
+
onClick: handleClick
|
|
2740
|
+
}, [
|
|
2741
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
2742
|
+
_ctx.closable ? (openBlock(), createElementBlock("span", {
|
|
2743
|
+
key: 0,
|
|
2744
|
+
class: "gi-tag-close-btn",
|
|
2745
|
+
onClick: handleClose
|
|
2746
|
+
}, [
|
|
2747
|
+
createVNode(unref(ElIcon), { class: "close-icon" }, {
|
|
2748
|
+
default: withCtx(() => [
|
|
2749
|
+
createVNode(unref(close_default))
|
|
2750
|
+
]),
|
|
2751
|
+
_: 1
|
|
2752
|
+
})
|
|
2753
|
+
])) : createCommentVNode("", true)
|
|
2754
|
+
], 6);
|
|
2755
|
+
};
|
|
2756
|
+
}
|
|
2757
|
+
});
|
|
2758
|
+
const Tag = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-d4945925"]]);
|
|
2582
2759
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
2583
2760
|
__name: "tabs",
|
|
2584
2761
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -8369,38 +8546,42 @@ const createSelectDialog = (params) => {
|
|
|
8369
8546
|
};
|
|
8370
8547
|
void [Dialog.info, Dialog.success, Dialog.warning, Dialog.error];
|
|
8371
8548
|
const components = {
|
|
8372
|
-
Button: _sfc_main$
|
|
8549
|
+
Button: _sfc_main$k,
|
|
8373
8550
|
Card,
|
|
8374
|
-
Descriptions,
|
|
8375
|
-
Drawer: _sfc_main$
|
|
8551
|
+
Descriptions: _sfc_main$i,
|
|
8552
|
+
Drawer: _sfc_main$e,
|
|
8376
8553
|
Dot,
|
|
8377
8554
|
Tabs,
|
|
8378
8555
|
InputGroup,
|
|
8379
8556
|
InputSearch,
|
|
8557
|
+
Flex,
|
|
8380
8558
|
Grid,
|
|
8381
8559
|
GridItem,
|
|
8382
8560
|
Form,
|
|
8383
8561
|
PageLayout,
|
|
8384
|
-
Dialog: _sfc_main$
|
|
8562
|
+
Dialog: _sfc_main$h,
|
|
8385
8563
|
EditTable,
|
|
8386
8564
|
Table,
|
|
8565
|
+
Tag,
|
|
8387
8566
|
TreeTransfer
|
|
8388
8567
|
};
|
|
8389
|
-
const GiButton = _sfc_main$
|
|
8568
|
+
const GiButton = _sfc_main$k;
|
|
8390
8569
|
const GiCard = Card;
|
|
8391
|
-
const GiDescriptions =
|
|
8392
|
-
const GiDrawer = _sfc_main$
|
|
8570
|
+
const GiDescriptions = _sfc_main$i;
|
|
8571
|
+
const GiDrawer = _sfc_main$e;
|
|
8393
8572
|
const GiDot = Dot;
|
|
8394
8573
|
const GiTabs = Tabs;
|
|
8395
8574
|
const GiInputGroup = InputGroup;
|
|
8396
8575
|
const GiInputSearch = InputSearch;
|
|
8576
|
+
const GiFlex = Flex;
|
|
8397
8577
|
const GiGrid = Grid;
|
|
8398
8578
|
const GiGridItem = GridItem;
|
|
8399
8579
|
const GiForm = Form;
|
|
8400
8580
|
const GiPageLayout = PageLayout;
|
|
8401
|
-
const GiDialog = _sfc_main$
|
|
8581
|
+
const GiDialog = _sfc_main$h;
|
|
8402
8582
|
const GiEditTable = EditTable;
|
|
8403
8583
|
const GiTable = Table;
|
|
8584
|
+
const GiTag = Tag;
|
|
8404
8585
|
const GiTreeTransfer = TreeTransfer;
|
|
8405
8586
|
function capitalizeWord(word) {
|
|
8406
8587
|
if (typeof word !== "string" || word.length === 0) {
|
|
@@ -8427,6 +8608,7 @@ export {
|
|
|
8427
8608
|
GiDot,
|
|
8428
8609
|
GiDrawer,
|
|
8429
8610
|
GiEditTable,
|
|
8611
|
+
GiFlex,
|
|
8430
8612
|
GiForm,
|
|
8431
8613
|
GiGrid,
|
|
8432
8614
|
GiGridItem,
|
|
@@ -8435,6 +8617,7 @@ export {
|
|
|
8435
8617
|
GiPageLayout,
|
|
8436
8618
|
GiTable,
|
|
8437
8619
|
GiTabs,
|
|
8620
|
+
GiTag,
|
|
8438
8621
|
GiTreeTransfer,
|
|
8439
8622
|
createDialog,
|
|
8440
8623
|
createDrawer,
|