@oipage/cli 0.3.0 → 1.0.0-alpha.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.
Files changed (92) hide show
  1. package/.github/FUNDING.yml +11 -11
  2. package/AUTHORS.txt +6 -6
  3. package/CHANGELOG +76 -47
  4. package/LICENSE +20 -20
  5. package/README.md +204 -132
  6. package/bin/WebSocket/decodeWsFrame.js +43 -43
  7. package/bin/WebSocket/encodeWsFrame.js +28 -28
  8. package/bin/WebSocket/headersToJSON.js +26 -26
  9. package/bin/WebSocket/index.js +106 -106
  10. package/bin/data/mineTypes.json +108 -104
  11. package/bin/disk.js +42 -42
  12. package/bin/help.js +63 -55
  13. package/bin/intercept.js +15 -15
  14. package/bin/network.js +21 -21
  15. package/bin/notebook/data.js +185 -0
  16. package/bin/notebook/index.js +168 -9
  17. package/bin/proxy.js +82 -82
  18. package/bin/run +146 -146
  19. package/bin/serve.js +455 -318
  20. package/bin/template/404.html +184 -184
  21. package/bin/tools/deleteEmptyFolder.js +33 -33
  22. package/bin/tools/format.js +75 -75
  23. package/bin/tools/isBinary.js +83 -83
  24. package/bin/tools/moduleForm.js +548 -0
  25. package/bin/tools/network.js +42 -42
  26. package/bin/tools/openBrowser.js +34 -34
  27. package/bin/tools/resolve404.js +98 -98
  28. package/bin/tools/resolveImport.js +278 -97
  29. package/bin/tools/resolvePackage.js +412 -0
  30. package/bin/website-htmls/components/ui-select-file/index.html +8 -8
  31. package/bin/website-htmls/components/ui-select-file/index.js +42 -42
  32. package/bin/website-htmls/components/ui-select-file/index.scss +44 -44
  33. package/bin/website-htmls/dialogs/imageSize/index.html +54 -54
  34. package/bin/website-htmls/dialogs/imageSize/index.js +53 -53
  35. package/bin/website-htmls/dialogs/imageSize/index.scss +140 -140
  36. package/bin/website-htmls/dialogs/index.js +52 -52
  37. package/bin/website-htmls/images/addFile.svg +1 -1
  38. package/bin/website-htmls/images/img-to-pdf.svg +1 -1
  39. package/bin/website-htmls/index.html +17 -17
  40. package/bin/website-htmls/main.js +13 -13
  41. package/bin/website-htmls/pages/App/index.html +6 -6
  42. package/bin/website-htmls/pages/App/index.js +22 -22
  43. package/bin/website-htmls/pages/App/index.scss +43 -43
  44. package/bin/website-htmls/pages/appStore/index.html +7 -7
  45. package/bin/website-htmls/pages/appStore/index.js +19 -19
  46. package/bin/website-htmls/pages/appStore/index.scss +54 -54
  47. package/bin/website-htmls/pages/chart/index.html +8 -8
  48. package/bin/website-htmls/pages/chart/index.js +72 -72
  49. package/bin/website-htmls/pages/chart/index.scss +71 -71
  50. package/bin/website-htmls/pages/home/index.html +19 -19
  51. package/bin/website-htmls/pages/home/index.js +19 -19
  52. package/bin/website-htmls/pages/home/index.scss +87 -87
  53. package/bin/website-htmls/pages/image-editor/index.html +27 -27
  54. package/bin/website-htmls/pages/image-editor/index.js +106 -106
  55. package/bin/website-htmls/pages/image-editor/index.scss +69 -69
  56. package/bin/website-htmls/pages/img-to-pdf/index.html +3 -3
  57. package/bin/website-htmls/pages/img-to-pdf/index.js +44 -44
  58. package/bin/website-htmls/pages/img-to-pdf/index.scss +9 -9
  59. package/bin/website-htmls/pages/recorder-screen/index.html +15 -15
  60. package/bin/website-htmls/pages/recorder-screen/index.js +227 -227
  61. package/bin/website-htmls/pages/recorder-screen/index.scss +52 -52
  62. package/bin/website-htmls/router.config.js +29 -29
  63. package/bin/website-htmls/styles/common.css +44 -44
  64. package/bin/website-htmls/styles/normalize.css +94 -94
  65. package/bin/website-plugins/intercept/chart.js +33 -33
  66. package/bin/website-plugins/intercept/getPackage.js +17 -17
  67. package/bin/website-plugins/intercept/head.js +8 -8
  68. package/bin/website-plugins/intercept/index.js +4 -8
  69. package/bin/website-plugins/loader/index.js +11 -11
  70. package/bin/website-plugins/loader/oipage-html-loader.js +7 -7
  71. package/bin/website-plugins/loader/oipage-scss-loader.js +149 -149
  72. package/docs/css/base.css +122 -0
  73. package/docs/css/components.css +180 -0
  74. package/docs/css/layout.css +295 -0
  75. package/docs/css/responsive.css +49 -0
  76. package/docs/images/file-list.webp +0 -0
  77. package/docs/images/logo-topbar.svg +5 -0
  78. package/docs/images/logo.png +0 -0
  79. package/docs/images/logo.svg +6 -0
  80. package/docs/images/manual.webp +0 -0
  81. package/docs/images/terminal-serve.webp +0 -0
  82. package/docs/index.html +1392 -0
  83. package/docs/js/copy.js +37 -0
  84. package/docs/js/nav.js +111 -0
  85. package/docs/js/search.js +241 -0
  86. package/docs/js/theme.js +17 -0
  87. package/package.json +42 -42
  88. package/src/index.js +26 -29
  89. package/types/serve.d.ts +83 -83
  90. package/bin/website-plugins/intercept/oipage-vislite-intercept.js +0 -56
  91. package/bin/website-plugins/intercept/oipage-zipaper-intercept.js +0 -37
  92. package/docs/config.md +0 -107
