@gct-paas/render-mobile 0.1.5-dev.1 → 0.1.5-dev.3

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 (55) hide show
  1. package/dist/index.min.css +2 -0
  2. package/dist/loader.esm.min.js +1 -1
  3. package/es/_virtual/_plugin-vue_export-helper.mjs +8 -0
  4. package/es/components/form-component/FieldCheckbox.d.ts +36 -0
  5. package/es/components/form-component/FieldCheckbox.mjs +74 -0
  6. package/es/components/form-component/FieldRadio.d.ts +37 -0
  7. package/es/components/form-component/FieldRadio.mjs +73 -0
  8. package/es/components/form-component/FieldSelect.d.ts +110 -0
  9. package/es/components/form-component/FieldSelect.mjs +170 -0
  10. package/es/components/form-component/index.css +32 -0
  11. package/es/components/form-component/index.d.ts +5 -0
  12. package/es/components/form-component/index.mjs +4 -0
  13. package/es/components/form-component/tag-label.vue.d.ts +26 -0
  14. package/es/components/form-component/tag-label.vue.mjs +7 -0
  15. package/es/components/form-component/tag-label.vue_vue_type_script_setup_true_lang.mjs +135 -0
  16. package/es/components/form-component/tag-label.vue_vue_type_style_index_0_scoped_42ed8aa7_lang.css +18 -0
  17. package/es/components/form-component/tag-span.vue.d.ts +21 -0
  18. package/es/components/form-component/tag-span.vue.mjs +7 -0
  19. package/es/components/form-component/tag-span.vue_vue_type_script_setup_true_lang.mjs +25 -0
  20. package/es/components/form-component/tag-span.vue_vue_type_style_index_0_scoped_1f0f2305_lang.css +31 -0
  21. package/es/components/index.d.ts +3 -0
  22. package/es/components/index.mjs +8 -0
  23. package/es/components/timePicker/index.d.ts +4 -0
  24. package/es/components/timePicker/index.mjs +34 -0
  25. package/es/components/timePicker/src/timePicker.vue.d.ts +4 -0
  26. package/es/components/timePicker/src/timePicker.vue.mjs +5 -0
  27. package/es/components/timePicker/src/timePicker.vue_vue_type_script_setup_true_name_timePicker_lang.mjs +82 -0
  28. package/es/components/timePicker/src/typing.d.ts +13 -0
  29. package/es/components/timePicker/src/typing.mjs +1 -0
  30. package/es/components/treePopup/index.d.ts +5 -0
  31. package/es/components/treePopup/index.mjs +35 -0
  32. package/es/components/treePopup/src/components/selectList.vue.d.ts +11 -0
  33. package/es/components/treePopup/src/components/selectList.vue.mjs +7 -0
  34. package/es/components/treePopup/src/components/selectList.vue_vue_type_script_setup_true_name_selectList_lang.mjs +62 -0
  35. package/es/components/treePopup/src/components/selectList.vue_vue_type_style_index_0_scoped_04a58132_lang.css +10 -0
  36. package/es/components/treePopup/src/components/treeItem.vue.d.ts +12 -0
  37. package/es/components/treePopup/src/components/treeItem.vue.mjs +7 -0
  38. package/es/components/treePopup/src/components/treeItem.vue_vue_type_script_setup_true_name_treeItem_lang.mjs +70 -0
  39. package/es/components/treePopup/src/components/treeItem.vue_vue_type_style_index_0_scoped_950c3131_lang.css +17 -0
  40. package/es/components/treePopup/src/components/treeList.vue.d.ts +19 -0
  41. package/es/components/treePopup/src/components/treeList.vue.mjs +7 -0
  42. package/es/components/treePopup/src/components/treeList.vue_vue_type_script_setup_true_name_treelist_lang.mjs +61 -0
  43. package/es/components/treePopup/src/components/treeList.vue_vue_type_style_index_0_scoped_469e28be_lang.css +20 -0
  44. package/es/components/treePopup/src/treeCheck.vue.d.ts +71 -0
  45. package/es/components/treePopup/src/treeCheck.vue.mjs +7 -0
  46. package/es/components/treePopup/src/treeCheck.vue_vue_type_script_setup_true_lang.mjs +276 -0
  47. package/es/components/treePopup/src/treeCheck.vue_vue_type_style_index_0_scoped_00b864e8_lang.css +29 -0
  48. package/es/components/treePopup/src/treePopup.vue.d.ts +103 -0
  49. package/es/components/treePopup/src/treePopup.vue.mjs +6 -0
  50. package/es/components/treePopup/src/treePopup.vue_vue_type_script_setup_true_name_treePopup_lang.mjs +129 -0
  51. package/es/components/treePopup/src/treePopup.vue_vue_type_style_index_0_lang.css +7 -0
  52. package/es/components/treePopup/src/typing.d.ts +53 -0
  53. package/es/components/treePopup/src/typing.mjs +13 -0
  54. package/es/index.mjs +8 -1
  55. package/package.json +20 -18
