Browse Source

Merge branch 'jdf2e:next' into next

yangxiaolu1993 3 years ago
parent
commit
c2b3faa36b

+ 2 - 1
package.json

@@ -64,13 +64,14 @@
     }
     }
   },
   },
   "dependencies": {
   "dependencies": {
+    "@tarojs/cli": "^3.4.0",
     "sass": "~1.32.0",
     "sass": "~1.32.0",
     "vue-router": "^4.0.11"
     "vue-router": "^4.0.11"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "@commitlint/cli": "^10.0.0",
     "@commitlint/cli": "^10.0.0",
     "@commitlint/config-conventional": "^10.0.0",
     "@commitlint/config-conventional": "^10.0.0",
-    "@tarojs/taro": "^3.3.0-alpha.8",
+    "@tarojs/taro": "^3.4.0",
     "@types/jest": "^26.0.22",
     "@types/jest": "^26.0.22",
     "@types/node": "^14.14.31",
     "@types/node": "^14.14.31",
     "@typescript-eslint/eslint-plugin": "^4.20.0",
     "@typescript-eslint/eslint-plugin": "^4.20.0",

+ 71 - 74
src/packages/__VUE/address/doc.md

@@ -184,36 +184,36 @@ app.use(Elevator);
         const existAddress = ref([
         const existAddress = ref([
           {
           {
             id: 1,
             id: 1,
-            addressDetail: 'th ',
-            cityName: '石景山区',
-            countyName: '区',
-            provinceName: '北京',
+            addressDetail: '',
+            cityName: '次渠镇',
+            countyName: '通州区',
+            provinceName: '北京',
             selectedAddress: true,
             selectedAddress: true,
-            townName: ''
-          },{
+            townName: '',
+            name: '探探鱼',
+            phone: '182****1718'
+          },
+          {
             id: 2,
             id: 2,
-            addressDetail: '12_ ',
-            cityName: '电饭锅',
-            countyName: '扶绥县',
-            provinceName: '北京',
+            addressDetail: '',
+            cityName: '钓鱼岛全区',
+            countyName: '',
+            provinceName: '钓鱼岛',
             selectedAddress: false,
             selectedAddress: false,
-            townName: ''
-          },{
+            townName: '',
+            name: '探探鱼',
+            phone: '182****1718'
+          },
+          {
             id: 3,
             id: 3,
-            addressDetail: '发大水比 ',
-            cityName: '放到',
-            countyName: '广宁街道',
-            provinceName: '钓鱼岛全区',
+            addressDetail: '京东大厦',
+            cityName: '大兴区',
+            countyName: '科创十一街18号院',
+            provinceName: '北京市',
             selectedAddress: false,
             selectedAddress: false,
-            townName: ''
-          },{
-            id: 4,
-            addressDetail: '还是想吧百度吧 ',
-            cityName: '研发',
-            countyName: '八里庄街道',
-            provinceName: '北京',
-            selectedAddress: false,
-            townName: ''
+            townName: '',
+            name: '探探鱼',
+            phone: '182****1718'
           }
           }
         ]);
         ]);
 
 
@@ -274,36 +274,36 @@ app.use(Elevator);
         const existAddress = ref([
         const existAddress = ref([
           {
           {
             id: 1,
             id: 1,
-            addressDetail: 'th ',
-            cityName: '石景山区',
-            countyName: '区',
-            provinceName: '北京',
+            addressDetail: '',
+            cityName: '次渠镇',
+            countyName: '通州区',
+            provinceName: '北京',
             selectedAddress: true,
             selectedAddress: true,
-            townName: ''
-          },{
+            townName: '',
+            name: '探探鱼',
+            phone: '182****1718'
+          },
+          {
             id: 2,
             id: 2,
-            addressDetail: '12_ ',
-            cityName: '电饭锅',
-            countyName: '扶绥县',
-            provinceName: '北京',
+            addressDetail: '',
+            cityName: '钓鱼岛全区',
+            countyName: '',
+            provinceName: '钓鱼岛',
             selectedAddress: false,
             selectedAddress: false,
-            townName: ''
-          },{
+            townName: '',
+            name: '探探鱼',
+            phone: '182****1718'
+          },
+          {
             id: 3,
             id: 3,
-            addressDetail: '发大水比 ',
-            cityName: '放到',
-            countyName: '广宁街道',
-            provinceName: '钓鱼岛全区',
-            selectedAddress: false,
-            townName: ''
-          },{
-            id: 4,
-            addressDetail: '还是想吧百度吧 ',
-            cityName: '研发',
-            countyName: '八里庄街道',
-            provinceName: '北京',
+            addressDetail: '京东大厦',
+            cityName: '大兴区',
+            countyName: '科创十一街18号院',
+            provinceName: '北京市',
             selectedAddress: false,
             selectedAddress: false,
-            townName: ''
+            townName: '',
+            name: '探探鱼',
+            phone: '182****1718'
           }
           }
         ]);
         ]);
 
 
@@ -382,39 +382,36 @@ app.use(Elevator);
         const existAddress = ref([
         const existAddress = ref([
           {
           {
             id: 1,
             id: 1,
-            addressDetail: 'th ',
-            cityName: '石景山区',
-            countyName: '区',
-            provinceName: '北京',
+            addressDetail: '',
+            cityName: '次渠镇',
+            countyName: '通州区',
+            provinceName: '北京',
             selectedAddress: true,
             selectedAddress: true,
-            townName: ''
+            townName: '',
+            name: '探探鱼',
+            phone: '182****1718'
           },
           },
           {
           {
             id: 2,
             id: 2,
-            addressDetail: '12_ ',
-            cityName: '电饭锅',
-            countyName: '扶绥县',
-            provinceName: '北京',
+            addressDetail: '',
+            cityName: '钓鱼岛全区',
+            countyName: '',
+            provinceName: '钓鱼岛',
             selectedAddress: false,
             selectedAddress: false,
-            townName: ''
+            townName: '',
+            name: '探探鱼',
+            phone: '182****1718'
           },
           },
           {
           {
             id: 3,
             id: 3,
-            addressDetail: '发大水比 ',
-            cityName: '放到',
-            countyName: '广宁街道',
-            provinceName: '钓鱼岛全区',
-            selectedAddress: false,
-            townName: ''
-          },
-          {
-            id: 4,
-            addressDetail: '还是想吧百度吧 ',
-            cityName: '研发',
-            countyName: '八里庄街道',
-            provinceName: '北京',
+            addressDetail: '京东大厦',
+            cityName: '大兴区',
+            countyName: '科创十一街18号院',
+            provinceName: '北京市',
             selectedAddress: false,
             selectedAddress: false,
-            townName: ''
+            townName: '',
+            name: '探探鱼',
+            phone: '182****1718'
           }
           }
         ]);
         ]);
         const backBtnIcon = ref('left')
         const backBtnIcon = ref('left')

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

@@ -75,6 +75,10 @@ export default create({
       type: [Number, String],
       type: [Number, String],
       default: 10
       default: 10
     },
     },
+    isAuto: {
+      tyep: Boolean,
+      default: false
+    },
     progressOption: {
     progressOption: {
       type: Object,
       type: Object,
       default: () => {}
       default: () => {}

+ 1 - 1
src/packages/__VUE/overlay/doc.md

@@ -46,7 +46,7 @@ app.use(OverLay);
 | duration               | 动画时长,单位秒 | String, Number | `0.3`    |
 | duration               | 动画时长,单位秒 | String, Number | `0.3`    |
 | overlay-class          | 自定义遮罩类名   | String         | -      |
 | overlay-class          | 自定义遮罩类名   | String         | -      |
 | overlay-style          | 自定义遮罩样式   | CSSProperties  | -      |
 | overlay-style          | 自定义遮罩样式   | CSSProperties  | -      |
-| lock-scroll            | 背景是否锁定     | Boolean        | `false`  |
+| lock-scroll            | 背景是否锁定(`小程序不支持`)     | Boolean        | `false`  |
 | close-on-click-overlay | 是否点击遮罩关闭 | Boolean        | `true`   |
 | close-on-click-overlay | 是否点击遮罩关闭 | Boolean        | `true`   |
 
 
 ### Events
 ### Events

+ 1 - 4
src/packages/__VUE/overlay/index.taro.vue

@@ -1,9 +1,6 @@
 <template>
 <template>
   <Transition name="overlay-fade">
   <Transition name="overlay-fade">
-    <view v-if="lockScroll" :class="classes" @click="onClick" :style="style" v-show="visible" :catch-move="true">
-      <slot></slot>
-    </view>
-    <view v-else :class="classes" @click="onClick" :style="style" v-show="visible">
+    <view :class="classes" @click="onClick" :style="style" v-show="visible">
       <slot></slot>
       <slot></slot>
     </view>
     </view>
   </Transition>
   </Transition>

+ 4 - 16
src/packages/__VUE/tabbar/demo.vue

@@ -53,11 +53,7 @@
       <nut-tabbar-item tab-title="首页" icon="home" num="11"></nut-tabbar-item>
       <nut-tabbar-item tab-title="首页" icon="home" num="11"></nut-tabbar-item>
       <nut-tabbar-item tab-title="分类" icon="category"></nut-tabbar-item>
       <nut-tabbar-item tab-title="分类" icon="category"></nut-tabbar-item>
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
-      <nut-tabbar-item
-        tab-title="购物车"
-        icon="cart"
-        num="110"
-      ></nut-tabbar-item>
+      <nut-tabbar-item tab-title="购物车" icon="cart" num="110"></nut-tabbar-item>
       <nut-tabbar-item tab-title="我的" icon="my"></nut-tabbar-item>
       <nut-tabbar-item tab-title="我的" icon="my"></nut-tabbar-item>
     </nut-tabbar>
     </nut-tabbar>
 
 
@@ -76,20 +72,12 @@
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
     </nut-tabbar>
     </nut-tabbar>
     <h2>固定底部,可自由跳转</h2>
     <h2>固定底部,可自由跳转</h2>
-    <nut-tabbar :bottom="true">
+    <nut-tabbar :bottom="true" :safeAreaInsetBottom="true">
       <nut-tabbar-item tab-title="首页" href="" icon="home"></nut-tabbar-item>
       <nut-tabbar-item tab-title="首页" href="" icon="home"></nut-tabbar-item>
       <nut-tabbar-item tab-title="分类" icon="category"></nut-tabbar-item>
       <nut-tabbar-item tab-title="分类" icon="category"></nut-tabbar-item>
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
-      <nut-tabbar-item
-        tab-title="购物车"
-        href="https://m.jd.com"
-        icon="cart"
-      ></nut-tabbar-item>
-      <nut-tabbar-item
-        tab-title="我的"
-        href="######"
-        icon="my"
-      ></nut-tabbar-item>
+      <nut-tabbar-item tab-title="购物车" href="https://m.jd.com" icon="cart"></nut-tabbar-item>
+      <nut-tabbar-item tab-title="我的" href="######" icon="my"></nut-tabbar-item>
     </nut-tabbar>
     </nut-tabbar>
   </div>
   </div>
 </template>
 </template>

+ 10 - 10
src/packages/__VUE/tabbar/doc.md

@@ -168,24 +168,24 @@ setup() {
 | 字段            | 说明               | 类型   | 默认值  |
 | 字段            | 说明               | 类型   | 默认值  |
 |-----------------|--------------------|--------|---------|
 |-----------------|--------------------|--------|---------|
 | v-model:visible | 选中标签的索引值   | number | 0       |
 | v-model:visible | 选中标签的索引值   | number | 0       |
-| bottom          | 是否固定在页面底部 | Booble | false   |
+| bottom          | 是否固定在页面底部 | boolean | false   |
 | size          | icon的尺寸/图片的宽高 | string | '20px'  |
 | size          | icon的尺寸/图片的宽高 | string | '20px'  |
 | unactive-color  | icon未激活的颜色   | string | #7d7e80 |
 | unactive-color  | icon未激活的颜色   | string | #7d7e80 |
 | active-color    | icon激活的颜色     | string | #1989fa |
 | active-color    | icon激活的颜色     | string | #1989fa |
-
+| safe-area-inset-bottom   | 是否开启iphone系列全面屏底部安全区适配    | boolean | false |
 ### tabbar-item
 ### tabbar-item
 
 
 | 字段      | 说明                                      | 类型   | 默认值 |
 | 字段      | 说明                                      | 类型   | 默认值 |
 |-----------|-------------------------------------------|--------|--------|
 |-----------|-------------------------------------------|--------|--------|
-| tab-title | 标签页的标题                              | String | --     |
-| icon      | 标签页显示的[图标名称](#/icon)  | String | --     |
-| font-class-name | 自定义icon 字体基础类名     | String           | `nutui-iconfont` |
-| class-prefix | 自定义icon 类名前缀,用于使用自定义图标     | String           | `nut-icon` |
+| tab-title | 标签页的标题                              | string | --     |
+| icon      | 标签页显示的[图标名称](#/icon)  | string | --     |
+| font-class-name | 自定义icon 字体基础类名     | string           | `nutui-iconfont` |
+| class-prefix | 自定义icon 类名前缀,用于使用自定义图标     | string           | `nut-icon` |
 | img      | 标签页显示图片链接 | String | --     |
 | img      | 标签页显示图片链接 | String | --     |
-| activeImg      | 激活以后的标签页显示图片链接(同一个item中icon和img只能选择一个) | String | --     |
-| href      | 标签页的跳转链接                          | String | --     |
-| to  `小程序不支持`      | 	标签页的路由对象,等于 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) 属性 | String|Object | --     |
-| num       | 页签右上角的数字角标,超出99之后为99+     | Number | --     |
+| active-img      | 激活以后的标签页显示图片链接(同一个item中icon和img只能选择一个) | string | --     |
+| href      | 标签页的跳转链接                          | string | --     |
+| to  `小程序不支持`      | 	标签页的路由对象,等于 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) 属性 | string|object | --     |
+| num       | 页签右上角的数字角标,超出99之后为99+     | number | --     |
 
 
 
 
 ### Event
 ### Event

+ 5 - 1
src/packages/__VUE/tabbar/index.scss

@@ -4,7 +4,7 @@
   border-top: 1px solid $tabbar-border-color;
   border-top: 1px solid $tabbar-border-color;
   width: 100%;
   width: 100%;
   display: flex;
   display: flex;
-  height: 50px;
+  padding: 7px 0;
   box-sizing: border-box;
   box-sizing: border-box;
   background: $white;
   background: $white;
 
 
@@ -17,4 +17,8 @@
     left: 0px;
     left: 0px;
     z-index: 888;
     z-index: 888;
   }
   }
+  &-safebottom {
+    padding-bottom: constant(safe-area-inset-bottom);
+    padding-bottom: env(safe-area-inset-bottom);
+  }
 }
 }

+ 5 - 1
src/packages/__VUE/tabbar/index.taro.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <view class="nut-tabbar" :class="{ 'nut-tabbar-bottom': bottom }">
+  <view class="nut-tabbar" :class="{ 'nut-tabbar-bottom': bottom, 'nut-tabbar-safebottom': safeAreaInsetBottom }">
     <slot></slot>
     <slot></slot>
   </view>
   </view>
 </template>
 </template>
@@ -33,6 +33,10 @@ export default create({
     activeColor: {
     activeColor: {
       type: String,
       type: String,
       default: ''
       default: ''
+    },
+    safeAreaInsetBottom: {
+      type: Boolean,
+      default: false
     }
     }
   },
   },
   emits: ['tab-switch', 'update:visible'],
   emits: ['tab-switch', 'update:visible'],

+ 5 - 1
src/packages/__VUE/tabbar/index.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <view class="nut-tabbar" :class="{ 'nut-tabbar-bottom': bottom }">
+  <view class="nut-tabbar" :class="{ 'nut-tabbar-bottom': bottom, 'nut-tabbar-safebottom': safeAreaInsetBottom }">
     <slot></slot>
     <slot></slot>
   </view>
   </view>
 </template>
 </template>
@@ -33,6 +33,10 @@ export default create({
     activeColor: {
     activeColor: {
       type: String,
       type: String,
       default: ''
       default: ''
+    },
+    safeAreaInsetBottom: {
+      type: Boolean,
+      default: false
     }
     }
   },
   },
   emits: ['tab-switch', 'update:visible'],
   emits: ['tab-switch', 'update:visible'],

+ 8 - 8
src/sites/mobile-taro/vue/package.json

@@ -37,18 +37,18 @@
   "dependencies": {
   "dependencies": {
     "@babel/runtime": "^7.7.7",
     "@babel/runtime": "^7.7.7",
     "@nutui/nutui-taro": "^3.0.2",
     "@nutui/nutui-taro": "^3.0.2",
-    "@tarojs/components": "^3.3.0-alpha.8",
-    "@tarojs/mini-runner": "^3.3.16",
-    "@tarojs/runtime": "^3.3.0-alpha.8",
-    "@tarojs/taro": "^3.3.0-alpha.8",
+    "@tarojs/components": "^3.4.0",
+    "@tarojs/mini-runner": "^3.4.0",
+    "@tarojs/runtime": "^3.4.0",
+    "@tarojs/taro": "^3.4.0",
     "vue": "^3.0.0"
     "vue": "^3.0.0"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "@babel/core": "^7.8.0",
     "@babel/core": "^7.8.0",
-    "@tarojs/cli": "^3.3.0-alpha.8",
-    "@tarojs/mini-runner": "^3.3.0-alpha.8",
-    "@tarojs/plugin-html": "^3.3.0-alpha.8",
-    "@tarojs/webpack-runner": "^3.3.0-alpha.8",
+    "@tarojs/cli": "^3.4.0",
+    "@tarojs/mini-runner": "^3.4.0",
+    "@tarojs/plugin-html": "^3.4.0",
+    "@tarojs/webpack-runner": "^3.4.0",
     "@types/webpack-env": "^1.13.6",
     "@types/webpack-env": "^1.13.6",
     "@typescript-eslint/eslint-plugin": "^4.15.1",
     "@typescript-eslint/eslint-plugin": "^4.15.1",
     "@typescript-eslint/parser": "^4.15.1",
     "@typescript-eslint/parser": "^4.15.1",

+ 4 - 16
src/sites/mobile-taro/vue/src/nav/pages/tabbar/index.vue

@@ -50,11 +50,7 @@
       <nut-tabbar-item tab-title="首页" icon="home" num="11"></nut-tabbar-item>
       <nut-tabbar-item tab-title="首页" icon="home" num="11"></nut-tabbar-item>
       <nut-tabbar-item tab-title="分类" icon="category"></nut-tabbar-item>
       <nut-tabbar-item tab-title="分类" icon="category"></nut-tabbar-item>
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
-      <nut-tabbar-item
-        tab-title="购物车"
-        icon="cart"
-        num="110"
-      ></nut-tabbar-item>
+      <nut-tabbar-item tab-title="购物车" icon="cart" num="110"></nut-tabbar-item>
       <nut-tabbar-item tab-title="我的" icon="my"></nut-tabbar-item>
       <nut-tabbar-item tab-title="我的" icon="my"></nut-tabbar-item>
     </nut-tabbar>
     </nut-tabbar>
 
 
@@ -73,20 +69,12 @@
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
     </nut-tabbar>
     </nut-tabbar>
     <h2>固定底部,可自由跳转</h2>
     <h2>固定底部,可自由跳转</h2>
-    <nut-tabbar :bottom="true">
+    <nut-tabbar :bottom="true" :safeAreaInsetBottom="true">
       <nut-tabbar-item tab-title="首页" href="" icon="home"></nut-tabbar-item>
       <nut-tabbar-item tab-title="首页" href="" icon="home"></nut-tabbar-item>
       <nut-tabbar-item tab-title="分类" icon="category"></nut-tabbar-item>
       <nut-tabbar-item tab-title="分类" icon="category"></nut-tabbar-item>
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
       <nut-tabbar-item tab-title="发现" icon="find"></nut-tabbar-item>
-      <nut-tabbar-item
-        tab-title="购物车"
-        href="https://m.jd.com"
-        icon="cart"
-      ></nut-tabbar-item>
-      <nut-tabbar-item
-        tab-title="我的"
-        href="######"
-        icon="my"
-      ></nut-tabbar-item>
+      <nut-tabbar-item tab-title="购物车" href="https://m.jd.com" icon="cart"></nut-tabbar-item>
+      <nut-tabbar-item tab-title="我的" href="######" icon="my"></nut-tabbar-item>
     </nut-tabbar>
     </nut-tabbar>
   </div>
   </div>
 </template>
 </template>