@@ -0,0 +1,412 @@
1
+ const { existsSync, readFileSync, statSync } = require("fs");
2
+ const { join, dirname, resolve, relative, sep, extname } = require("path");
3
+ const { getForm } = require("./moduleForm.js");
4
+
5
+ // 命令行工具自身根目录(本文件位于 bin/tools/ 下)
6
+ const cliRoot = resolve(__dirname, "../..");
7
+
8
+ // 补全候选
9
+ const EXTENSIONS = [".js", ".mjs", ".cjs", ".json"];
10
+ const INDEX_FILES = ["index.js", "index.mjs", "index.cjs", "index.json"];
11
+
12
+ // package.json 读取缓存:路径 -> { mtimeMs, size, value }
13
+ const packageCache = new Map();
14
+
15
+ /**
16
+ * 静态读取 package.json(不使用 require,避免长期缓存与 ESM 报错)
17
+ * @param {string} packageDir 包目录
18
+ * @returns {object|null} package.json 内容
19
+ */
20
+ function readPackageJson(packageDir) {
21
+ const file = join(packageDir, "package.json");
22
+ const stat = statOf(file);
23
+
24
+ if (!stat || stat.isDirectory()) return null;
25
+
26
+ const cached = packageCache.get(file);
27
+ if (cached && cached.mtimeMs === stat.mtimeMs && cached.size === stat.size) return cached.value;
28
+
29
+ let value = null;
30
+
31
+ try {
32
+ value = JSON.parse(readFileSync(file, "utf8"));
33
+ } catch (e) {
34
+ // 解析失败的 package.json 不应该让整个服务器挂掉
35
+ console.log("\x1b[1m\x1b[33m[resolvePackage] invalid package.json: " + file + "\x1b[0m " + e.message);
36
+ value = null;
37
+ }
38
+
39
+ packageCache.set(file, { mtimeMs: stat.mtimeMs, size: stat.size, value });
40
+ return value;
41
+ }
42
+
43
+ /**
44
+ * 向上查找离文件最近的 package.json
45
+ * @param {string} filePath 文件路径
46
+ * @returns {{dir: string, value: object}|null}
47
+ */
48
+ function findPackageJson(filePath) {
49
+ let dir = dirname(filePath);
50
+
51
+ while (true) {
52
+ const file = join(dir, "package.json");
53
+
54
+ if (existsSync(file)) {
55
+ return { dir, value: readPackageJson(dir) };
56
+ }
57
+
58
+ const parent = dirname(dir);
59
+ if (parent === dir) return null;
60
+ dir = parent;
61
+ }
62
+ }
63
+
64
+ function statOf(file) {
65
+ try {
66
+ return statSync(file);
67
+ } catch (e) {
68
+ return null;
69
+ }
70
+ }
71
+
72
+ /**
73
+ * 补全路径:扩展名、目录 index
74
+ * @param {string} candidate 候选路径
75
+ * @returns {string|null} 真实文件路径
76
+ */
77
+ function completePath(candidate) {
78
+ const stat = statOf(candidate);
79
+
80
+ if (stat && stat.isFile()) return candidate;
81
+
82
+ if (stat && stat.isDirectory()) {
83
+ for (const name of INDEX_FILES) {
84
+ const file = join(candidate, name);
85
+ const subStat = statOf(file);
86
+ if (subStat && subStat.isFile()) return file;
87
+ }
88
+ return null;
89
+ }
90
+
91
+ if (!extname(candidate)) {
92
+ for (const ext of EXTENSIONS) {
93
+ const file = candidate + ext;
94
+ const subStat = statOf(file);
95
+ if (subStat && subStat.isFile()) return file;
96
+ }
97
+ }
98
+
99
+ return null;
100
+ }
101
+
102
+ /**
103
+ * exports 字段是否属于“条件对象”(不含以 . 开头的子路径键)
104
+ */
105
+ function isConditionalObject(value) {
106
+ const keys = Object.keys(value);
107
+ return keys.length > 0 && !keys.some(key => key.startsWith("."));
108
+ }
109
+
110
+ /**
111
+ * 把 exports 统一成 { 子路径: 目标 } 的形式
112
+ */
113
+ function normalizeExportsMap(exportsField) {
114
+ if (typeof exportsField === "string" || Array.isArray(exportsField)) {
115
+ return { ".": exportsField };
116
+ }
117
+
118
+ if (exportsField && typeof exportsField === "object") {
119
+ const keys = Object.keys(exportsField);
120
+ if (keys.length === 0) return {};
121
+ if (!keys.some(key => key.startsWith("."))) return { ".": exportsField };
122
+ return exportsField;
123
+ }
124
+
125
+ return {};
126
+ }
127
+
128
+ /**
129
+ * 按条件优先级取出目标路径
130
+ * @param {*} target exports 里的某一项
131
+ * @param {Array<string>} conditions 条件优先级
132
+ * @param {string} packageDir 包目录
133
+ * @param {string|null} patternMatch 通配命中的片段
134
+ * @returns {string|null} 绝对路径
135
+ */
136
+ function pickTarget(target, conditions, packageDir, patternMatch) {
137
+ if (typeof target === "string") {
138
+ let targetPath = target;
139
+
140
+ if (patternMatch !== null && patternMatch !== undefined) {
141
+ targetPath = targetPath.split("*").join(patternMatch);
142
+ }
143
+
144
+ // 只允许包内相对路径
145
+ if (!targetPath.startsWith("./")) return null;
146
+
147
+ return completePath(resolve(packageDir, targetPath));
148
+ }
149
+
150
+ if (Array.isArray(target)) {
151
+ for (const item of target) {
152
+ const result = pickTarget(item, conditions, packageDir, patternMatch);
153
+ if (result) return result;
154
+ }
155
+ return null;
156
+ }
157
+
158
+ if (target && typeof target === "object") {
159
+ if (!isConditionalObject(target)) return null;
160
+
161
+ for (const key of Object.keys(target)) {
162
+ // types 永远不是运行时入口
163
+ if (key === "types" || key === "typings") continue;
164
+
165
+ if (key === "default" || conditions.includes(key)) {
166
+ const result = pickTarget(target[key], conditions, packageDir, patternMatch);
167
+ if (result) return result;
168
+ }
169
+ }
170
+
171
+ return null;
172
+ }
173
+
174
+ return null;
175
+ }
176
+
177
+ /**
178
+ * 解析 exports 里的子路径
179
+ * @param {object} exportsField exports 字段
180
+ * @param {string} subpath 子路径(不带前导 ./,空串代表入口)
181
+ * @param {Array<string>} conditions 条件优先级
182
+ * @param {string} packageDir 包目录
183
+ * @returns {string|null} 绝对路径
184
+ */
185
+ function resolveExportsSubpath(exportsField, subpath, conditions, packageDir) {
186
+ const map = normalizeExportsMap(exportsField);
187
+ const key = subpath ? "./" + subpath : ".";
188
+
189
+ if (map[key] !== undefined) {
190
+ const result = pickTarget(map[key], conditions, packageDir, null);
191
+ if (result) return result;
192
+ }
193
+
194
+ // 通配匹配:取前缀最长的那个(对齐 Node 的规则)
195
+ let best = null;
196
+
197
+ for (const mapKey of Object.keys(map)) {
198
+ const starIndex = mapKey.indexOf("*");
199
+ if (starIndex < 0) continue;
200
+
201
+ const prefix = mapKey.slice(0, starIndex);
202
+ const suffix = mapKey.slice(starIndex + 1);
203
+
204
+ if (key.length < prefix.length + suffix.length) continue;
205
+ if (!key.startsWith(prefix) || !key.endsWith(suffix)) continue;
206
+
207
+ const match = key.slice(prefix.length, key.length - suffix.length);
208
+
209
+ if (!best || prefix.length > best.prefix.length) {
210
+ best = { prefix, suffix, match, value: map[mapKey] };
211
+ }
212
+ }
213
+
214
+ if (best) {
215
+ return pickTarget(best.value, conditions, packageDir, best.match);
216
+ }
217
+
218
+ return null;
219
+ }
220
+
221
+ /**
222
+ * 传统字段回退:browser -> module -> main -> index.js
223
+ */
224
+ function resolveLegacy(pkg, packageDir, subpath) {
225
+ // 子路径的 browser 映射(browser 字段写成对象时)
226
+ if (subpath && pkg && pkg.browser && typeof pkg.browser === "object") {
227
+ const mapped = pkg.browser["./" + subpath] || pkg.browser[subpath];
228
+ if (typeof mapped === "string") {
229
+ const result = completePath(resolve(packageDir, mapped));
230
+ if (result) return result;
231
+ }
232
+ }
233
+
234
+ const candidates = [];
235
+
236
+ if (typeof pkg.browser === "string") candidates.push(pkg.browser);
237
+ if (typeof pkg.module === "string") candidates.push(pkg.module);
238
+ if (typeof pkg.main === "string") candidates.push(pkg.main);
239
+
240
+ if (!subpath) candidates.push("index.js");
241
+
242
+ for (const candidate of candidates) {
243
+ const result = completePath(resolve(packageDir, candidate));
244
+ if (result) return result;
245
+ }
246
+
247
+ // 子路径直接按物理路径找
248
+ if (subpath) {
249
+ const result = completePath(join(packageDir, subpath));
250
+ if (result) return result;
251
+ }
252
+
253
+ return null;
254
+ }
255
+
256
+ /**
257
+ * 拆分包名与子路径
258
+ * @param {string} specifier 包说明符
259
+ */
260
+ function splitSpecifier(specifier) {
261
+ const segments = specifier.split("/");
262
+
263
+ if (specifier.startsWith("@")) {
264
+ if (segments.length < 2) return null;
265
+ return {
266
+ name: segments.slice(0, 2).join("/"),
267
+ subpath: segments.slice(2).join("/")
268
+ };
269
+ }
270
+
271
+ return {
272
+ name: segments[0],
273
+ subpath: segments.slice(1).join("/")
274
+ };
275
+ }
276
+
277
+ /**
278
+ * 构造搜索根目录:命令行工程 -> 当前目录 -> 命令行工具自身
279
+ * preferCli 为 true 时把命令行工具自身放到最前(内置网站固定用自带依赖)
280
+ * @param {string} basePath 服务器根目录
281
+ * @param {boolean} preferCli 是否优先使用命令行工具自带的依赖
282
+ */
283
+ function makeRoots(basePath, preferCli) {
284
+ const roots = [];
285
+ const seen = new Set();
286
+
287
+ const push = (projectDir, urlMode) => {
288
+ const nodeModules = join(projectDir, "node_modules");
289
+ if (seen.has(nodeModules)) return;
290
+ seen.add(nodeModules);
291
+ roots.push({ dir: nodeModules, urlMode });
292
+ };
293
+
294
+ if (preferCli) push(cliRoot, "modules");
295
+
296
+ push(basePath, "base");
297
+ push(process.cwd(), "modules");
298
+
299
+ if (!preferCli) push(cliRoot, "modules");
300
+
301
+ return roots;
302
+ }
303
+
304
+ /**
305
+ * 把文件路径映射回浏览器 URL
306
+ * @param {string} filePath 文件路径
307
+ * @param {string} basePath 服务器根目录
308
+ * @returns {string|null} URL
309
+ */
310
+ function urlOf(filePath, basePath) {
311
+ const cliNodeModules = join(cliRoot, "node_modules");
312
+ const cwdNodeModules = join(process.cwd(), "node_modules");
313
+
314
+ const toUrl = (root, prefix) => prefix + relative(root, filePath).split(sep).join("/");
315
+
316
+ if (filePath.startsWith(cliNodeModules + sep)) return toUrl(cliNodeModules, "/@modules/");
317
+ if (filePath.startsWith(basePath + sep)) return toUrl(basePath, "/");
318
+ if (filePath.startsWith(cwdNodeModules + sep)) return toUrl(cwdNodeModules, "/@modules/");
319
+
320
+ return null;
321
+ }
322
+
323
+ /**
324
+ * 解析一个裸包说明符
325
+ * @param {string} specifier 说明符,如 @auipage/core 或 vislite
326
+ * @param {object} options 选项
327
+ * @param {string} options.basePath 服务器根目录
328
+ * @param {Array<string>} options.conditions 条件优先级
329
+ * @param {boolean} options.preferCli 是否优先使用命令行工具自带的依赖
330
+ * @returns {{filePath: string, url: string, form: string, via: string, packageDir: string, fromCli: boolean}|null}
331
+ */
332
+ function resolveSpecifier(specifier, options) {
333
+ const parsed = splitSpecifier(specifier);
334
+ if (!parsed) return null;
335
+
336
+ const { name, subpath } = parsed;
337
+ const basePath = options.basePath;
338
+ const conditions = options.conditions || ["browser", "import", "default"];
339
+ const cliNodeModules = join(cliRoot, "node_modules");
340
+
341
+ for (const root of makeRoots(basePath, options.preferCli)) {
342
+ const packageDir = join(root.dir, name);
343
+ const stat = statOf(packageDir);
344
+
345
+ if (!stat || !stat.isDirectory()) continue;
346
+
347
+ const pkg = readPackageJson(packageDir);
348
+ let filePath = null;
349
+ let via = "";
350
+
351
+ if (pkg && pkg.exports) {
352
+ const exportsResult = resolveExportsSubpath(pkg.exports, subpath, conditions, packageDir);
353
+ if (exportsResult) {
354
+ filePath = exportsResult;
355
+ via = "exports";
356
+ }
357
+ }
358
+
359
+ // exports 没命中时退回物理路径(保留历史行为,方便深链导入)
360
+ if (!filePath) {
361
+ const legacyResult = resolveLegacy(pkg || {}, packageDir, subpath);
362
+ if (legacyResult) {
363
+ filePath = legacyResult;
364
+ via = pkg && pkg.exports ? "path" : "legacy";
365
+ }
366
+ }
367
+
368
+ if (!filePath) continue;
369
+
370
+ const url = urlOf(filePath, basePath);
371
+
372
+ return {
373
+ filePath,
374
+ url,
375
+ form: getForm(filePath, pkg),
376
+ via,
377
+ packageDir,
378
+ // 是否取自命令行工具自带的依赖,决定 URL 上要不要带 oipage=cli 标记
379
+ fromCli: filePath.startsWith(cliNodeModules + sep)
380
+ };
381
+ }
382
+
383
+ return null;
384
+ }
385
+
386
+ /**
387
+ * 生成可读的解析失败说明(写进 500 响应/终端日志)
388
+ */
389
+ function explain(specifier, options) {
390
+ const parsed = splitSpecifier(specifier);
391
+ if (!parsed) return "invalid specifier: " + specifier;
392
+
393
+ const tried = [];
394
+
395
+ for (const root of makeRoots(options.basePath || process.cwd(), options.preferCli)) {
396
+ const packageDir = join(root.dir, parsed.name);
397
+ if (!existsSync(packageDir)) { tried.push(packageDir + " (missing)"); continue; }
398
+
399
+ const pkg = readPackageJson(packageDir);
400
+ tried.push(packageDir + " (exports:" + (pkg && pkg.exports ? "yes" : "no") + ", main:" + (pkg && pkg.main ? pkg.main : "-") + ")");
401
+ }
402
+
403
+ return "cannot resolve \"" + specifier + "\", tried: " + tried.join("; ");
404
+ }
405
+
406
+ module.exports = {
407
+ resolveSpecifier,
408
+ readPackageJson,
409
+ findPackageJson,
410
+ explain,
411
+ completePath
412
+ };
@@ -1,9 +1,9 @@
1
- <div class="ui-select-file-view">
2
- <h2 class="title" z-bind="_props.title"></h2>
3
- <div class="tips" z-bind="_props.tips"></div>
4
- <div class="file">
5
- <input type="file" :multiple="_props.multiple?'multiple':'none'" id="input" z-on:change.stop="doChange"
6
- z-bind:accept="accept" />
7
- <label for="input" z-bind="'选择'+_props.type+'文件'"></label>
8
- </div>
1
+ <div class="ui-select-file-view">
2
+ <h2 class="title" z-bind="_props.title"></h2>
3
+ <div class="tips" z-bind="_props.tips"></div>
4
+ <div class="file">
5
+ <input type="file" :multiple="_props.multiple?'multiple':'none'" id="input" z-on:change.stop="doChange"
6
+ z-bind:accept="accept" />
7
+ <label for="input" z-bind="'选择'+_props.type+'文件'"></label>
8
+ </div>
9
9
  </div>
