File tree Expand file tree Collapse file tree 7 files changed +836
-23
lines changed Expand file tree Collapse file tree 7 files changed +836
-23
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <NuxtLayout >
3
- <NuxtPage />
4
- </NuxtLayout >
2
+ <div id =" app" >
3
+ <NuxtLayout >
4
+ <NuxtPage />
5
+ </NuxtLayout >
6
+ </div >
5
7
</template >
8
+
9
+ <style >
10
+ html ,
11
+ body ,
12
+ #__nuxt {
13
+ height : 100vh ;
14
+ margin : 0 ;
15
+ padding : 0 ;
16
+ }
17
+
18
+ #app {
19
+ width : 100% ;
20
+ height : 100% ;
21
+ }
22
+ </style >
Original file line number Diff line number Diff line change 1
1
import antfu from '@antfu/eslint-config'
2
2
import nuxt from './.nuxt/eslint.config.mjs'
3
3
4
- export default antfu ( { } , nuxt )
4
+ export default antfu ( {
5
+ unocss : true ,
6
+ formatters : true ,
7
+ } , nuxt )
Original file line number Diff line number Diff line change @@ -2,13 +2,18 @@ export default defineNuxtConfig({
2
2
devtools : { enabled : true } ,
3
3
modules : [
4
4
'@vant/nuxt' ,
5
+ '@unocss/nuxt' ,
5
6
'nuxt-module-eslint-config' ,
6
7
] ,
7
8
8
9
typescript : {
9
10
shim : false ,
10
11
} ,
11
12
13
+ css : [
14
+ '@unocss/reset/tailwind.css' ,
15
+ ] ,
16
+
12
17
postcss : {
13
18
plugins : {
14
19
// https://github.com/wswmsword/postcss-mobile-forever
Original file line number Diff line number Diff line change 18
18
},
19
19
"devDependencies" : {
20
20
"@antfu/eslint-config" : " ^2.7.0" ,
21
+ "@unocss/nuxt" : " ^0.58.6" ,
22
+ "@unocss/preset-rem-to-px" : " ^0.58.6" ,
21
23
"@vant/nuxt" : " ^1.0.4" ,
22
24
"eslint" : " npm:eslint-ts-patch@^8.57.0-0" ,
23
25
"eslint-ts-patch" : " ^8.57.0-0" ,
Original file line number Diff line number Diff line change 1
- <script lang="ts" setup>
2
-
3
- </script >
4
-
5
1
<template >
6
- <div id =" app" >
7
- <div class =" txt" >
8
- init
9
- </div >
2
+ <div class =" text-16 text-gray-800" >
3
+ 你好
10
4
</div >
11
5
</template >
12
6
13
7
<style scoped>
14
- #app {
15
- width : 100% ;
16
- min-height : 100vh ;
17
- display : flex ;
18
- }
19
-
20
- .txt {
21
- position : relative ;
22
- top : 10px ;
23
- transform : translateY (-10px );
24
- }
25
8
</style >
You can’t perform that action at this time.
0 commit comments