create-lve 0.4.24 → 0.4.26
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/config.js +6 -2
- package/package.json +1 -1
- package/template-react/src/style.css +80 -0
- package/template-vue/src/style.css +78 -0
package/config.js
CHANGED
|
@@ -119,9 +119,13 @@ export default defineConfig({
|
|
|
119
119
|
pluginCode: 'tailwindcss(), ',
|
|
120
120
|
entryImport: "import './style.css'\n",
|
|
121
121
|
async setup(ctx) {
|
|
122
|
+
// 模板自带 style.css(含 @import 'tailwindcss' + base UX),不覆盖
|
|
123
|
+
// 仅确保文件存在
|
|
122
124
|
const stylePath = path.join(ctx.targetDir, 'src/style.css')
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
if (!fs.existsSync(stylePath)) {
|
|
126
|
+
await fs.ensureDir(path.dirname(stylePath))
|
|
127
|
+
await fs.writeFile(stylePath, `@import "tailwindcss";`)
|
|
128
|
+
}
|
|
125
129
|
},
|
|
126
130
|
},
|
|
127
131
|
}
|
package/package.json
CHANGED
|
@@ -1 +1,81 @@
|
|
|
1
1
|
@import 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
/* Scrollbar */
|
|
4
|
+
@layer base {
|
|
5
|
+
* {
|
|
6
|
+
scrollbar-width: thin;
|
|
7
|
+
scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
::-webkit-scrollbar {
|
|
11
|
+
width: 6px;
|
|
12
|
+
height: 6px;
|
|
13
|
+
}
|
|
14
|
+
::-webkit-scrollbar-thumb {
|
|
15
|
+
background: rgba(0, 0, 0, 0.2);
|
|
16
|
+
border-radius: 3px;
|
|
17
|
+
}
|
|
18
|
+
::-webkit-scrollbar-track {
|
|
19
|
+
background: transparent;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dark * {
|
|
23
|
+
scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
|
|
24
|
+
}
|
|
25
|
+
.dark ::-webkit-scrollbar-thumb {
|
|
26
|
+
background: rgba(255, 255, 255, 0.15);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* 链接和图片禁止拖拽 + 长按菜单 + 点击高亮 */
|
|
31
|
+
a,
|
|
32
|
+
img {
|
|
33
|
+
-webkit-user-drag: none;
|
|
34
|
+
-webkit-tap-highlight-color: transparent;
|
|
35
|
+
-webkit-touch-callout: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* input number 去掉上下箭头 */
|
|
39
|
+
input[type='number']::-webkit-inner-spin-button,
|
|
40
|
+
input[type='number']::-webkit-outer-spin-button {
|
|
41
|
+
-webkit-appearance: none;
|
|
42
|
+
margin: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* textarea 禁止拖拽调整大小 */
|
|
46
|
+
textarea {
|
|
47
|
+
resize: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* details/summary 去掉默认三角 */
|
|
51
|
+
summary {
|
|
52
|
+
list-style: none;
|
|
53
|
+
}
|
|
54
|
+
summary::marker {
|
|
55
|
+
display: none;
|
|
56
|
+
content: '';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* focus 焦点环 */
|
|
60
|
+
a:focus-visible {
|
|
61
|
+
outline: 2px solid var(--color-primary, #3b82f6);
|
|
62
|
+
outline-offset: 2px;
|
|
63
|
+
border-radius: 2px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* 文本渲染 */
|
|
67
|
+
html {
|
|
68
|
+
-webkit-font-smoothing: antialiased;
|
|
69
|
+
-moz-osx-font-smoothing: grayscale;
|
|
70
|
+
text-rendering: optimizeLegibility;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* 选中色 */
|
|
74
|
+
::selection {
|
|
75
|
+
background: rgba(59, 130, 246, 0.2);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* 触摸优化 */
|
|
79
|
+
body {
|
|
80
|
+
-webkit-tap-highlight-color: transparent;
|
|
81
|
+
}
|
|
@@ -1 +1,79 @@
|
|
|
1
1
|
@import 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
@layer base {
|
|
4
|
+
/* Scrollbar */
|
|
5
|
+
* {
|
|
6
|
+
scrollbar-width: thin;
|
|
7
|
+
scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
|
|
8
|
+
}
|
|
9
|
+
::-webkit-scrollbar {
|
|
10
|
+
width: 6px;
|
|
11
|
+
height: 6px;
|
|
12
|
+
}
|
|
13
|
+
::-webkit-scrollbar-thumb {
|
|
14
|
+
background: rgba(0, 0, 0, 0.2);
|
|
15
|
+
border-radius: 3px;
|
|
16
|
+
}
|
|
17
|
+
::-webkit-scrollbar-track {
|
|
18
|
+
background: transparent;
|
|
19
|
+
}
|
|
20
|
+
.dark * {
|
|
21
|
+
scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
|
|
22
|
+
}
|
|
23
|
+
.dark ::-webkit-scrollbar-thumb {
|
|
24
|
+
background: rgba(255, 255, 255, 0.15);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* 文本渲染 */
|
|
28
|
+
html {
|
|
29
|
+
-webkit-font-smoothing: antialiased;
|
|
30
|
+
-moz-osx-font-smoothing: grayscale;
|
|
31
|
+
text-rendering: optimizeLegibility;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* 选中色 */
|
|
35
|
+
::selection {
|
|
36
|
+
background: rgba(59, 130, 246, 0.2);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* 触摸优化 */
|
|
40
|
+
body {
|
|
41
|
+
-webkit-tap-highlight-color: transparent;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* 链接和图片禁止拖拽 + 长按菜单 + 点击高亮 */
|
|
46
|
+
a,
|
|
47
|
+
img {
|
|
48
|
+
-webkit-user-drag: none;
|
|
49
|
+
-webkit-tap-highlight-color: transparent;
|
|
50
|
+
-webkit-touch-callout: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* input number 去掉上下箭头 */
|
|
54
|
+
input[type='number']::-webkit-inner-spin-button,
|
|
55
|
+
input[type='number']::-webkit-outer-spin-button {
|
|
56
|
+
-webkit-appearance: none;
|
|
57
|
+
margin: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* textarea 禁止拖拽调整大小 */
|
|
61
|
+
textarea {
|
|
62
|
+
resize: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* details/summary 去掉默认三角 */
|
|
66
|
+
summary {
|
|
67
|
+
list-style: none;
|
|
68
|
+
}
|
|
69
|
+
summary::marker {
|
|
70
|
+
display: none;
|
|
71
|
+
content: '';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* focus 焦点环 */
|
|
75
|
+
a:focus-visible {
|
|
76
|
+
outline: 2px solid var(--color-primary, #3b82f6);
|
|
77
|
+
outline-offset: 2px;
|
|
78
|
+
border-radius: 2px;
|
|
79
|
+
}
|