فهرست منبع

feat: 多语言

菲鸽 2 سال پیش
والد
کامیت
c51391570f
3فایلهای تغییر یافته به همراه26 افزوده شده و 3 حذف شده
  1. 11 1
      src/layouts/default.vue
  2. 11 1
      src/layouts/demo.vue
  3. 4 1
      src/style/index.scss

+ 11 - 1
src/layouts/default.vue

@@ -1,7 +1,17 @@
 <template>
-  <wd-config-provider>
+  <wd-config-provider :themeVars="themeVars">
     <slot />
     <wd-toast />
     <wd-message-box />
   </wd-config-provider>
 </template>
+
+<script lang="ts" setup>
+import type { ConfigProviderThemeVars } from 'wot-design-uni'
+
+const themeVars: ConfigProviderThemeVars = {
+  // colorTheme: 'red',
+  // buttonPrimaryBgColor: '#07c160',
+  // buttonPrimaryColor: '#07c160',
+}
+</script>

+ 11 - 1
src/layouts/demo.vue

@@ -1,7 +1,17 @@
 <template>
-  <wd-config-provider>
+  <wd-config-provider :themeVars="themeVars">
     <slot />
     <wd-toast />
     <wd-message-box />
   </wd-config-provider>
 </template>
+
+<script lang="ts" setup>
+import type { ConfigProviderThemeVars } from 'wot-design-uni'
+
+const themeVars: ConfigProviderThemeVars = {
+  // colorTheme: 'red',
+  // buttonPrimaryBgColor: '#07c160',
+  // buttonPrimaryColor: '#07c160',
+}
+</script>

+ 4 - 1
src/style/index.scss

@@ -8,6 +8,9 @@
 
 :root,
 page {
+  // 修改按主题色
+  // --wot-color-theme: #37c2bc;
+
   // 修改按钮背景色
-  --wot-button-primary-bg-color: green;
+  // --wot-button-primary-bg-color: green;
 }