cc1-ui 0.0.1
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/README.md +1 -0
- package/dist/autoimport.d.ts +18 -0
- package/dist/autoimport.js +160 -0
- package/dist/cc1-ui.js +86 -0
- package/dist/components/Button/index.vue.d.ts +292 -0
- package/dist/components/Button/style.css +166 -0
- package/dist/components/Circle/index.vue.d.ts +269 -0
- package/dist/components/Circle/style.css +17 -0
- package/dist/components/Icon/index.vue.d.ts +96 -0
- package/dist/components/Icon/style.css +0 -0
- package/dist/components/Mask/index.vue.d.ts +194 -0
- package/dist/components/Mask/style.css +30 -0
- package/dist/components/SIcon/index.vue.d.ts +135 -0
- package/dist/components/SIcon/style.css +0 -0
- package/dist/components/Scale/index.vue.d.ts +21 -0
- package/dist/components/Scale/style.css +19 -0
- package/dist/components/Select/index.vue.d.ts +49 -0
- package/dist/components/Select/style.css +78 -0
- package/dist/components/Switch/index.vue.d.ts +37 -0
- package/dist/components/Switch/style.css +39 -0
- package/dist/index-BGzY32VF.js +145 -0
- package/dist/index-BlU8Q4GS.js +184 -0
- package/dist/index-BvvdDtUd.js +56 -0
- package/dist/index-CpyM3z5X.js +185 -0
- package/dist/index-l4J1-e0K.js +50 -0
- package/dist/index-lDlR9NjA.js +169 -0
- package/dist/index-ti4E-Nv5.js +172 -0
- package/dist/index-ycYY--mh.js +79 -0
- package/dist/index.css +0 -0
- package/dist/index.d.ts +26 -0
- package/dist/vconf.d.ts +153 -0
- package/package.json +59 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { defineComponent, reactive, createElementBlock, createCommentVNode, openBlock, normalizeClass, createElementVNode, renderSlot, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
+
|
|
3
|
+
const _hoisted_1 = ["type", "disabled"];
|
|
4
|
+
const _hoisted_2 = { class: "flex flex-center no-wrap" };
|
|
5
|
+
const _hoisted_3 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "icon",
|
|
8
|
+
style: { marginRight: "5px" },
|
|
9
|
+
width: "20",
|
|
10
|
+
height: "20",
|
|
11
|
+
viewBox: "0 0 1024 1024",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_4 = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "flex flex-center no-wrap"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_5 = { class: "flex flex-center no-wrapr" };
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
+
__name: "index",
|
|
21
|
+
props: {
|
|
22
|
+
/**
|
|
23
|
+
* 图标的class样式
|
|
24
|
+
*/
|
|
25
|
+
icon: { default: "" },
|
|
26
|
+
/**
|
|
27
|
+
* text样式
|
|
28
|
+
*/
|
|
29
|
+
text: { default: null },
|
|
30
|
+
/**
|
|
31
|
+
* 幽灵样式
|
|
32
|
+
*/
|
|
33
|
+
ghost: { default: null },
|
|
34
|
+
/**
|
|
35
|
+
* 样式类型
|
|
36
|
+
*/
|
|
37
|
+
type: { default: "primary" },
|
|
38
|
+
/**
|
|
39
|
+
* 大小
|
|
40
|
+
*/
|
|
41
|
+
size: { default: "middle" },
|
|
42
|
+
/**
|
|
43
|
+
* 铺满
|
|
44
|
+
*/
|
|
45
|
+
long: { default: null },
|
|
46
|
+
/**
|
|
47
|
+
* 加载状态
|
|
48
|
+
*/
|
|
49
|
+
loading: { default: null },
|
|
50
|
+
/**
|
|
51
|
+
* 点击函数
|
|
52
|
+
*/
|
|
53
|
+
cmd: { default: null },
|
|
54
|
+
/**
|
|
55
|
+
* 按钮类型
|
|
56
|
+
*/
|
|
57
|
+
htmlType: { default: "button" },
|
|
58
|
+
/**
|
|
59
|
+
* 点击状态
|
|
60
|
+
*/
|
|
61
|
+
disabled: { default: null }
|
|
62
|
+
},
|
|
63
|
+
setup(__props) {
|
|
64
|
+
let props = __props;
|
|
65
|
+
const conf = reactive({
|
|
66
|
+
loading: props.loading,
|
|
67
|
+
hover: false,
|
|
68
|
+
active: false,
|
|
69
|
+
type: {
|
|
70
|
+
default: {
|
|
71
|
+
d: { color: "#fff", bgColor: "#353D3DFF", bdColor: "#353D3DFF" },
|
|
72
|
+
h: { color: "#fff", bgColor: "#4B6060FF", bdColor: "#4B6060FF" }
|
|
73
|
+
},
|
|
74
|
+
primary: {
|
|
75
|
+
d: { color: "#fff", bgColor: "#2d8cf0", bdColor: "#2d8cf0" },
|
|
76
|
+
h: { color: "#fff", bgColor: "#57a3f3", bdColor: "#57a3f3" }
|
|
77
|
+
},
|
|
78
|
+
success: {
|
|
79
|
+
d: {
|
|
80
|
+
color: "var(--v-color-btn-font)",
|
|
81
|
+
bgColor: "var(--v-color-btn-success)",
|
|
82
|
+
bdColor: "var(--v-color-btn-success)"
|
|
83
|
+
},
|
|
84
|
+
h: {
|
|
85
|
+
color: "var(--v-color-btn-font)",
|
|
86
|
+
bgColor: "var(--v-color-btn-success-hover)",
|
|
87
|
+
bdColor: "var(--v-color-btn-success-hover)"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
error: {
|
|
91
|
+
d: {
|
|
92
|
+
color: "var(--v-color-btn-font)",
|
|
93
|
+
bgColor: "var(--v-color-btn-error)",
|
|
94
|
+
bdColor: "var(--v-color-btn-error)"
|
|
95
|
+
},
|
|
96
|
+
h: {
|
|
97
|
+
color: "var(--v-color-btn-font)",
|
|
98
|
+
bgColor: "var(--v-color-btn-error-hover)",
|
|
99
|
+
bdColor: "var(--v-color-btn-error-hover)"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
warning: {
|
|
103
|
+
d: { color: "#fff", bgColor: "#f90", bdColor: "#f90" },
|
|
104
|
+
h: { color: "#fff", bgColor: "#ffad33", bdColor: "#ffad33" }
|
|
105
|
+
},
|
|
106
|
+
info: {
|
|
107
|
+
d: { color: "#fff", bgColor: "#1890FFFF", bdColor: "#1890FFFF" },
|
|
108
|
+
h: { color: "#fff", bgColor: "#59AFFFFF", bdColor: "#59AFFFFF" }
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const ok = async () => {
|
|
113
|
+
if (props.cmd instanceof Function) {
|
|
114
|
+
if (conf.loading != null) conf.loading = true;
|
|
115
|
+
await props.cmd();
|
|
116
|
+
if (conf.loading != null) conf.loading = false;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
return (_ctx, _cache) => {
|
|
120
|
+
return __props.text == null ? (openBlock(), createElementBlock("button", {
|
|
121
|
+
key: 0,
|
|
122
|
+
type: __props.htmlType,
|
|
123
|
+
onClick: ok,
|
|
124
|
+
disabled: __props.disabled === "" || __props.disabled || conf.loading ? true : false,
|
|
125
|
+
class: normalizeClass([
|
|
126
|
+
"v-btn",
|
|
127
|
+
`v-btn-${__props.size}`,
|
|
128
|
+
__props.long != null ? "v-btn-long" : void 0,
|
|
129
|
+
conf.loading ? "v-btn-loading" : "",
|
|
130
|
+
`v-btn-${__props.type}`,
|
|
131
|
+
__props.ghost != null ? `v-btn-${__props.type}-ghost` : void 0
|
|
132
|
+
])
|
|
133
|
+
}, [
|
|
134
|
+
createElementVNode("div", _hoisted_2, [
|
|
135
|
+
conf.loading ? (openBlock(), createElementBlock("svg", _hoisted_3, _cache[0] || (_cache[0] = [
|
|
136
|
+
createElementVNode("animateTransform", {
|
|
137
|
+
attributeType: "xml",
|
|
138
|
+
attributeName: "transform",
|
|
139
|
+
type: "rotate",
|
|
140
|
+
values: "0;360",
|
|
141
|
+
dur: "2s",
|
|
142
|
+
repeatCount: "indefinite"
|
|
143
|
+
}, null, -1),
|
|
144
|
+
createElementVNode("path", {
|
|
145
|
+
fill: "currentColor",
|
|
146
|
+
d: "M512 64a32 32 0 0132 32v192a32 32 0 01-64 0V96a32 32 0 0132-32zm0 640a32 32 0 0132 32v192a32 32 0 11-64 0V736a32 32 0 0132-32zm448-192a32 32 0 01-32 32H736a32 32 0 110-64h192a32 32 0 0132 32zm-640 0a32 32 0 01-32 32H96a32 32 0 010-64h192a32 32 0 0132 32zM195.2 195.2a32 32 0 0145.248 0L376.32 331.008a32 32 0 01-45.248 45.248L195.2 240.448a32 32 0 010-45.248zm452.544 452.544a32 32 0 0145.248 0L828.8 783.552a32 32 0 01-45.248 45.248L647.744 692.992a32 32 0 010-45.248zM828.8 195.264a32 32 0 010 45.184L692.992 376.32a32 32 0 01-45.248-45.248l135.808-135.808a32 32 0 0145.248 0zm-452.544 452.48a32 32 0 010 45.248L240.448 828.8a32 32 0 01-45.248-45.248l135.808-135.808a32 32 0 0145.248 0z"
|
|
147
|
+
}, null, -1)
|
|
148
|
+
]))) : createCommentVNode("", true),
|
|
149
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
150
|
+
createTextVNode(toDisplayString(__props.type), 1)
|
|
151
|
+
])
|
|
152
|
+
])
|
|
153
|
+
], 10, _hoisted_1)) : __props.text != null ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
154
|
+
createElementVNode("div", {
|
|
155
|
+
onClick: ok,
|
|
156
|
+
style: { "display": "inline-block", "padding": "2px 5px", "cursor": "pointer" }
|
|
157
|
+
}, [
|
|
158
|
+
createElementVNode("div", _hoisted_5, [
|
|
159
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
160
|
+
createTextVNode(toDisplayString(__props.type), 1)
|
|
161
|
+
])
|
|
162
|
+
])
|
|
163
|
+
])
|
|
164
|
+
])) : createCommentVNode("", true);
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { defineComponent, reactive, computed, createElementBlock, openBlock, normalizeStyle, createElementVNode, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
+
|
|
3
|
+
const _hoisted_1 = { viewBox: "0 0 100 100" };
|
|
4
|
+
const _hoisted_2 = { key: 0 };
|
|
5
|
+
const _hoisted_3 = ["id"];
|
|
6
|
+
const _hoisted_4 = ["stop-color"];
|
|
7
|
+
const _hoisted_5 = ["stop-color"];
|
|
8
|
+
const _hoisted_6 = { key: 1 };
|
|
9
|
+
const _hoisted_7 = ["id"];
|
|
10
|
+
const _hoisted_8 = ["stop-color"];
|
|
11
|
+
const _hoisted_9 = ["stop-color"];
|
|
12
|
+
const _hoisted_10 = { key: 2 };
|
|
13
|
+
const _hoisted_11 = ["id"];
|
|
14
|
+
const _hoisted_12 = ["stop-color"];
|
|
15
|
+
const _hoisted_13 = ["stop-color"];
|
|
16
|
+
const _hoisted_14 = ["d", "stroke-width"];
|
|
17
|
+
const _hoisted_15 = ["d", "stroke-width", "opacity"];
|
|
18
|
+
const _hoisted_16 = { class: "v-progress-circle-text" };
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
+
__name: "index",
|
|
21
|
+
props: {
|
|
22
|
+
/**
|
|
23
|
+
* 进度,0-100
|
|
24
|
+
*/
|
|
25
|
+
length: { default: 50 },
|
|
26
|
+
/**
|
|
27
|
+
* 背景色
|
|
28
|
+
*/
|
|
29
|
+
bgColor: { default: "#f5f5f5" },
|
|
30
|
+
/**
|
|
31
|
+
* 背景色-渐变
|
|
32
|
+
*/
|
|
33
|
+
bgColors: { default: [] },
|
|
34
|
+
/**
|
|
35
|
+
* 底色
|
|
36
|
+
*/
|
|
37
|
+
runColor: { default: "#1890ff" },
|
|
38
|
+
/**
|
|
39
|
+
* 底色-渐变
|
|
40
|
+
*/
|
|
41
|
+
runColors: { default: [] },
|
|
42
|
+
/**
|
|
43
|
+
* 进度色
|
|
44
|
+
*/
|
|
45
|
+
successColor: { default: "#52c41a" },
|
|
46
|
+
/**
|
|
47
|
+
* 进度色-渐变
|
|
48
|
+
*/
|
|
49
|
+
successColors: { default: [] },
|
|
50
|
+
/**
|
|
51
|
+
* 进度条厚度
|
|
52
|
+
*/
|
|
53
|
+
strokeWidth: { default: 10 },
|
|
54
|
+
/**
|
|
55
|
+
* 进度条宽度
|
|
56
|
+
*/
|
|
57
|
+
width: { default: 120 }
|
|
58
|
+
},
|
|
59
|
+
setup(__props) {
|
|
60
|
+
let props = __props;
|
|
61
|
+
const conf = reactive({
|
|
62
|
+
r: (100 - props.strokeWidth) / 2,
|
|
63
|
+
bgid: "svg-lg-" + StrUtil.getId(),
|
|
64
|
+
runid: "svg-lg-" + StrUtil.getId(),
|
|
65
|
+
successid: "svg-lg-" + StrUtil.getId(),
|
|
66
|
+
total: 2 * Math.PI * (50 - props.strokeWidth / 2),
|
|
67
|
+
length: computed(() => props.length),
|
|
68
|
+
status: props.length == 0 ? 0 : props.length == 100 ? 1 : -1
|
|
69
|
+
//0-为空,-1-没满,1-满了
|
|
70
|
+
});
|
|
71
|
+
const getLength = () => {
|
|
72
|
+
let l = conf.total * (conf.length / 100);
|
|
73
|
+
if (conf.length < 100 && conf.length > 0) conf.status = -1;
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
conf.status = conf.length == 0 ? 0 : conf.length == 100 ? 1 : -1;
|
|
76
|
+
}, 300);
|
|
77
|
+
return l;
|
|
78
|
+
};
|
|
79
|
+
return (_ctx, _cache) => {
|
|
80
|
+
return openBlock(), createElementBlock("div", {
|
|
81
|
+
style: normalizeStyle([{ "font-size": "24px", "position": "relative", "display": "inline-block" }, { width: `${__props.width}px`, height: `${__props.width}px` }])
|
|
82
|
+
}, [
|
|
83
|
+
(openBlock(), createElementBlock("svg", _hoisted_1, [
|
|
84
|
+
__props.bgColors.length > 0 ? (openBlock(), createElementBlock("defs", _hoisted_2, [
|
|
85
|
+
createElementVNode("linearGradient", {
|
|
86
|
+
id: conf.bgid,
|
|
87
|
+
x1: "100%",
|
|
88
|
+
y1: "0%",
|
|
89
|
+
x2: "0%",
|
|
90
|
+
y2: "0%"
|
|
91
|
+
}, [
|
|
92
|
+
createElementVNode("stop", {
|
|
93
|
+
offset: "0",
|
|
94
|
+
"stop-color": __props.bgColors[0]
|
|
95
|
+
}, null, 8, _hoisted_4),
|
|
96
|
+
createElementVNode("stop", {
|
|
97
|
+
offset: "100%",
|
|
98
|
+
"stop-color": __props.bgColors[1]
|
|
99
|
+
}, null, 8, _hoisted_5)
|
|
100
|
+
], 8, _hoisted_3)
|
|
101
|
+
])) : createCommentVNode("", true),
|
|
102
|
+
__props.runColors.length > 0 ? (openBlock(), createElementBlock("defs", _hoisted_6, [
|
|
103
|
+
createElementVNode("linearGradient", {
|
|
104
|
+
id: conf.runid,
|
|
105
|
+
x1: "100%",
|
|
106
|
+
y1: "0%",
|
|
107
|
+
x2: "0%",
|
|
108
|
+
y2: "0%"
|
|
109
|
+
}, [
|
|
110
|
+
createElementVNode("stop", {
|
|
111
|
+
offset: "0",
|
|
112
|
+
"stop-color": __props.runColors[0]
|
|
113
|
+
}, null, 8, _hoisted_8),
|
|
114
|
+
createElementVNode("stop", {
|
|
115
|
+
offset: "100%",
|
|
116
|
+
"stop-color": __props.runColors[1]
|
|
117
|
+
}, null, 8, _hoisted_9)
|
|
118
|
+
], 8, _hoisted_7)
|
|
119
|
+
])) : createCommentVNode("", true),
|
|
120
|
+
__props.successColors.length > 0 ? (openBlock(), createElementBlock("defs", _hoisted_10, [
|
|
121
|
+
createElementVNode("linearGradient", {
|
|
122
|
+
id: conf.successid,
|
|
123
|
+
x1: "100%",
|
|
124
|
+
y1: "0%",
|
|
125
|
+
x2: "0%",
|
|
126
|
+
y2: "0%"
|
|
127
|
+
}, [
|
|
128
|
+
createElementVNode("stop", {
|
|
129
|
+
offset: "0",
|
|
130
|
+
"stop-color": __props.successColors[0]
|
|
131
|
+
}, null, 8, _hoisted_12),
|
|
132
|
+
createElementVNode("stop", {
|
|
133
|
+
offset: "100%",
|
|
134
|
+
"stop-color": __props.successColors[1]
|
|
135
|
+
}, null, 8, _hoisted_13)
|
|
136
|
+
], 8, _hoisted_11)
|
|
137
|
+
])) : createCommentVNode("", true),
|
|
138
|
+
createElementVNode("path", {
|
|
139
|
+
d: `M 50,50 m -${conf.r},0 a ${conf.r},${conf.r} 0 1,0 ${conf.r * 2},0 a ${conf.r},${conf.r} 0 1,0 -${conf.r * 2},0`,
|
|
140
|
+
"stroke-linecap": "round",
|
|
141
|
+
"stroke-width": __props.strokeWidth,
|
|
142
|
+
"fill-opacity": "0",
|
|
143
|
+
class: "v-progress-circle-run-svg",
|
|
144
|
+
style: normalizeStyle({
|
|
145
|
+
stroke: `${__props.bgColors.length > 0 ? "url(#" + conf.bgid + ")" : __props.bgColor}`,
|
|
146
|
+
strokeDasharray: `${conf.total}px, ${conf.total}px`
|
|
147
|
+
})
|
|
148
|
+
}, null, 12, _hoisted_14),
|
|
149
|
+
createElementVNode("path", {
|
|
150
|
+
d: `M 50,50 m -${conf.r},0 a ${conf.r},${conf.r} 0 1,0 ${conf.r * 2},0 a ${conf.r},${conf.r} 0 1,0 -${conf.r * 2},0`,
|
|
151
|
+
"stroke-linecap": "round",
|
|
152
|
+
"stroke-width": __props.strokeWidth,
|
|
153
|
+
opacity: conf.status == 0 ? 0 : 1,
|
|
154
|
+
"fill-opacity": "0",
|
|
155
|
+
class: "v-progress-circle-run-svg",
|
|
156
|
+
style: normalizeStyle({
|
|
157
|
+
stroke: `${conf.status != 1 ? `${__props.runColors.length > 0 ? "url(#" + conf.runid + ")" : __props.runColor}` : `${__props.successColors.length > 0 ? "url(#" + conf.successid + ")" : __props.successColor}`}`,
|
|
158
|
+
strokeDasharray: `${getLength()}px, ${conf.total}px`
|
|
159
|
+
})
|
|
160
|
+
}, null, 12, _hoisted_15)
|
|
161
|
+
])),
|
|
162
|
+
createElementVNode("span", _hoisted_16, [
|
|
163
|
+
renderSlot(_ctx.$slots, "content", { data: __props.length }, () => [
|
|
164
|
+
createTextVNode(toDisplayString(__props.length) + "%", 1)
|
|
165
|
+
])
|
|
166
|
+
])
|
|
167
|
+
], 4);
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineComponent, reactive, onMounted, createBlock, createCommentVNode, openBlock, Teleport, createVNode, Transition, withCtx, createElementBlock, normalizeStyle, normalizeClass, unref, createElementVNode, withModifiers, renderSlot } from 'vue';
|
|
2
|
+
|
|
3
|
+
const _hoisted_1 = ["id"];
|
|
4
|
+
const _hoisted_2 = { class: "v-mask-ctx" };
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
/**
|
|
9
|
+
* 是否显示
|
|
10
|
+
*/
|
|
11
|
+
show: { default: false },
|
|
12
|
+
/**
|
|
13
|
+
* 开启背景色
|
|
14
|
+
*/
|
|
15
|
+
mask: { default: true },
|
|
16
|
+
/**
|
|
17
|
+
* 背景色
|
|
18
|
+
*/
|
|
19
|
+
maskBgColor: { default: "rgba(0, 0, 0, 0.5)" },
|
|
20
|
+
/**
|
|
21
|
+
* 是否可以点击背景关闭
|
|
22
|
+
*/
|
|
23
|
+
closemask: { default: true },
|
|
24
|
+
/**
|
|
25
|
+
* 放置位置
|
|
26
|
+
*/
|
|
27
|
+
to: { default: "body" },
|
|
28
|
+
/**
|
|
29
|
+
* 是否是布局显示,默认是全屏
|
|
30
|
+
*/
|
|
31
|
+
box: { default: null }
|
|
32
|
+
},
|
|
33
|
+
emits: ["update:show"],
|
|
34
|
+
setup(__props, { emit: __emit }) {
|
|
35
|
+
const zindex = VConf.zindex.mask;
|
|
36
|
+
const props = __props;
|
|
37
|
+
const emit = __emit;
|
|
38
|
+
const colse = () => {
|
|
39
|
+
if (props.closemask) emit("update:show", false);
|
|
40
|
+
};
|
|
41
|
+
const conf = reactive({
|
|
42
|
+
show: false,
|
|
43
|
+
id: "v-mask-" + StrUtil.getId()
|
|
44
|
+
});
|
|
45
|
+
onMounted(() => {
|
|
46
|
+
conf.show = true;
|
|
47
|
+
});
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
return conf.show ? (openBlock(), createBlock(Teleport, {
|
|
50
|
+
key: 0,
|
|
51
|
+
to: __props.to
|
|
52
|
+
}, [
|
|
53
|
+
createVNode(Transition, { name: "v-mask" }, {
|
|
54
|
+
default: withCtx(() => [
|
|
55
|
+
__props.show ? (openBlock(), createElementBlock("div", {
|
|
56
|
+
key: 0,
|
|
57
|
+
id: conf.id,
|
|
58
|
+
class: normalizeClass(["v-mask", [__props.to !== "body" ? __props.box !== null ? "v-mask-box" : "" : ""]]),
|
|
59
|
+
style: normalizeStyle({ backgroundColor: __props.mask ? __props.maskBgColor : "", zIndex: unref(zindex) }),
|
|
60
|
+
onClick: colse
|
|
61
|
+
}, [
|
|
62
|
+
createElementVNode("div", _hoisted_2, [
|
|
63
|
+
createElementVNode("div", {
|
|
64
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
65
|
+
}, ["stop"]))
|
|
66
|
+
}, [
|
|
67
|
+
renderSlot(_ctx.$slots, "default")
|
|
68
|
+
])
|
|
69
|
+
])
|
|
70
|
+
], 14, _hoisted_1)) : createCommentVNode("", true)
|
|
71
|
+
]),
|
|
72
|
+
_: 3
|
|
73
|
+
})
|
|
74
|
+
], 8, ["to"])) : createCommentVNode("", true);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export { _sfc_main as default };
|
package/dist/index.css
ADDED
|
File without changes
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="./vconf" />
|
|
2
|
+
import { type App } from 'vue';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
install: (app: App) => Promise<void>;
|
|
5
|
+
VConf: VConfType;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
|
|
9
|
+
export declare const VConf: VConfType
|
|
10
|
+
export {}
|
|
11
|
+
|
|
12
|
+
/* prettier-ignore */
|
|
13
|
+
declare module 'vue' {
|
|
14
|
+
export interface GlobalComponents {
|
|
15
|
+
VButton:typeof import('./components/Button/index.vue')['default']
|
|
16
|
+
VCircle:typeof import('./components/Circle/index.vue')['default']
|
|
17
|
+
VMask:typeof import('./components/Mask/index.vue')['default']
|
|
18
|
+
VIcon:typeof import('./components/Icon/index.vue')['default']
|
|
19
|
+
VSIcon:typeof import('./components/SIcon/index.vue')['default']
|
|
20
|
+
VSelect:typeof import('./components/Select/index.vue')['default']
|
|
21
|
+
VSwitch:typeof import('./components/Switch/index.vue')['default']
|
|
22
|
+
VScale:typeof import('./components/Scale/index.vue')['default']
|
|
23
|
+
}
|
|
24
|
+
export interface ComponentCustomProperties {
|
|
25
|
+
}
|
|
26
|
+
}
|
package/dist/vconf.d.ts
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
|
|
2
|
+
interface VConfType {
|
|
3
|
+
/**
|
|
4
|
+
* vsicon图标组件默认配置
|
|
5
|
+
*/
|
|
6
|
+
vsicon: {
|
|
7
|
+
/**
|
|
8
|
+
* 加载静态资源地址,默认为'https://cdn.c44.cc/vsicon'
|
|
9
|
+
*/
|
|
10
|
+
url: string;
|
|
11
|
+
/**
|
|
12
|
+
* 使用的图标库名称,默认为'ant'
|
|
13
|
+
*/
|
|
14
|
+
lib: string;
|
|
15
|
+
/**
|
|
16
|
+
* 使用的图标名称,默认为'up'
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* 使用的图标大小,默认为'20'
|
|
21
|
+
*/
|
|
22
|
+
size: any;
|
|
23
|
+
/**
|
|
24
|
+
* 使用的图标宽度,默认为空,取size字段
|
|
25
|
+
*/
|
|
26
|
+
width: any;
|
|
27
|
+
/**
|
|
28
|
+
* 使用的图标高度,默认为空,取size字段
|
|
29
|
+
*/
|
|
30
|
+
height: any;
|
|
31
|
+
/**
|
|
32
|
+
* 使用的图标颜色,默认为[]
|
|
33
|
+
*/
|
|
34
|
+
color: string[];
|
|
35
|
+
/**
|
|
36
|
+
* 使用的图标单位,默认为px
|
|
37
|
+
*/
|
|
38
|
+
unit: string;
|
|
39
|
+
/**
|
|
40
|
+
* 其他辅助方法
|
|
41
|
+
*/
|
|
42
|
+
fun: {
|
|
43
|
+
/**
|
|
44
|
+
* 加载控制对象-外部无作用
|
|
45
|
+
*/
|
|
46
|
+
load: any
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 默认的内容缓存对象
|
|
50
|
+
*/
|
|
51
|
+
resource: any
|
|
52
|
+
/**
|
|
53
|
+
* 保存资源-默认用的对象缓存
|
|
54
|
+
* @param url
|
|
55
|
+
* @param content
|
|
56
|
+
* @returns
|
|
57
|
+
*/
|
|
58
|
+
setRes: (url: string, content: any) => void
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 获取缓存资源
|
|
62
|
+
* @param url
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
getRes: (url: string) => any
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 获取图标资源
|
|
69
|
+
* @param _url 如https://cdn.c44.cc/vsicon/ant/up.svg
|
|
70
|
+
* @param save 是否对获取到的资源进行缓存,默认为false
|
|
71
|
+
* @returns
|
|
72
|
+
*/
|
|
73
|
+
getResorce: (_url: string,save?:boolean) => Promise<any>
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* vicon图标组件默认配置
|
|
78
|
+
*/
|
|
79
|
+
vicon: {
|
|
80
|
+
/**
|
|
81
|
+
* 加载静态资源地址,默认为'https://cdn.c44.cc/vicon'
|
|
82
|
+
*/
|
|
83
|
+
url: string;
|
|
84
|
+
/**
|
|
85
|
+
* 使用的图标库名称,默认为'ant'
|
|
86
|
+
*/
|
|
87
|
+
lib: string;
|
|
88
|
+
/**
|
|
89
|
+
* 使用的图标名称,默认为'up'
|
|
90
|
+
*/
|
|
91
|
+
name: string;
|
|
92
|
+
/**
|
|
93
|
+
* 使用的图标大小,默认为'20'
|
|
94
|
+
*/
|
|
95
|
+
size: any;
|
|
96
|
+
/**
|
|
97
|
+
* 使用的图标颜色,默认为'currentColor'
|
|
98
|
+
*/
|
|
99
|
+
color: any;
|
|
100
|
+
/**
|
|
101
|
+
* 如果为true,使用设计的图标颜色使得color属性无效。默认为false,一般用于多色或固定色图标
|
|
102
|
+
*/
|
|
103
|
+
nofill: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* 使用的图标单位,默认为px
|
|
106
|
+
*/
|
|
107
|
+
unit: string;
|
|
108
|
+
/**
|
|
109
|
+
* 其他辅助方法
|
|
110
|
+
*/
|
|
111
|
+
fun: {
|
|
112
|
+
/**
|
|
113
|
+
* 加载控制对象-外部无作用
|
|
114
|
+
*/
|
|
115
|
+
load: any
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* 默认的内容缓存对象
|
|
119
|
+
*/
|
|
120
|
+
resource: any
|
|
121
|
+
/**
|
|
122
|
+
* 保存资源-默认用的对象缓存
|
|
123
|
+
* @param url
|
|
124
|
+
* @param content
|
|
125
|
+
* @returns
|
|
126
|
+
*/
|
|
127
|
+
setRes: (url: string, content: any) => void
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* 获取缓存资源
|
|
131
|
+
* @param url
|
|
132
|
+
* @returns
|
|
133
|
+
*/
|
|
134
|
+
getRes: (url: string) => any
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* 获取图标资源
|
|
138
|
+
* @param _url 如https://cdn.c44.cc/vicon/ant/up.json
|
|
139
|
+
* @param save 是否对获取到的资源进行缓存,默认为false
|
|
140
|
+
* @returns
|
|
141
|
+
*/
|
|
142
|
+
getResorce: (_url: string,save?:boolean) => Promise<any>
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* 层级管理
|
|
147
|
+
*/
|
|
148
|
+
zindex: {
|
|
149
|
+
mask: number;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare var VConf: VConfType;
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cc1-ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "我来助你-Vue3UI库",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://cc1.cc"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://cc1.cc",
|
|
10
|
+
"author": "veigarchen",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"type": "module",
|
|
16
|
+
"module": "./dist/cc1-ui.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/cc1-ui.js",
|
|
22
|
+
"require": "./dist/cc1-ui.js"
|
|
23
|
+
},
|
|
24
|
+
"./index.css": "./dist/index.css"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"dev": "vite",
|
|
28
|
+
"build": "npm run build:package && npm run build:types && npm run build:auto",
|
|
29
|
+
"build:auto": "cd autoimport && npm run build && cd ..",
|
|
30
|
+
"build:package": "vite build",
|
|
31
|
+
"build:types": "vue-tsc --declaration --emitDeclarationOnly && tsc-alias -p tsconfig.json && npm run addtype",
|
|
32
|
+
"format": "prettier --write . ",
|
|
33
|
+
"typecheck": "vue-tsc --noEmit",
|
|
34
|
+
"addtype": "tsx ./build/buildTypes.ts",
|
|
35
|
+
"publish": "npm publish --access public"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "22.15.2",
|
|
39
|
+
"@vitejs/plugin-vue": "5.2.1",
|
|
40
|
+
"@vue/tsconfig": "0.7.0",
|
|
41
|
+
"less": "4.3.0",
|
|
42
|
+
"prettier": "3.2.5",
|
|
43
|
+
"terser": "5.44.1",
|
|
44
|
+
"tools-javascript": "*",
|
|
45
|
+
"tools-mock": "^2.0.8",
|
|
46
|
+
"tools-vue3": "*",
|
|
47
|
+
"ts-node": "*",
|
|
48
|
+
"tsc-alias": "1.8.11",
|
|
49
|
+
"tsx": "4.19.4",
|
|
50
|
+
"typescript": "*",
|
|
51
|
+
"vite": "6.2.2",
|
|
52
|
+
"vue": "3.5.18",
|
|
53
|
+
"vue-tsc": "2.2.8"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=18.x",
|
|
57
|
+
"npm": ">=10.x"
|
|
58
|
+
}
|
|
59
|
+
}
|