File tree Expand file tree Collapse file tree 8 files changed +19
-16
lines changed
Expand file tree Collapse file tree 8 files changed +19
-16
lines changed Original file line number Diff line number Diff line change 11VITE_APP_PUBLIC_PATH = /
22VITE_APP_PREVIEW = true
3- VITE_APP_API_BASE_URL = /api
3+ VITE_APP_API_BASE_URL = /api
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ VITE_APP_PREVIEW=true
22VITE_APP_API_BASE_URL = /api
33VITE_MOCK = true
44VITE_HTTP_MOCK = true
5+
Original file line number Diff line number Diff line change 11NODE_ENV = production
22VITE_APP_PREVIEW = false
3- VITE_APP_API_URL = /api
3+ VITE_APP_API_URL = /api
Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ const createMockServer = () => {
1010 return mockTarget
1111}
1212
13- export default createMockServer
13+ export default createMockServer
Original file line number Diff line number Diff line change 4242 "mockjs" : " ^1.1.0" ,
4343 "plop" : " ^3.1.0" ,
4444 "postcss-px-to-viewport-8-plugin" : " ^1.1.3" ,
45- "typescript" : " ^4.5.4 " ,
45+ "typescript" : " 4.7.3 " ,
4646 "umi-mock-middleware2" : " ^1.0.2" ,
4747 "unplugin-vue-components" : " ^0.19.6" ,
4848 "vite" : " ^2.9.9" ,
Original file line number Diff line number Diff line change 77
88<script lang="ts">
99import { defineComponent , ref , watch } from ' vue'
10+ import type { ConfigProviderTheme } from ' vant'
1011export default defineComponent ({
1112 setup() {
12- const theme = ref ( ' dark ' )
13- const checked = ref ( true )
13+ const theme = ref < ConfigProviderTheme >( ' light ' )
14+ const checked = ref < boolean >( false )
1415
15- watch (
16- checked ,() => {
17- if (checked .value ) {
18- document .getElementsByTagName (' html' )[0 ].setAttribute (' data-theme' , ' data-theme-dark' )
19- } else {
20- document .getElementsByTagName (' html' )[0 ].setAttribute (' data-theme' , ' data-theme-light' )
21- }
22- }, { immediate: true })
16+ watch (checked ,() => {
17+ if (checked .value ) {
18+ theme .value = ' dark'
19+ document .getElementsByTagName (' html' )[0 ].setAttribute (' data-theme' , ' data-theme-dark' )
20+ } else {
21+ theme .value = ' light'
22+ document .getElementsByTagName (' html' )[0 ].setAttribute (' data-theme' , ' data-theme-light' )
23+ }
24+ })
2325
2426 return {
2527 theme ,
Original file line number Diff line number Diff line change 1010 "allowSyntheticDefaultImports" : true ,
1111 "sourceMap" : true ,
1212 "baseUrl" : " ." ,
13- "types" : [],
13+ "types" : [" node " ],
1414 "paths" : {
1515 "@/*" : [" src/*" ]
1616 },
Original file line number Diff line number Diff line change @@ -3337,7 +3337,7 @@ type-is@~1.6.18:
33373337 media-typer "0.3.0"
33383338 mime-types "~2.1.24"
33393339
3340- typescript@^4.5.4 :
3340+ typescript@4.7.3 :
33413341 version "4.7.3"
33423342 resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.3.tgz#8364b502d5257b540f9de4c40be84c98e23a129d"
33433343 integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==
You can’t perform that action at this time.
0 commit comments