Jelajahi Sumber

Merge branch 'base' into tabbar

菲鸽 2 tahun lalu
induk
melakukan
9736931bfd
8 mengubah file dengan 46 tambahan dan 7 penghapusan
  1. 1 0
      manifest.config.ts
  2. 2 1
      package.json
  3. 2 0
      pages.config.ts
  4. 14 2
      src/layouts/default.vue
  5. 14 2
      src/layouts/demo.vue
  6. 2 1
      src/manifest.json
  7. 2 1
      src/pages.json
  8. 9 0
      src/style/index.scss

+ 1 - 0
manifest.config.ts

@@ -89,6 +89,7 @@ export default defineManifestConfig({
   },
   'mp-alipay': {
     usingComponents: true,
+    styleIsolation: 'shared',
   },
   'mp-baidu': {
     usingComponents: true,

+ 2 - 1
package.json

@@ -98,7 +98,8 @@
     "pinia-plugin-persistedstate": "3.2.1",
     "qs": "6.5.3",
     "vue": "3.4.26",
-    "wot-design-uni": "^1.2.13"
+    "wot-design-uni": "^1.2.13",
+    "z-paging": "^2.7.10"
   },
   "devDependencies": {
     "@commitlint/cli": "^18.4.3",

+ 2 - 0
pages.config.ts

@@ -13,6 +13,8 @@ export default defineUniPages({
     custom: {
       // '^fg-(.*)': '@/components/fg-$1.vue',
       '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
+      '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)':
+        'z-paging/components/z-paging$1/z-paging$1.vue',
     },
   },
   tabBar: {

+ 14 - 2
src/layouts/default.vue

@@ -1,5 +1,17 @@
 <template>
-  <view class="default-layout">
+  <wd-config-provider :themeVars="themeVars">
     <slot />
-  </view>
+    <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>

+ 14 - 2
src/layouts/demo.vue

@@ -1,5 +1,17 @@
 <template>
-  <view class="demo-layout">
+  <wd-config-provider :themeVars="themeVars">
     <slot />
-  </view>
+    <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>

+ 2 - 1
src/manifest.json

@@ -59,7 +59,8 @@
     "usingComponents": true
   },
   "mp-alipay": {
-    "usingComponents": true
+    "usingComponents": true,
+    "styleIsolation": "shared"
   },
   "mp-baidu": {
     "usingComponents": true

+ 2 - 1
src/pages.json

@@ -9,7 +9,8 @@
   "easycom": {
     "autoscan": true,
     "custom": {
-      "^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue"
+      "^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue",
+      "^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue"
     }
   },
   "tabBar": {

+ 9 - 0
src/style/index.scss

@@ -5,3 +5,12 @@
   padding-top: 4px;
   color: red;
 }
+
+:root,
+page {
+  // 修改按主题色
+  // --wot-color-theme: #37c2bc;
+
+  // 修改按钮背景色
+  // --wot-button-primary-bg-color: green;
+}