@gct-paas/render-web 0.1.6-dev.2 → 0.1.6-dev.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +3 -1
- package/es/Event/Events.mjs +7 -3
- package/es/components/card-view-render/card-view-render.css +71 -0
- package/es/components/card-view-render/card-view-render.d.ts +38 -0
- package/es/components/card-view-render/card-view-render.mjs +84 -0
- package/es/components/collapse-detail/components/collapse-list.vue.d.ts +24 -0
- package/es/components/collapse-detail/components/collapse-list.vue.mjs +5 -0
- package/es/components/collapse-detail/components/collapse-list.vue_vue_type_script_setup_true_lang.mjs +103 -0
- package/es/components/collapse-detail/components/enum-tag-label.vue.d.ts +6 -0
- package/es/components/collapse-detail/components/enum-tag-label.vue.mjs +5 -0
- package/es/components/collapse-detail/components/enum-tag-label.vue_vue_type_script_setup_true_lang.mjs +61 -0
- package/es/components/collapse-detail/components/instance-status-label.vue.d.ts +34 -0
- package/es/components/collapse-detail/components/instance-status-label.vue.mjs +7 -0
- package/es/components/collapse-detail/components/instance-status-label.vue_vue_type_script_setup_true_lang.mjs +76 -0
- package/es/components/collapse-detail/components/instance-status-label.vue_vue_type_style_index_0_scoped_610b0bb3_lang.css +77 -0
- package/es/components/collapse-detail/components/label-tag.vue.d.ts +6 -0
- package/es/components/collapse-detail/components/label-tag.vue.mjs +7 -0
- package/es/components/collapse-detail/components/label-tag.vue_vue_type_script_setup_true_lang.mjs +34 -0
- package/es/components/collapse-detail/components/label-tag.vue_vue_type_style_index_0_scoped_b25afce5_lang.css +39 -0
- package/es/components/collapse-detail/constants/instance-theme-config.d.ts +64 -0
- package/es/components/collapse-detail/constants/instance-theme-config.mjs +100 -0
- package/es/components/collapse-detail/constants/status.d.ts +36 -0
- package/es/components/collapse-detail/constants/status.mjs +34 -0
- package/es/components/collapse-detail/index.d.ts +3 -0
- package/es/components/collapse-detail/index.mjs +1 -0
- package/es/components/collapse-detail/index.vue.d.ts +37 -0
- package/es/components/collapse-detail/index.vue.mjs +7 -0
- package/es/components/collapse-detail/index.vue_vue_type_script_setup_true_name_collapse-detail_lang.mjs +90 -0
- package/es/components/collapse-detail/index.vue_vue_type_style_index_0_scoped_b4b9903c_lang.css +83 -0
- package/es/components/collapse-detail/typing.d.ts +44 -0
- package/es/components/collapse-detail/typing.mjs +17 -0
- package/es/components/field-search-cascader/field-cascader.vue.d.ts +17 -0
- package/es/components/field-search-cascader/field-cascader.vue.mjs +8 -0
- package/es/components/field-search-cascader/field-cascader.vue_vue_type_script_setup_true_lang.mjs +297 -0
- package/es/components/field-search-cascader/field-cascader.vue_vue_type_style_index_0_scoped_cb5e4d67_lang.css +52 -0
- package/es/components/field-search-cascader/field-cascader.vue_vue_type_style_index_1_lang.css +3 -0
- package/es/components/field-search-cascader/index.d.ts +2 -0
- package/es/components/field-search-cascader/index.mjs +1 -0
- package/es/components/form-component/FieldSelect.mjs +1 -0
- package/es/components/form-component/field-label/ref-card-label-render.vue_vue_type_script_setup_true_lang.mjs +2 -1
- package/es/components/form-component/field-label/tag-span.vue.mjs +1 -1
- package/es/components/index.d.ts +7 -0
- package/es/components/index.mjs +9 -0
- package/es/components/layouts/basic-page/basic-page.vue.d.ts +30 -0
- package/es/components/layouts/basic-page/basic-page.vue.mjs +7 -0
- package/es/components/layouts/basic-page/basic-page.vue_vue_type_script_setup_true_name_basic-page_lang.mjs +30 -0
- package/es/components/layouts/basic-page/basic-page.vue_vue_type_style_index_0_scoped_23453a1b_lang.css +20 -0
- package/es/components/layouts/basic-page-render/basic-page-render.vue.d.ts +30 -0
- package/es/components/layouts/basic-page-render/basic-page-render.vue.mjs +7 -0
- package/es/components/layouts/basic-page-render/basic-page-render.vue_vue_type_script_setup_true_name_BasicPageRender_lang.mjs +30 -0
- package/es/components/layouts/basic-page-render/basic-page-render.vue_vue_type_style_index_0_scoped_264ca5fa_lang.css +20 -0
- package/es/components/rich-editor/index.d.ts +2 -0
- package/es/components/rich-editor/index.mjs +1 -0
- package/es/components/rich-editor/rich-editor.vue.d.ts +22 -0
- package/es/components/rich-editor/rich-editor.vue.mjs +5 -0
- package/es/components/rich-editor/rich-editor.vue_vue_type_script_setup_true_lang.mjs +150 -0
- package/es/components/rich-editor/style.css +747 -0
- package/es/constants/xlsx-parser.d.ts +15 -0
- package/es/constants/xlsx-parser.mjs +58 -0
- package/es/enums/xlsx-parser.d.ts +293 -0
- package/es/enums/xlsx-parser.mjs +36 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/useQuickSearch.d.ts +8 -0
- package/es/hooks/useQuickSearch.mjs +96 -0
- package/es/index.d.ts +2 -0
- package/es/index.mjs +11 -1
- package/es/interface/xlsx-parser/base.d.ts +151 -0
- package/es/interface/xlsx-parser/index.d.ts +246 -0
- package/es/setup-app.d.ts +2 -0
- package/es/setup-app.mjs +10 -0
- package/es/types/shims-modules.d.ts +11 -0
- package/es/utils/cell-border.d.ts +73 -0
- package/es/utils/cell-border.mjs +203 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.mjs +1 -0
- package/es/utils/xlsx-parser.d.ts +141 -0
- package/es/utils/xlsx-parser.mjs +262 -0
- package/package.json +20 -11
package/es/Event/Events.mjs
CHANGED
|
@@ -4,9 +4,13 @@ import { inject, provide } from "vue";
|
|
|
4
4
|
var PAGE_EVENT = Symbol("PAGE_EVENT");
|
|
5
5
|
var setupPageEvent = (event) => provide(PAGE_EVENT, event);
|
|
6
6
|
var usePageEvent = () => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
try {
|
|
8
|
+
const event = inject(PAGE_EVENT);
|
|
9
|
+
if (!event) throw new Error("PAGE_EVENT not provided");
|
|
10
|
+
return event;
|
|
11
|
+
} catch {
|
|
12
|
+
return {};
|
|
13
|
+
}
|
|
10
14
|
};
|
|
11
15
|
//#endregion
|
|
12
16
|
export { setupPageEvent, usePageEvent };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
3
|
+
/* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
|
|
4
|
+
/**
|
|
5
|
+
* 定义 Block 块
|
|
6
|
+
* @param {String} $block - Block 块名称
|
|
7
|
+
* @example
|
|
8
|
+
* @include b('button') {
|
|
9
|
+
* padding: 10px;
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 定义 Element 元素
|
|
14
|
+
* @param {String|List} $element - Element 元素名称,支持单个或多个
|
|
15
|
+
* @example
|
|
16
|
+
* @include b('button') {
|
|
17
|
+
* @include e('text') {
|
|
18
|
+
* color: #000;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* // 或传入多个元素
|
|
22
|
+
* @include b('button') {
|
|
23
|
+
* @include e(('text', 'icon')) {
|
|
24
|
+
* margin: 5px;
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* 定义 Modifier 修饰符
|
|
30
|
+
* @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
|
|
31
|
+
* @example
|
|
32
|
+
* @include b('button') {
|
|
33
|
+
* @include m('primary') {
|
|
34
|
+
* background: blue;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* // 或传入多个修饰符
|
|
38
|
+
* @include b('button') {
|
|
39
|
+
* @include m(('primary', 'large')) {
|
|
40
|
+
* background: blue;
|
|
41
|
+
* font-size: 16px;
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* 定义状态选择器
|
|
47
|
+
* @param {String} $state - 状态名称
|
|
48
|
+
* @example
|
|
49
|
+
* @include b('button') {
|
|
50
|
+
* @include when('disabled') {
|
|
51
|
+
* opacity: 0.5;
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* 深色主题样式
|
|
57
|
+
* @param {String} $block - Block 块名称
|
|
58
|
+
* @example
|
|
59
|
+
* @include dark('button') {
|
|
60
|
+
* background: #333;
|
|
61
|
+
* color: #fff;
|
|
62
|
+
* }
|
|
63
|
+
*/
|
|
64
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
65
|
+
.gct-card-view-render {
|
|
66
|
+
position: relative;
|
|
67
|
+
}
|
|
68
|
+
.gct-card-view-render .gct-design-render {
|
|
69
|
+
width: auto;
|
|
70
|
+
height: auto;
|
|
71
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export declare const CardViewRender: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
id: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
modelKey: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
fetch: {
|
|
12
|
+
type: PropType<() => Promise<IObject>>;
|
|
13
|
+
};
|
|
14
|
+
preview: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "mounted"[], "mounted", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
19
|
+
id: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
modelKey: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
fetch: {
|
|
28
|
+
type: PropType<() => Promise<IObject>>;
|
|
29
|
+
};
|
|
30
|
+
preview: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
}>> & Readonly<{
|
|
35
|
+
onMounted?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
}>, {
|
|
37
|
+
preview: boolean;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import './card-view-render.css';/* empty css */
|
|
2
|
+
import { DesignRender, DesignRenderViewPrefix } from "@gct-paas/render";
|
|
3
|
+
import { computed, createVNode, defineComponent, nextTick, ref } from "vue";
|
|
4
|
+
import { gctMemoizeAsync, useNamespace } from "@gct-paas/core";
|
|
5
|
+
//#region src/components/card-view-render/card-view-render.tsx
|
|
6
|
+
var loadModelAsync = gctMemoizeAsync(_api.apaas.commonInfoCard.getGetById);
|
|
7
|
+
var CardViewRender = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "CardViewRender",
|
|
9
|
+
props: {
|
|
10
|
+
id: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
modelKey: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
fetch: { type: Function },
|
|
19
|
+
preview: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
emits: ["mounted"],
|
|
25
|
+
setup(props, { emit, slots }) {
|
|
26
|
+
const ns = useNamespace("card-view-render");
|
|
27
|
+
const isLoading = ref(false);
|
|
28
|
+
const isLoaded = ref(false);
|
|
29
|
+
const json = ref(null);
|
|
30
|
+
const data = ref({});
|
|
31
|
+
const style = computed(() => {
|
|
32
|
+
if (json.value) return { width: json.value.pageNode?.data.width ? `${json.value.pageNode.data.width}px` : "" };
|
|
33
|
+
return {};
|
|
34
|
+
});
|
|
35
|
+
async function loadModel() {
|
|
36
|
+
const res = await loadModelAsync({
|
|
37
|
+
id: props.id,
|
|
38
|
+
modelKey: props.modelKey,
|
|
39
|
+
type: "CARD"
|
|
40
|
+
});
|
|
41
|
+
if (res && res.designerJson) json.value = JSON.parse(decodeURIComponent(res.designerJson));
|
|
42
|
+
}
|
|
43
|
+
async function onInit() {
|
|
44
|
+
if (!props.id) return;
|
|
45
|
+
try {
|
|
46
|
+
isLoading.value = true;
|
|
47
|
+
await loadModel();
|
|
48
|
+
if (props.preview !== true && props.fetch) data.value = await props.fetch() || {};
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(error);
|
|
51
|
+
} finally {
|
|
52
|
+
isLoading.value = false;
|
|
53
|
+
}
|
|
54
|
+
isLoaded.value = true;
|
|
55
|
+
await nextTick();
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
emit("mounted", json.value?.pageNode?.data);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
onInit();
|
|
61
|
+
return () => {
|
|
62
|
+
return createVNode("div", {
|
|
63
|
+
"class": ns.b(),
|
|
64
|
+
"style": style.value
|
|
65
|
+
}, [isLoading.value && slots.loading ? slots.loading?.() : null, !json.value || !isLoaded.value ? null : createVNode(DesignRender, {
|
|
66
|
+
"context": {
|
|
67
|
+
data: data.value,
|
|
68
|
+
id: props.id,
|
|
69
|
+
modelKey: props.modelKey
|
|
70
|
+
},
|
|
71
|
+
"model": {
|
|
72
|
+
nodes: json.value.nodes,
|
|
73
|
+
pageNode: json.value.pageNode,
|
|
74
|
+
tree: json.value.tree,
|
|
75
|
+
type: DesignRenderViewPrefix.CARD_VIEW
|
|
76
|
+
},
|
|
77
|
+
"prefix": DesignRenderViewPrefix.CARD_VIEW,
|
|
78
|
+
"preview": props.preview
|
|
79
|
+
}, null)]);
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
//#endregion
|
|
84
|
+
export { CardViewRender };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CollapseItem } from '../typing';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
descData: CollapseItem[];
|
|
4
|
+
isHead?: boolean;
|
|
5
|
+
column?: number;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: Partial<Record<string, (_: {
|
|
10
|
+
item: CollapseItem;
|
|
11
|
+
slotData: IObject | undefined;
|
|
12
|
+
}) => any>>;
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
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, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import collapse_list_vue_vue_type_script_setup_true_lang_default from "./collapse-list.vue_vue_type_script_setup_true_lang.mjs";
|
|
2
|
+
//#region src/components/collapse-detail/components/collapse-list.vue
|
|
3
|
+
var collapse_list_default = collapse_list_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { collapse_list_default as default };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import instance_status_label_default from "./instance-status-label.vue.mjs";
|
|
2
|
+
import label_tag_default from "./label-tag.vue.mjs";
|
|
3
|
+
import enum_tag_label_default from "./enum-tag-label.vue.mjs";
|
|
4
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, openBlock, renderList, renderSlot, resolveComponent, toDisplayString, unref, withCtx } from "vue";
|
|
5
|
+
import { CopyModuleKey } from "@gct-paas/core-web";
|
|
6
|
+
//#region src/components/collapse-detail/components/collapse-list.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var _hoisted_1 = ["title"];
|
|
8
|
+
var _hoisted_2 = ["title"];
|
|
9
|
+
var collapse_list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "collapse-list",
|
|
11
|
+
props: {
|
|
12
|
+
descData: {},
|
|
13
|
+
isHead: { type: Boolean },
|
|
14
|
+
column: {}
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const getSpan = (span = 1) => {
|
|
18
|
+
if (span > 3) return 3;
|
|
19
|
+
return span;
|
|
20
|
+
};
|
|
21
|
+
const ellipsisStyle = (item) => {
|
|
22
|
+
if (!item.ellipsis) return {};
|
|
23
|
+
return {
|
|
24
|
+
overflow: "hidden",
|
|
25
|
+
textOverflow: "ellipsis",
|
|
26
|
+
whiteSpace: "nowrap",
|
|
27
|
+
display: "inline-block"
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
return (_ctx, _cache) => {
|
|
31
|
+
const _component_a_tag = resolveComponent("a-tag");
|
|
32
|
+
const _component_a_descriptions_item = resolveComponent("a-descriptions-item");
|
|
33
|
+
const _component_a_descriptions = resolveComponent("a-descriptions");
|
|
34
|
+
return openBlock(), createBlock(_component_a_descriptions, {
|
|
35
|
+
class: normalizeClass(__props.isHead ? "item" : "desc-area"),
|
|
36
|
+
column: __props.column || 3
|
|
37
|
+
}, {
|
|
38
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.descData, (item, _index) => {
|
|
39
|
+
return openBlock(), createBlock(_component_a_descriptions_item, {
|
|
40
|
+
key: _index,
|
|
41
|
+
label: item.label,
|
|
42
|
+
span: getSpan(item.span),
|
|
43
|
+
"content-style": ellipsisStyle(item)
|
|
44
|
+
}, {
|
|
45
|
+
default: withCtx(() => [item.useSlot && item.slotName && _ctx.$slots[item.slotName] ? renderSlot(_ctx.$slots, item.slotName, {
|
|
46
|
+
key: 0,
|
|
47
|
+
item,
|
|
48
|
+
slotData: item.slotData
|
|
49
|
+
}) : item.render ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
50
|
+
item.render === "link_render" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [item.name ? (openBlock(), createElementBlock("span", {
|
|
51
|
+
key: 0,
|
|
52
|
+
title: item.name
|
|
53
|
+
}, toDisplayString(item.name), 9, _hoisted_1)) : (openBlock(), createBlock(_component_a_tag, {
|
|
54
|
+
key: 1,
|
|
55
|
+
color: "error"
|
|
56
|
+
}, {
|
|
57
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("sys.onlineForm.noAssociation")), 1)]),
|
|
58
|
+
_: 1
|
|
59
|
+
}))], 64)) : createCommentVNode("", true),
|
|
60
|
+
item.render === "status_render" ? (openBlock(), createBlock(instance_status_label_default, {
|
|
61
|
+
key: 1,
|
|
62
|
+
"instance-status": item.name
|
|
63
|
+
}, null, 8, ["instance-status"])) : createCommentVNode("", true),
|
|
64
|
+
item.render === "change_status_render" ? (openBlock(), createBlock(enum_tag_label_default, {
|
|
65
|
+
key: 2,
|
|
66
|
+
value: item.name,
|
|
67
|
+
model: item.model
|
|
68
|
+
}, null, 8, ["value", "model"])) : createCommentVNode("", true),
|
|
69
|
+
item.render === "label_tag_render" ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(item.tagList, (tag, i) => {
|
|
70
|
+
return openBlock(), createBlock(label_tag_default, {
|
|
71
|
+
key: i,
|
|
72
|
+
data: tag
|
|
73
|
+
}, null, 8, ["data"]);
|
|
74
|
+
}), 128)) : createCommentVNode("", true)
|
|
75
|
+
], 64)) : item.isCopy ? (openBlock(), createBlock(unref(CopyModuleKey), {
|
|
76
|
+
key: 2,
|
|
77
|
+
"module-key": item.key
|
|
78
|
+
}, null, 8, ["module-key"])) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [createElementVNode("span", {
|
|
79
|
+
title: item.name,
|
|
80
|
+
class: normalizeClass({ "mr-4px": item.hasTag })
|
|
81
|
+
}, toDisplayString(item.name), 11, _hoisted_2), item.hasTag ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(item.tagList, (tag) => {
|
|
82
|
+
return openBlock(), createBlock(_component_a_tag, {
|
|
83
|
+
key: tag.key,
|
|
84
|
+
color: tag?.color
|
|
85
|
+
}, {
|
|
86
|
+
default: withCtx(() => [createTextVNode(toDisplayString(tag.name), 1)]),
|
|
87
|
+
_: 2
|
|
88
|
+
}, 1032, ["color"]);
|
|
89
|
+
}), 128)) : createCommentVNode("", true)], 64))]),
|
|
90
|
+
_: 2
|
|
91
|
+
}, 1032, [
|
|
92
|
+
"label",
|
|
93
|
+
"span",
|
|
94
|
+
"content-style"
|
|
95
|
+
]);
|
|
96
|
+
}), 128))]),
|
|
97
|
+
_: 3
|
|
98
|
+
}, 8, ["class", "column"]);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
//#endregion
|
|
103
|
+
export { collapse_list_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
model: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import enum_tag_label_vue_vue_type_script_setup_true_lang_default from "./enum-tag-label.vue_vue_type_script_setup_true_lang.mjs";
|
|
2
|
+
//#region src/components/collapse-detail/components/enum-tag-label.vue
|
|
3
|
+
var enum_tag_label_default = enum_tag_label_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { enum_tag_label_default as default };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import tag_label_default from "../../form-component/field-label/tag-label.vue.mjs";
|
|
2
|
+
import "../../form-component/index.mjs";
|
|
3
|
+
import { createBlock, defineComponent, openBlock, ref, unref, watch } from "vue";
|
|
4
|
+
import { FIELD_TYPE, gctMemoizeAsync } from "@gct-paas/core";
|
|
5
|
+
import { pick } from "lodash-es";
|
|
6
|
+
//#region src/components/collapse-detail/components/enum-tag-label.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var enum_tag_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "enum-tag-label",
|
|
9
|
+
props: {
|
|
10
|
+
model: {},
|
|
11
|
+
value: {}
|
|
12
|
+
},
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const enumInfo = ref({});
|
|
16
|
+
const iconProps = ref();
|
|
17
|
+
const iconExtraProps = ref();
|
|
18
|
+
const loadData = gctMemoizeAsync(getEnumConfig);
|
|
19
|
+
watch(() => props.model, async () => {
|
|
20
|
+
if (!props.model) return;
|
|
21
|
+
const { list, tagProps } = await loadData({ id: props.model });
|
|
22
|
+
enumInfo.value = list.find((e) => e.value === props.value);
|
|
23
|
+
iconExtraProps.value = tagProps;
|
|
24
|
+
}, { immediate: true });
|
|
25
|
+
async function getEnumConfig({ id }) {
|
|
26
|
+
return await getEnumData(await _api.apaas.enumModel.getInfoId({ id }) || {});
|
|
27
|
+
}
|
|
28
|
+
async function getEnumData({ iconState, textState }) {
|
|
29
|
+
const res = await _api.apaas.enumModelField.getPageList({
|
|
30
|
+
enumModelId: props.model,
|
|
31
|
+
enumModelKey: props.model
|
|
32
|
+
});
|
|
33
|
+
const keys = iconState ? ["icon", "iconColor"] : [];
|
|
34
|
+
if (textState) keys.push("textColor");
|
|
35
|
+
return {
|
|
36
|
+
list: res?.data || [],
|
|
37
|
+
tagProps: res?.data?.reduce((map, e) => {
|
|
38
|
+
map[e.text] = pick(e, keys);
|
|
39
|
+
return map;
|
|
40
|
+
}, {})
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return openBlock(), createBlock(unref(tag_label_default), {
|
|
45
|
+
type: unref(FIELD_TYPE).ENUM,
|
|
46
|
+
label: enumInfo.value.text,
|
|
47
|
+
"tag-widget-style": { tagStyleOpen: true },
|
|
48
|
+
"is-design": false,
|
|
49
|
+
"icon-extra-props": iconExtraProps.value,
|
|
50
|
+
"icon-props": iconProps.value
|
|
51
|
+
}, null, 8, [
|
|
52
|
+
"type",
|
|
53
|
+
"label",
|
|
54
|
+
"icon-extra-props",
|
|
55
|
+
"icon-props"
|
|
56
|
+
]);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
//#endregion
|
|
61
|
+
export { enum_tag_label_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { InstanceStatusValue } from '../constants/status';
|
|
2
|
+
import { FormTypeEnum } from '../typing';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
formType?: FormTypeEnum;
|
|
5
|
+
dataStatus?: string;
|
|
6
|
+
instanceStatus: InstanceStatusValue;
|
|
7
|
+
statusType?: string;
|
|
8
|
+
useDynamicColor?: boolean;
|
|
9
|
+
showIcon?: boolean;
|
|
10
|
+
needCustomClass?: boolean;
|
|
11
|
+
isFormSummary?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare function __VLS_template(): {
|
|
14
|
+
attrs: Partial<{}>;
|
|
15
|
+
slots: {
|
|
16
|
+
instanceTitle?(_: {}): any;
|
|
17
|
+
};
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: HTMLDivElement;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
23
|
+
useDynamicColor: boolean;
|
|
24
|
+
showIcon: boolean;
|
|
25
|
+
needCustomClass: boolean;
|
|
26
|
+
isFormSummary: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import instance_status_label_vue_vue_type_script_setup_true_lang_default from "./instance-status-label.vue_vue_type_script_setup_true_lang.mjs";
|
|
3
|
+
import './instance-status-label.vue_vue_type_style_index_0_scoped_610b0bb3_lang.css';/* empty css */
|
|
4
|
+
//#region src/components/collapse-detail/components/instance-status-label.vue
|
|
5
|
+
var instance_status_label_default = /* @__PURE__ */ _plugin_vue_export_helper_default(instance_status_label_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-610b0bb3"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { instance_status_label_default as default };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useInstanceThemeConfig } from "../constants/instance-theme-config.mjs";
|
|
2
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString } from "vue";
|
|
3
|
+
import { t } from "@gct-paas/core";
|
|
4
|
+
//#region src/components/collapse-detail/components/instance-status-label.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var _hoisted_1 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "instance-status-icon"
|
|
8
|
+
};
|
|
9
|
+
var instance_status_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "instance-status-label",
|
|
11
|
+
props: {
|
|
12
|
+
formType: {},
|
|
13
|
+
dataStatus: {},
|
|
14
|
+
instanceStatus: {},
|
|
15
|
+
statusType: {},
|
|
16
|
+
useDynamicColor: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
showIcon: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
needCustomClass: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
isFormSummary: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
setup(__props) {
|
|
34
|
+
const props = __props;
|
|
35
|
+
const themeConfig = computed(() => {
|
|
36
|
+
const base = "instance-status-label";
|
|
37
|
+
if (props.useDynamicColor) {
|
|
38
|
+
const config = useInstanceThemeConfig({
|
|
39
|
+
formType: props.formType,
|
|
40
|
+
dataStatus: props.dataStatus,
|
|
41
|
+
instanceStatus: props.instanceStatus,
|
|
42
|
+
statusType: props.statusType,
|
|
43
|
+
isFormSummary: props.isFormSummary
|
|
44
|
+
});
|
|
45
|
+
return {
|
|
46
|
+
baseClass: [base, `${base}--dynamic`],
|
|
47
|
+
...config
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
placeholder: props.instanceStatus ? t(`sys.edhr.instanceStatus2FormEnum.${props.instanceStatus}`) : "",
|
|
52
|
+
baseClass: [
|
|
53
|
+
base,
|
|
54
|
+
`${base}--static`,
|
|
55
|
+
`${base}--${props.instanceStatus}`
|
|
56
|
+
]
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
return (_ctx, _cache) => {
|
|
60
|
+
return openBlock(), createElementBlock("div", {
|
|
61
|
+
class: normalizeClass(["instance-status-wrapper", themeConfig.value.baseClass]),
|
|
62
|
+
style: normalizeStyle({
|
|
63
|
+
"--nocode-iconBgColor": themeConfig.value?.iconBackground,
|
|
64
|
+
"--nocode-textColor": themeConfig.value?.textColor,
|
|
65
|
+
"--nocode-bgColor": themeConfig.value?.background
|
|
66
|
+
})
|
|
67
|
+
}, [
|
|
68
|
+
__props.showIcon ? (openBlock(), createElementBlock("span", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("i", { class: "iconfont icon-a-biaodan2" }, null, -1)])])) : createCommentVNode("", true),
|
|
69
|
+
renderSlot(_ctx.$slots, "instanceTitle", {}, void 0, true),
|
|
70
|
+
createElementVNode("span", { class: normalizeClass(["instance-title", __props.needCustomClass ? "is-custom-class" : ""]) }, toDisplayString(themeConfig.value?.placeholder), 3)
|
|
71
|
+
], 6);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
export { instance_status_label_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.instance-status-wrapper[data-v-610b0bb3] {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: flex-start;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
}
|
|
7
|
+
.instance-status-wrapper.instance-status-label--UNFILLED[data-v-610b0bb3],
|
|
8
|
+
.instance-status-wrapper.instance-status-label--UNRELEASED[data-v-610b0bb3] {
|
|
9
|
+
--color: #de5e5f;
|
|
10
|
+
}
|
|
11
|
+
.instance-status-wrapper.instance-status-label--RUNNING[data-v-610b0bb3],
|
|
12
|
+
.instance-status-wrapper.instance-status-label--running[data-v-610b0bb3],
|
|
13
|
+
.instance-status-wrapper.instance-status-label--RELEASE[data-v-610b0bb3] {
|
|
14
|
+
--color: #026ac8;
|
|
15
|
+
}
|
|
16
|
+
.instance-status-wrapper.instance-status-label--COMPLETED[data-v-610b0bb3],
|
|
17
|
+
.instance-status-wrapper.instance-status-label--finished[data-v-610b0bb3] {
|
|
18
|
+
--color: #309c41;
|
|
19
|
+
}
|
|
20
|
+
.instance-status-wrapper.instance-status-label--ARCHIVED[data-v-610b0bb3],
|
|
21
|
+
.instance-status-wrapper.instance-status-label--IN_AUDIT[data-v-610b0bb3] {
|
|
22
|
+
--color: #dda200;
|
|
23
|
+
}
|
|
24
|
+
.instance-status-wrapper.instance-status-label--EXCEPTION[data-v-610b0bb3] {
|
|
25
|
+
--color: var(--ant-warning-color);
|
|
26
|
+
}
|
|
27
|
+
.instance-status-wrapper.instance-status-label--IN_SUMMARY[data-v-610b0bb3] {
|
|
28
|
+
--color: #ff9442;
|
|
29
|
+
}
|
|
30
|
+
.instance-status-wrapper.instance-status-label--SUMMARIZED[data-v-610b0bb3] {
|
|
31
|
+
--color: #aa78ff;
|
|
32
|
+
}
|
|
33
|
+
.instance-status-wrapper.instance-status-label--static .instance-title[data-v-610b0bb3] {
|
|
34
|
+
color: var(--color, #606266);
|
|
35
|
+
padding: 0;
|
|
36
|
+
}
|
|
37
|
+
.instance-status-wrapper .icon-dot[data-v-610b0bb3] {
|
|
38
|
+
width: 4px;
|
|
39
|
+
height: 4px;
|
|
40
|
+
margin-right: 4px;
|
|
41
|
+
border-radius: 50%;
|
|
42
|
+
background-color: var(--color, transparent);
|
|
43
|
+
}
|
|
44
|
+
.instance-status-wrapper .instance-status-icon[data-v-610b0bb3] {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
height: 32px;
|
|
48
|
+
width: 32px;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
color: #fff;
|
|
51
|
+
background: var(--nocode-iconBgColor);
|
|
52
|
+
border-radius: 2px;
|
|
53
|
+
}
|
|
54
|
+
.instance-status-wrapper .instance-status-icon .iconfont[data-v-610b0bb3] {
|
|
55
|
+
font-size: 18px;
|
|
56
|
+
}
|
|
57
|
+
.instance-status-wrapper .instance-title[data-v-610b0bb3] {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
line-height: 22px;
|
|
60
|
+
font-size: 14px;
|
|
61
|
+
color: var(--nocode-textColor);
|
|
62
|
+
background: var(--nocode-bgColor);
|
|
63
|
+
border-radius: 4px;
|
|
64
|
+
padding: 0 6px;
|
|
65
|
+
}
|
|
66
|
+
.instance-status-wrapper .instance-title.is-custom-class[data-v-610b0bb3] {
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: 0;
|
|
69
|
+
right: 0;
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
height: 18px;
|
|
74
|
+
font-size: 12px;
|
|
75
|
+
line-height: 18px;
|
|
76
|
+
border-radius: 0 0 4px 4px;
|
|
77
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LabelTagItem } from '../typing';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
data: LabelTagItem;
|
|
4
|
+
};
|
|
5
|
+
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, {}, HTMLSpanElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import label_tag_vue_vue_type_script_setup_true_lang_default from "./label-tag.vue_vue_type_script_setup_true_lang.mjs";
|
|
3
|
+
import './label-tag.vue_vue_type_style_index_0_scoped_b25afce5_lang.css';/* empty css */
|
|
4
|
+
//#region src/components/collapse-detail/components/label-tag.vue
|
|
5
|
+
var label_tag_default = /* @__PURE__ */ _plugin_vue_export_helper_default(label_tag_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-b25afce5"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { label_tag_default as default };
|
package/es/components/collapse-detail/components/label-tag.vue_vue_type_script_setup_true_lang.mjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, toDisplayString, toRef, useCssVars } from "vue";
|
|
2
|
+
import { TagTypeEnum } from "@gct-paas/core";
|
|
3
|
+
//#region src/components/collapse-detail/components/label-tag.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var label_tag_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "label-tag",
|
|
6
|
+
props: { data: {} },
|
|
7
|
+
setup(__props) {
|
|
8
|
+
useCssVars((_ctx) => ({ "v218ac50d": tagStyleColor.value }));
|
|
9
|
+
const props = __props;
|
|
10
|
+
const showLabel = toRef(() => {
|
|
11
|
+
return props.data.label + "";
|
|
12
|
+
});
|
|
13
|
+
const tagType = toRef(() => {
|
|
14
|
+
return props.data.labelStyle || TagTypeEnum.RADIUS;
|
|
15
|
+
});
|
|
16
|
+
const tagStyleColor = toRef(() => {
|
|
17
|
+
return props.data.labelColor || "#026ac8";
|
|
18
|
+
});
|
|
19
|
+
const getTagClass = toRef(() => {
|
|
20
|
+
return `tag-${tagType.value}`;
|
|
21
|
+
});
|
|
22
|
+
const msgColor = toRef(() => {
|
|
23
|
+
return { color: props.data.valueColor || "#fff" };
|
|
24
|
+
});
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return openBlock(), createElementBlock("span", { class: normalizeClass(["tag label-ellipsis", getTagClass.value]) }, [createElementVNode("span", {
|
|
27
|
+
class: "select-text",
|
|
28
|
+
style: normalizeStyle(msgColor.value)
|
|
29
|
+
}, toDisplayString(showLabel.value || "\xA0"), 5)], 2);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
export { label_tag_vue_vue_type_script_setup_true_lang_default as default };
|