btxui 1.0.3 → 1.0.6
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/favicon.png +0 -0
- package/index.js +549 -0
- package/index.js.gz +0 -0
- package/index.umd.cjs +1 -0
- package/package.json +3 -4
- package/demo.html +0 -1
- package/index.common.js +0 -93
- package/index.common.js.map +0 -1
- package/index.umd.js +0 -104
- package/index.umd.js.map +0 -1
- package/index.umd.min.js +0 -2
- package/index.umd.min.js.map +0 -1
package/favicon.png
ADDED
|
Binary file
|
package/index.js
ADDED
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, reactive, onMounted, renderSlot, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, normalizeStyle } from "vue";
|
|
2
|
+
const prestyles = {
|
|
3
|
+
//预置样式-----------------------------------------------------------------------------------
|
|
4
|
+
//重置初始字号及行高
|
|
5
|
+
"resize": `font-size: 1rem; lineHeight: 1.5;`,
|
|
6
|
+
//文字加粗
|
|
7
|
+
"bold": `font-weight: bold;`,
|
|
8
|
+
//隐藏显示
|
|
9
|
+
"show": `display: "block";`,
|
|
10
|
+
"hide": `display: "none";`,
|
|
11
|
+
//布局
|
|
12
|
+
"flex": `display: "flex"; justifyContent: "flex-start"; alignItems: "stretch";`,
|
|
13
|
+
"flex-column": `display: "flex"; flexDirection: "column";`,
|
|
14
|
+
"flex-1": `display: "flex"; justifyContent: "flex-start"; alignItems: "flex-start";`,
|
|
15
|
+
"flex-2": `display: "flex"; justifyContent: "center"; alignItems: "flex-start";`,
|
|
16
|
+
"flex-3": `display: "flex"; justifyContent: "flex-end"; alignItems: "flex-start";`,
|
|
17
|
+
"flex-4": `display: "flex"; justifyContent: "flex-start"; alignItems: "center"`,
|
|
18
|
+
"flex-5": {
|
|
19
|
+
display: "flex",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
alignItems: "center"
|
|
22
|
+
},
|
|
23
|
+
"flex-6": {
|
|
24
|
+
display: "flex",
|
|
25
|
+
justifyContent: "flex-end",
|
|
26
|
+
alignItems: "center"
|
|
27
|
+
},
|
|
28
|
+
"flex-7": {
|
|
29
|
+
display: "flex",
|
|
30
|
+
justifyContent: "flex-start",
|
|
31
|
+
alignItems: "flex-end"
|
|
32
|
+
},
|
|
33
|
+
"flex-8": {
|
|
34
|
+
display: "flex",
|
|
35
|
+
justifyContent: "center",
|
|
36
|
+
alignItems: "flex-end"
|
|
37
|
+
},
|
|
38
|
+
"flex-9": {
|
|
39
|
+
display: "flex",
|
|
40
|
+
justifyContent: "flex-end",
|
|
41
|
+
alignItems: "flex-end"
|
|
42
|
+
},
|
|
43
|
+
"flex-between": {
|
|
44
|
+
display: "flex",
|
|
45
|
+
justifyContent: "space-between",
|
|
46
|
+
alignItems: "center"
|
|
47
|
+
},
|
|
48
|
+
"flex-around": {
|
|
49
|
+
display: "flex",
|
|
50
|
+
justifyContent: "space-around",
|
|
51
|
+
alignItems: "center"
|
|
52
|
+
},
|
|
53
|
+
"grid": {
|
|
54
|
+
display: "flex",
|
|
55
|
+
flexWrap: "wrap",
|
|
56
|
+
alignContent: "flex-start"
|
|
57
|
+
},
|
|
58
|
+
"max-h": {
|
|
59
|
+
height: "100%"
|
|
60
|
+
},
|
|
61
|
+
"max-w": {
|
|
62
|
+
width: "100%"
|
|
63
|
+
},
|
|
64
|
+
"max": {
|
|
65
|
+
height: "100%",
|
|
66
|
+
width: "100%"
|
|
67
|
+
},
|
|
68
|
+
"max-screen": {
|
|
69
|
+
height: "100%",
|
|
70
|
+
width: "100%",
|
|
71
|
+
position: "fixed",
|
|
72
|
+
left: 0,
|
|
73
|
+
top: 0
|
|
74
|
+
},
|
|
75
|
+
"item": {
|
|
76
|
+
breakInside: "avoid",
|
|
77
|
+
mozPageBreakInside: "avoid",
|
|
78
|
+
webkitColumnBreakInside: "avoid"
|
|
79
|
+
},
|
|
80
|
+
"fixed": { position: "fixed" },
|
|
81
|
+
"rel": { position: "relative" },
|
|
82
|
+
"abs": { position: "absolute" },
|
|
83
|
+
"z-1": { zIndex: -1 },
|
|
84
|
+
"z0": { zIndex: 0 },
|
|
85
|
+
"z1": { zIndex: 1 },
|
|
86
|
+
"z2": { zIndex: 2 },
|
|
87
|
+
"z3": { zIndex: 3 },
|
|
88
|
+
"z4": { zIndex: 4 },
|
|
89
|
+
"z5": { zIndex: 5 },
|
|
90
|
+
"z6": { zIndex: 6 },
|
|
91
|
+
"z7": { zIndex: 7 },
|
|
92
|
+
"z8": { zIndex: 8 },
|
|
93
|
+
"z9": { zIndex: 9 },
|
|
94
|
+
"z10": { zIndex: 10 },
|
|
95
|
+
//溢出处理
|
|
96
|
+
"no-scroll": { overflow: "hidden" },
|
|
97
|
+
"over-show": { overflow: "visible" },
|
|
98
|
+
"over-scroll": { overflow: "scroll" },
|
|
99
|
+
"over-hide": { overflow: "hidden" },
|
|
100
|
+
// 背景
|
|
101
|
+
"bg-repeat": { backgroundRepeat: "repeat" },
|
|
102
|
+
"bg-repeat-x": { backgroundRepeat: "repeat-x" },
|
|
103
|
+
"bg-repeat-y": { backgroundRepeat: "repeat-y" },
|
|
104
|
+
// size
|
|
105
|
+
"bg-size-cover": `background-size: cover;`,
|
|
106
|
+
"bg-size-contain": `background-size: contain;`,
|
|
107
|
+
"bg-size-max": `background-size: 100% 100%;`,
|
|
108
|
+
"bg-size-max-h": `background-size: auto 100%;`,
|
|
109
|
+
"bg-size-max-w": `background-size: 100% auto;`,
|
|
110
|
+
"bg-pos-1": { backgroundPosition: "left top" },
|
|
111
|
+
"bg-pos-2": { backgroundPosition: "center top" },
|
|
112
|
+
"bg-pos-3": { backgroundPosition: "right top" },
|
|
113
|
+
"bg-pos-4": { backgroundPosition: "left center" },
|
|
114
|
+
"bg-pos-5": { backgroundPosition: "center center" },
|
|
115
|
+
"bg-pos-6": { backgroundPosition: "right center" },
|
|
116
|
+
"bg-pos-7": { backgroundPosition: "left bottom" },
|
|
117
|
+
"bg-pos-8": { backgroundPosition: "center bottom" },
|
|
118
|
+
"bg-pos-9": { backgroundPosition: "right bottom" },
|
|
119
|
+
//圆角
|
|
120
|
+
"round": `border-radius: 50%;`,
|
|
121
|
+
"round-lg": `borderRadius: 24px;`,
|
|
122
|
+
"round-md": `border-radius: 10px;`,
|
|
123
|
+
"round-sm": `borderRadius: 4px;`,
|
|
124
|
+
"round-t": `borderBottomRightRadius: 0; borderBottomLeftRadius: 0;`,
|
|
125
|
+
"round-b": `borderTopRightRadius: 0; borderTopLeftRadius: 0;`,
|
|
126
|
+
"round-l": `borderTopRightRadius: 0; borderBottomRightRadius: 0;`,
|
|
127
|
+
"round-r": `borderTopLeftRadius: 0; borderBottomLeftRadius: 0;`,
|
|
128
|
+
//描边
|
|
129
|
+
"line": `borderStyle: solid;`,
|
|
130
|
+
"dashed": `borderStyle: dashed;`,
|
|
131
|
+
"line-l": `borderLeftStyle: solid;`,
|
|
132
|
+
"line-r": `borderRightStyle: solid;`,
|
|
133
|
+
"line-t": `borderTopStyle: solid;`,
|
|
134
|
+
"line-b": `borderBottomStyle: solid;`,
|
|
135
|
+
"dashed-l": `borderLeftStyle: dashed;`,
|
|
136
|
+
"dashed-r": `borderRightStyle: dashed;`,
|
|
137
|
+
"dashed-t": `borderTopStyle: dashed;`,
|
|
138
|
+
"dashed-b": `borderBottomStyle: dashed;`,
|
|
139
|
+
"line-outside": `backgroundClip: padding-box;`,
|
|
140
|
+
//文字描边
|
|
141
|
+
"text-line": {
|
|
142
|
+
textShadow: "1px 0 0 rgba(200, 200, 200, .5), -1px 0 0 rgba(200, 200, 200, .5), 0 1px 0 rgba(200, 200, 200, .5), 0 -1px 0 rgba(200, 200, 200, .5)"
|
|
143
|
+
},
|
|
144
|
+
//单行省略文本
|
|
145
|
+
"ellipsis": {
|
|
146
|
+
overflow: "hidden",
|
|
147
|
+
textOverflow: "ellipsis",
|
|
148
|
+
whiteSpace: "nowrap"
|
|
149
|
+
},
|
|
150
|
+
//阴影
|
|
151
|
+
"shadow": { boxShadow: "0 4px 17px" },
|
|
152
|
+
"shadow-sm": { boxShadow: "0 2px 4px" },
|
|
153
|
+
"shadow-lg": { boxShadow: "0 14px 40px" },
|
|
154
|
+
"shadow-relief": { boxShadow: "1px 1px 0 rgba(0,0,0,.7) inset, 1px 1px 0 rgba(255,255,255,.4)" },
|
|
155
|
+
//过渡动画
|
|
156
|
+
"trans": { transition: "all .7s" },
|
|
157
|
+
"trans-fast": { transition: "all .4s" },
|
|
158
|
+
"trans-slow": { transition: "all 1.4s" },
|
|
159
|
+
"trans-no": { transition: "none" },
|
|
160
|
+
//模糊滤镜
|
|
161
|
+
"blur-no": { filter: "blur(0px)" },
|
|
162
|
+
"blur-sm": { filter: "blur(2px)" },
|
|
163
|
+
"blur-md": { filter: "blur(7px)" },
|
|
164
|
+
"blur-lg": { filter: "blur(17px)" },
|
|
165
|
+
//明度滤镜
|
|
166
|
+
"dark-no": { filter: "brightness(100%)" },
|
|
167
|
+
"dark-sm": { filter: "brightness(80%)" },
|
|
168
|
+
"dark-md": { filter: "brightness(50%)" },
|
|
169
|
+
"dark-lg": { filter: "brightness(20%)" },
|
|
170
|
+
// 纯度滤镜
|
|
171
|
+
"gray-no": `filter: grayscale(0%);`,
|
|
172
|
+
"gray-sm": `filter: grayscale(40%);`,
|
|
173
|
+
"gray-md": `filter: grayscale(70%);`,
|
|
174
|
+
"gray-lg": `filter: grayscale(100%);`,
|
|
175
|
+
// 特殊
|
|
176
|
+
"bg-none": `pointerEvents: none;`,
|
|
177
|
+
"bg-use": `pointerEvents: auto;`,
|
|
178
|
+
"touch-none": `touchAction: none;`,
|
|
179
|
+
// 二段赋值-----------------------------------------------------------------------------------
|
|
180
|
+
// 文本对齐
|
|
181
|
+
"p": {
|
|
182
|
+
pro: "text-align"
|
|
183
|
+
},
|
|
184
|
+
// 文字颜色
|
|
185
|
+
"color": {
|
|
186
|
+
pro: "color"
|
|
187
|
+
},
|
|
188
|
+
// 背景色
|
|
189
|
+
"bg": {
|
|
190
|
+
pro: "background"
|
|
191
|
+
},
|
|
192
|
+
// 宽度
|
|
193
|
+
"w": {
|
|
194
|
+
pro: "width",
|
|
195
|
+
unit: "rem"
|
|
196
|
+
},
|
|
197
|
+
// 高度
|
|
198
|
+
"h": {
|
|
199
|
+
pro: "height",
|
|
200
|
+
unit: "rem"
|
|
201
|
+
},
|
|
202
|
+
// 内边距
|
|
203
|
+
"pad": {
|
|
204
|
+
pro: "padding",
|
|
205
|
+
unit: "rem"
|
|
206
|
+
},
|
|
207
|
+
// 外边距
|
|
208
|
+
"mrg": {
|
|
209
|
+
pro: "margin",
|
|
210
|
+
unit: "rem"
|
|
211
|
+
},
|
|
212
|
+
"rule_2": {
|
|
213
|
+
//字体
|
|
214
|
+
"font": {
|
|
215
|
+
pro: "fontFamily"
|
|
216
|
+
},
|
|
217
|
+
//字号
|
|
218
|
+
"fsize": {
|
|
219
|
+
pro: "fontSize",
|
|
220
|
+
unit: "em"
|
|
221
|
+
},
|
|
222
|
+
//行高
|
|
223
|
+
"lh": {
|
|
224
|
+
pro: "lineHeight"
|
|
225
|
+
},
|
|
226
|
+
//字符间距
|
|
227
|
+
"lspace": {
|
|
228
|
+
pro: "letterSpacing",
|
|
229
|
+
unit: "rem"
|
|
230
|
+
},
|
|
231
|
+
//不透明度
|
|
232
|
+
"alpha": {
|
|
233
|
+
pro: "opacity",
|
|
234
|
+
extra: {
|
|
235
|
+
visibility: "visible"
|
|
236
|
+
},
|
|
237
|
+
escape: {
|
|
238
|
+
"0": {
|
|
239
|
+
visibility: "hidden"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
//描边颜色
|
|
244
|
+
"line": {
|
|
245
|
+
pro: "borderColor"
|
|
246
|
+
},
|
|
247
|
+
//自生长比率
|
|
248
|
+
"grow": {
|
|
249
|
+
pro: "flexGrow",
|
|
250
|
+
extra: {
|
|
251
|
+
flexBasis: 0
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
//弹性布局项目排序
|
|
255
|
+
"order": {
|
|
256
|
+
pro: "order"
|
|
257
|
+
},
|
|
258
|
+
//多列布局容器
|
|
259
|
+
"column": {
|
|
260
|
+
pro: "columnCount",
|
|
261
|
+
extra: {
|
|
262
|
+
columnGap: 0
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
//最大宽
|
|
266
|
+
"rw": {
|
|
267
|
+
pro: "maxWidth",
|
|
268
|
+
unit: "rem"
|
|
269
|
+
},
|
|
270
|
+
//最小宽
|
|
271
|
+
"lw": {
|
|
272
|
+
pro: "minWidth",
|
|
273
|
+
unit: "rem"
|
|
274
|
+
},
|
|
275
|
+
//最大高
|
|
276
|
+
"th": {
|
|
277
|
+
pro: "maxHeight",
|
|
278
|
+
unit: "rem"
|
|
279
|
+
},
|
|
280
|
+
//最小高
|
|
281
|
+
"bh": {
|
|
282
|
+
pro: "minHeight",
|
|
283
|
+
unit: "rem"
|
|
284
|
+
},
|
|
285
|
+
//基于容器左侧水平位移
|
|
286
|
+
"l": {
|
|
287
|
+
pro: "left",
|
|
288
|
+
unit: "rem"
|
|
289
|
+
},
|
|
290
|
+
//基于容器右侧水平位移
|
|
291
|
+
"r": {
|
|
292
|
+
pro: "right",
|
|
293
|
+
unit: "rem"
|
|
294
|
+
},
|
|
295
|
+
//基于容器上侧垂直位移
|
|
296
|
+
"t": {
|
|
297
|
+
pro: "top",
|
|
298
|
+
unit: "rem"
|
|
299
|
+
},
|
|
300
|
+
//基于容器下侧垂直位移
|
|
301
|
+
"b": {
|
|
302
|
+
pro: "bottom",
|
|
303
|
+
unit: "rem"
|
|
304
|
+
},
|
|
305
|
+
//水平位移
|
|
306
|
+
"translateX": {
|
|
307
|
+
pro: "transform",
|
|
308
|
+
tmp: "translateX(%{}%)",
|
|
309
|
+
unit: "%"
|
|
310
|
+
},
|
|
311
|
+
//垂直位移
|
|
312
|
+
"translateY": {
|
|
313
|
+
pro: "transform",
|
|
314
|
+
tmp: "translateY(%{}%)",
|
|
315
|
+
unit: "%"
|
|
316
|
+
},
|
|
317
|
+
//放缩
|
|
318
|
+
"scale": {
|
|
319
|
+
pro: "transform",
|
|
320
|
+
tmp: "scale(%{}%)"
|
|
321
|
+
},
|
|
322
|
+
//旋转
|
|
323
|
+
"rotate": {
|
|
324
|
+
pro: "transform",
|
|
325
|
+
tmp: "rotate(%{}%)",
|
|
326
|
+
unit: "deg"
|
|
327
|
+
},
|
|
328
|
+
//变形
|
|
329
|
+
"transform": {
|
|
330
|
+
pro: "transform"
|
|
331
|
+
},
|
|
332
|
+
//变形中心点
|
|
333
|
+
"origin": {
|
|
334
|
+
pro: "transformOrigin"
|
|
335
|
+
},
|
|
336
|
+
//描边粗细
|
|
337
|
+
"thick": {
|
|
338
|
+
pro: "borderWidth",
|
|
339
|
+
unit: "px"
|
|
340
|
+
},
|
|
341
|
+
//过渡动画延迟
|
|
342
|
+
"trans": {
|
|
343
|
+
pro: "transition"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
//三段赋值-----------------------------------------------------------------------------------
|
|
347
|
+
"rule_3": {
|
|
348
|
+
//左侧
|
|
349
|
+
"l": {
|
|
350
|
+
pro: ["Left"],
|
|
351
|
+
unit: "rem"
|
|
352
|
+
},
|
|
353
|
+
//右侧
|
|
354
|
+
"r": {
|
|
355
|
+
pro: ["Right"],
|
|
356
|
+
unit: "rem"
|
|
357
|
+
},
|
|
358
|
+
//上侧
|
|
359
|
+
"t": {
|
|
360
|
+
pro: ["Top"],
|
|
361
|
+
unit: "rem"
|
|
362
|
+
},
|
|
363
|
+
//下侧
|
|
364
|
+
"b": {
|
|
365
|
+
pro: ["Bottom"],
|
|
366
|
+
unit: "rem"
|
|
367
|
+
},
|
|
368
|
+
//垂直方向
|
|
369
|
+
"v": {
|
|
370
|
+
pro: ["Top", "Bottom"],
|
|
371
|
+
unit: "rem"
|
|
372
|
+
},
|
|
373
|
+
//水平方向
|
|
374
|
+
"h": {
|
|
375
|
+
pro: ["Left", "Right"],
|
|
376
|
+
unit: "rem"
|
|
377
|
+
},
|
|
378
|
+
//背景颜色
|
|
379
|
+
"gradient": {
|
|
380
|
+
pro: ["Image"],
|
|
381
|
+
tmp: "-webkit-linear-gradient(%{}%)"
|
|
382
|
+
},
|
|
383
|
+
//背景颜色
|
|
384
|
+
"color": {
|
|
385
|
+
pro: ["Color"]
|
|
386
|
+
},
|
|
387
|
+
//背景尺寸
|
|
388
|
+
"size": {
|
|
389
|
+
pro: ["Size"]
|
|
390
|
+
},
|
|
391
|
+
//背景定位
|
|
392
|
+
"pos": {
|
|
393
|
+
pro: ["Position"]
|
|
394
|
+
},
|
|
395
|
+
//过渡动画延迟
|
|
396
|
+
"delay": {
|
|
397
|
+
pro: ["Delay"],
|
|
398
|
+
unit: "s"
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
const theme = {
|
|
403
|
+
// 预置主题色
|
|
404
|
+
colors: {
|
|
405
|
+
none: "transparent",
|
|
406
|
+
main: "#051c24",
|
|
407
|
+
sub: "#b4967a",
|
|
408
|
+
light: "#fff",
|
|
409
|
+
lgray: "#eee",
|
|
410
|
+
mgray: "#a7a7a7",
|
|
411
|
+
dgray: "#373737",
|
|
412
|
+
dark: "#111",
|
|
413
|
+
blue: "#4085f3",
|
|
414
|
+
green: "#02b9a1",
|
|
415
|
+
yellow: "#fdba00",
|
|
416
|
+
red: "#ec4334",
|
|
417
|
+
neutral: "rgba(134,134,134,.17)"
|
|
418
|
+
},
|
|
419
|
+
// 追加或覆盖主题色
|
|
420
|
+
append(colors) {
|
|
421
|
+
this.colors = { ...this.colors, ...colors };
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
const GLOBAL_STYLE_NAME = "BTXUIGlobal";
|
|
425
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
426
|
+
__name: "index",
|
|
427
|
+
props: {
|
|
428
|
+
class: {}
|
|
429
|
+
},
|
|
430
|
+
setup(__props) {
|
|
431
|
+
const props = __props;
|
|
432
|
+
const $style = ref();
|
|
433
|
+
const styleMap = computed(() => {
|
|
434
|
+
const list = [];
|
|
435
|
+
for (let item of $style.value.sheet.rules) {
|
|
436
|
+
list.push(item.selectorText.substr(1));
|
|
437
|
+
}
|
|
438
|
+
return list;
|
|
439
|
+
});
|
|
440
|
+
const initStyle = () => {
|
|
441
|
+
let $_style = document.head.querySelector(`#${GLOBAL_STYLE_NAME}`);
|
|
442
|
+
if (!$_style) {
|
|
443
|
+
$_style = document.createElement("style");
|
|
444
|
+
$_style.setAttribute("type", "text/css");
|
|
445
|
+
$_style.setAttribute("id", GLOBAL_STYLE_NAME);
|
|
446
|
+
document.head.appendChild($_style);
|
|
447
|
+
}
|
|
448
|
+
$style.value = $_style;
|
|
449
|
+
};
|
|
450
|
+
const styles = reactive({});
|
|
451
|
+
const validValue = (val) => {
|
|
452
|
+
if (!isNaN(val * 1))
|
|
453
|
+
return val;
|
|
454
|
+
if (theme.colors[val])
|
|
455
|
+
return theme.colors[val];
|
|
456
|
+
return false;
|
|
457
|
+
};
|
|
458
|
+
const parseStyle = (rule) => {
|
|
459
|
+
let style = prestyles[rule];
|
|
460
|
+
if (style)
|
|
461
|
+
return style;
|
|
462
|
+
const rules = rule.split("-");
|
|
463
|
+
const dirs = {
|
|
464
|
+
l: "left",
|
|
465
|
+
t: "top",
|
|
466
|
+
r: "right",
|
|
467
|
+
b: "bottom"
|
|
468
|
+
};
|
|
469
|
+
let [r1, r2, r3, r4] = rules;
|
|
470
|
+
style = prestyles[r1];
|
|
471
|
+
if (style) {
|
|
472
|
+
let value = validValue(r2);
|
|
473
|
+
if (value)
|
|
474
|
+
return `${style.pro}: ${value}${r3 || style.unit || ""}`;
|
|
475
|
+
value = validValue(r3);
|
|
476
|
+
if (value)
|
|
477
|
+
return `${style.pro}-${dirs[r2] || r2}: ${value}${r4 || style.unit || ""}`;
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
const parseStyles = (_class) => {
|
|
481
|
+
_class.split(" ").forEach((rule) => {
|
|
482
|
+
if (!styleMap.value.includes(rule)) {
|
|
483
|
+
styleMap.value.push(rule);
|
|
484
|
+
styles[rule] = parseStyle(rule);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
};
|
|
488
|
+
const setStyle = () => {
|
|
489
|
+
Object.keys(styles).forEach((key) => {
|
|
490
|
+
$style.value.sheet.addRule(`.${key}`, styles[key]);
|
|
491
|
+
});
|
|
492
|
+
};
|
|
493
|
+
onMounted(() => {
|
|
494
|
+
if (props.class) {
|
|
495
|
+
initStyle();
|
|
496
|
+
parseStyles(props.class);
|
|
497
|
+
setStyle();
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
return (_ctx, _cache) => {
|
|
501
|
+
return renderSlot(_ctx.$slots, "default");
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
506
|
+
__name: "index",
|
|
507
|
+
props: {
|
|
508
|
+
class: {},
|
|
509
|
+
bgImg: {}
|
|
510
|
+
},
|
|
511
|
+
setup(__props) {
|
|
512
|
+
return (_ctx, _cache) => {
|
|
513
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
514
|
+
class: normalizeClass(_ctx.class)
|
|
515
|
+
}, {
|
|
516
|
+
default: withCtx(() => [
|
|
517
|
+
createElementVNode("div", {
|
|
518
|
+
class: normalizeClass(_ctx.class),
|
|
519
|
+
style: normalizeStyle({ backgroundImage: `url(${_ctx.bgImg})` })
|
|
520
|
+
}, [
|
|
521
|
+
renderSlot(_ctx.$slots, "default")
|
|
522
|
+
], 6)
|
|
523
|
+
]),
|
|
524
|
+
_: 3
|
|
525
|
+
}, 8, ["class"]);
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
const initGlobalComponents = [
|
|
530
|
+
{
|
|
531
|
+
name: "styles",
|
|
532
|
+
wid: _sfc_main$1
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
name: "b-view",
|
|
536
|
+
wid: _sfc_main
|
|
537
|
+
}
|
|
538
|
+
];
|
|
539
|
+
const index = {
|
|
540
|
+
name: "btxui",
|
|
541
|
+
install(app) {
|
|
542
|
+
initGlobalComponents.forEach((item) => {
|
|
543
|
+
app.component(item.name, item.wid);
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
export {
|
|
548
|
+
index as default
|
|
549
|
+
};
|
package/index.js.gz
ADDED
|
Binary file
|
package/index.umd.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).btxui=t(e.vue)}(this,(function(e){"use strict";const t={resize:"font-size: 1rem; lineHeight: 1.5;",bold:"font-weight: bold;",show:'display: "block";',hide:'display: "none";',flex:'display: "flex"; justifyContent: "flex-start"; alignItems: "stretch";',"flex-column":'display: "flex"; flexDirection: "column";',"flex-1":'display: "flex"; justifyContent: "flex-start"; alignItems: "flex-start";',"flex-2":'display: "flex"; justifyContent: "center"; alignItems: "flex-start";',"flex-3":'display: "flex"; justifyContent: "flex-end"; alignItems: "flex-start";',"flex-4":'display: "flex"; justifyContent: "flex-start"; alignItems: "center"',"flex-5":{display:"flex",justifyContent:"center",alignItems:"center"},"flex-6":{display:"flex",justifyContent:"flex-end",alignItems:"center"},"flex-7":{display:"flex",justifyContent:"flex-start",alignItems:"flex-end"},"flex-8":{display:"flex",justifyContent:"center",alignItems:"flex-end"},"flex-9":{display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},"flex-between":{display:"flex",justifyContent:"space-between",alignItems:"center"},"flex-around":{display:"flex",justifyContent:"space-around",alignItems:"center"},grid:{display:"flex",flexWrap:"wrap",alignContent:"flex-start"},"max-h":{height:"100%"},"max-w":{width:"100%"},max:{height:"100%",width:"100%"},"max-screen":{height:"100%",width:"100%",position:"fixed",left:0,top:0},item:{breakInside:"avoid",mozPageBreakInside:"avoid",webkitColumnBreakInside:"avoid"},fixed:{position:"fixed"},rel:{position:"relative"},abs:{position:"absolute"},"z-1":{zIndex:-1},z0:{zIndex:0},z1:{zIndex:1},z2:{zIndex:2},z3:{zIndex:3},z4:{zIndex:4},z5:{zIndex:5},z6:{zIndex:6},z7:{zIndex:7},z8:{zIndex:8},z9:{zIndex:9},z10:{zIndex:10},"no-scroll":{overflow:"hidden"},"over-show":{overflow:"visible"},"over-scroll":{overflow:"scroll"},"over-hide":{overflow:"hidden"},"bg-repeat":{backgroundRepeat:"repeat"},"bg-repeat-x":{backgroundRepeat:"repeat-x"},"bg-repeat-y":{backgroundRepeat:"repeat-y"},"bg-size-cover":"background-size: cover;","bg-size-contain":"background-size: contain;","bg-size-max":"background-size: 100% 100%;","bg-size-max-h":"background-size: auto 100%;","bg-size-max-w":"background-size: 100% auto;","bg-pos-1":{backgroundPosition:"left top"},"bg-pos-2":{backgroundPosition:"center top"},"bg-pos-3":{backgroundPosition:"right top"},"bg-pos-4":{backgroundPosition:"left center"},"bg-pos-5":{backgroundPosition:"center center"},"bg-pos-6":{backgroundPosition:"right center"},"bg-pos-7":{backgroundPosition:"left bottom"},"bg-pos-8":{backgroundPosition:"center bottom"},"bg-pos-9":{backgroundPosition:"right bottom"},round:"border-radius: 50%;","round-lg":"borderRadius: 24px;","round-md":"border-radius: 10px;","round-sm":"borderRadius: 4px;","round-t":"borderBottomRightRadius: 0; borderBottomLeftRadius: 0;","round-b":"borderTopRightRadius: 0; borderTopLeftRadius: 0;","round-l":"borderTopRightRadius: 0; borderBottomRightRadius: 0;","round-r":"borderTopLeftRadius: 0; borderBottomLeftRadius: 0;",line:"borderStyle: solid;",dashed:"borderStyle: dashed;","line-l":"borderLeftStyle: solid;","line-r":"borderRightStyle: solid;","line-t":"borderTopStyle: solid;","line-b":"borderBottomStyle: solid;","dashed-l":"borderLeftStyle: dashed;","dashed-r":"borderRightStyle: dashed;","dashed-t":"borderTopStyle: dashed;","dashed-b":"borderBottomStyle: dashed;","line-outside":"backgroundClip: padding-box;","text-line":{textShadow:"1px 0 0 rgba(200, 200, 200, .5), -1px 0 0 rgba(200, 200, 200, .5), 0 1px 0 rgba(200, 200, 200, .5), 0 -1px 0 rgba(200, 200, 200, .5)"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},shadow:{boxShadow:"0 4px 17px"},"shadow-sm":{boxShadow:"0 2px 4px"},"shadow-lg":{boxShadow:"0 14px 40px"},"shadow-relief":{boxShadow:"1px 1px 0 rgba(0,0,0,.7) inset, 1px 1px 0 rgba(255,255,255,.4)"},trans:{transition:"all .7s"},"trans-fast":{transition:"all .4s"},"trans-slow":{transition:"all 1.4s"},"trans-no":{transition:"none"},"blur-no":{filter:"blur(0px)"},"blur-sm":{filter:"blur(2px)"},"blur-md":{filter:"blur(7px)"},"blur-lg":{filter:"blur(17px)"},"dark-no":{filter:"brightness(100%)"},"dark-sm":{filter:"brightness(80%)"},"dark-md":{filter:"brightness(50%)"},"dark-lg":{filter:"brightness(20%)"},"gray-no":"filter: grayscale(0%);","gray-sm":"filter: grayscale(40%);","gray-md":"filter: grayscale(70%);","gray-lg":"filter: grayscale(100%);","bg-none":"pointerEvents: none;","bg-use":"pointerEvents: auto;","touch-none":"touchAction: none;",p:{pro:"text-align"},color:{pro:"color"},bg:{pro:"background"},w:{pro:"width",unit:"rem"},h:{pro:"height",unit:"rem"},pad:{pro:"padding",unit:"rem"},mrg:{pro:"margin",unit:"rem"},rule_2:{font:{pro:"fontFamily"},fsize:{pro:"fontSize",unit:"em"},lh:{pro:"lineHeight"},lspace:{pro:"letterSpacing",unit:"rem"},alpha:{pro:"opacity",extra:{visibility:"visible"},escape:{0:{visibility:"hidden"}}},line:{pro:"borderColor"},grow:{pro:"flexGrow",extra:{flexBasis:0}},order:{pro:"order"},column:{pro:"columnCount",extra:{columnGap:0}},rw:{pro:"maxWidth",unit:"rem"},lw:{pro:"minWidth",unit:"rem"},th:{pro:"maxHeight",unit:"rem"},bh:{pro:"minHeight",unit:"rem"},l:{pro:"left",unit:"rem"},r:{pro:"right",unit:"rem"},t:{pro:"top",unit:"rem"},b:{pro:"bottom",unit:"rem"},translateX:{pro:"transform",tmp:"translateX(%{}%)",unit:"%"},translateY:{pro:"transform",tmp:"translateY(%{}%)",unit:"%"},scale:{pro:"transform",tmp:"scale(%{}%)"},rotate:{pro:"transform",tmp:"rotate(%{}%)",unit:"deg"},transform:{pro:"transform"},origin:{pro:"transformOrigin"},thick:{pro:"borderWidth",unit:"px"},trans:{pro:"transition"}},rule_3:{l:{pro:["Left"],unit:"rem"},r:{pro:["Right"],unit:"rem"},t:{pro:["Top"],unit:"rem"},b:{pro:["Bottom"],unit:"rem"},v:{pro:["Top","Bottom"],unit:"rem"},h:{pro:["Left","Right"],unit:"rem"},gradient:{pro:["Image"],tmp:"-webkit-linear-gradient(%{}%)"},color:{pro:["Color"]},size:{pro:["Size"]},pos:{pro:["Position"]},delay:{pro:["Delay"],unit:"s"}}},r={colors:{none:"transparent",main:"#051c24",sub:"#b4967a",light:"#fff",lgray:"#eee",mgray:"#a7a7a7",dgray:"#373737",dark:"#111",blue:"#4085f3",green:"#02b9a1",yellow:"#fdba00",red:"#ec4334",neutral:"rgba(134,134,134,.17)"},append(e){this.colors={...this.colors,...e}}},o="BTXUIGlobal",n=e.defineComponent({__name:"index",props:{class:{}},setup(n){const i=n,l=e.ref(),a=e.computed((()=>{const e=[];for(let t of l.value.sheet.rules)e.push(t.selectorText.substr(1));return e})),s=e.reactive({}),d=e=>isNaN(1*e)?!!r.colors[e]&&r.colors[e]:e,p=e=>{e.split(" ").forEach((e=>{a.value.includes(e)||(a.value.push(e),s[e]=(e=>{let r=t[e];if(r)return r;const o=e.split("-"),n={l:"left",t:"top",r:"right",b:"bottom"};let[i,l,a,s]=o;if(r=t[i],r){let e=d(l);if(e)return`${r.pro}: ${e}${a||r.unit||""}`;if(e=d(a),e)return`${r.pro}-${n[l]||l}: ${e}${s||r.unit||""}`}})(e))}))};return e.onMounted((()=>{i.class&&((()=>{let e=document.head.querySelector(`#${o}`);e||(e=document.createElement("style"),e.setAttribute("type","text/css"),e.setAttribute("id",o),document.head.appendChild(e)),l.value=e})(),p(i.class),Object.keys(s).forEach((e=>{l.value.sheet.addRule(`.${e}`,s[e])})))})),(t,r)=>e.renderSlot(t.$slots,"default")}}),i=[{name:"styles",wid:n},{name:"b-view",wid:e.defineComponent({__name:"index",props:{class:{},bgImg:{}},setup:t=>(t,r)=>(e.openBlock(),e.createBlock(n,{class:e.normalizeClass(t.class)},{default:e.withCtx((()=>[e.createElementVNode("div",{class:e.normalizeClass(t.class),style:e.normalizeStyle({backgroundImage:`url(${t.bgImg})`})},[e.renderSlot(t.$slots,"default")],6)])),_:3},8,["class"]))})}];return{name:"btxui",install(e){i.forEach((t=>{e.component(t.name,t.wid)}))}}}));
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "btxui",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"private": false,
|
|
3
|
+
"version": "1.0.6",
|
|
5
4
|
"description": "",
|
|
6
|
-
"main": "index.
|
|
5
|
+
"main": "index.js",
|
|
7
6
|
"scripts": {
|
|
8
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
8
|
},
|
|
10
|
-
"author": "
|
|
9
|
+
"author": "",
|
|
11
10
|
"license": "ISC"
|
|
12
11
|
}
|
package/demo.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!doctype html><meta charset="utf-8"><title>index demo</title><script src="./index.umd.js"></script><link rel="stylesheet" href="./index.css"><script>console.log(index)</script>
|
package/index.common.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/******/ (() => { // webpackBootstrap
|
|
2
|
-
/******/ "use strict";
|
|
3
|
-
/******/ // The require scope
|
|
4
|
-
/******/ var __webpack_require__ = {};
|
|
5
|
-
/******/
|
|
6
|
-
/************************************************************************/
|
|
7
|
-
/******/ /* webpack/runtime/define property getters */
|
|
8
|
-
/******/ (() => {
|
|
9
|
-
/******/ // define getter functions for harmony exports
|
|
10
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
11
|
-
/******/ for(var key in definition) {
|
|
12
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
13
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
14
|
-
/******/ }
|
|
15
|
-
/******/ }
|
|
16
|
-
/******/ };
|
|
17
|
-
/******/ })();
|
|
18
|
-
/******/
|
|
19
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
20
|
-
/******/ (() => {
|
|
21
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
22
|
-
/******/ })();
|
|
23
|
-
/******/
|
|
24
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
25
|
-
/******/ (() => {
|
|
26
|
-
/******/ // define __esModule on exports
|
|
27
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
28
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
29
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
30
|
-
/******/ }
|
|
31
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
32
|
-
/******/ };
|
|
33
|
-
/******/ })();
|
|
34
|
-
/******/
|
|
35
|
-
/******/ /* webpack/runtime/publicPath */
|
|
36
|
-
/******/ (() => {
|
|
37
|
-
/******/ __webpack_require__.p = "";
|
|
38
|
-
/******/ })();
|
|
39
|
-
/******/
|
|
40
|
-
/************************************************************************/
|
|
41
|
-
var __webpack_exports__ = {};
|
|
42
|
-
// ESM COMPAT FLAG
|
|
43
|
-
__webpack_require__.r(__webpack_exports__);
|
|
44
|
-
|
|
45
|
-
// EXPORTS
|
|
46
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
47
|
-
"default": () => (/* binding */ entry_lib)
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
51
|
-
/* eslint-disable no-var */
|
|
52
|
-
// This file is imported into lib/wc client bundles.
|
|
53
|
-
|
|
54
|
-
if (typeof window !== 'undefined') {
|
|
55
|
-
var currentScript = window.document.currentScript
|
|
56
|
-
if (false) { var getCurrentScript; }
|
|
57
|
-
|
|
58
|
-
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
59
|
-
if (src) {
|
|
60
|
-
__webpack_require__.p = src[1] // eslint-disable-line
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Indicate to webpack that this file can be concatenated
|
|
65
|
-
/* harmony default export */ const setPublicPath = (null);
|
|
66
|
-
|
|
67
|
-
;// CONCATENATED MODULE: ./components/index.js
|
|
68
|
-
// const initGlobalComponents: GlobalType.IRecord = import.meta.glob("@/components/BTXUI/core/*/*.vue");
|
|
69
|
-
const styles = ({}).glob("@/components/BTXUI/core/styles/index.vue");
|
|
70
|
-
const bView = ({}).glob("@/components/BTXUI/core/b-view/index.vue");
|
|
71
|
-
const initGlobalComponents = { ...styles, ...bView };
|
|
72
|
-
|
|
73
|
-
/* harmony default export */ const components = ({
|
|
74
|
-
name: "btxui",
|
|
75
|
-
install(app){
|
|
76
|
-
// 注册全局组件
|
|
77
|
-
Object.keys(initGlobalComponents).forEach(path => {
|
|
78
|
-
const pathBlocks = path.split("/");
|
|
79
|
-
pathBlocks.pop();
|
|
80
|
-
app.component(pathBlocks.pop(), initGlobalComponents[path]);
|
|
81
|
-
})
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/* harmony default export */ const entry_lib = (components);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
module.exports = __webpack_exports__;
|
|
91
|
-
/******/ })()
|
|
92
|
-
;
|
|
93
|
-
//# sourceMappingURL=index.common.js.map
|
package/index.common.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.common.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;;;;;;;;;;;;;ACAA;AACA;;AAEA;AACA;AACA,MAAM,KAAuC,EAAE,yBAQ5C;;AAEH;AACA;AACA,IAAI,qBAAuB;AAC3B;AACA;;AAEA;AACA,oDAAe,IAAI;;;ACtBnB;AACA,eAAe,IAAW;AAC1B,cAAc,IAAW;AACzB,+BAA+B;AAC/B;AACA,iDAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;ACfwB;AACA;AACxB,gDAAe,UAAG;AACI","sources":["webpack://btxui/webpack/bootstrap","webpack://btxui/webpack/runtime/define property getters","webpack://btxui/webpack/runtime/hasOwnProperty shorthand","webpack://btxui/webpack/runtime/make namespace object","webpack://btxui/webpack/runtime/publicPath","webpack://btxui/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://btxui/./components/index.js","webpack://btxui/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"\";","/* eslint-disable no-var */\n// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","// const initGlobalComponents: GlobalType.IRecord = import.meta.glob(\"@/components/BTXUI/core/*/*.vue\");\r\nconst styles = import.meta.glob(\"@/components/BTXUI/core/styles/index.vue\");\r\nconst bView = import.meta.glob(\"@/components/BTXUI/core/b-view/index.vue\");\r\nconst initGlobalComponents = { ...styles, ...bView };\r\n\r\nexport default {\r\n name: \"btxui\",\r\n install(app){\r\n // 注册全局组件\r\n Object.keys(initGlobalComponents).forEach(path => {\r\n const pathBlocks = path.split(\"/\");\r\n pathBlocks.pop();\r\n app.component(pathBlocks.pop(), initGlobalComponents[path]);\r\n })\r\n }\r\n}","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"names":[],"sourceRoot":""}
|
package/index.umd.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory();
|
|
4
|
-
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define([], factory);
|
|
6
|
-
else if(typeof exports === 'object')
|
|
7
|
-
exports["index"] = factory();
|
|
8
|
-
else
|
|
9
|
-
root["index"] = factory();
|
|
10
|
-
})((typeof self !== 'undefined' ? self : this), () => {
|
|
11
|
-
return /******/ (() => { // webpackBootstrap
|
|
12
|
-
/******/ "use strict";
|
|
13
|
-
/******/ // The require scope
|
|
14
|
-
/******/ var __webpack_require__ = {};
|
|
15
|
-
/******/
|
|
16
|
-
/************************************************************************/
|
|
17
|
-
/******/ /* webpack/runtime/define property getters */
|
|
18
|
-
/******/ (() => {
|
|
19
|
-
/******/ // define getter functions for harmony exports
|
|
20
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
21
|
-
/******/ for(var key in definition) {
|
|
22
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
23
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
24
|
-
/******/ }
|
|
25
|
-
/******/ }
|
|
26
|
-
/******/ };
|
|
27
|
-
/******/ })();
|
|
28
|
-
/******/
|
|
29
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
30
|
-
/******/ (() => {
|
|
31
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
32
|
-
/******/ })();
|
|
33
|
-
/******/
|
|
34
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
35
|
-
/******/ (() => {
|
|
36
|
-
/******/ // define __esModule on exports
|
|
37
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
38
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
39
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
40
|
-
/******/ }
|
|
41
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/ })();
|
|
44
|
-
/******/
|
|
45
|
-
/******/ /* webpack/runtime/publicPath */
|
|
46
|
-
/******/ (() => {
|
|
47
|
-
/******/ __webpack_require__.p = "";
|
|
48
|
-
/******/ })();
|
|
49
|
-
/******/
|
|
50
|
-
/************************************************************************/
|
|
51
|
-
var __webpack_exports__ = {};
|
|
52
|
-
// ESM COMPAT FLAG
|
|
53
|
-
__webpack_require__.r(__webpack_exports__);
|
|
54
|
-
|
|
55
|
-
// EXPORTS
|
|
56
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
57
|
-
"default": () => (/* binding */ entry_lib)
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
61
|
-
/* eslint-disable no-var */
|
|
62
|
-
// This file is imported into lib/wc client bundles.
|
|
63
|
-
|
|
64
|
-
if (typeof window !== 'undefined') {
|
|
65
|
-
var currentScript = window.document.currentScript
|
|
66
|
-
if (false) { var getCurrentScript; }
|
|
67
|
-
|
|
68
|
-
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
69
|
-
if (src) {
|
|
70
|
-
__webpack_require__.p = src[1] // eslint-disable-line
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Indicate to webpack that this file can be concatenated
|
|
75
|
-
/* harmony default export */ const setPublicPath = (null);
|
|
76
|
-
|
|
77
|
-
;// CONCATENATED MODULE: ./components/index.js
|
|
78
|
-
// const initGlobalComponents: GlobalType.IRecord = import.meta.glob("@/components/BTXUI/core/*/*.vue");
|
|
79
|
-
const styles = ({}).glob("@/components/BTXUI/core/styles/index.vue");
|
|
80
|
-
const bView = ({}).glob("@/components/BTXUI/core/b-view/index.vue");
|
|
81
|
-
const initGlobalComponents = { ...styles, ...bView };
|
|
82
|
-
|
|
83
|
-
/* harmony default export */ const components = ({
|
|
84
|
-
name: "btxui",
|
|
85
|
-
install(app){
|
|
86
|
-
// 注册全局组件
|
|
87
|
-
Object.keys(initGlobalComponents).forEach(path => {
|
|
88
|
-
const pathBlocks = path.split("/");
|
|
89
|
-
pathBlocks.pop();
|
|
90
|
-
app.component(pathBlocks.pop(), initGlobalComponents[path]);
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/* harmony default export */ const entry_lib = (components);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/******/ return __webpack_exports__;
|
|
101
|
-
/******/ })()
|
|
102
|
-
;
|
|
103
|
-
});
|
|
104
|
-
//# sourceMappingURL=index.umd.js.map
|
package/index.umd.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;UCVA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;;;;;;;;;;;;;ACAA;AACA;;AAEA;AACA;AACA,MAAM,KAAuC,EAAE,yBAQ5C;;AAEH;AACA;AACA,IAAI,qBAAuB;AAC3B;AACA;;AAEA;AACA,oDAAe,IAAI;;;ACtBnB;AACA,eAAe,IAAW;AAC1B,cAAc,IAAW;AACzB,+BAA+B;AAC/B;AACA,iDAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;ACfwB;AACA;AACxB,gDAAe,UAAG;AACI","sources":["webpack://index/webpack/universalModuleDefinition","webpack://index/webpack/bootstrap","webpack://index/webpack/runtime/define property getters","webpack://index/webpack/runtime/hasOwnProperty shorthand","webpack://index/webpack/runtime/make namespace object","webpack://index/webpack/runtime/publicPath","webpack://index/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://index/./components/index.js","webpack://index/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"index\"] = factory();\n\telse\n\t\troot[\"index\"] = factory();\n})((typeof self !== 'undefined' ? self : this), () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"\";","/* eslint-disable no-var */\n// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","// const initGlobalComponents: GlobalType.IRecord = import.meta.glob(\"@/components/BTXUI/core/*/*.vue\");\r\nconst styles = import.meta.glob(\"@/components/BTXUI/core/styles/index.vue\");\r\nconst bView = import.meta.glob(\"@/components/BTXUI/core/b-view/index.vue\");\r\nconst initGlobalComponents = { ...styles, ...bView };\r\n\r\nexport default {\r\n name: \"btxui\",\r\n install(app){\r\n // 注册全局组件\r\n Object.keys(initGlobalComponents).forEach(path => {\r\n const pathBlocks = path.split(\"/\");\r\n pathBlocks.pop();\r\n app.component(pathBlocks.pop(), initGlobalComponents[path]);\r\n })\r\n }\r\n}","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"names":[],"sourceRoot":""}
|
package/index.umd.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(e,o){"object"===typeof exports&&"object"===typeof module?module.exports=o():"function"===typeof define&&define.amd?define([],o):"object"===typeof exports?exports["index"]=o():e["index"]=o()})("undefined"!==typeof self?self:this,(()=>(()=>{"use strict";var e={};(()=>{e.d=(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})}})(),(()=>{e.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o)})(),(()=>{e.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{e.p=""})();var o={};if(e.r(o),e.d(o,{default:()=>c}),"undefined"!==typeof window){var t=window.document.currentScript,n=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(e.p=n[1])}const r={}.glob("@/components/BTXUI/core/styles/index.vue"),i={}.glob("@/components/BTXUI/core/b-view/index.vue"),p={...r,...i},d={name:"btxui",install(e){Object.keys(p).forEach((o=>{const t=o.split("/");t.pop(),e.component(t.pop(),p[o])}))}},c=d;return o})()));
|
|
2
|
-
//# sourceMappingURL=index.umd.min.js.map
|
package/index.umd.min.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.min.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,IACQ,oBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,kBAAZC,QACdA,QAAQ,SAAWD,IAEnBD,EAAK,SAAWC,GACjB,EATD,CASoB,qBAATK,KAAuBA,KAAOC,MAAO,I,mBCRhD,IAAIC,EAAsB,CAAC,E,MCA3BA,EAAoBC,EAAI,CAACP,EAASQ,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEV,EAASS,IAC5EE,OAAOC,eAAeZ,EAASS,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,C,WCNDH,EAAoBI,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,E,WCClFV,EAAoBc,EAAKpB,IACH,qBAAXqB,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAeZ,EAASqB,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAeZ,EAAS,aAAc,CAAEuB,OAAO,GAAO,C,WCL9DjB,EAAoBkB,EAAI,E,cCGxB,G,8BAAsB,qBAAXC,OAAwB,CACjC,IAAIC,EAAgBD,OAAOE,SAASD,cAWhCE,EAAMF,GAAiBA,EAAcE,IAAIC,MAAM,2BAC/CD,IACF,IAA0BA,EAAI,GAElC,CAGA,MCrBME,EAAS,GAAYC,KAAK,4CAC1BC,EAAQ,GAAYD,KAAK,4CACzBE,EAAuB,IAAKH,KAAWE,GAE7C,GACIE,KAAM,QACN,OAAAC,CAAQC,GAEJzB,OAAO0B,KAAKJ,GAAsBK,SAAQC,IACtC,MAAMC,EAAaD,EAAKE,MAAM,KAC9BD,EAAWE,MACXN,EAAIO,UAAUH,EAAWE,MAAOT,EAAqBM,GAAM,GAEnE,GCZJ,I","sources":["webpack://index/webpack/universalModuleDefinition","webpack://index/webpack/bootstrap","webpack://index/webpack/runtime/define property getters","webpack://index/webpack/runtime/hasOwnProperty shorthand","webpack://index/webpack/runtime/make namespace object","webpack://index/webpack/runtime/publicPath","webpack://index/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://index/./components/index.js","webpack://index/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"index\"] = factory();\n\telse\n\t\troot[\"index\"] = factory();\n})((typeof self !== 'undefined' ? self : this), () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"\";","/* eslint-disable no-var */\n// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","// const initGlobalComponents: GlobalType.IRecord = import.meta.glob(\"@/components/BTXUI/core/*/*.vue\");\r\nconst styles = import.meta.glob(\"@/components/BTXUI/core/styles/index.vue\");\r\nconst bView = import.meta.glob(\"@/components/BTXUI/core/b-view/index.vue\");\r\nconst initGlobalComponents = { ...styles, ...bView };\r\n\r\nexport default {\r\n name: \"btxui\",\r\n install(app){\r\n // 注册全局组件\r\n Object.keys(initGlobalComponents).forEach(path => {\r\n const pathBlocks = path.split(\"/\");\r\n pathBlocks.pop();\r\n app.component(pathBlocks.pop(), initGlobalComponents[path]);\r\n })\r\n }\r\n}","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"names":["root","factory","exports","module","define","amd","self","this","__webpack_require__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","p","window","currentScript","document","src","match","styles","glob","bView","initGlobalComponents","name","install","app","keys","forEach","path","pathBlocks","split","pop","component"],"sourceRoot":""}
|