File tree Expand file tree Collapse file tree 3 files changed +2619
-1272
lines changed Expand file tree Collapse file tree 3 files changed +2619
-1272
lines changed Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import zhCn from " element-plus/es/locale/lang/zh-cn" ;
3+
4+ const timeValue = ref (" " );
5+ const hello = () => ElMessage .info (" hello world" );
6+ const helloSuccess = () => ElMessage .success (" hello world" );
7+
8+ const color = useColorMode ();
9+ const colorMode = computed ({
10+ get : () => color .value === ' dark' ,
11+ set : () => (color .preference = (color .value === ' dark' ? ' light' : ' dark' )),
12+ });
13+ </script >
14+
15+
116<template >
2- <el-switch v-model =" colorMode" inline-prompt active-text =" dark" inactive-text =" light" size =" large" ></el-switch >
17+ <ClientOnly >
18+ <el-switch v-model =" colorMode" inline-prompt active-text =" dark" inactive-text =" light" size =" large" ></el-switch >
19+ </ClientOnly >
320
421 <br />
522
5370 />
5471 </el-config-provider >
5572</template >
56-
57- <script setup lang="ts">
58- import zhCn from " element-plus/es/locale/lang/zh-cn" ;
59-
60- const timeValue = ref (" " );
61- const hello = () => ElMessage .info (" hello world" );
62- const helloSuccess = () => ElMessage .success (" hello world" );
63-
64- const color = useColorMode ();
65- const colorMode = computed ({
66- get : () => color .value === ' dark' ,
67- set : () => (color .preference = color .value === ' dark' ? ' light' : ' dark' ),
68- });
69- </script >
Original file line number Diff line number Diff line change 11{
22 "name" : " element-plus-nuxt-starter" ,
3- "packageManager" : " pnpm@8.8.0 " ,
3+ "packageManager" : " pnpm@8.12.1 " ,
44 "version" : " 0.1.0" ,
55 "description" : " Element Plus with Nuxt 3 Minimal Starter" ,
66 "repository" : {
2020 "postinstall" : " nuxi prepare"
2121 },
2222 "dependencies" : {
23- "@element-plus/icons-vue" : " ^2.1.0 " ,
24- "element-plus" : " ^2.3.14 "
23+ "@element-plus/icons-vue" : " ^2.3.1 " ,
24+ "element-plus" : " ^2.4.4 "
2525 },
2626 "devDependencies" : {
27- "@element-plus/nuxt" : " ^1.0.6 " ,
28- "@nuxtjs/color-mode" : " ^3.3.0 " ,
29- "@pinia/nuxt" : " ^0.4.11 " ,
30- "@unocss/nuxt" : " ^0.53.6 " ,
31- "@vueuse/nuxt" : " ^10.4.1 " ,
27+ "@element-plus/nuxt" : " ^1.0.7 " ,
28+ "@nuxtjs/color-mode" : " ^3.3.2 " ,
29+ "@pinia/nuxt" : " ^0.5.1 " ,
30+ "@unocss/nuxt" : " ^0.58.0 " ,
31+ "@vueuse/nuxt" : " ^10.7.0 " ,
3232 "consola" : " ^3.2.3" ,
33- "nuxt" : " ^3.7.4 " ,
34- "sass" : " ^1.68.0 " ,
35- "typescript" : " ^5.2.2 "
33+ "nuxt" : " ^3.8.2 " ,
34+ "sass" : " ^1.69.5 " ,
35+ "typescript" : " ^5.3.3 "
3636 },
3737 "peerDependencies" : {
3838 "pinia" : " ^2.1.6"
You can’t perform that action at this time.
0 commit comments