@gct-paas/design-web 0.1.4-dev.9 → 0.1.5-dev.0

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 (74) hide show
  1. package/dist/index.min.css +2 -1
  2. package/dist/loader.esm.min.js +1 -0
  3. package/es/_virtual/_plugin-vue_export-helper.mjs +7 -8
  4. package/es/components/form-component/FieldCheckbox.d.ts +38 -0
  5. package/es/components/form-component/FieldCheckbox.mjs +71 -0
  6. package/es/components/form-component/FieldRadio.d.ts +38 -0
  7. package/es/components/form-component/FieldRadio.mjs +64 -0
  8. package/es/components/form-component/FieldSelect.d.ts +82 -0
  9. package/es/components/form-component/FieldSelect.mjs +174 -0
  10. package/es/components/form-component/field-emptyValue.d.ts +6 -0
  11. package/es/components/form-component/field-label/ref-card-label-design.vue.d.ts +17 -0
  12. package/es/components/form-component/field-label/ref-card-label-design.vue.mjs +6 -0
  13. package/es/components/form-component/field-label/ref-card-label-design.vue_vue_type_script_setup_true_lang.mjs +122 -0
  14. package/es/components/form-component/field-label/ref-card-label-design.vue_vue_type_style_index_0_lang.css +9 -0
  15. package/es/components/form-component/field-label/selectTag.vue.d.ts +10 -0
  16. package/es/components/form-component/field-label/selectTag.vue.mjs +5 -0
  17. package/es/components/form-component/field-label/selectTag.vue_vue_type_script_setup_true_lang.mjs +22 -0
  18. package/es/components/form-component/field-label/tag-label.vue.d.ts +36 -0
  19. package/es/components/form-component/field-label/tag-label.vue.mjs +7 -0
  20. package/es/components/form-component/field-label/tag-label.vue_vue_type_script_setup_true_lang.mjs +143 -0
  21. package/es/components/form-component/field-label/tag-label.vue_vue_type_style_index_0_scoped_a1ded441_lang.css +15 -0
  22. package/es/components/form-component/field-label/tag-layout.vue.d.ts +21 -0
  23. package/es/components/form-component/field-label/tag-layout.vue.mjs +7 -0
  24. package/es/components/form-component/field-label/tag-layout.vue_vue_type_script_setup_true_lang.mjs +16 -0
  25. package/es/components/form-component/field-label/tag-layout.vue_vue_type_style_index_0_scoped_85e6a8f5_lang.css +12 -0
  26. package/es/components/form-component/field-label/tag-span.vue.d.ts +21 -0
  27. package/es/components/form-component/field-label/tag-span.vue.mjs +7 -0
  28. package/es/components/form-component/field-label/tag-span.vue_vue_type_script_setup_true_lang.mjs +25 -0
  29. package/es/components/form-component/field-label/tag-span.vue_vue_type_style_index_0_scoped_3bf855f6_lang.css +31 -0
  30. package/es/components/form-component/field-readonly.vue.d.ts +22 -0
  31. package/es/components/form-component/field-readonly.vue.mjs +5 -0
  32. package/es/components/form-component/field-readonly.vue_vue_type_script_setup_true_lang.mjs +81 -0
  33. package/es/components/form-component/index.css +40 -0
  34. package/es/components/form-component/index.d.ts +8 -0
  35. package/es/components/form-component/index.mjs +7 -0
  36. package/es/components/index.d.ts +1 -1
  37. package/es/components/index.mjs +8 -0
  38. package/es/index.mjs +14 -15
  39. package/es/loader.d.ts +1 -0
  40. package/package.json +23 -18
  41. package/dist/index.esm.min.mjs +0 -1606
  42. package/dist/index.min.cjs +0 -57
  43. package/dist/index.system.min.js +0 -57
  44. package/es/components/I18nSelect/index.d.ts +0 -7
  45. package/es/components/I18nSelect/src/i18n-modal.vue.d.ts +0 -21
  46. package/es/components/I18nSelect/src/i18n-modal.vue.mjs +0 -151
  47. package/es/components/I18nSelect/src/i18n-modal.vue2.mjs +0 -5
  48. package/es/components/I18nSelect/src/i18n-select-btn.css +0 -58
  49. package/es/components/I18nSelect/src/i18n-select-btn.vue.d.ts +0 -18
  50. package/es/components/I18nSelect/src/i18n-select-btn.vue.mjs +0 -7
  51. package/es/components/I18nSelect/src/i18n-select-btn.vue2.mjs +0 -138
  52. package/es/components/I18nSelect/src/i18n-select-container.css +0 -6
  53. package/es/components/I18nSelect/src/i18n-select-container.vue.d.ts +0 -10
  54. package/es/components/I18nSelect/src/i18n-select-container.vue.mjs +0 -7
  55. package/es/components/I18nSelect/src/i18n-select-container.vue2.mjs +0 -250
  56. package/es/components/I18nSelect/src/i18n-select-input-form.vue.d.ts +0 -15
  57. package/es/components/I18nSelect/src/i18n-select-input-form.vue.mjs +0 -57
  58. package/es/components/I18nSelect/src/i18n-select-input-form.vue2.mjs +0 -5
  59. package/es/components/I18nSelect/src/i18n-select-input.css +0 -3
  60. package/es/components/I18nSelect/src/i18n-select-input.vue.d.ts +0 -51
  61. package/es/components/I18nSelect/src/i18n-select-input.vue.mjs +0 -7
  62. package/es/components/I18nSelect/src/i18n-select-input.vue2.mjs +0 -129
  63. package/es/components/I18nSelect/src/i18n-select-modal.vue.d.ts +0 -4
  64. package/es/components/I18nSelect/src/i18n-select-modal.vue.mjs +0 -21
  65. package/es/components/I18nSelect/src/i18n-select-modal.vue2.mjs +0 -5
  66. package/es/components/I18nSelect/src/i18n-select-textarea-form.vue.d.ts +0 -15
  67. package/es/components/I18nSelect/src/i18n-select-textarea-form.vue.mjs +0 -57
  68. package/es/components/I18nSelect/src/i18n-select-textarea-form.vue2.mjs +0 -5
  69. package/es/components/I18nSelect/src/i18n-select-textarea.css +0 -17
  70. package/es/components/I18nSelect/src/i18n-select-textarea.vue.d.ts +0 -26
  71. package/es/components/I18nSelect/src/i18n-select-textarea.vue.mjs +0 -7
  72. package/es/components/I18nSelect/src/i18n-select-textarea.vue2.mjs +0 -93
  73. package/es/components/I18nSelect/src/useI18nSelect.d.ts +0 -13
  74. package/es/components/I18nSelect/src/useI18nSelect.mjs +0 -51
