@gct-paas/design-mobile 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.
- package/dist/index.min.css +2 -0
- package/dist/loader.esm.min.js +1 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +8 -0
- package/es/components/form-component/FieldCheckbox.d.ts +36 -0
- package/es/components/form-component/FieldCheckbox.mjs +73 -0
- package/es/components/form-component/FieldRadio.d.ts +36 -0
- package/es/components/form-component/FieldRadio.mjs +72 -0
- package/es/components/form-component/FieldSelect.d.ts +102 -0
- package/es/components/form-component/FieldSelect.mjs +177 -0
- package/es/components/form-component/index.d.ts +6 -0
- package/es/components/form-component/index.mjs +5 -0
- package/es/components/form-component/optionList.vue.d.ts +30 -0
- package/es/components/form-component/optionList.vue.mjs +7 -0
- package/es/components/form-component/optionList.vue_vue_type_script_setup_true_lang.mjs +277 -0
- package/es/components/form-component/optionList.vue_vue_type_style_index_0_scoped_d6c8e197_lang.css +76 -0
- package/es/components/form-component/tag-label.vue.d.ts +26 -0
- package/es/components/form-component/tag-label.vue.mjs +7 -0
- package/es/components/form-component/tag-label.vue_vue_type_script_setup_true_lang.mjs +127 -0
- package/es/components/form-component/tag-label.vue_vue_type_style_index_0_scoped_10bd7861_lang.css +18 -0
- package/es/components/form-component/tag-span.vue.d.ts +21 -0
- package/es/components/form-component/tag-span.vue.mjs +7 -0
- package/es/components/form-component/tag-span.vue_vue_type_script_setup_true_lang.mjs +25 -0
- package/es/components/form-component/tag-span.vue_vue_type_style_index_0_scoped_1f0f2305_lang.css +31 -0
- package/es/components/form-component/typing.d.ts +12 -0
- package/es/components/form-component/typing.mjs +8 -0
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +6 -0
- package/es/index.d.ts +1 -0
- package/es/index.mjs +10 -3
- package/es/loader.d.ts +1 -0
- package/es/types/index.d.ts +2 -0
- package/package.json +17 -15
- package/dist/index.esm.min.mjs +0 -6
- package/dist/index.min.cjs +0 -1
- package/dist/index.system.min.js +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import tag_span_default from "./tag-span.vue.mjs";
|
|
2
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, h, inject, normalizeClass, normalizeStyle, openBlock, renderList, resolveComponent, toDisplayString, toRef, unref, withCtx } from "vue";
|
|
3
|
+
import { FIELD_TYPE } from "@gct-paas/core";
|
|
4
|
+
import { schemaToStyle, transformField2Component } from "@gct-paas/design";
|
|
5
|
+
import { isString } from "lodash-es";
|
|
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 tag_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "tag-label",
|
|
13
|
+
props: {
|
|
14
|
+
tagWidgetStyle: {},
|
|
15
|
+
type: {},
|
|
16
|
+
disabled: { type: Boolean },
|
|
17
|
+
label: {},
|
|
18
|
+
isDesign: { type: Boolean },
|
|
19
|
+
showTagStyle: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: true
|
|
22
|
+
},
|
|
23
|
+
iconExtraProps: {},
|
|
24
|
+
avatarProps: {}
|
|
25
|
+
},
|
|
26
|
+
emits: ["on-close"],
|
|
27
|
+
setup(__props) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const labelLayout = inject("labelLayout", {});
|
|
30
|
+
const showLabel = toRef(() => {
|
|
31
|
+
let showMsg = props.label ?? "";
|
|
32
|
+
if ((!showMsg || showMsg.length <= 0) && props.isDesign) showMsg = props.type ? transformField2Component(props.type)?.example || "" : "";
|
|
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
|
+
return (_ctx, _cache) => {
|
|
71
|
+
return __props.showTagStyle && __props.tagWidgetStyle?.tagStyleOpen ? (openBlock(), createElementBlock("div", {
|
|
72
|
+
key: 0,
|
|
73
|
+
class: normalizeClass([__props.disabled ? "tag-label-disabled" : null, !!unref(labelLayout)?.hasLabelWidth && unref(labelLayout)?.layout.label === "left" ? unref(labelLayout)?.overLabelDisplay == "ellipsis" ? "label-ellipsis" : "label-wrap" : ""])
|
|
74
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(showLabel.value, (i, index) => {
|
|
75
|
+
return openBlock(), createBlock(tag_span_default, {
|
|
76
|
+
key: index,
|
|
77
|
+
"tag-style": __props.tagWidgetStyle.tagStyle,
|
|
78
|
+
style: normalizeStyle(getMsgColor(i))
|
|
79
|
+
}, {
|
|
80
|
+
default: withCtx(() => [createVNode(iconNode, { "label-name": i }, null, 8, ["label-name"]), createElementVNode("span", null, toDisplayString(i), 1)]),
|
|
81
|
+
_: 2
|
|
82
|
+
}, 1032, ["tag-style", "style"]);
|
|
83
|
+
}), 128))], 2)) : __props.type === unref(FIELD_TYPE).ENUM_MULTI || __props.type === unref(FIELD_TYPE).ENUM ? (openBlock(), createElementBlock("div", {
|
|
84
|
+
key: 1,
|
|
85
|
+
class: normalizeClass([
|
|
86
|
+
__props.disabled ? "tag-label-disabled" : null,
|
|
87
|
+
"tag-text",
|
|
88
|
+
!!unref(labelLayout)?.hasLabelWidth && unref(labelLayout)?.layout.label === "left" ? unref(labelLayout)?.overLabelDisplay == "ellipsis" ? "label-ellipsis" : "label-wrap" : ""
|
|
89
|
+
])
|
|
90
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(showLabel.value, (i, index) => {
|
|
91
|
+
return openBlock(), createElementBlock("span", {
|
|
92
|
+
key: index,
|
|
93
|
+
style: normalizeStyle(getMsgColor(i)),
|
|
94
|
+
class: "mr-5px"
|
|
95
|
+
}, [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);
|
|
96
|
+
}), 128))], 2)) : [
|
|
97
|
+
unref(FIELD_TYPE).ORG_MULTI,
|
|
98
|
+
unref(FIELD_TYPE).ORG,
|
|
99
|
+
unref(FIELD_TYPE).USER,
|
|
100
|
+
unref(FIELD_TYPE).USER_MULTI
|
|
101
|
+
].includes(__props.type) ? (openBlock(), createElementBlock("div", {
|
|
102
|
+
key: 2,
|
|
103
|
+
class: normalizeClass([
|
|
104
|
+
__props.disabled ? "tag-label-disabled" : null,
|
|
105
|
+
"tag-text",
|
|
106
|
+
!!unref(labelLayout)?.hasLabelWidth && unref(labelLayout)?.layout.label === "left" ? unref(labelLayout)?.overLabelDisplay == "ellipsis" ? "label-ellipsis" : "label-wrap" : ""
|
|
107
|
+
])
|
|
108
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(showLabel.value, (i, index) => {
|
|
109
|
+
return openBlock(), createElementBlock("span", {
|
|
110
|
+
key: index,
|
|
111
|
+
style: normalizeStyle(getMsgColor(i)),
|
|
112
|
+
class: "mr-5px"
|
|
113
|
+
}, [__props.type === unref(FIELD_TYPE).ORG_MULTI || __props.type === unref(FIELD_TYPE).ORG ? (openBlock(), createElementBlock("span", _hoisted_1)) : createCommentVNode("", true), createElementVNode("span", null, toDisplayString(i) + " " + toDisplayString(!__props.tagWidgetStyle?.tagStyleOpen && index < showLabel.value.length - 1 ? "," : ""), 1)], 4);
|
|
114
|
+
}), 128))], 2)) : (openBlock(), createElementBlock("div", {
|
|
115
|
+
key: 3,
|
|
116
|
+
style: normalizeStyle(getMsgColor(showLabel.value)),
|
|
117
|
+
class: normalizeClass([
|
|
118
|
+
__props.disabled ? "tag-label-disabled" : null,
|
|
119
|
+
"text-[#000000]",
|
|
120
|
+
!!unref(labelLayout)?.hasLabelWidth && unref(labelLayout)?.layout.label === "left" ? unref(labelLayout)?.overLabelDisplay == "ellipsis" ? "label-ellipsis" : "label-wrap" : ""
|
|
121
|
+
])
|
|
122
|
+
}, toDisplayString(showLabel.value), 7));
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
//#endregion
|
|
127
|
+
export { tag_label_vue_vue_type_script_setup_true_lang_default as default };
|
package/es/components/form-component/tag-label.vue_vue_type_style_index_0_scoped_10bd7861_lang.css
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.tag-label-disabled[data-v-10bd7861] {
|
|
2
|
+
color: var(--van-field-input-disabled-text-color) !important;
|
|
3
|
+
}
|
|
4
|
+
.label-ellipsis[data-v-10bd7861] {
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
text-overflow: ellipsis;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
}
|
|
9
|
+
.label-wrap[data-v-10bd7861] {
|
|
10
|
+
word-break: break-all;
|
|
11
|
+
white-space: wrap;
|
|
12
|
+
}
|
|
13
|
+
.user-avatar[data-v-10bd7861] {
|
|
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 };
|
package/es/components/form-component/tag-span.vue_vue_type_style_index_0_scoped_1f0f2305_lang.css
ADDED
|
@@ -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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './form-component';
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import tag_label_default from "./components/form-component/tag-label.vue.mjs";
|
|
2
|
+
import { SelectType } from "./components/form-component/typing.mjs";
|
|
3
|
+
import FieldSelect_default from "./components/form-component/FieldSelect.mjs";
|
|
4
|
+
import FieldRadio_default from "./components/form-component/FieldRadio.mjs";
|
|
5
|
+
import FieldCheckbox_default from "./components/form-component/FieldCheckbox.mjs";
|
|
6
|
+
import "./components/index.mjs";
|
|
7
|
+
//#region src/index.ts
|
|
1
8
|
function run() {
|
|
2
|
-
|
|
9
|
+
console.log("Hello World!");
|
|
3
10
|
}
|
|
4
|
-
|
|
5
|
-
export { run };
|
|
11
|
+
//#endregion
|
|
12
|
+
export { FieldCheckbox_default as FieldCheckbox, FieldRadio_default as FieldRadio, FieldSelect_default as FieldSelect, SelectType, tag_label_default as Taglabel, run };
|
package/es/loader.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index';
|
package/es/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/design-mobile",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5-dev.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台设计界面移动端底包",
|
|
6
|
-
"
|
|
7
|
-
"module": "es/index.mjs",
|
|
6
|
+
"loader": "dist/loader.esm.min.js",
|
|
8
7
|
"types": "es/index.d.ts",
|
|
9
|
-
"system": "dist/index.system.min.js",
|
|
10
8
|
"exports": {
|
|
11
9
|
".": {
|
|
12
10
|
"types": "./es/index.d.ts",
|
|
13
|
-
"import": "./es/index.mjs"
|
|
14
|
-
|
|
11
|
+
"import": "./es/index.mjs"
|
|
12
|
+
},
|
|
13
|
+
"./types": {
|
|
14
|
+
"types": "./es/types/index.d.ts"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
@@ -42,16 +42,18 @@
|
|
|
42
42
|
"publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@gct-paas/core": "0.1.
|
|
46
|
-
"@gct-paas/core-mobile": "0.1.
|
|
47
|
-
"@gct-paas/design": "0.1.
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"@gct-paas/build": "^0.1.5-dev.8"
|
|
45
|
+
"@gct-paas/core": "0.1.5-dev.0",
|
|
46
|
+
"@gct-paas/core-mobile": "0.1.5-dev.0",
|
|
47
|
+
"@gct-paas/design": "0.1.5-dev.0",
|
|
48
|
+
"@gct-paas/schema": "0.1.5-dev.0",
|
|
49
|
+
"vant": "4.9.15",
|
|
50
|
+
"vue": "^3.5.30"
|
|
52
51
|
},
|
|
53
52
|
"peerDependencies": {
|
|
54
|
-
"
|
|
53
|
+
"@gct-paas/core": "*",
|
|
54
|
+
"@gct-paas/core-mobile": "*",
|
|
55
|
+
"@gct-paas/design": "*",
|
|
56
|
+
"vue": ">=3"
|
|
55
57
|
},
|
|
56
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "d5a1badfd34c55ceefd2cf33f2ee659454076e37"
|
|
57
59
|
}
|
package/dist/index.esm.min.mjs
DELETED
package/dist/index.min.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(){console.log("Hello World!")}exports.run=o;
|
package/dist/index.system.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register([],(function(e,o){"use strict";return{execute:(function(){e("run",n);function n(){console.log("Hello World!")}})}}));
|