@@ -0,0 +1,170 @@
1
+ import tag_label_default from "./tag-label.vue.mjs";
2
+ import { Fragment, computed, createVNode, defineComponent, inject } from "vue";
3
+ import { Cell, Picker, Popup } from "vant";
4
+ import { EntityModelTypeEnum, FIELD_TYPE } from "@gct-paas/core";
5
+ //#region src/components/form-component/FieldSelect.tsx
6
+ var FieldSelect_default = /* @__PURE__ */ defineComponent({
7
+ name: "FieldSelect",
8
+ props: {
9
+ design: Boolean,
10
+ disabled: Boolean,
11
+ readonly: Boolean,
12
+ showPop: Boolean,
13
+ fieldType: {
14
+ type: String,
15
+ required: true
16
+ },
17
+ type: {
18
+ type: Object,
19
+ required: true
20
+ },
21
+ tagStyle: {
22
+ type: Object,
23
+ required: true
24
+ },
25
+ isLinkageMode: { type: Boolean },
26
+ options: Array,
27
+ value: [
28
+ String,
29
+ Number,
30
+ Boolean
31
+ ],
32
+ multiple: {
33
+ type: Boolean,
34
+ default: false
35
+ },
36
+ placeholder: {
37
+ type: String,
38
+ default: "请选择"
39
+ },
40
+ refModelType: {
41
+ type: String,
42
+ default: ""
43
+ },
44
+ useSwitchComp: {
45
+ type: Boolean,
46
+ default: false
47
+ },
48
+ maxTagTextLength: {
49
+ type: Number,
50
+ default: 12
51
+ }
52
+ },
53
+ slots: Object,
54
+ setup(props, { emit, slots: slotList }) {
55
+ const layout = inject("form-layout", {});
56
+ const options = computed(() => {
57
+ return (props.options ?? []).map((item) => {
58
+ return { ...item };
59
+ });
60
+ });
61
+ function getLabels(item) {
62
+ const arr = item._item?.full_path_.split("/") || [];
63
+ return (props.options ?? []).filter((i) => arr.includes(i.value)).map((val) => val.label).join("/");
64
+ }
65
+ const selectInfo = computed(() => {
66
+ return options.value?.filter((item) => {
67
+ if (props.multiple) return props.value?.includes(item.value);
68
+ return props.value === item.value;
69
+ }) ?? [];
70
+ });
71
+ const slots = { value: () => {
72
+ if (props.value?.length || ["boolean", "enum"].includes(props.fieldType) && !(props.value === void 0 || props.value === "")) {
73
+ const iconExts = {};
74
+ const avatarProps = {};
75
+ const labelArr = [];
76
+ selectInfo.value.forEach((e) => {
77
+ const label = handleLabel(e.label);
78
+ const { icon, iconColor, textColor } = e._item || {};
79
+ iconExts[label] = {
80
+ icon,
81
+ iconColor,
82
+ textColor
83
+ };
84
+ if (props.fieldType === FIELD_TYPE.USER_MULTI || props.fieldType === FIELD_TYPE.USER) avatarProps[label] = { avatar: e._item?.avatar };
85
+ labelArr.push(props.refModelType === EntityModelTypeEnum.TREE && !props.isLinkageMode ? getLabels(e) : label);
86
+ });
87
+ return createVNode(tag_label_default, {
88
+ "class": "mr-4px",
89
+ "tagWidgetStyle": props.tagStyle,
90
+ "type": props.fieldType,
91
+ "label": labelArr,
92
+ "disabled": props.disabled,
93
+ "iconExtraProps": iconExts,
94
+ "avatarProps": avatarProps
95
+ }, null);
96
+ } else return createVNode(tag_label_default, {
97
+ "type": props.fieldType,
98
+ "disabled": props.disabled,
99
+ "label": !props.readonly ? props.placeholder : "",
100
+ "style": {
101
+ color: "var(--van-gray-5)",
102
+ paddingRight: layout?.value?.inputBg ? "12px" : "",
103
+ fontSize: "14px"
104
+ }
105
+ }, null);
106
+ } };
107
+ const pickerSlots = { option: (option) => {
108
+ return createVNode(tag_label_default, {
109
+ "tagWidgetStyle": props.tagStyle,
110
+ "type": props.fieldType,
111
+ "label": option.label,
112
+ "disabled": props.disabled,
113
+ "showTagStyle": false
114
+ }, null);
115
+ } };
116
+ const onConfirm = ({ selectedOptions }) => {
117
+ emit("confirm", selectedOptions[0].value);
118
+ emit("update:value", selectedOptions[0].value);
119
+ emit("update:showPop", false);
120
+ };
121
+ const onCancel = () => {
122
+ emit("update:showPop", false);
123
+ };
124
+ const onChecked = (value) => {
125
+ emit("update:value", value.value);
126
+ emit("checked", value.value);
127
+ emit("update:showPop", false);
128
+ };
129
+ const handleLabel = (label) => {
130
+ if (props.readonly) return label;
131
+ if (label.length > props.maxTagTextLength) return label.slice(0, props.maxTagTextLength) + "...";
132
+ return label;
133
+ };
134
+ return () => {
135
+ return createVNode(Fragment, null, [createVNode(Cell, {
136
+ "class": "app-tag-cell-box",
137
+ "is-link": !props.readonly,
138
+ "border": false,
139
+ "style": {
140
+ padding: 0,
141
+ background: "transparent"
142
+ }
143
+ }, slots), createVNode(Popup, {
144
+ "show": props.showPop,
145
+ "onUpdate:show": ($event) => props.showPop = $event,
146
+ "position": "bottom",
147
+ "round": true,
148
+ "teleport": "body",
149
+ "onClickOverlay": onCancel,
150
+ "style": props.useSwitchComp ? { height: "60%" } : {}
151
+ }, { default: () => [props.useSwitchComp ? props.showPop ? slotList.optionList?.({
152
+ stype: "single",
153
+ fieldType: FIELD_TYPE.REF,
154
+ activeKey: props.value ?? "",
155
+ title: "请选择",
156
+ onChecked
157
+ }) : null : createVNode(Picker, {
158
+ "columns": props.options || [],
159
+ "columnsFieldNames": {
160
+ text: "label",
161
+ value: "value"
162
+ },
163
+ "onConfirm": onConfirm,
164
+ "onCancel": onCancel
165
+ }, pickerSlots)] })]);
166
+ };
167
+ }
168
+ });
169
+ //#endregion
170
+ export { FieldSelect_default as default };
@@ -0,0 +1,32 @@
1
+ .van-radio-group.mobile-field-radio-group .van-radio.van-radio--disabled .van-radio__icon.van-radio__icon--disabled {
2
+ background: #f5f5f5;
3
+ border: 1px solid #d9d9d9 !important;
4
+ }
5
+ .van-radio-group.mobile-field-radio-group .van-radio.van-radio--disabled .van-radio__label.van-radio__label--disabled {
6
+ color: #BFBFBF;
7
+ }
8
+ .van-radio-group.mobile-field-radio-group--readonly {
9
+ pointer-events: none;
10
+ }
11
+ .van-radio-group.mobile-field-radio-group--readonly .van-radio .van-radio__label {
12
+ color: #666;
13
+ }
14
+ .van-checkbox-group.mobile-field-checkbox-group .van-checkbox.van-checkbox--disabled .van-checkbox__icon.van-checkbox__icon--disabled .van-icon {
15
+ background: #f5f5f5;
16
+ border: 1px solid #d9d9d9 !important;
17
+ }
18
+ .van-checkbox-group.mobile-field-checkbox-group .van-checkbox.van-checkbox--disabled .van-checkbox__label.van-checkbox__label--disabled {
19
+ color: #BFBFBF;
20
+ }
21
+ .van-checkbox-group.mobile-field-checkbox-group--readonly {
22
+ pointer-events: none;
23
+ }
24
+ .van-checkbox-group.mobile-field-checkbox-group--readonly .van-checkbox .van-checkbox__label {
25
+ color: #666;
26
+ }
27
+ .van-radio {
28
+ flex-shrink: 0;
29
+ }
30
+ .van-radio-group--horizontal {
31
+ flex-wrap: nowrap !important;
32
+ }
@@ -0,0 +1,5 @@
1
+ import { default as FieldSelect } from './FieldSelect';
2
+ import { default as FieldRadio } from './FieldRadio';
3
+ import { default as FieldCheckbox } from './FieldCheckbox';
4
+ import { default as TagLabel } from './tag-label.vue';
5
+ export { FieldSelect, FieldRadio, FieldCheckbox, TagLabel as Taglabel };
@@ -0,0 +1,4 @@
1
+ import "./tag-label.vue.mjs";
2
+ import "./FieldSelect.mjs";
3
+ import "./FieldRadio.mjs";
4
+ import "./FieldCheckbox.mjs";
@@ -0,0 +1,26 @@
1
+ import { FIELD_TYPE } from '@gct-paas/core';
2
+ export interface Props {
3
+ tagWidgetStyle?: IObject;
4
+ type?: FIELD_TYPE | undefined;
5
+ disabled?: boolean;
6
+ label?: string | (string | number)[];
7
+ isDesign?: boolean;
8
+ /** 外部控制是否显示标签样式 */
9
+ showTagStyle?: boolean;
10
+ iconExtraProps?: Record<string, {
11
+ icon: string;
12
+ iconColor: string;
13
+ textColor: string;
14
+ }>;
15
+ avatarProps?: Record<string, {
16
+ avatar: string;
17
+ }>;
18
+ }
19
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ "on-close": (...args: any[]) => void;
21
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
22
+ "onOn-close"?: ((...args: any[]) => any) | undefined;
23
+ }>, {
24
+ showTagStyle: boolean;
25
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
26
+ 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_42ed8aa7_lang.css';/* empty css */
4
+ //#region src/components/form-component/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-42ed8aa7"]]);
6
+ //#endregion
7
+ export { tag_label_default as default };
@@ -0,0 +1,135 @@
1
+ import tag_span_default from "./tag-span.vue.mjs";
2
+ import { schemaToStyle } from "@gct-paas/render";
3
+ import { Fragment, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, h, inject, normalizeClass, normalizeStyle, openBlock, renderList, resolveComponent, toDisplayString, toRef, unref, withCtx } from "vue";
4
+ import { isString } from "lodash-es";
5
+ import { FIELD_TYPE } from "@gct-paas/core";
6
+ //#region src/components/form-component/tag-label.vue?vue&type=script&setup=true&lang.ts
7
+ var _hoisted_1 = {
8
+ key: 0,
9
+ class: "gct-iconfont icon-ziduan-bumen primary-gct"
10
+ };
11
+ var _hoisted_2 = ["src"];
12
+ var tag_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
13
+ __name: "tag-label",
14
+ props: {
15
+ tagWidgetStyle: {},
16
+ type: {},
17
+ disabled: { type: Boolean },
18
+ label: {},
19
+ isDesign: { type: Boolean },
20
+ showTagStyle: {
21
+ type: Boolean,
22
+ default: true
23
+ },
24
+ iconExtraProps: {},
25
+ avatarProps: {}
26
+ },
27
+ emits: ["on-close"],
28
+ setup(__props) {
29
+ const props = __props;
30
+ const labelLayout = inject("labelLayout", {});
31
+ const showLabel = toRef(() => {
32
+ let showMsg = props.label ?? "";
33
+ if (props.showTagStyle && props.tagWidgetStyle?.tagStyleOpen || props.type === FIELD_TYPE.ENUM_MULTI || props.type === FIELD_TYPE.ENUM) return showMsg ? isString(showMsg) ? [showMsg] : showMsg : [];
34
+ else if ([
35
+ FIELD_TYPE.ORG_MULTI,
36
+ FIELD_TYPE.ORG,
37
+ FIELD_TYPE.USER,
38
+ FIELD_TYPE.USER_MULTI
39
+ ].includes(props.type)) return showMsg ? isString(showMsg) ? [showMsg] : showMsg : [];
40
+ else return showMsg + "";
41
+ });
42
+ const comStyle = toRef(() => {
43
+ const contentFont = props.tagWidgetStyle?.contentFont;
44
+ if (!contentFont) return {};
45
+ return schemaToStyle(contentFont);
46
+ });
47
+ const getMsgColor = (key) => {
48
+ const iconAttrs = props.iconExtraProps?.[key] || {};
49
+ const color = {};
50
+ Object.assign(color, { color: iconAttrs?.textColor || "#000000" });
51
+ if (comStyle.value?.color) return comStyle.value;
52
+ return {
53
+ wordBreak: "break-all",
54
+ ...comStyle.value,
55
+ ...color
56
+ };
57
+ };
58
+ const iconNode = { render: ({ $attrs }) => {
59
+ if ($attrs.labelName) {
60
+ const iconAttrs = props.iconExtraProps?.[$attrs.labelName] || {};
61
+ if (!iconAttrs?.icon) return;
62
+ return h(resolveComponent("icon-next"), {
63
+ size: 16,
64
+ value: iconAttrs?.icon,
65
+ color: iconAttrs?.iconColor,
66
+ style: "vertical-align: text-bottom; margin-right: 4px"
67
+ });
68
+ }
69
+ } };
70
+ const getAvatar = (key) => {
71
+ const avatarAttrs = props.avatarProps?.[key] || {};
72
+ return avatarAttrs?.avatar ? `/minio/${avatarAttrs.avatar}` : "";
73
+ };
74
+ return (_ctx, _cache) => {
75
+ return __props.showTagStyle && __props.tagWidgetStyle?.tagStyleOpen ? (openBlock(), createElementBlock("div", {
76
+ key: 0,
77
+ class: normalizeClass([__props.disabled ? "tag-label-disabled" : null, !!unref(labelLayout)?.hasLabelWidth && unref(labelLayout)?.layout.label === "left" ? unref(labelLayout)?.overLabelDisplay == "ellipsis" ? "label-ellipsis" : "label-wrap" : ""])
78
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(showLabel.value, (i, index) => {
79
+ return openBlock(), createBlock(tag_span_default, {
80
+ key: index,
81
+ "tag-style": __props.tagWidgetStyle.tagStyle,
82
+ style: normalizeStyle(getMsgColor(i))
83
+ }, {
84
+ default: withCtx(() => [createVNode(iconNode, { "label-name": i }, null, 8, ["label-name"]), createElementVNode("span", null, toDisplayString(i), 1)]),
85
+ _: 2
86
+ }, 1032, ["tag-style", "style"]);
87
+ }), 128))], 2)) : __props.type === unref(FIELD_TYPE).ENUM_MULTI || __props.type === unref(FIELD_TYPE).ENUM ? (openBlock(), createElementBlock("div", {
88
+ key: 1,
89
+ class: normalizeClass([
90
+ __props.disabled ? "tag-label-disabled" : null,
91
+ "tag-text",
92
+ !!unref(labelLayout)?.hasLabelWidth && unref(labelLayout)?.layout.label === "left" ? unref(labelLayout)?.overLabelDisplay == "ellipsis" ? "label-ellipsis" : "label-wrap" : ""
93
+ ])
94
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(showLabel.value, (i, index) => {
95
+ return openBlock(), createElementBlock("span", {
96
+ key: index,
97
+ style: normalizeStyle(getMsgColor(i)),
98
+ class: "mr-5px"
99
+ }, [createVNode(iconNode, { "label-name": i }, null, 8, ["label-name"]), createElementVNode("span", null, toDisplayString(i) + toDisplayString(!__props.tagWidgetStyle?.tagStyleOpen && index < showLabel.value.length - 1 ? "," : ""), 1)], 4);
100
+ }), 128))], 2)) : [
101
+ unref(FIELD_TYPE).ORG_MULTI,
102
+ unref(FIELD_TYPE).ORG,
103
+ unref(FIELD_TYPE).USER,
104
+ unref(FIELD_TYPE).USER_MULTI
105
+ ].includes(__props.type) ? (openBlock(), createElementBlock("div", {
106
+ key: 2,
107
+ class: normalizeClass([
108
+ __props.disabled ? "tag-label-disabled" : null,
109
+ "tag-text",
110
+ !!unref(labelLayout)?.hasLabelWidth && unref(labelLayout)?.layout.label === "left" ? unref(labelLayout)?.overLabelDisplay == "ellipsis" ? "label-ellipsis" : "label-wrap" : ""
111
+ ])
112
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(showLabel.value, (i, index) => {
113
+ return openBlock(), createElementBlock("span", {
114
+ key: index,
115
+ style: normalizeStyle(getMsgColor(i)),
116
+ class: "mr-5px"
117
+ }, [__props.type === unref(FIELD_TYPE).ORG_MULTI || __props.type === unref(FIELD_TYPE).ORG ? (openBlock(), createElementBlock("span", _hoisted_1)) : (openBlock(), createElementBlock("img", {
118
+ key: 1,
119
+ class: "user-avatar mr4px",
120
+ src: getAvatar(i)
121
+ }, null, 8, _hoisted_2)), createElementVNode("span", null, toDisplayString(i) + toDisplayString(!__props.tagWidgetStyle?.tagStyleOpen && index < showLabel.value.length - 1 ? "," : ""), 1)], 4);
122
+ }), 128))], 2)) : (openBlock(), createElementBlock("div", {
123
+ key: 3,
124
+ style: normalizeStyle(getMsgColor(showLabel.value)),
125
+ class: normalizeClass([
126
+ __props.disabled ? "tag-label-disabled" : null,
127
+ "text-[#000000]",
128
+ !!unref(labelLayout)?.hasLabelWidth && unref(labelLayout)?.layout.label === "left" ? unref(labelLayout)?.overLabelDisplay == "ellipsis" ? "label-ellipsis" : "label-wrap" : ""
129
+ ])
130
+ }, toDisplayString(showLabel.value), 7));
131
+ };
132
+ }
133
+ });
134
+ //#endregion
135
+ export { tag_label_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,18 @@
1
+ .tag-label-disabled[data-v-42ed8aa7] {
2
+ color: var(--van-field-input-disabled-text-color) !important;
3
+ }
4
+ .label-ellipsis[data-v-42ed8aa7] {
5
+ overflow: hidden;
6
+ text-overflow: ellipsis;
7
+ white-space: nowrap;
8
+ }
9
+ .label-wrap[data-v-42ed8aa7] {
10
+ word-break: break-all;
11
+ white-space: wrap;
12
+ }
13
+ .user-avatar[data-v-42ed8aa7] {
14
+ width: 16px;
15
+ height: 16px;
16
+ border-radius: 50%;
17
+ vertical-align: middle;
18
+ }
@@ -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: HTMLDivElement;
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, {}, HTMLDivElement>;
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_1f0f2305_lang.css';/* empty css */
3
+ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ //#region src/components/form-component/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-1f0f2305"]]);
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/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) => ({ "v4f612305": 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("div", { 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-1f0f2305] {
2
+ padding: 4px 6px;
3
+ line-height: 1;
4
+ }
5
+ .tag + .tag[data-v-1f0f2305] {
6
+ margin-left: 5px;
7
+ }
8
+ .tag-radius[data-v-1f0f2305] {
9
+ border-radius: 4px;
10
+ background: var(--v4f612305);
11
+ }
12
+ .tag-linear_radius[data-v-1f0f2305] {
13
+ border: 1px solid var(--v4f612305);
14
+ border-radius: 4px;
15
+ }
16
+ .tag-big_radius[data-v-1f0f2305] {
17
+ border-radius: 100px;
18
+ background: var(--v4f612305);
19
+ }
20
+ .tag-linear_big_radius[data-v-1f0f2305] {
21
+ border: 1px solid var(--v4f612305);
22
+ border-radius: 100px;
23
+ }
24
+ .tag-dashed_radius[data-v-1f0f2305] {
25
+ border: 1px dashed var(--v4f612305);
26
+ border-radius: 4px;
27
+ }
28
+ .tag-status[data-v-1f0f2305] {
29
+ border-radius: 14px 4px 4px;
30
+ background: var(--v4f612305);
31
+ }
@@ -1 +1,4 @@
1
1
  export * from './numKeyboard';
2
+ export * from './form-component';
3
+ export * from './treePopup';
4
+ export * from './timePicker';
@@ -1 +1,9 @@
1
1
  import "./numKeyboard/index.mjs";
2
+ import "./form-component/tag-label.vue.mjs";
3
+ import "./form-component/FieldSelect.mjs";
4
+ import "./form-component/FieldRadio.mjs";
5
+ import "./form-component/FieldCheckbox.mjs";
6
+ import "./form-component/index.mjs";
7
+ import "./treePopup/src/typing.mjs";
8
+ import "./treePopup/index.mjs";
9
+ import "./timePicker/index.mjs";
@@ -0,0 +1,4 @@
1
+ import { openTimePickerType } from './src/typing';
2
+ export declare function createTimePicker(options: IObject): {
3
+ openTimePicker: ({ val, columnsType, minTime, maxTime, callback, formatter, filter, }: openTimePickerType) => void;
4
+ } | undefined;
@@ -0,0 +1,34 @@
1
+ import "./src/typing.mjs";
2
+ import timePicker_default from "./src/timePicker.vue.mjs";
3
+ import { createVNode, render } from "vue";
4
+ import { isClient } from "@gct-paas/core-mobile";
5
+ //#region src/components/timePicker/index.ts
6
+ var instance = null;
7
+ function createTimePicker(options) {
8
+ if (!isClient) return;
9
+ const propsData = {};
10
+ let popupRef;
11
+ const container = document.createElement("div");
12
+ Object.assign(propsData, options);
13
+ function readyModal() {
14
+ instance = createVNode(timePicker_default, propsData);
15
+ render(instance, container);
16
+ document.body.appendChild(container);
17
+ popupRef = instance.component?.exposed;
18
+ }
19
+ function openTimePicker({ val, columnsType, minTime, maxTime, callback, formatter, filter }) {
20
+ readyModal();
21
+ popupRef?.openTimePickerOpen({
22
+ val,
23
+ columnsType,
24
+ minTime,
25
+ maxTime,
26
+ callback,
27
+ formatter,
28
+ filter
29
+ });
30
+ }
31
+ return { openTimePicker };
32
+ }
33
+ //#endregion
34
+ export { createTimePicker };
@@ -0,0 +1,4 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {
2
+ openTimePickerOpen: ({ val, columnsType, minTime, maxTime, callback, formatter, filter, }: IObject) => void;
3
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
4
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import timePicker_vue_vue_type_script_setup_true_name_timePicker_lang_default from "./timePicker.vue_vue_type_script_setup_true_name_timePicker_lang.mjs";
2
+ //#region src/components/timePicker/src/timePicker.vue
3
+ var timePicker_default = timePicker_vue_vue_type_script_setup_true_name_timePicker_lang_default;
4
+ //#endregion
5
+ export { timePicker_default as default };
@@ -0,0 +1,82 @@
1
+ import "./typing.mjs";
2
+ import { createBlock, createCommentVNode, defineComponent, nextTick, openBlock, ref, resolveComponent, withCtx } from "vue";
3
+ //#region src/components/timePicker/src/timePicker.vue?vue&type=script&setup=true&name=timePicker&lang.ts
4
+ var timePicker_vue_vue_type_script_setup_true_name_timePicker_lang_default = /* @__PURE__ */ defineComponent({
5
+ __name: "timePicker",
6
+ setup(__props, { expose: __expose }) {
7
+ const value = ref([]);
8
+ const isShow = ref(false);
9
+ const timeType = ref([
10
+ "hour",
11
+ "minute",
12
+ "second"
13
+ ]);
14
+ const MIN = ref();
15
+ const MAX = ref();
16
+ const formatterFn = ref();
17
+ const filterFn = ref();
18
+ let handleOk;
19
+ const openTimePickerOpen = ({ val, columnsType, minTime, maxTime, callback, formatter, filter }) => {
20
+ value.value = val;
21
+ isShow.value = true;
22
+ timeType.value = columnsType || [
23
+ "hour",
24
+ "minute",
25
+ "second"
26
+ ];
27
+ MIN.value = minTime || "";
28
+ MAX.value = maxTime || "";
29
+ handleOk = callback;
30
+ formatterFn.value = formatter;
31
+ filterFn.value = filter;
32
+ };
33
+ const confirm = async () => {
34
+ await nextTick();
35
+ handleOk && handleOk(value.value);
36
+ isShow.value = false;
37
+ };
38
+ const cancel = () => {
39
+ isShow.value = false;
40
+ };
41
+ __expose({ openTimePickerOpen });
42
+ return (_ctx, _cache) => {
43
+ const _component_van_time_picker = resolveComponent("van-time-picker");
44
+ const _component_van_popup = resolveComponent("van-popup");
45
+ return openBlock(), createBlock(_component_van_popup, {
46
+ show: isShow.value,
47
+ "onUpdate:show": _cache[1] || (_cache[1] = ($event) => isShow.value = $event),
48
+ position: "bottom",
49
+ closeable: false,
50
+ style: {
51
+ height: "50%",
52
+ overflow: "hidden"
53
+ },
54
+ round: ""
55
+ }, {
56
+ default: withCtx(() => [isShow.value ? (openBlock(), createBlock(_component_van_time_picker, {
57
+ key: 0,
58
+ modelValue: value.value,
59
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
60
+ title: "选择时间",
61
+ "columns-type": timeType.value,
62
+ formatter: formatterFn.value,
63
+ filter: filterFn.value,
64
+ "min-time": MIN.value,
65
+ "max-time": MAX.value,
66
+ onConfirm: confirm,
67
+ onCancel: cancel
68
+ }, null, 8, [
69
+ "modelValue",
70
+ "columns-type",
71
+ "formatter",
72
+ "filter",
73
+ "min-time",
74
+ "max-time"
75
+ ])) : createCommentVNode("", true)]),
76
+ _: 1
77
+ }, 8, ["show"]);
78
+ };
79
+ }
80
+ });
81
+ //#endregion
82
+ export { timePicker_vue_vue_type_script_setup_true_name_timePicker_lang_default as default };
@@ -0,0 +1,13 @@
1
+ import { TimePickerColumnType } from 'vant';
2
+ export interface openTimePickerType {
3
+ val: string[];
4
+ columnsType?: TimePickerColumnType[];
5
+ minTime?: string;
6
+ maxTime?: string;
7
+ callback: openPickerCallback;
8
+ /**对选项的文字进行格式化 */
9
+ formatter?: () => void;
10
+ /**对选项数组进行过滤 */
11
+ filter?: () => void;
12
+ }
13
+ export type openPickerCallback = (value: string[]) => void;
@@ -0,0 +1 @@
1
+ import "vant";