Browse Source

chore: add international components addresslist

richard1015 3 years ago
parent
commit
41d946a784

+ 1 - 1
package.json

@@ -37,7 +37,7 @@
     "checked:taro:vue": "npm run generate:file:taro:vue",
     "dev": "npm run checked && vite --open --force",
     "dev:taro:vue": "npm run createTaroConfig && npm run checked:taro:vue && cd src/sites/mobile-taro/vue/ && npm run dev:weapp",
-    "dev:taro:h5": "npm run checked:taro:vue && cd src/sites/mobile-taro/vue/ && npm run dev:h5",
+    "dev:taro:h5": "npm run createTaroConfig && npm run checked:taro:vue && cd src/sites/mobile-taro/vue/ && npm run dev:h5",
     "build:site": "npm run checked && vite build",
     "build:site:oss": "npm run checked && vite build --base=/nutui/3x/",
     "build": "npm run checked && vite build --config vite.config.build.ts && vite build --config vite.config.build.disperse.ts && npm run generate:types && npm run generate:themes && vite build --config vite.config.build.css.ts",

+ 4 - 7
src/packages/__VUE/addresslist/index.taro.vue

@@ -60,14 +60,14 @@
       </template>
     </swipe-shell>
     <div class="nut-addresslist__bottom" v-if="showBottomButton" @click="addAddress">
-      <nut-button block type="danger">+新建收获地址</nut-button>
+      <nut-button block type="danger">{{ translate('addAddress') }}</nut-button>
     </div>
   </div>
 </template>
 <script lang="ts">
 import { toRefs, reactive, onMounted, ref } from 'vue';
 import { createComponent } from '../../utils/create';
-const { componentName, create } = createComponent('addresslist');
+const { componentName, create, translate } = createComponent('addresslist');
 import LongPressShell from './components/LongPressShell.vue';
 import SwipeShell from './components/SwipeShell.vue';
 import GeneralShell from './components/GeneralShell.vue';
@@ -173,12 +173,9 @@ export default create({
       clickLongDel,
       clickSwipeDel,
       addAddress,
-      dataArray
+      dataArray,
+      translate
     };
   }
 });
 </script>
-
-<style lang="scss">
-@import 'index.scss';
-</style>

+ 4 - 7
src/packages/__VUE/addresslist/index.vue

@@ -60,14 +60,14 @@
       </template>
     </swipe-shell>
     <div class="nut-addresslist__bottom" v-if="showBottomButton" @click="addAddress">
-      <nut-button block type="danger">+新建收获地址</nut-button>
+      <nut-button block type="danger">{{ translate('addAddress') }}</nut-button>
     </div>
   </div>
 </template>
 <script lang="ts">
 import { toRefs, reactive, onMounted, ref } from 'vue';
 import { createComponent } from '../../utils/create';
-const { componentName, create } = createComponent('addresslist');
+const { componentName, create, translate } = createComponent('addresslist');
 import LongPressShell from './components/LongPressShell.vue';
 import SwipeShell from './components/SwipeShell.vue';
 import GeneralShell from './components/GeneralShell.vue';
@@ -173,12 +173,9 @@ export default create({
       clickLongDel,
       clickSwipeDel,
       addAddress,
-      dataArray
+      dataArray,
+      translate
     };
   }
 });
 </script>
-
-<style lang="scss">
-@import 'index.scss';
-</style>

+ 0 - 4
src/packages/__VUE/category/index.taro.vue

@@ -60,7 +60,3 @@ export default create({
   }
 });
 </script>
-
-<style lang="scss">
-@import 'index.scss';
-</style>

+ 0 - 4
src/packages/__VUE/category/index.vue

@@ -60,7 +60,3 @@ export default create({
   }
 });
 </script>
-
-<style lang="scss">
-@import 'index.scss';
-</style>

+ 3 - 0
src/packages/locale/lang/baseLang.ts

@@ -70,4 +70,7 @@ export interface BaseLang {
   skuheader: {
     skuId: string;
   };
+  addresslist: {
+    addAddress: string;
+  };
 }

