Browse Source

Merge branch 'v2' of https://github.com/jdf2e/nutui into v2

zhangyufei 5 years ago
parent
commit
3f909230a7
8 changed files with 49 additions and 5 deletions
  1. 18 0
      CHANGELOG.md
  2. 1 1
      README-zh_CN.md
  3. 1 1
      README.md
  4. 1 1
      docs/intro.md
  5. 1 1
      package.json
  6. 7 1
      src/packages/stepper/demo.vue
  7. 16 0
      src/packages/stepper/doc.md
  8. 4 0
      src/packages/stepper/stepper.vue

+ 18 - 0
CHANGELOG.md

@@ -1,3 +1,21 @@
+## 2.2.1
+
+`2020-03-09`
+
+* :sparkles: upd(BackTop):支持指定容器Id监听滚动事件,重构优化,文档优化 @richard1015
+* :sparkles: upd(Cell):重构优化内部代码,文档优化 @zhenyulei
+* :sparkles: upd(Dialog):重构优化内部代码,文档优化 @guoxiao158
+* :sparkles: doc:文档新增业务组件 @richard1015
+* :sparkles: feat(Types):新增TextBox types类型 @richard1015
+* :sparkles: feat(Scroller):vertical-scroll组件新增滚动监听事件 @richard1015
+* :sparkles: feat(LuckDraw):新增业务抽奖组件 @Ymm0008
+* :bug: fix(Stepper) 修复步进器组件触发多次change事件 #207 @richard1015
+* :bug: fix(Popup) 修复样式加载问题 @yangkaixuan
+* :bug: fix(Tab) 修复标签中数据更新不渲染页面的问题 #215 @zhenyulei
+* :bug: fix(LeftSlip) 左滑删除优化,单元测试问题修复 @vickyYE
+* :bug: fix(MoToVue) md 转换 vue 插件性能优化 @linrufeng
+* :bug: fix(checkboxgroup) 修复代码冲突 @richard1015
+
 ## 2.2.0
 
 `2020-02-12`

+ 1 - 1
README-zh_CN.md

@@ -10,7 +10,7 @@
 ## 特性
 
 * 全新的架构
-* 40+ 高质量组件
+* 50+ 高质量组件
 * 30+ 京东移动端项目正在使用
 * 参照京东APP 7.0 视觉规范
 * 支持按需加载

+ 1 - 1
README.md

@@ -10,7 +10,7 @@ English | [简体中文](./README-zh_CN.md)
 ## Features
 
 * New structure
-* 40+ Reusable components
+* 50+ Reusable components
 * Used by 30+ JD mobile projects
 * Refer to JD APP 7.0 visual specification
 * On-demand loading Support

+ 1 - 1
docs/intro.md

@@ -14,7 +14,7 @@ NutUI是一套京东风格的移动端Vue组件库,开发和服务于移动Web
 
 ## 特性
 
-* 40+ 高质量组件
+* 50+ 高质量组件
 * 30+ 京东移动端项目正在使用
 * 基于京东APP 7.0 视觉规范
 * 支持按需加载

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
     "name": "@nutui/nutui",
-    "version": "2.2.0",
+    "version": "2.2.2",
     "description": "一套轻量级移动端Vue组件库",
     "typings": "dist/types/index.d.ts",
     "main": "dist/nutui.js",

+ 7 - 1
src/packages/stepper/demo.vue

@@ -15,7 +15,7 @@
     <div>
       <nut-cell>
         <span slot="title">
-          <nut-stepper :value.sync="val2" :min="5" :max="100"></nut-stepper>
+          <nut-stepper :value.sync="val2" @add-no-allow="addNoAllow" @reduce-no-allow="reduceNoAllow" :min="5" :max="100"></nut-stepper>
         </span>
       </nut-cell>
     </div>
@@ -68,6 +68,12 @@ export default {
     }
   },
   methods: {
+    addNoAllow(){
+      alert('超出最大限制')
+    },
+    reduceNoAllow(){
+      alert('超出最小限制')
+    },
     focus(e, v) {
       console.log('focus,', e, v)
     },

+ 16 - 0
src/packages/stepper/doc.md

@@ -17,8 +17,22 @@
     :value.sync="val2" 
     :min="5" 
     :max="100"
+    @add-no-allow="addNoAllow" 
+    @reduce-no-allow="reduceNoAllow"
 ></nut-stepper>
 ```
+``` javascript
+export default {
+  methods: {
+    addNoAllow(){
+      alert('超出最大限制')
+    },
+    reduceNoAllow(){
+      alert('超出最小限制')
+    }
+  }
+}
+```
 
 设置加减的步长
 
@@ -76,3 +90,5 @@
 | change | 值改变时触发事件 | value
 | blur | 输入框失去焦点时触发事件 | value
 | focus | 输入框获取焦点时触发事件 | value
+| add-no-allow | 超出最大回调事件 | -
+| reduce-no-allow | 超出最小回调事件 | -

+ 4 - 0
src/packages/stepper/stepper.vue

@@ -193,6 +193,8 @@ export default {
                 };
                 this.$emit('update:value', this.num);
                 this.$emit('add', this.num); 
+            }else{
+                this.$emit('add-no-allow'); 
             }
             
         },
@@ -220,6 +222,8 @@ export default {
                 }    
                 this.$emit('update:value', this.num);
                 this.$emit('reduce', this.num);
+            }else{
+                this.$emit('reduce-no-allow'); 
             }
             
         },