@@ -0,0 +1,122 @@
1
+ import tag_span_default from "./tag-span.vue.mjs";
2
+ import tag_layout_default from "./tag-layout.vue.mjs";
3
+ import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, inject, normalizeClass, normalizeStyle, openBlock, reactive, ref, renderList, resolveComponent, toDisplayString, toRef, unref, withCtx, withModifiers } from "vue";
4
+ import { CARD_TRIGGER_ENUM, t } from "@gct-paas/core";
5
+ import { schemaToStyle, transformField2Component } from "@gct-paas/design";
6
+ //#region src/components/form-component/field-label/ref-card-label-design.vue?vue&type=script&setup=true&lang.ts
7
+ var _hoisted_1 = ["src"];
8
+ var _hoisted_2 = ["src"];
9
+ var _hoisted_3 = ["onMouseup"];
10
+ var _hoisted_4 = { key: 1 };
11
+ var ref_card_label_design_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
12
+ __name: "ref-card-label-design",
13
+ props: {
14
+ tagWidgetStyle: {},
15
+ disabled: { type: Boolean },
16
+ trigger: {},
17
+ modelKey: {},
18
+ refCardId: {},
19
+ type: {}
20
+ },
21
+ setup(__props) {
22
+ const props = __props;
23
+ const imgSrc = ref("");
24
+ const classData = toRef(() => props.trigger === CARD_TRIGGER_ENUM.HOVER ? "primary-gct-hover" : "primary-gct");
25
+ const labelLayout = inject("labelLayout", {});
26
+ const tipMap = reactive({});
27
+ const showLabel = computed(() => {
28
+ const example = props.type ? transformField2Component(props.type)?.example : [];
29
+ return (example ? typeof example === "string" ? [t(example)] : example.map((e) => t(e)) : []).map((i) => {
30
+ return {
31
+ value: i,
32
+ label: i
33
+ };
34
+ });
35
+ });
36
+ const comStyle = toRef(() => {
37
+ const contentFont = props.tagWidgetStyle?.contentFont;
38
+ if (!contentFont) return {};
39
+ return schemaToStyle(contentFont);
40
+ });
41
+ const getMsgColor = toRef(() => {
42
+ if (comStyle.value?.color) return comStyle.value;
43
+ return {
44
+ wordBreak: "break-all",
45
+ ...comStyle.value
46
+ };
47
+ });
48
+ const visibleChange = async (visible, row) => {
49
+ if (visible) imgSrc.value = (await _api.apaas.commonInfoCard.getGetById({
50
+ id: props.refCardId,
51
+ modelKey: props.modelKey,
52
+ type: "CARD"
53
+ })).screenShoot ?? "";
54
+ tipMap[row.value] = visible;
55
+ };
56
+ function mouseup(row) {
57
+ visibleChange(true, row);
58
+ }
59
+ return (_ctx, _cache) => {
60
+ const _component_a_popover = resolveComponent("a-popover");
61
+ return !!showLabel.value.length ? (openBlock(), createBlock(tag_layout_default, {
62
+ key: 0,
63
+ disabled: !!__props.disabled,
64
+ "label-layout": unref(labelLayout)
65
+ }, {
66
+ default: withCtx(() => [__props.tagWidgetStyle?.tagStyleOpen ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(showLabel.value, (i, index) => {
67
+ return openBlock(), createBlock(_component_a_popover, {
68
+ key: index,
69
+ trigger: __props.trigger,
70
+ visible: !!tipMap[i.value],
71
+ placement: "bottomLeft",
72
+ color: "#fff",
73
+ "overlay-class-name": "gct-ref-card-popover min-w100px min-h30px max-h96vh",
74
+ onVisibleChange: (v) => visibleChange(v, i)
75
+ }, {
76
+ content: withCtx(() => [createElementVNode("img", { src: imgSrc.value }, null, 8, _hoisted_1)]),
77
+ default: withCtx(() => [createVNode(tag_span_default, {
78
+ "tag-style": __props.tagWidgetStyle.tagStyle,
79
+ onMouseup: withModifiers(($event) => mouseup(i), ["stop"])
80
+ }, {
81
+ default: withCtx(() => [createElementVNode("span", {
82
+ class: normalizeClass(["select-text cursor-pointer", classData.value]),
83
+ style: normalizeStyle(getMsgColor.value)
84
+ }, toDisplayString(i.label), 7)]),
85
+ _: 2
86
+ }, 1032, ["tag-style", "onMouseup"])]),
87
+ _: 2
88
+ }, 1032, [
89
+ "trigger",
90
+ "visible",
91
+ "onVisibleChange"
92
+ ]);
93
+ }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(showLabel.value, (i, index) => {
94
+ return openBlock(), createElementBlock(Fragment, { key: index }, [createElementVNode("span", null, toDisplayString(!!index ? "," : ""), 1), createVNode(_component_a_popover, {
95
+ "overlay-class-name": "gct-ref-card-popover min-w100px min-h30px max-h96vh",
96
+ visible: !!tipMap[i.value],
97
+ trigger: __props.trigger,
98
+ color: "#fff",
99
+ placement: "bottomLeft",
100
+ onVisibleChange: (v) => visibleChange(v, i)
101
+ }, {
102
+ content: withCtx(() => [createElementVNode("img", { src: imgSrc.value }, null, 8, _hoisted_2)]),
103
+ default: withCtx(() => [createElementVNode("span", {
104
+ class: normalizeClass(["select-text cursor-pointer", classData.value]),
105
+ style: normalizeStyle(getMsgColor.value),
106
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
107
+ onMouseup: withModifiers(($event) => mouseup(i), ["stop"])
108
+ }, toDisplayString(i.label), 47, _hoisted_3)]),
109
+ _: 2
110
+ }, 1032, [
111
+ "visible",
112
+ "trigger",
113
+ "onVisibleChange"
114
+ ])], 64);
115
+ }), 128))]),
116
+ _: 1
117
+ }, 8, ["disabled", "label-layout"])) : (openBlock(), createElementBlock("span", _hoisted_4, "\xA0"));
118
+ };
119
+ }
120
+ });
121
+ //#endregion
122
+ export { ref_card_label_design_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,9 @@
1
+ .gct-ref-card-popover {
2
+ box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
3
+ }
4
+ .gct-ref-card-popover .ant-popover-inner-content {
5
+ padding: 0;
6
+ }
7
+ .gct-ref-card-popover .ant-popover-arrow {
8
+ display: none;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { LowCodeWidget } from '@gct-paas/schema';
2
+ export interface Props {
3
+ tagWidgetStyle: {
4
+ tagStyleOpen: boolean;
5
+ contentFont: LowCodeWidget.FontStyle;
6
+ tagStyle?: LowCodeWidget.TagConfigStyle;
7
+ };
8
+ }
9
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import selectTag_vue_vue_type_script_setup_true_lang_default from "./selectTag.vue_vue_type_script_setup_true_lang.mjs";
2
+ //#region src/components/form-component/field-label/selectTag.vue
3
+ var selectTag_default = selectTag_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { selectTag_default as default };
@@ -0,0 +1,22 @@
1
+ import tag_label_default from "./tag-label.vue.mjs";
2
+ import { createBlock, defineComponent, openBlock, toRef } from "vue";
3
+ //#region src/components/form-component/field-label/selectTag.vue?vue&type=script&setup=true&lang.ts
4
+ var selectTag_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
5
+ __name: "selectTag",
6
+ props: { tagWidgetStyle: {} },
7
+ setup(__props) {
8
+ const props = __props;
9
+ const tagWidgetStyle = toRef(() => {
10
+ if (!props.tagWidgetStyle.tagStyleOpen) return {
11
+ tagStyleOpen: true,
12
+ contentFont: props.tagWidgetStyle?.contentFont
13
+ };
14
+ else return props.tagWidgetStyle;
15
+ });
16
+ return (_ctx, _cache) => {
17
+ return openBlock(), createBlock(tag_label_default, { "tag-widget-style": tagWidgetStyle.value }, null, 8, ["tag-widget-style"]);
18
+ };
19
+ }
20
+ });
21
+ //#endregion
22
+ export { selectTag_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,36 @@
1
+ import { LowCodeWidget } from '@gct-paas/schema';
2
+ import { FIELD_TYPE } from '@gct-paas/core';
3
+ export interface Props {
4
+ tagWidgetStyle?: {
5
+ tagStyleOpen?: boolean;
6
+ contentFont?: LowCodeWidget.FontStyle;
7
+ tagStyle?: LowCodeWidget.TagConfigStyle;
8
+ };
9
+ type?: FIELD_TYPE | undefined;
10
+ disabled?: boolean;
11
+ label?: string | (string | number)[];
12
+ isDesign?: boolean;
13
+ closable?: boolean;
14
+ /** 外部控制是否显示标签样式 */
15
+ showTagStyle?: boolean;
16
+ /** 头像 */
17
+ avatar?: string;
18
+ iconExtraProps?: Record<string, {
19
+ icon?: string;
20
+ iconColor?: string;
21
+ textColor?: string;
22
+ }>;
23
+ iconProps?: {
24
+ icon: string;
25
+ iconColor: string;
26
+ textColor: string;
27
+ };
28
+ }
29
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
30
+ "on-close": (...args: any[]) => void;
31
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
32
+ "onOn-close"?: ((...args: any[]) => any) | undefined;
33
+ }>, {
34
+ showTagStyle: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
2
+ import tag_label_vue_vue_type_script_setup_true_lang_default from "./tag-label.vue_vue_type_script_setup_true_lang.mjs";
3
+ import './tag-label.vue_vue_type_style_index_0_scoped_a1ded441_lang.css';/* empty css */
4
+ //#region src/components/form-component/field-label/tag-label.vue
5
+ var tag_label_default = /* @__PURE__ */ _plugin_vue_export_helper_default(tag_label_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-a1ded441"]]);
6
+ //#endregion
7
+ export { tag_label_default as default };
@@ -0,0 +1,143 @@
1
+ import tag_span_default from "./tag-span.vue.mjs";
2
+ import tag_layout_default from "./tag-layout.vue.mjs";
3
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, h, inject, normalizeStyle, openBlock, renderList, toDisplayString, toRef, unref, withCtx, withModifiers } from "vue";
4
+ import { Avatar } from "ant-design-vue";
5
+ import { FIELD_TYPE, t } from "@gct-paas/core";
6
+ import { isString } from "lodash-es";
7
+ import { IconNext, transformUrl } from "@gct-paas/core-web";
8
+ import { schemaToStyle, transformField2Component } from "@gct-paas/design";
9
+ //#region src/components/form-component/field-label/tag-label.vue?vue&type=script&setup=true&lang.ts
10
+ var _hoisted_1 = { class: "select-text" };
11
+ var _hoisted_2 = { class: "select-text" };
12
+ var _hoisted_3 = { key: 0 };
13
+ var tag_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
14
+ __name: "tag-label",
15
+ props: {
16
+ tagWidgetStyle: {},
17
+ type: {},
18
+ disabled: { type: Boolean },
19
+ label: {},
20
+ isDesign: { type: Boolean },
21
+ closable: { type: Boolean },
22
+ showTagStyle: {
23
+ type: Boolean,
24
+ default: true
25
+ },
26
+ avatar: {},
27
+ iconExtraProps: {},
28
+ iconProps: {}
29
+ },
30
+ emits: ["on-close"],
31
+ setup(__props) {
32
+ const props = __props;
33
+ const themeSetting = _gct.platformStore.themeSetting;
34
+ const labelLayout = inject("labelLayout", {});
35
+ const showLabel = computed(() => {
36
+ let showMsg = props.label ?? "";
37
+ if ((!showMsg || showMsg.length <= 0) && props.isDesign) {
38
+ const example = props.type ? transformField2Component(props.type)?.example || "" : "";
39
+ showMsg = example ? isString(example) ? t(example) : example.map((e) => t(e)) : "";
40
+ }
41
+ if (props.showTagStyle && props.tagWidgetStyle?.tagStyleOpen || props.type === FIELD_TYPE.ENUM_MULTI || props.type === FIELD_TYPE.ENUM) return showMsg ? isString(showMsg) ? showMsg.split(",") : showMsg : [];
42
+ else if (showMsg instanceof Array) return showMsg.join(",");
43
+ else return showMsg + "";
44
+ });
45
+ const comStyle = toRef(() => {
46
+ const contentFont = props.tagWidgetStyle?.contentFont;
47
+ if (!contentFont) return {};
48
+ return schemaToStyle(contentFont);
49
+ });
50
+ const getMsgColor = (key = "") => {
51
+ const iconAttrs = props.iconExtraProps?.[key] || {};
52
+ const color = {};
53
+ if (iconAttrs?.textColor) Object.assign(color, { color: iconAttrs?.textColor });
54
+ if (comStyle.value?.color) return comStyle.value;
55
+ return {
56
+ wordBreak: "break-all",
57
+ ...comStyle.value,
58
+ ...color
59
+ };
60
+ };
61
+ const iconNode = { render: ({ $attrs }) => {
62
+ if ($attrs.labelName) {
63
+ const iconAttrs = props.iconExtraProps?.[$attrs.labelName] || props.iconProps || {};
64
+ if (!iconAttrs?.icon) return;
65
+ return h(IconNext, {
66
+ size: 16,
67
+ value: iconAttrs?.icon,
68
+ color: iconAttrs?.iconColor || themeSetting.themeColor,
69
+ style: "vertical-align: text-bottom; margin-right: 3px"
70
+ });
71
+ }
72
+ } };
73
+ return (_ctx, _cache) => {
74
+ return __props.showTagStyle && __props.tagWidgetStyle?.tagStyleOpen ? (openBlock(), createBlock(tag_layout_default, {
75
+ key: 0,
76
+ disabled: !!__props.disabled,
77
+ "label-layout": unref(labelLayout)
78
+ }, {
79
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(showLabel.value, (i, index) => {
80
+ return openBlock(), createBlock(tag_span_default, {
81
+ key: index,
82
+ "tag-style": __props.tagWidgetStyle.tagStyle,
83
+ style: normalizeStyle(getMsgColor(i))
84
+ }, {
85
+ default: withCtx(() => [
86
+ props.avatar ? (openBlock(), createBlock(unref(Avatar), {
87
+ key: 0,
88
+ src: unref(transformUrl)(props.avatar),
89
+ size: 20,
90
+ style: { "margin-top": "-5px" },
91
+ class: "mr4px"
92
+ }, null, 8, ["src"])) : createCommentVNode("", true),
93
+ createVNode(iconNode, { "label-name": i }, null, 8, ["label-name"]),
94
+ createElementVNode("span", _hoisted_1, toDisplayString(i), 1),
95
+ __props.closable ? (openBlock(), createBlock(unref(IconNext), {
96
+ key: 1,
97
+ size: 15,
98
+ value: "icon-park:close-small",
99
+ style: {
100
+ verticalAlign: "text-bottom",
101
+ "--color": "rgba(0,0,0,.45)",
102
+ lineHeight: "1",
103
+ marginLeft: "2px"
104
+ },
105
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("on-close"), ["prevent", "stop"]))
106
+ })) : createCommentVNode("", true)
107
+ ]),
108
+ _: 2
109
+ }, 1032, ["tag-style", "style"]);
110
+ }), 128))]),
111
+ _: 1
112
+ }, 8, ["disabled", "label-layout"])) : __props.type === unref(FIELD_TYPE).ENUM_MULTI || __props.type === unref(FIELD_TYPE).ENUM ? (openBlock(), createBlock(tag_layout_default, {
113
+ key: 1,
114
+ disabled: !!__props.disabled,
115
+ "label-layout": unref(labelLayout)
116
+ }, {
117
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(showLabel.value, (i, index) => {
118
+ return openBlock(), createElementBlock("span", {
119
+ key: index,
120
+ style: normalizeStyle(getMsgColor(i)),
121
+ class: "mr-5px"
122
+ }, [createVNode(iconNode, { "label-name": i }, null, 8, ["label-name"]), createElementVNode("span", _hoisted_2, toDisplayString(i) + toDisplayString(!__props.tagWidgetStyle?.tagStyleOpen && index < showLabel.value.length - 1 ? "," : ""), 1)], 4);
123
+ }), 128)), !showLabel.value.length ? (openBlock(), createElementBlock("span", _hoisted_3, "\xA0")) : createCommentVNode("", true)]),
124
+ _: 1
125
+ }, 8, ["disabled", "label-layout"])) : (openBlock(), createBlock(tag_layout_default, {
126
+ key: 2,
127
+ style: normalizeStyle(getMsgColor(showLabel.value)),
128
+ disabled: !!__props.disabled,
129
+ "label-layout": unref(labelLayout),
130
+ class: "select-text leading-none ell"
131
+ }, {
132
+ default: withCtx(() => [createTextVNode(toDisplayString(showLabel.value || "\xA0"), 1)]),
133
+ _: 1
134
+ }, 8, [
135
+ "style",
136
+ "disabled",
137
+ "label-layout"
138
+ ]));
139
+ };
140
+ }
141
+ });
142
+ //#endregion
143
+ export { tag_label_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,15 @@
1
+ .tag-label-disabled[data-v-a1ded441] {
2
+ opacity: 0.5;
3
+ }
4
+ .label-ellipsis[data-v-a1ded441] {
5
+ overflow: hidden;
6
+ text-overflow: ellipsis;
7
+ white-space: nowrap;
8
+ }
9
+ .label-wrap[data-v-a1ded441] {
10
+ word-break: break-all;
11
+ white-space: wrap;
12
+ }
13
+ .select-text[data-v-a1ded441] {
14
+ min-width: 16px;
15
+ }
@@ -0,0 +1,21 @@
1
+ interface Props {
2
+ labelLayout?: IObject;
3
+ disabled: boolean;
4
+ }
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLSpanElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
15
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
+ export default _default;
17
+ type __VLS_WithTemplateSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,7 @@
1
+ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
2
+ import tag_layout_vue_vue_type_script_setup_true_lang_default from "./tag-layout.vue_vue_type_script_setup_true_lang.mjs";
3
+ import './tag-layout.vue_vue_type_style_index_0_scoped_85e6a8f5_lang.css';/* empty css */
4
+ //#region src/components/form-component/field-label/tag-layout.vue
5
+ var tag_layout_default = /* @__PURE__ */ _plugin_vue_export_helper_default(tag_layout_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-85e6a8f5"]]);
6
+ //#endregion
7
+ export { tag_layout_default as default };
@@ -0,0 +1,16 @@
1
+ import { createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot } from "vue";
2
+ //#region src/components/form-component/field-label/tag-layout.vue?vue&type=script&setup=true&lang.ts
3
+ var tag_layout_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
4
+ __name: "tag-layout",
5
+ props: {
6
+ labelLayout: {},
7
+ disabled: { type: Boolean }
8
+ },
9
+ setup(__props) {
10
+ return (_ctx, _cache) => {
11
+ return openBlock(), createElementBlock("span", { class: normalizeClass([__props.disabled ? "tag-label-disabled" : null, !!__props.labelLayout?.hasLabelWidth && (__props.labelLayout?.layout.label === "left" || __props.labelLayout?.layout == "horizontal") ? __props.labelLayout?.overLabelDisplay == "ellipsis" ? "label-ellipsis" : "label-wrap" : ""]) }, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 2);
12
+ };
13
+ }
14
+ });
15
+ //#endregion
16
+ export { tag_layout_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,12 @@
1
+ .tag-label-disabled[data-v-85e6a8f5] {
2
+ opacity: 0.5;
3
+ }
4
+ .label-ellipsis[data-v-85e6a8f5] {
5
+ overflow: hidden;
6
+ text-overflow: ellipsis;
7
+ white-space: nowrap;
8
+ }
9
+ .label-wrap[data-v-85e6a8f5] {
10
+ word-break: break-all;
11
+ white-space: wrap;
12
+ }
@@ -0,0 +1,21 @@
1
+ import { LowCodeWidget } from '@gct-paas/schema';
2
+ type __VLS_Props = {
3
+ tagStyle?: LowCodeWidget.TagConfigStyle;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLSpanElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
15
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
+ export default _default;
17
+ type __VLS_WithTemplateSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,7 @@
1
+ import tag_span_vue_vue_type_script_setup_true_lang_default from "./tag-span.vue_vue_type_script_setup_true_lang.mjs";
2
+ import './tag-span.vue_vue_type_style_index_0_scoped_3bf855f6_lang.css';/* empty css */
3
+ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ //#region src/components/form-component/field-label/tag-span.vue
5
+ var tag_span_default = /* @__PURE__ */ _plugin_vue_export_helper_default(tag_span_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3bf855f6"]]);
6
+ //#endregion
7
+ export { tag_span_default as default };
@@ -0,0 +1,25 @@
1
+ import { createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot, toRef, useCssVars } from "vue";
2
+ import { TagTypeEnum } from "@gct-paas/core";
3
+ //#region src/components/form-component/field-label/tag-span.vue?vue&type=script&setup=true&lang.ts
4
+ var tag_span_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
5
+ __name: "tag-span",
6
+ props: { tagStyle: {} },
7
+ setup(__props) {
8
+ useCssVars((_ctx) => ({ "v650d3ac5": tagStyleColor.value }));
9
+ const props = __props;
10
+ const tagType = toRef(() => {
11
+ return props.tagStyle?.tagType || TagTypeEnum.RADIUS;
12
+ });
13
+ const tagStyleColor = toRef(() => {
14
+ return props.tagStyle?.color || "#f0f0f0";
15
+ });
16
+ const getTagClass = toRef(() => {
17
+ return `tag-${tagType.value}`;
18
+ });
19
+ return (_ctx, _cache) => {
20
+ return openBlock(), createElementBlock("span", { class: normalizeClass(["tag cursor-pointer", getTagClass.value]) }, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 2);
21
+ };
22
+ }
23
+ });
24
+ //#endregion
25
+ export { tag_span_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,31 @@
1
+ .tag[data-v-3bf855f6] {
2
+ padding: 4px 6px;
3
+ line-height: 1;
4
+ }
5
+ .tag + .tag[data-v-3bf855f6] {
6
+ margin-left: 5px;
7
+ }
8
+ .tag-radius[data-v-3bf855f6] {
9
+ border-radius: 4px;
10
+ background: var(--v650d3ac5);
11
+ }
12
+ .tag-linear_radius[data-v-3bf855f6] {
13
+ border: 1px solid var(--v650d3ac5);
14
+ border-radius: 4px;
15
+ }
16
+ .tag-big_radius[data-v-3bf855f6] {
17
+ border-radius: 100px;
18
+ background: var(--v650d3ac5);
19
+ }
20
+ .tag-linear_big_radius[data-v-3bf855f6] {
21
+ border: 1px solid var(--v650d3ac5);
22
+ border-radius: 100px;
23
+ }
24
+ .tag-dashed_radius[data-v-3bf855f6] {
25
+ border: 1px dashed var(--v650d3ac5);
26
+ border-radius: 4px;
27
+ }
28
+ .tag-status[data-v-3bf855f6] {
29
+ border-radius: 14px 4px 4px;
30
+ background: var(--v650d3ac5);
31
+ }
@@ -0,0 +1,22 @@
1
+ import { LowCodeWidget } from '@gct-paas/schema';
2
+ /** 与 FieldRadio 传入的 tagStyle 一致,避免依赖 @gct-paas/schema */
3
+ interface TagWidgetStyle {
4
+ tagStyleOpen?: boolean;
5
+ contentFont?: LowCodeWidget.FontStyle;
6
+ tagStyle?: LowCodeWidget.TagConfigStyle;
7
+ }
8
+ type __VLS_Props = {
9
+ isTooltip?: boolean;
10
+ label?: string | (string | number)[];
11
+ type?: string;
12
+ modelValue?: string;
13
+ tagWidgetStyle?: TagWidgetStyle;
14
+ disabled?: boolean;
15
+ iconExtraProps?: Record<string, {
16
+ icon?: string;
17
+ iconColor?: string;
18
+ textColor?: string;
19
+ }>;
20
+ };
21
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import field_readonly_vue_vue_type_script_setup_true_lang_default from "./field-readonly.vue_vue_type_script_setup_true_lang.mjs";
2
+ //#region src/components/form-component/field-readonly.vue
3
+ var field_readonly_default = field_readonly_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { field_readonly_default as default };
@@ -0,0 +1,81 @@
1
+ import tag_label_default from "./field-label/tag-label.vue.mjs";
2
+ import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, ref, resolveComponent, toDisplayString, unref, withCtx } from "vue";
3
+ import { FIELD_TYPE } from "@gct-paas/core";
4
+ //#region src/components/form-component/field-readonly.vue?vue&type=script&setup=true&lang.ts
5
+ var _hoisted_1 = {
6
+ key: 0,
7
+ class: "w100% ell"
8
+ };
9
+ var _hoisted_2 = {
10
+ key: 0,
11
+ class: "gct-custom-tag ml8px"
12
+ };
13
+ var field_readonly_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
14
+ __name: "field-readonly",
15
+ props: {
16
+ isTooltip: { type: Boolean },
17
+ label: {},
18
+ type: {},
19
+ modelValue: {},
20
+ tagWidgetStyle: {},
21
+ disabled: { type: Boolean },
22
+ iconExtraProps: {}
23
+ },
24
+ setup(__props) {
25
+ const props = __props;
26
+ const visible = ref(false);
27
+ const showLabel = computed(() => {
28
+ if (Array.isArray(props.label)) return props.label.join(",");
29
+ else return props.label;
30
+ });
31
+ const FieldLabel = computed(() => {
32
+ return tag_label_default;
33
+ });
34
+ /**超出内容出现tip显示全部 */
35
+ function onMouseenter(e) {
36
+ if (!props.isTooltip) return;
37
+ const el = e.target?.parentNode;
38
+ if (el.scrollWidth > el.clientWidth) visible.value = true;
39
+ }
40
+ function onMouseleave() {
41
+ visible.value = false;
42
+ }
43
+ return (_ctx, _cache) => {
44
+ const _component_a_tooltip = resolveComponent("a-tooltip");
45
+ return openBlock(), createBlock(_component_a_tooltip, {
46
+ placement: "topLeft",
47
+ visible: visible.value
48
+ }, {
49
+ title: withCtx(() => [createTextVNode(toDisplayString(showLabel.value), 1)]),
50
+ default: withCtx(() => [props.type === unref(FIELD_TYPE).RDO_REF ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(FieldLabel), mergeProps(_ctx.$attrs, {
51
+ label: __props.label,
52
+ "tag-widget-style": props.tagWidgetStyle,
53
+ disabled: props.disabled,
54
+ "icon-extra-props": props.iconExtraProps,
55
+ onMouseenter,
56
+ onMouseleave
57
+ }), null, 16, [
58
+ "label",
59
+ "tag-widget-style",
60
+ "disabled",
61
+ "icon-extra-props"
62
+ ]), props.type === unref(FIELD_TYPE).RDO_REF && props.modelValue && !props.modelValue?.includes(":") ? (openBlock(), createElementBlock("span", _hoisted_2, " 默认 ")) : createCommentVNode("", true)])) : (openBlock(), createBlock(unref(FieldLabel), mergeProps({ key: 1 }, _ctx.$attrs, {
63
+ label: __props.label,
64
+ "tag-widget-style": props.tagWidgetStyle,
65
+ disabled: props.disabled,
66
+ "icon-extra-props": props.iconExtraProps,
67
+ onMouseenter,
68
+ onMouseleave
69
+ }), null, 16, [
70
+ "label",
71
+ "tag-widget-style",
72
+ "disabled",
73
+ "icon-extra-props"
74
+ ]))]),
75
+ _: 1
76
+ }, 8, ["visible"]);
77
+ };
78
+ }
79
+ });
80
+ //#endregion
81
+ export { field_readonly_vue_vue_type_script_setup_true_lang_default as default };