+ 3 - 0
src/packages/locale/lang/en-US.ts

@@ -70,6 +70,9 @@ const lang: BaseLang = {
   },
   skuheader: {
     skuId: 'Sku Number'
+  },
+  addresslist: {
+    addAddress: 'Add New Address'
   }
 };
 export default lang;

+ 3 - 0
src/packages/locale/lang/zh-CN.ts

@@ -70,6 +70,9 @@ const lang: BaseLang = {
   },
   skuheader: {
     skuId: '商品编号'
+  },
+  addresslist: {
+    addAddress: '新建地址'
   }
 };
 export default lang;

+ 3 - 0
src/packages/locale/lang/zh-TW.ts

@@ -70,6 +70,9 @@ const lang: BaseLang = {
   },
   skuheader: {
     skuId: '商品編號'
+  },
+  addresslist: {
+    addAddress: '新建地址'
   }
 };
 export default lang;

+ 10 - 2
src/packages/styles/variables-jdt.scss

@@ -142,7 +142,7 @@ $picker-columns-item-color: $title-color !default;
 //input
 $input-border-bottom: #eaf0fb !default;
 $input-disabled-color: #c8c9cc !default;
-$input-require-color: $primary-color !default;
+$input-required-color: $primary-color !default;
 $input-font-size: $font-size-2 !default;
 
 // textarea
@@ -722,11 +722,19 @@ $elevator-list-item-bars-inner-item-padding: 3px !default;
 $elevator-list-item-bars-inner-item-font-size: 10px !default;
 
 // list
-$list-item-margin: 0 0 10px 0;
+$list-item-margin: 0 0 10px 0 !default;
 
 //Ecard
 $ecard-bg-color: #f0f2f5 !default;
 
+//category
+$category-bg-color: rgba(255, 255, 255, 1) !default;
+$cateListLeft-bg-color: rgba(246, 247, 249, 1) !default;
+$cateListItem-color: rgba(51, 51, 51, 1) !default;
+$cateListItemChecked-color: rgba(255, 255, 255, 1) !default;
+$cateListItem-color: rgba(51, 51, 51, 1) !default;
+$cateListItemChecked-img-bg-color: rgba(240, 37, 15, 1) !default;
+
 // circleProgress
 $circle-progress-primary-color: $primary-color !default;
 $circle-progress-path-color: #e5e9f2 !default;

+ 7 - 9
src/packages/styles/variables.scss

@@ -746,19 +746,18 @@ $elevator-list-item-bars-inner-item-padding: 3px !default;
 $elevator-list-item-bars-inner-item-font-size: 10px !default;
 
 // list
-$list-item-margin: 0 0 10px 0;
+$list-item-margin: 0 0 10px 0 !default;
 
 //Ecard
 $ecard-bg-color: #f0f2f5 !default;
 
-
 //category
-$category-bg-color: rgba(255, 255, 255, 1);
-$cateListLeft-bg-color: rgba(246, 247, 249, 1);
-$cateListItem-color: rgba(51, 51, 51, 1);
-$cateListItemChecked-color: rgba(255, 255, 255, 1);
-$cateListItem-color: rgba(51, 51, 51, 1);
-$cateListItemChecked-img-bg-color: rgba(240, 37, 15, 1);
+$category-bg-color: rgba(255, 255, 255, 1) !default;
+$cateListLeft-bg-color: rgba(246, 247, 249, 1) !default;
+$cateListItem-color: rgba(51, 51, 51, 1) !default;
+$cateListItemChecked-color: rgba(255, 255, 255, 1) !default;
+$cateListItem-color: rgba(51, 51, 51, 1) !default;
+$cateListItemChecked-img-bg-color: rgba(240, 37, 15, 1) !default;
 
 // circleProgress
 $circle-progress-primary-color: $primary-color !default;
@@ -766,6 +765,5 @@ $circle-progress-path-color: #e5e9f2 !default;
 $circle-progress-text-color: #000000 !default;
 $circle-progress-text-size: $font-size-3 !default;
 
-
 @import './mixins/index';
 @import './animation/index';