@@ -1,43 +1,43 @@
1
- import { defineElement } from "zipaper";
2
- import template from "./index.html";
3
- import style from "./index.scss";
4
-
5
- export default defineElement({
6
- template,
7
- emits: ["change"],
8
- props: {
9
- title: {
10
- type: String,
11
- required: true,
12
- },
13
- tips: {
14
- type: String,
15
- required: true,
16
- },
17
- type: {
18
- type: String,
19
- required: true,
20
- },
21
- multiple: {
22
- type: Boolean,
23
- default: true
24
- }
25
- },
26
- data() {
27
- return {
28
- accept: {
29
- pdf: "application/pdf",
30
- image: "image/*",
31
- video: "video/*",
32
- }[this._props.type]
33
- };
34
- },
35
- methods: {
36
- doChange(event, target) {
37
- this.$emit("change", target.files);
38
- }
39
- },
40
- style: {
41
- content: style
42
- }
1
+ import { defineElement } from "zipaper";
2
+ import template from "./index.html";
3
+ import style from "./index.scss";
4
+
5
+ export default defineElement({
6
+ template,
7
+ emits: ["change"],
8
+ props: {
9
+ title: {
10
+ type: String,
11
+ required: true,
12
+ },
13
+ tips: {
14
+ type: String,
15
+ required: true,
16
+ },
17
+ type: {
18
+ type: String,
19
+ required: true,
20
+ },
21
+ multiple: {
22
+ type: Boolean,
23
+ default: true
24
+ }
25
+ },
26
+ data() {
27
+ return {
28
+ accept: {
29
+ pdf: "application/pdf",
30
+ image: "image/*",
31
+ video: "video/*",
32
+ }[this._props.type]
33
+ };
34
+ },
35
+ methods: {
36
+ doChange(event, target) {
37
+ this.$emit("change", target.files);
38
+ }
39
+ },
40
+ style: {
41
+ content: style
42
+ }
43
43
  });
@@ -1,45 +1,45 @@
1
- .ui-select-file-view{
2
- &>.title {
3
- text-align: center;
4
- font-weight: 700;
5
- color: rgb(26, 26, 26);
6
- font-size: 36px;
7
- line-height: 48px;
8
- padding-top: 30px;
9
- }
10
-
11
- &>.tips {
12
- text-align: center;
13
- line-height: 30px;
14
- font-size: 22px;
15
- color: rgb(26, 26, 26);
16
- font-weight: 300;
17
- }
18
-
19
- &>.file {
20
- text-align: center;
21
- margin-top: 30px;
22
-
23
- input {
24
- display: none;
25
- }
26
-
27
- label {
28
- line-height: 50px;
29
- display: inline-block;
30
- border: 1px solid gray;
31
- background-image: url("./images/addFile.svg");
32
- background-repeat: no-repeat;
33
- background-position: 5px center;
34
- background-size: auto 70%;
35
- padding-left: 40px;
36
- padding-right: 10px;
37
- border-radius: 5px;
38
-
39
- &:hover {
40
- text-decoration: underline;
41
- cursor: pointer;
42
- }
43
- }
44
- }
1
+ .ui-select-file-view{
2
+ &>.title {
3
+ text-align: center;
4
+ font-weight: 700;
5
+ color: rgb(26, 26, 26);
6
+ font-size: 36px;
7
+ line-height: 48px;
8
+ padding-top: 30px;
9
+ }
10
+
11
+ &>.tips {
12
+ text-align: center;
13
+ line-height: 30px;
14
+ font-size: 22px;
15
+ color: rgb(26, 26, 26);
16
+ font-weight: 300;
17
+ }
18
+
19
+ &>.file {
20
+ text-align: center;
21
+ margin-top: 30px;
22
+
23
+ input {
24
+ display: none;
25
+ }
26
+
27
+ label {
28
+ line-height: 50px;
29
+ display: inline-block;
30
+ border: 1px solid gray;
31
+ background-image: url("./images/addFile.svg");
32
+ background-repeat: no-repeat;
33
+ background-position: 5px center;
34
+ background-size: auto 70%;
35
+ padding-left: 40px;
36
+ padding-right: 10px;
37
+ border-radius: 5px;
38
+
39
+ &:hover {
40
+ text-decoration: underline;
41
+ cursor: pointer;
42
+ }
43
+ }
44
+ }
45
45
  }