6363 :inactive-color =" switchInactiveColor"
6464 ></el-switch >
6565 </el-col >
66- <el-col :span =" 3" >
67- {{ currentLocal["theme"] }}
68- <el-switch
69- v-model =" enableDarkTheme"
70- :active-color =" switchActiveColor"
71- :inactive-color =" switchInactiveColor"
72- @change =" switchTheme"
73- ></el-switch >
74- </el-col >
7566 <el-col :span =" 2" ></el-col >
7667 </el-row >
7768 </div >
118109import Mock from " mockjs" ;
119110import locale from " ../comp/locale" ;
120111import I18nMixins from " ../comp/mixins/i18n-mixins" ;
121- import ThemeSwitchMixins from " ../comp/mixins/theme-switch-mixins.js" ;
122112export default {
123113 name: " demo" ,
124114 components: {
125115 /* Footer */
126116 },
127- mixins: [I18nMixins, ThemeSwitchMixins ],
117+ mixins: [I18nMixins],
128118 data () {
129119 return {
130120 // edit option 可控单元格编辑
@@ -139,7 +129,6 @@ export default {
139129 switchActiveColor: " #1890ff" ,
140130 switchInactiveColor: " rgba(0,0,0,.25)" ,
141131
142- enableDarkTheme: false ,
143132 enableColumnFixed: true ,
144133 enableLoading: false ,
145134 enableExpand: true ,
@@ -541,19 +530,6 @@ export default {
541530 this .$refs [" tableRef" ].scrollTo ({ top: 0 });
542531 },
543532
544- // switch theme
545- switchTheme () {
546- this .loadingInstance .show ();
547-
548- const themeName = this .enableDarkTheme
549- ? " theme-dark"
550- : " theme-default" ;
551-
552- this .switchThemeMix (themeName).finally (() => {
553- this .loadingInstance .close ();
554- });
555- },
556-
557533 // switch loading
558534 switchLoading () {
559535 if (this .enableLoading ) {
@@ -620,7 +596,7 @@ export default {
620596 });
621597 },
622598 destroyed () {
623- this .switchThemeMix (" theme-default" );
599+ // this.switchThemeMix("theme-default");
624600 },
625601};
626602 </script >
0 commit comments