Browse Source

在线练习改成 高频题库

y595705120 2 years ago
parent
commit
800cbe5280
100 changed files with 64 additions and 1837 deletions
  1. 6 1
      app.json
  2. 0 37
      component/iView/alert/index.js
  3. 0 7
      component/iView/alert/index.json
  4. 0 15
      component/iView/alert/index.wxml
  5. 0 1
      component/iView/alert/index.wxss
  6. 56 1
      component/iView/avatar/index.wxss
  7. 0 38
      component/iView/checkbox-group/index.js
  8. 0 7
      component/iView/checkbox-group/index.json
  9. 0 3
      component/iView/checkbox-group/index.wxml
  10. 0 0
      component/iView/checkbox-group/index.wxss
  11. 0 56
      component/iView/checkbox/index.js
  12. 0 7
      component/iView/checkbox/index.json
  13. 0 8
      component/iView/checkbox/index.wxml
  14. 0 1
      component/iView/checkbox/index.wxss
  15. 0 90
      component/iView/count-down/index.js
  16. 0 4
      component/iView/count-down/index.json
  17. 0 4
      component/iView/count-down/index.wxml
  18. 0 0
      component/iView/count-down/index.wxss
  19. 0 25
      component/iView/divider/index.js
  20. 0 3
      component/iView/divider/index.json
  21. 0 19
      component/iView/divider/index.wxml
  22. 0 1
      component/iView/divider/index.wxss
  23. 0 33
      component/iView/drawer/index.js
  24. 0 3
      component/iView/drawer/index.json
  25. 0 6
      component/iView/drawer/index.wxml
  26. 0 1
      component/iView/drawer/index.wxss
  27. 0 10
      component/iView/grid-icon/index.js
  28. 0 3
      component/iView/grid-icon/index.json
  29. 0 1
      component/iView/grid-icon/index.wxml
  30. 0 1
      component/iView/grid-icon/index.wxss
  31. 0 10
      component/iView/grid-label/index.js
  32. 0 3
      component/iView/grid-label/index.json
  33. 0 1
      component/iView/grid-label/index.wxml
  34. 0 1
      component/iView/grid-label/index.wxss
  35. 0 32
      component/iView/index-item/index.js
  36. 0 3
      component/iView/index-item/index.json
  37. 0 11
      component/iView/index-item/index.wxml
  38. 0 1
      component/iView/index-item/index.wxss
  39. 0 158
      component/iView/index/index.js
  40. 0 3
      component/iView/index/index.json
  41. 0 38
      component/iView/index/index.wxml
  42. 0 1
      component/iView/index/index.wxss
  43. 0 101
      component/iView/input-number/index.js
  44. 0 3
      component/iView/input-number/index.json
  45. 0 5
      component/iView/input-number/index.wxml
  46. 0 1
      component/iView/input-number/index.wxss
  47. 0 112
      component/iView/notice-bar/index.js
  48. 0 7
      component/iView/notice-bar/index.json
  49. 0 9
      component/iView/notice-bar/index.wxml
  50. 0 1
      component/iView/notice-bar/index.wxss
  51. 0 42
      component/iView/page/index.js
  52. 0 7
      component/iView/page/index.json
  53. 0 14
      component/iView/page/index.wxml
  54. 0 1
      component/iView/page/index.wxss
  55. 0 23
      component/iView/progress/index.js
  56. 0 3
      component/iView/progress/index.json
  57. 0 10
      component/iView/progress/index.wxml
  58. 0 1
      component/iView/progress/index.wxss
  59. 0 15
      component/iView/slide/index.js
  60. 0 8
      component/iView/slide/index.json
  61. 0 4
      component/iView/slide/index.wxml
  62. 0 0
      component/iView/slide/index.wxss
  63. 0 52
      component/iView/step/index.js
  64. 0 7
      component/iView/step/index.json
  65. 0 70
      component/iView/step/index.wxml
  66. 0 1
      component/iView/step/index.wxss
  67. 0 50
      component/iView/steps/index.js
  68. 0 3
      component/iView/steps/index.json
  69. 0 3
      component/iView/steps/index.wxml
  70. 0 1
      component/iView/steps/index.wxss
  71. 0 40
      component/iView/sticky-item/index.js
  72. 0 3
      component/iView/sticky-item/index.json
  73. 0 10
      component/iView/sticky-item/index.wxml
  74. 0 1
      component/iView/sticky-item/index.wxss
  75. 0 63
      component/iView/sticky/index.js
  76. 0 3
      component/iView/sticky/index.json
  77. 0 3
      component/iView/sticky/index.wxml
  78. 0 0
      component/iView/sticky/index.wxss
  79. 0 161
      component/iView/swipeout/index.js
  80. 0 7
      component/iView/swipeout/index.json
  81. 0 39
      component/iView/swipeout/index.wxml
  82. 0 1
      component/iView/swipeout/index.wxss
  83. 0 62
      component/iView/tab-bar-item/index.js
  84. 0 8
      component/iView/tab-bar-item/index.json
  85. 0 10
      component/iView/tab-bar-item/index.wxml
  86. 0 1
      component/iView/tab-bar-item/index.wxss
  87. 0 66
      component/iView/tab-bar/index.js
  88. 0 3
      component/iView/tab-bar/index.json
  89. 0 6
      component/iView/tab-bar/index.wxml
  90. 0 1
      component/iView/tab-bar/index.wxss
  91. 0 42
      component/iView/tag/index.js
  92. 0 3
      component/iView/tag/index.json
  93. 0 27
      component/iView/tag/index.wxml
  94. 0 1
      component/iView/tag/index.wxss
  95. 0 48
      component/iView/toast/index.js
  96. 0 7
      component/iView/toast/index.json
  97. 0 16
      component/iView/toast/index.wxml
  98. 0 1
      component/iView/toast/index.wxss
  99. 1 1
      pages/exam/collection/index.js
  100. 1 1
      pages/exam/collection/index.json

+ 6 - 1
app.json

@@ -1,7 +1,10 @@
 {
   "pages": [
     "pages/index/index",
+    "pages/train/orderTest/answer",
+    
     "pages/newExam/mockExam/index",
+    "pages/exam/collection/index",
     
     "pages/newExam/home/index",
     "pages/my/index/index",
@@ -11,6 +14,8 @@
     "pages/exam/group/group",
     "pages/exam/paper/paper",
     "pages/exam/do/index",
+    "pages/exam/home/index",
+    "pages/exam/orderTest/answer",
     "pages/study/exam/index",
     "pages/user/identify/index",
     "pages/study/course/index",
@@ -29,7 +34,7 @@
     "pages/train/limitHome/index",
     "pages/train/limitDo/index",
     "pages/train/limit/index",
-    "pages/train/orderTest/answer",
+    
     "pages/newExam/orderTest/index"
     
   ],

+ 0 - 37
component/iView/alert/index.js

@@ -1,37 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    options: {
-        multipleSlots: true
-    },
-    properties: {
-        //info, success, warning, error
-        type: {
-            type: String,
-            value: 'info'
-        },
-        closable: {
-            type: Boolean,
-            value: false
-        },
-        showIcon: {
-            type: Boolean,
-            default: false
-        },
-        desc: {
-            type: Boolean,
-            default: false
-        },
-    },
-    data: {
-        closed: false
-    },
-    methods: {
-        handleTap() {
-            this.setData({
-                closed: !this.data.closed,
-            });
-            this.triggerEvent('close');
-        },
-
-    }
-});

+ 0 - 7
component/iView/alert/index.json

@@ -1,7 +0,0 @@
-{
-    "component": true,
-    "usingComponents":
-    {
-        "i-icon": "../icon/index"
-    }
-}

+ 0 - 15
component/iView/alert/index.wxml

@@ -1,15 +0,0 @@
-<view class="i-class i-alert {{'i-alert-'+type}} {{showIcon?'i-alert-with-icon':''}} {{desc?'i-alert-with-desc':''}}" wx:if="{{!closed}}">
-    <view wx:if="{{ showIcon }}" class="i-alert-icon">
-        <i-icon type="prompt" wx:if="{{ type === 'info' }}" size="{{desc?24:16}}"></i-icon>
-        <i-icon type="success" wx:if="{{ type === 'success' }}" size="{{desc?24:16}}"></i-icon>
-        <i-icon type="warning" wx:if="{{ type === 'warning' }}" size="{{desc?24:16}}"></i-icon>
-        <i-icon type="delete" wx:if="{{ type === 'error' }}" size="{{desc?24:16}}"></i-icon>
-    </view>
-    <slot></slot>
-    <view class="i-alert-desc">
-        <slot name="desc"></slot>
-    </view>
-    <view class="i-alert-close" wx:if="{{ closable }}" bindtap="handleTap">
-        <i-icon type="close"></i-icon>
-    </view>
-</view>

+ 0 - 1
component/iView/alert/index.wxss

@@ -1 +0,0 @@
-.i-alert{position:relative;margin:10px;padding:8px 48px 8px 16px;font-size:14px;border-radius:2px;color:#fff;background:#f7f7f7;color:#495060}.i-alert.i-alert-with-icon{padding:8px 48px 8px 38px}.i-alert-info{color:#fff;background:#2db7f5}.i-alert-success{color:#fff;background:#19be6b}.i-alert-warning{color:#fff;background:#f90}.i-alert-error{color:#fff;background:#ed3f14}.i-alert-icon{position:absolute;top:9px;left:16px;font-size:14px}.i-alert-desc{font-size:12px}.i-alert-with-desc{padding:16px;position:relative}.i-alert-with-desc.i-alert-with-icon{padding:16px 16px 16px 69px}.i-alert-with-desc .i-alert-icon{top:50%;left:24px;margin-top:-21px;font-size:28px}.i-alert-close{font-size:12px;position:absolute;right:16px;top:8px;overflow:hidden;cursor:pointer}

+ 56 - 1
component/iView/avatar/index.wxss

@@ -1 +1,56 @@
-.i-avatar{display:inline-block;text-align:center;background:#ccc;color:#fff;white-space:nowrap;position:relative;overflow:hidden;vertical-align:middle;width:32px;height:32px;line-height:32px;border-radius:16px;font-size:18px}.i-avatar .ivu-avatar-string{line-height:32px}.i-avatar-large{width:40px;height:40px;line-height:40px;border-radius:20px;font-size:24px}.i-avatar-large .ivu-avatar-string{line-height:40px}.i-avatar-small{width:24px;height:24px;line-height:24px;border-radius:12px;font-size:14px}.i-avatar-small .ivu-avatar-string{line-height:24px}.i-avatar-image{background:0 0}.i-avatar-square{border-radius:4px}.i-avatar>image{width:100%;height:100%}
+.i-avatar {
+  display: inline-block;
+  text-align: center;
+  background: #ccc;
+  color: #fff;
+  white-space: nowrap;
+  position: relative;
+  overflow: hidden;
+  vertical-align: middle;
+  width: 32px;
+  height: 32px;
+  line-height: 32px;
+  border-radius: 16px;
+  font-size: 18px
+}
+
+.i-avatar .ivu-avatar-string {
+  line-height: 32px
+}
+
+.i-avatar-large {
+  width: 40px;
+  height: 40px;
+  line-height: 40px;
+  border-radius: 20px;
+  font-size: 24px
+}
+
+.i-avatar-large .ivu-avatar-string {
+  line-height: 40px
+}
+
+.i-avatar-small {
+  width: 24px;
+  height: 24px;
+  line-height: 24px;
+  border-radius: 12px;
+  font-size: 14px
+}
+
+.i-avatar-small .ivu-avatar-string {
+  line-height: 24px
+}
+
+.i-avatar-image {
+  background: 0 0
+}
+
+.i-avatar-square {
+  border-radius: 4px
+}
+
+/* .i-avatar>image {
+  width: 100%;
+  height: 100%
+} */

+ 0 - 38
component/iView/checkbox-group/index.js

@@ -1,38 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    relations: {
-        '../checkbox/index': {
-            type: 'child',
-            linked() {
-                this.changeCurrent();
-            },
-            linkChanged() {
-                this.changeCurrent();
-            },
-            unlinked() {
-                this.changeCurrent();
-            }
-        }
-    },
-    properties: {
-        current: {
-            type: Array,
-            value: [],
-            observer: 'changeCurrent'
-        },
-    },
-    methods: {
-        changeCurrent(val = this.data.current) {
-            let items = this.getRelationNodes('../checkbox/index');
-            const len = items.length;
-            if (len > 0) {
-                items.forEach(item => {
-                    item.changeCurrent(val.indexOf(item.data.value) !== -1);
-                });
-            }
-        },
-        emitEvent(current) {
-            this.triggerEvent('change', current);
-        }
-    }
-});

+ 0 - 7
component/iView/checkbox-group/index.json

@@ -1,7 +0,0 @@
-{
-    "component": true,
-    "usingComponents":
-    {
-        "i-cell-group": "../cell-group/index"
-    }
-}

+ 0 - 3
component/iView/checkbox-group/index.wxml

@@ -1,3 +0,0 @@
-<i-cell-group class="i-class">
-    <slot></slot>
-</i-cell-group>

+ 0 - 0
component/iView/checkbox-group/index.wxss


+ 0 - 56
component/iView/checkbox/index.js

@@ -1,56 +0,0 @@
-const prefixCls = 'i-checkbox';
-
-Component({
-    externalClasses: ['i-class'],
-    relations: {
-        '../checkbox-group/index': {
-            type: 'parent'
-        }
-    },
-    properties: {
-        value: {
-            type: String,
-            value: ''
-        },
-        checked: {
-            type: Boolean,
-            value: false
-        },
-        disabled: {
-            type: Boolean,
-            value: false
-        },
-        color: {
-            type: String,
-            value: '#2d8cf0'
-        },
-        position: {
-            type: String,
-            value: 'left', //left right
-            observer: 'setPosition'
-        }
-    },
-    data: {
-        checked: true,
-        positionCls: `${prefixCls}-checkbox-left`,
-    },
-    attached() {
-        this.setPosition();
-    },
-    methods: {
-        changeCurrent(current) {
-            this.setData({ checked: current });
-        },
-        checkboxChange() {
-            if (this.data.disabled) return;
-            const item = { current: !this.data.checked, value: this.data.value };
-            const parent = this.getRelationNodes('../checkbox-group/index')[0];
-            parent ? parent.emitEvent(item) : this.triggerEvent('change', item);
-        },
-        setPosition() {
-            this.setData({
-                positionCls: this.data.position.indexOf('left') !== -1 ? `${prefixCls}-checkbox-left` : `${prefixCls}-checkbox-right`,
-            });
-        }
-    }
-});

+ 0 - 7
component/iView/checkbox/index.json

@@ -1,7 +0,0 @@
-{
-    "component": true,
-    "usingComponents":
-    {
-        "i-cell": "../cell/index"
-    }
-}

+ 0 - 8
component/iView/checkbox/index.wxml

@@ -1,8 +0,0 @@
-<view class="i-class i-checkbox" catchtap="checkboxChange">
-    <i-cell i-class="i-checkbox-cell">
-        <label>
-            <radio value="{{value}}" checked="{{checked}}" color="{{checked?color:''}}" disabled="{{disabled}}" class="i-checkbox-radio {{positionCls}}" />
-            <view class="i-checkbox-title">{{value}}</view>
-        </label>
-    </i-cell>
-</view>

+ 0 - 1
component/iView/checkbox/index.wxss

@@ -1 +0,0 @@
-.i-checkbox-cell::after{display:block}.i-checkbox-checkbox-left{float:left}.i-checkbox-checkbox-right{float:right}.i-checkbox-radio{vertical-align:middle}.i-checkbox-title{display:inline-block;vertical-align:middle}

+ 0 - 90
component/iView/count-down/index.js

@@ -1,90 +0,0 @@
-Component({
-    properties: {
-        target: Number,
-        showDay: Boolean,
-        callback: String,
-        format: Array,
-        clearTimer: Boolean
-    },
-    externalClasses: ['countdown-class'],
-    data: {
-        time: '',
-        resultFormat: [],
-        changeFormat: false
-    },
-    ready() {
-        this.getFormat();
-
-    },
-    methods: {
-        getFormat() {
-            const data = this.data;
-            const len = data.format.length;
-
-            if (!data.showDay) data.resultFormat.push('');
-
-            if (len >= 3) {
-                for (let i = 0; i < len; i++) {
-                    if (data.resultFormat.length >= 4) break;
-                    if (data.format[i]) {
-                        data.resultFormat.push(data.format[i].toString());
-                    }
-                }
-
-                if (data.resultFormat.length >= 4) data.changeFormat = true;
-            }
-
-            this.getLastTime();
-        },
-        init() {
-            const self = this;
-            setTimeout(function () {
-                self.getLastTime.call(self);
-            }, 1000);
-        },
-        getLastTime() {
-            const data = this.data;
-            const gapTime = Math.ceil((data.target - new Date().getTime()) / 1000);
-            let result = '';
-            let time = '00:00:00';
-            let day = '00';
-            const format = data.resultFormat;
-
-            if (gapTime > 0) {
-                day = this.formatNum(parseInt(gapTime / 86400));
-                let lastTime = gapTime % 86400;
-                const hour = this.formatNum(parseInt(lastTime / 3600));
-                lastTime = lastTime % 3600;
-                const minute = this.formatNum(parseInt(lastTime / 60));
-                const second = this.formatNum(lastTime % 60);
-
-                if (data.changeFormat) time = `${hour}${format[1]}${minute}${format[2]}${second}${format[3]}`;
-                else time = `${hour}:${minute}:${second}`;
-
-                if (!data.clearTimer) this.init.call(this);
-            } else {
-                this.endfn();
-            }
-
-            if (data.showDay) {
-                if (data.changeFormat) {
-                    result = `${day}${format[0]} ${time}`;
-                } else {
-                    result = `${day}d ${time}`;
-                }
-            } else {
-                result = time;
-            }
-            this.setData({
-                time: result
-            });
-
-        },
-        formatNum(num) {
-            return num > 9 ? num : `0${num}`;
-        },
-        endfn() {
-            this.triggerEvent('callback', {});
-        }
-    }
-});

+ 0 - 4
component/iView/count-down/index.json

@@ -1,4 +0,0 @@
-
-{
-  "component": true
-}

+ 0 - 4
component/iView/count-down/index.wxml

@@ -1,4 +0,0 @@
-<span class="countdown-class">
-  {{time}}
-</span>
-

+ 0 - 0
component/iView/count-down/index.wxss


+ 0 - 25
component/iView/divider/index.js

@@ -1,25 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    properties: {
-        content: {
-            type: String,
-            value: ''
-        },
-        height : {
-            type: Number,
-            value: 48
-        },
-        color : {
-            type : String,
-            value : '#80848f'
-        },
-        lineColor : {
-            type : String,
-            value : '#e9eaec'
-        },
-        size : {
-            type: String,
-            value: 12
-        }
-    }
-});

+ 0 - 3
component/iView/divider/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 19
component/iView/divider/index.wxml

@@ -1,19 +0,0 @@
-<view class="i-divider i-class" style="{{parse.getStyle(color,size,height)}}">
-    <view class="i-divider-content" wx:if="{{content !== ''}}">
-        {{content}}
-    </view>
-    <view class="i-divider-content" wx:else>
-        <slot></slot>
-    </view>
-    <view class="i-divider-line" style="background:{{lineColor}}"></view>
-</view>
-<wxs module="parse">
-    module.exports = {
-        getStyle : function(color,size,height){
-            var color = 'color:' + color +';';
-            var size = 'font-size:' + size + 'px;';
-            var height = 'height:' + height+'px;'      
-            return color + size + height;
-        }
-    }
-</wxs>

+ 0 - 1
component/iView/divider/index.wxss

@@ -1 +0,0 @@
-.i-divider{width:100%;text-align:center;font-size:12px;position:relative;display:flex;align-items:center;justify-content:center}.i-divider-line{position:absolute;left:0;width:100%;height:1rpx;background-color:#f7f7f7;top:50%}.i-divider-content{background:#fff;position:relative;z-index:1;display:inline-block;padding:0 10px}

+ 0 - 33
component/iView/drawer/index.js

@@ -1,33 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    properties: {
-        visible: {
-            type: Boolean,
-            value: false
-        },
-
-        mask: {
-            type: Boolean,
-            value: true
-        },
-
-        maskClosable: {
-            type: Boolean,
-            value: true
-        },
-
-        mode: {
-            type: String,
-            value: 'left' // left right
-        }
-    },
-    data: {},
-    methods: {
-        handleMaskClick() {
-            if (!this.data.maskClosable) {
-                return;
-            }
-            this.triggerEvent('close', {});
-        }
-    }
-});

+ 0 - 3
component/iView/drawer/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 6
component/iView/drawer/index.wxml

@@ -1,6 +0,0 @@
-<view class="i-class i-drawer {{ visible ? 'i-drawer-show' : '' }} {{ 'i-drawer-' + mode }}">
-    <view wx:if="{{ mask }}" class="i-drawer-mask" bindtap="handleMaskClick"></view>
-    <view class="i-drawer-container">
-        <slot></slot>
-    </view>
-</view>

+ 0 - 1
component/iView/drawer/index.wxss

@@ -1 +0,0 @@
-.i-drawer{visibility:hidden}.i-drawer-show{visibility:visible}.i-drawer-show .i-drawer-mask{display:block;opacity:1}.i-drawer-show .i-drawer-container{opacity:1}.i-drawer-show.i-drawer-left .i-drawer-container,.i-drawer-show.i-drawer-right .i-drawer-container{transform:translate3d(0,-50%,0)}.i-drawer-mask{opacity:0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:6;background:rgba(0,0,0,.6);transition:all .3s ease-in-out}.i-drawer-container{position:fixed;left:50%;top:50%;transform:translate3d(-50%,-50%,0);transform-origin:center;transition:all .3s ease-in-out;z-index:7;opacity:0}.i-drawer-left .i-drawer-container{left:0;top:50%;transform:translate3d(-100%,-50%,0)}.i-drawer-right .i-drawer-container{right:0;top:50%;left:auto;transform:translate3d(100%,-50%,0)}

+ 0 - 10
component/iView/grid-icon/index.js

@@ -1,10 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-
-    relations: {
-        '../grid-item/index': {
-            type: 'parent'
-        }
-    },
-
-});

+ 0 - 3
component/iView/grid-icon/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 1
component/iView/grid-icon/index.wxml

@@ -1 +0,0 @@
-<view class="i-class i-grid-icon"><slot></slot></view>

+ 0 - 1
component/iView/grid-icon/index.wxss

@@ -1 +0,0 @@
-.i-grid-icon{display:block;width:28px;height:28px;margin:0 auto}.i-grid-icon image{width:100%;height:100%}

+ 0 - 10
component/iView/grid-label/index.js

@@ -1,10 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-
-    relations: {
-        '../grid-item/index': {
-            type: 'parent'
-        }
-    },
-
-});

+ 0 - 3
component/iView/grid-label/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 1
component/iView/grid-label/index.wxml

@@ -1 +0,0 @@
-<view class="i-class i-grid-label"><slot></slot></view>

+ 0 - 1
component/iView/grid-label/index.wxss

@@ -1 +0,0 @@
-.i-grid-label{margin-top:5px;display:block;text-align:center;color:#1c2438;font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}

+ 0 - 32
component/iView/index-item/index.js

@@ -1,32 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    properties : {
-        name : {
-            type : String,
-            value : ''
-        }
-    },
-    relations : {
-        '../index/index' : {
-            type : 'parent'
-        }
-    },
-    data : {
-        top : 0,
-        height : 0,
-        currentName : ''
-    },
-    methods: {
-        updateDataChange() {
-            const className = '.i-index-item';
-            const query = wx.createSelectorQuery().in(this);
-            query.select( className ).boundingClientRect((res)=>{
-                    this.setData({
-                        top : res.top,
-                        height : res.height,
-                        currentName : this.data.name
-                    })
-            }).exec()
-        }
-    }
-})

+ 0 - 3
component/iView/index-item/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 11
component/iView/index-item/index.wxml

@@ -1,11 +0,0 @@
-<view class="i-index-item i-class">
-    <view class="i-index-item-header">{{name}}</view>
-    <view class="i-index-item-content">
-        <slot></slot>
-    </view>
-</view>
-<wxs module="parse">
-    module.exports = {
-       
-    }
-</wxs>

+ 0 - 1
component/iView/index-item/index.wxss

@@ -1 +0,0 @@
-.i-index-item-header{height:30px;line-height:30px;background:#eee;font-size:14px;padding-left:10px;width:100%;box-sizing:border-box}.i-index-item-content{font-size:14px}

+ 0 - 158
component/iView/index/index.js

@@ -1,158 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    properties : {
-        height : {
-            type : String,
-            value : '300'
-        },
-        itemHeight : {
-            type : Number,
-            value : 18
-        }
-    },
-    relations : {
-        '../index-item/index' : {
-            type : 'child',
-            linked(){
-                this._updateDataChange();
-            },
-            linkChanged () {
-                this._updateDataChange();
-            },
-            unlinked () {
-                this._updateDataChange();
-            }
-        }
-    },
-    data : {
-        scrollTop : 0,
-        fixedData : [],
-        current : 0,
-        timer : null,
-        startTop : 0,
-        itemLength : 0,
-        currentName : '',
-        isTouches : false
-    },
-    methods : {
-        loop(){},
-        _updateDataChange( ){
-            const indexItems = this.getRelationNodes('../index-item/index');
-            const len = indexItems.length;
-            const fixedData = this.data.fixedData;
-            /*
-             * 使用函数节流限制重复去设置数组内容进而限制多次重复渲染
-             * 暂时没有研究微信在渲染的时候是否会进行函数节流
-            */
-            if (len > 0) {
-
-                if( this.data.timer ){
-                    clearTimeout( this.data.timer )
-                    this.setData({
-                        timer : null
-                    })
-                }
-                
-                this.data.timer = setTimeout(()=>{
-                    const data = [];
-                    indexItems.forEach((item) => {
-                        if( item.data.name && fixedData.indexOf( item.data.name ) === -1 ){
-                            data.push(item.data.name);
-                            item.updateDataChange();
-                        }
-                    })
-                    this.setData({
-                        fixedData : data,
-                        itemLength : indexItems.length
-                    })
-                    //组件加载完成之后重新设置顶部高度
-                    this.setTouchStartVal();
-                },0);
-                this.setData({
-                    timer : this.data.timer
-                })
-                
-            }
-        },
-        handlerScroll(event){
-            const detail = event.detail;
-            const scrollTop = detail.scrollTop;
-            const indexItems = this.getRelationNodes('../index-item/index');
-            indexItems.forEach((item,index)=>{
-                let data = item.data;
-                let offset = data.top + data.height;
-                if( scrollTop < offset && scrollTop >= data.top ){
-                    this.setData({
-                        current : index,
-                        currentName : data.currentName
-                    })
-                }
-            })
-        },
-        getCurrentItem(index){
-            const indexItems = this.getRelationNodes('../index-item/index');
-            let result = {};
-            result = indexItems[index].data;
-            result.total = indexItems.length;
-            return result;
-        },
-        triggerCallback(options){
-            this.triggerEvent('change',options)
-        },
-        handlerFixedTap(event){
-            const eindex = event.currentTarget.dataset.index;
-            const item = this.getCurrentItem(eindex);
-            this.setData({
-                scrollTop : item.top,
-                currentName : item.currentName,
-                isTouches : true
-            })
-            this.triggerCallback({
-                index : eindex,
-                current : item.currentName
-            })
-        },
-        handlerTouchMove(event){
-            const data = this.data;
-            const touches = event.touches[0] || {};
-            const pageY = touches.pageY;
-            const rest = pageY - data.startTop;
-            let index = Math.ceil( rest/data.itemHeight );
-            index = index >= data.itemLength ? data.itemLength -1 : index;
-            const movePosition = this.getCurrentItem(index);
-
-           /*
-            * 当touch选中的元素和当前currentName不相等的时候才震动一下
-            * 微信震动事件
-           */
-            if( movePosition.name !== this.data.currentName ){
-                wx.vibrateShort();
-            }
-
-            this.setData({
-                scrollTop : movePosition.top,
-                currentName : movePosition.name,
-                isTouches : true
-            })
-
-            this.triggerCallback({
-                index : index,
-                current : movePosition.name
-            })
-        },
-        handlerTouchEnd(){
-            this.setData({
-                isTouches : false
-            })
-        },
-        setTouchStartVal(){
-            const className = '.i-index-fixed';
-            const query = wx.createSelectorQuery().in(this);
-            query.select( className ).boundingClientRect((res)=>{
-                this.setData({
-                    startTop : res.top
-                })
-            }).exec()
-        }
-    }
-})

+ 0 - 3
component/iView/index/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 38
component/iView/index/index.wxml

@@ -1,38 +0,0 @@
-<view class="i-index i-class">
-    <scroll-view 
-        scroll-y 
-        style="{{parse.setScrollStyle(height)}}" 
-        bindscroll="handlerScroll"
-        scroll-top="{{scrollTop}}">
-        <slot></slot>  
-        <view class="i-index-fixed" 
-            catchtouchstart="handlerTouchMove" 
-            catchtouchmove="handlerTouchMove" 
-            catchtouchend="handlerTouchEnd">
-            <view class="i-index-fixed-item" 
-                wx:for="{{fixedData}}" 
-                wx:key="{{index}}" 
-                data-index="{{index}}" 
-                catchtap="handlerFixedTap">
-                {{item}}
-            </view>
-        </view>  
-        <view class="i-index-tooltip" style="{{ isTouches ? 'display:block' : 'display:none' }}">{{currentName}}</view>
-    </scroll-view>
-</view>
-<wxs module="parse">
-    module.exports = {
-       setScrollStyle : function(height){
-           var units = ['%','px','rem','rpx','em','rem'];
-           var hasUnits = false;
-           for( var i = 0; i < units.length;i++ ){
-               var u = units[i];
-               if( height.indexOf( u ) > -1 ){
-                   hasUnits = true;
-                   break;
-               }
-           }
-           return 'height:'+ ( hasUnits ? height : height+'px' );
-       }
-    }
-</wxs>

+ 0 - 1
component/iView/index/index.wxss

@@ -1 +0,0 @@
-.i-index{width:100%;height:100%}.i-index-line{position:absolute;left:0;width:100%;height:1rpx;background-color:#f7f7f7;top:50%}.i-index-content{background:#fff;position:relative;z-index:1;display:inline-block;padding:0 10px}.i-index-fixed{position:fixed;right:0;top:50%;z-index:10;padding-left:10px;transform:translateY(-50%)}.i-index-fixed-item{display:block;height:18px;line-height:18px;padding:0 5px;text-align:center;color:#2d8cf0;font-size:12px;border-radius:50%}.i-index-fixed-item-current{background:#2d8cf0;color:#fff}.i-index-tooltip{position:fixed;left:50%;top:50%;transform:translate3d(-50%,-50%,0);background:rgba(0,0,0,.7);color:#fff;font-size:24px;border-radius:50%;width:80px;height:80px;line-height:80px;text-align:center}

+ 0 - 101
component/iView/input-number/index.js

@@ -1,101 +0,0 @@
-function addNum (num1, num2) {
-    let sq1, sq2, m;
-    try {
-        sq1 = num1.toString().split('.')[1].length;
-    }
-    catch (e) {
-        sq1 = 0;
-    }
-    try {
-        sq2 = num2.toString().split('.')[1].length;
-    }
-    catch (e) {
-        sq2 = 0;
-    }
-    m = Math.pow(10, Math.max(sq1, sq2));
-    return (Math.round(num1 * m) + Math.round(num2 * m)) / m;
-}
-
-Component({
-    externalClasses: ['i-class'],
-
-    properties: {
-        // small || default || large
-        size: String,
-        value: {
-            type: Number,
-            value: 1
-        },
-        min: {
-            type: Number,
-            value: -Infinity
-        },
-        max: {
-            type: Number,
-            value: Infinity
-        },
-        step: {
-            type: Number,
-            value: 1
-        }
-    },
-    
-
-    methods: {
-        handleChangeStep(e, type) {
-            const { dataset = {} } = e.currentTarget;
-            const { disabled } = dataset;
-            const { step } = this.data;
-            let { value } = this.data;
-
-            if (disabled) return null;
-
-            if (type === 'minus') {
-                value = addNum(value, -step);
-            } else if (type === 'plus') {
-                value = addNum(value, step);
-            }
-
-            if (value < this.data.min || value > this.data.max) return null;
-
-            this.handleEmit(value, type);
-        },
-
-        handleMinus(e) {
-            this.handleChangeStep(e, 'minus');
-        },
-
-        handlePlus(e) {
-            this.handleChangeStep(e, 'plus');
-        },
-
-        handleBlur(e) {
-            let { value } = e.detail;
-            const { min, max } = this.data;
-
-            if (!value) {
-                setTimeout(() => {
-                    this.handleEmit(value);
-                }, 16);
-                return;
-            }
-
-            value = +value;
-            if (value > max) {
-                value = max;
-            } else if (value < min) {
-                value = min;
-            }
-
-            this.handleEmit(value);
-        },
-        handleEmit (value, type) {
-            const data = {
-                value: value
-            };
-            if (type) data.type = type;
-
-            this.triggerEvent('change', data);
-        }
-    }
-});

+ 0 - 3
component/iView/input-number/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 5
component/iView/input-number/index.wxml

@@ -1,5 +0,0 @@
-<view class="i-class i-input-number i-input-number-size-{{ size }}">
-    <view class="i-input-number-minus {{ value <= min ? 'i-input-number-disabled' : '' }}" data-disabled="{{ value <= min }}" bindtap="handleMinus">-</view>
-    <input class="i-input-number-text {{ min >= max ? 'i-input-number-disabled' : '' }}" type="number" value="{{ value }}" disabled="{{ min >= max }}" bindblur="handleBlur" />
-    <view class="i-input-number-plus {{ value >= max ? 'i-input-number-disabled' : '' }}" data-disabled="{{ value >= max }}" bindtap="handlePlus">+</view>
-</view>

+ 0 - 1
component/iView/input-number/index.wxss

@@ -1 +0,0 @@
-.i-input-number{color:#495060}.i-input-number view{display:inline-block;line-height:20px;padding:5px 0;text-align:center;min-width:40px;box-sizing:border-box;vertical-align:middle;font-size:12px;border:1rpx solid #dddee1}.i-input-number-minus{border-right:none;border-radius:2px 0 0 2px}.i-input-number-plus{border-left:none;border-radius:0 2px 2px 0}.i-input-number-text{border:1rpx solid #dddee1;display:inline-block;text-align:center;vertical-align:middle;height:30px;width:40px;min-height:auto;font-size:12px;line-height:30px}.i-input-number-disabled{border-color:#dddee1;color:#bbbec4;background:#f7f7f7}

+ 0 - 112
component/iView/notice-bar/index.js

@@ -1,112 +0,0 @@
-const VALID_MODE = ['closeable'];
-const FONT_COLOR = '#f60';
-const BG_COLOR = '#fff7cc';
-
-Component({
-    externalClasses: ['i-class'],
-
-    properties: {
-        closable: {
-            type: Boolean,
-            value: false
-        },
-        icon: {
-            type: String,
-            value: ''
-        },
-        loop: {
-            type: Boolean,
-            value: false
-        },
-        // 背景颜色
-        backgroundcolor: {
-            type: String,
-            value: '#fefcec'
-        },
-        // 字体及图标颜色
-        color: {
-            type: String,
-            value: '#f76a24'
-        },
-        // 滚动速度
-        speed: {
-            type: Number,
-            value: 1000
-        }
-    },
-
-    data: {
-        show: true,
-        wrapWidth: 0,
-        width: 0,
-        duration: 0,
-        animation: null,
-        timer: null,
-    },
-    detached() {
-        this.destroyTimer();
-    },
-    ready() {
-        if (this.data.loop) {
-            this.initAnimation();
-        }
-    },
-
-    methods: {
-        initAnimation() {
-            wx.createSelectorQuery().in(this).select('.i-noticebar-content-wrap').boundingClientRect((wrapRect) => {
-                wx.createSelectorQuery().in(this).select('.i-noticebar-content').boundingClientRect((rect) => {
-                    const duration = rect.width / 40 * this.data.speed;
-                    const animation = wx.createAnimation({
-                        duration: duration,
-                        timingFunction: "linear",
-                    });
-                    this.setData({
-                        wrapWidth: wrapRect.width,
-                        width: rect.width,
-                        duration: duration,
-                        animation: animation
-                    }, () => {
-                        this.startAnimation();
-                    });
-                }).exec();
-
-            }).exec();
-        },
-        startAnimation() {
-            //reset
-            if (this.data.animation.option.transition.duration !== 0) {
-                this.data.animation.option.transition.duration = 0;
-                const resetAnimation = this.data.animation.translateX(this.data.wrapWidth).step();
-                this.setData({
-                    animationData: resetAnimation.export()
-                });
-            }
-            this.data.animation.option.transition.duration = this.data.duration;
-            const animationData = this.data.animation.translateX(-this.data.width).step();
-            setTimeout(() => {
-                this.setData({
-                    animationData: animationData.export()
-                });
-            }, 100);
-            const timer = setTimeout(() => {
-                this.startAnimation();
-            }, this.data.duration);
-            this.setData({
-                timer,
-            });
-        },
-        destroyTimer() {
-            if (this.data.timer) {
-                clearTimeout(this.data.timer);
-            }
-        },
-        handleClose() {
-            this.destroyTimer();
-            this.setData({
-                show: false,
-                timer: null
-            });
-        }
-    }
-});

+ 0 - 7
component/iView/notice-bar/index.json

@@ -1,7 +0,0 @@
-{
-    "component": true,
-    "usingComponents":
-    {
-        "i-icon": "../icon/index"
-    }
-}

+ 0 - 9
component/iView/notice-bar/index.wxml

@@ -1,9 +0,0 @@
-<view wx:if="{{ show }}" class="i-class i-noticebar" style="color: {{ color }}; background-color: {{ backgroundcolor }}">
-    <i-icon wx:if="{{ icon }}" type="{{ icon }}" size="24" color="{{color}}" class="i-noticebar-icon"></i-icon>
-    <view class="i-noticebar-content-wrap">
-        <view class="i-noticebar-content {{loop?'i-noticebar-content-loop':''}}" animation="{{ animationData }}">
-           <slot></slot>
-        </view>
-    </view>
-    <i-icon wx:if="{{closable}}" class="i-noticebar-operation" type="close" size="20" color="{{color}}" bindtap="handleClose"></i-icon>
-</view>

+ 0 - 1
component/iView/notice-bar/index.wxss

@@ -1 +0,0 @@
-.i-noticebar{display:flex;height:72rpx;line-height:72rpx;font-size:14px;color:#f76a24;background-color:#fefcec;overflow:hidden}.i-noticebar-icon{display:flex;margin-left:30rpx;align-items:center}.i-noticebar-icon+view{margin-left:10rpx}.i-noticebar-operation{display:flex;margin-right:16rpx;align-items:center}.i-noticebar-content-wrap{position:relative;flex:1;margin:0 30rpx;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.i-noticebar-content-wrap .i-noticebar-content{position:absolute;transition-duration:20s}

+ 0 - 42
component/iView/page/index.js

@@ -1,42 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-
-    options: {
-        multipleSlots: true
-    },
-
-    properties: {
-        // button || number || pointer
-        mode: {
-            type: String,
-            value: 'button'
-        },
-        current: {
-            type: Number,
-            value: 1
-        },
-        total: {
-            type: Number,
-            value: 0
-        },
-        // 是否隐藏数值
-        simple: {
-            type: Boolean,
-            value: false
-        }
-    },
-
-    methods: {
-        handleChange (type) {
-            this.triggerEvent('change', {
-                type: type
-            });
-        },
-        handlePrev () {
-            this.handleChange('prev');
-        },
-        handleNext () {
-            this.handleChange('next');
-        }
-    }
-});

+ 0 - 7
component/iView/page/index.json

@@ -1,7 +0,0 @@
-{
-  "component": true,
-  "usingComponents":
-  {
-    "i-button": "../button/index"
-  }
-}

+ 0 - 14
component/iView/page/index.wxml

@@ -1,14 +0,0 @@
-<view class="i-class i-page">
-    <view class="i-page-prev" wx:if="{{ mode === 'button' }}">
-        <i-button i-class="i-page-button" type="ghost" bindclick="handlePrev" disabled="{{ current === 1 }}"><slot name="prev"></slot></i-button>
-    </view>
-    <view class="i-page-number" wx:if="{{ mode !== 'pointer' && !simple }}">
-        <view class="i-page-number-current">{{ current }}</view>/{{total}}
-    </view>
-    <view class="i-page-pointer" wx:if="{{ mode === 'pointer' }}">
-        <view class="i-page-pointer-dot {{ (index + 1) === current ? 'current' : '' }}" wx:for="{{ total }}" wx:key="index"></view>
-    </view>
-    <view class="i-page-next" wx:if="{{ mode === 'button' }}">
-        <i-button i-class="i-page-button" type="ghost" bindclick="handleNext" disabled="{{ current === total }}"><slot name="next"></slot></i-button>
-    </view>
-</view>

+ 0 - 1
component/iView/page/index.wxss

@@ -1 +0,0 @@
-.i-page{display:block;width:100%;height:44px;overflow:hidden;box-sizing:border-box;position:relative}.i-page-prev{position:absolute;left:10px;top:0}.i-page-next{position:absolute;right:10px;top:0}.i-page-number{width:100%;height:44px;line-height:44px;margin:0 auto;text-align:center}.i-page-number-current{display:inline;color:#2d8cf0}.i-page-pointer{width:100%;height:44px;line-height:44px;margin:0 auto;text-align:center}.i-page-pointer-dot{display:inline-block;width:8px;height:8px;margin:0 2px;border-radius:50%;background:#bbbec4}.i-page-pointer-dot.current{background:#80848f}.i-page-button{display:inline-block;margin:0}

+ 0 - 23
component/iView/progress/index.js

@@ -1,23 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-
-    properties: {
-        percent: {
-            type: Number,
-            value: 0
-        },
-        // normal || active || wrong || success
-        status: {
-            type: String,
-            value: 'normal'
-        },
-        strokeWidth: {
-            type: Number,
-            value: 10
-        },
-        hideInfo: {
-            type: Boolean,
-            value: false
-        }
-    }
-});

+ 0 - 3
component/iView/progress/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 10
component/iView/progress/index.wxml

@@ -1,10 +0,0 @@
-<view class="i-class i-progress i-progress-{{ status }} {{ !hideInfo ? 'i-progress-show-info' : '' }}">
-    <view class="i-progress-outer">
-        <view class="i-progress-inner">
-            <view class="i-progress-bg" style="width: {{percent}}%;height: {{strokeWidth}}px"></view>
-        </view>
-    </view>
-    <view class="i-progress-text" wx:if="{{ !hideInfo }}">
-        <view class="i-progress-text-inner">{{ percent }}%</view>
-    </view>
-</view>

+ 0 - 1
component/iView/progress/index.wxss

@@ -1 +0,0 @@
-.i-progress{display:inline-block;width:100%;font-size:12px;position:relative}.i-progress-outer{display:inline-block;width:100%;margin-right:0;padding-right:0;box-sizing:border-box}.i-progress-show-info .i-progress-outer{padding-right:55px;margin-right:-55px}.i-progress-inner{display:inline-block;width:100%;background-color:#f3f3f3;border-radius:100px;vertical-align:middle}.i-progress-bg{border-radius:100px;background-color:#2db7f5;transition:all .2s linear;position:relative}.i-progress-text{display:inline-block;margin-left:5px;text-align:left;font-size:1em;vertical-align:middle}.i-progress-active .i-progress-bg:before{content:'';opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;background:#fff;border-radius:10px;animation:i-progress-active 2s ease-in-out infinite}.i-progress-wrong .i-progress-bg{background-color:#ed3f14}.i-progress-wrong .i-progress-text{color:#ed3f14}.i-progress-success .i-progress-bg{background-color:#19be6b}.i-progress-success .i-progress-text{color:#19be6b}@keyframes i-progress-active{0%{opacity:.3;width:0}100%{opacity:0;width:100%}}

+ 0 - 15
component/iView/slide/index.js

@@ -1,15 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    options: {
-        // 在组件定义时的选项中启用多slot支持
-        multipleSlots: true
-    },
-    methods : {
-        handleTap2(){
-            console.log(event,1111111)
-        },
-        handleTap3(){
-            
-        }
-    }
-});

+ 0 - 8
component/iView/slide/index.json

@@ -1,8 +0,0 @@
-{
-  "component": true,
-  "usingComponents":
-  {
-    "i-button": "../button/index",
-    "i-icon": "../icon/index"
-  }
-}

+ 0 - 4
component/iView/slide/index.wxml

@@ -1,4 +0,0 @@
-<view class="i-class i-slide" capture-catch:touchstart="handleTap2" capture-catch:touchmove="handleTap3">
-    1111
-    
-</view>

+ 0 - 0
component/iView/slide/index.wxss


+ 0 - 52
component/iView/step/index.js

@@ -1,52 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    properties : {
-        status : {
-            type : String,
-            //wait、process、finish、error
-            value : ''
-        },
-        title : {
-            type : String,
-            value : ''
-        },
-        content : {
-            type : String,
-            value : ''
-        },
-        icon : {
-            type : String,
-            value : ''
-        }
-    },
-    options: {
-        // 在组件定义时的选项中启用多slot支持
-        multipleSlots: true
-    },
-    relations : {
-        '../steps/index' : {
-            type : 'parent'
-        }
-    },
-    data : {
-        //step length
-        len : 1,
-        //current in step index
-        index : 0,
-        //parent component select current index
-        current : 0,
-        //css direction
-        direction : 'horizontal'
-    },
-    methods : {
-        updateDataChange( options ){
-            this.setData({
-                len : options.len,
-                index : options.index,
-                current : options.current,
-                direction : options.direction
-            })
-        }
-    }
-
-})

+ 0 - 7
component/iView/step/index.json

@@ -1,7 +0,0 @@
-{
-  "component": true,
-  "usingComponents":
-    {
-        "i-icon": "../icon/index"
-    }
-}

+ 0 - 70
component/iView/step/index.wxml

@@ -1,70 +0,0 @@
-<view class="i-class i-step-item {{parse.getClass(status,current,index)}} {{ direction === 'vertical' ? 'i-step-vertical' : 'i-step-horizontal' }}" style="{{parse.getItemStyle(len,direction)}}">
-    <view class="i-step-item-ico">
-        <view class="i-step-ico" wx:if="{{parse.noIco(status,current,index,icon)  }}">{{ index+1 }}</view>
-        <view class="i-step-ico" wx:else>
-            <i-icon i-class="i-step-ico-in" type="{{parse.getIcoClass(status,icon)}}"></i-icon>
-        </view>
-        <view class="i-step-line" wx:if="{{ index !== len - 1 }}"></view>
-    </view>
-    <view class="i-step-item-main">
-        <view class="i-step-item-title" wx:if="{{title !== ''}}">
-            {{title}}
-        </view>
-        <view class="i-step-item-title" wx:else>
-            <slot name="title"></slot>
-        </view>
-        <view class="i-step-item-content" wx:if="{{content !== ''}}">
-            {{content}}
-        </view>
-        <view class="i-step-item-content" wx:else>
-            <slot name="content"></slot>
-        </view>
-    </view>
-</view>
-<wxs module="parse"> 
-var allStatus = ['wait','process','finish','error'];
-module.exports = {
-    noIco : function( status,current,index,icon ){
-        var aindex = allStatus.indexOf(status);
-        var noIcon = true;
-        if( index < current || icon !== '' ){
-            noIcon = false;
-        }
-        return noIcon;
-    },
-    getIcoClass : function( status,ico ){
-        var class = '';
-        if( status === 'error' ){
-            class = 'close';
-        }else{
-            class = 'right';
-        }
-        if( ico !== '' ){
-            class = ico;
-        }
-        return class;
-    },
-    getItemStyle : function(len,direction){
-        if( direction === 'horizontal' ){
-            return 'width :'+100/len + '%';
-        }else{
-            return 'width : 100%;';
-        }
-    },
-    getClass : function( status,current,index ) {
-        //wait、process、finish、error
-        var startClass = 'i-step-'
-        var classes = '';
-        var cindex = allStatus.indexOf( status );
-        if( cindex !== -1 ){
-            classes = startClass + allStatus[cindex];
-        }
-        if( index < current ){
-            classes = startClass + 'finish';
-        }else if( index === current ){
-            classes = startClass + 'process';
-        }
-        return classes;
-    }
-}
-</wxs>

+ 0 - 1
component/iView/step/index.wxss

@@ -1 +0,0 @@
-.i-step-ico{width:24px;height:100%;border-radius:100%;background:#fff;position:relative;z-index:2;margin:0 auto;border:#dddee1 solid 1px}.i-step-ico-in{vertical-align:baseline}.i-step-line{position:absolute;left:50%;top:12px;width:100%;height:1px;background:#dddee1}.i-step-horizontal .i-step-ico::after{position:absolute;top:11px;left:23px;z-index:1;content:'';height:1px;background:#fff;width:10px}.i-step-horizontal .i-step-item-main{text-align:center}.i-step-horizontal .i-step-ico::before{position:absolute;top:11px;left:-11px;z-index:1;content:'';height:1px;background:#fff;width:10px}.i-step-ico{box-sizing:border-box;font-size:12px}.i-step-process .i-step-ico{border:#2d8cf0 solid 1px;color:#fff;background:#2d8cf0}.i-step-wait .i-step-ico{border:#e9eaec solid 1px;color:#e9eaec}.i-step-wait .i-step-line{background:#2d8cf0}.i-step-finish .i-step-ico{border:#2d8cf0 solid 1px;color:#2d8cf0}.i-step-finish .i-step-line{background:#2d8cf0}.i-step-error .i-step-ico{border:#ed3f14 solid 1px;color:#ed3f14}.i-step-error .i-step-line{background:#ed3f14}.i-step-item{font-size:12px;position:relative;display:inline-block;box-sizing:border-box;padding-left:10px;vertical-align:top}.i-step-item-ico{width:100%;height:24px;line-height:24px;text-align:center}.i-step-item-main{margin-top:10px;clear:both}.i-step-item-title{font-size:14px;font-weight:700;color:#1c2438}.i-step-item-content{font-size:12px;font-weight:700;margin-top:2px;color:#80848f}.i-step-vertical{padding-bottom:30px}.i-step-vertical .i-step-item-ico{width:24px;float:left}.i-step-vertical .i-step-item-main{margin-left:40px;margin-top:0;clear:inherit}.i-step-vertical .i-step-line{position:absolute;height:100%;top:0;left:10px;margin:0 0 0 12px;width:1px}

+ 0 - 50
component/iView/steps/index.js

@@ -1,50 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    properties : {
-        current : {
-            type : Number,
-            value : -1,
-            observer : '_updateDataChange'
-        },
-        status : {
-            type : String,
-            //wait、process、finish、error
-            value : ''
-        },
-        direction : {
-            type : String,
-            //value has horizontal or vertical 
-            value : 'horizontal'
-        } 
-    },
-    relations : {
-        '../step/index' : {
-            type : 'child',
-            linked(){
-                this._updateDataChange();
-            },
-            linkChanged () {
-                this._updateDataChange();
-            },
-            unlinked () {
-                this._updateDataChange();
-            }
-        }
-    },
-    methods: {
-        _updateDataChange() {
-            let steps = this.getRelationNodes('../step/index');
-            const len = steps.length;
-            if (len > 0) {
-                steps.forEach((step, index) => {
-                    step.updateDataChange({
-                        len : len,
-                        index : index,
-                        current : this.data.current,
-                        direction : this.data.direction
-                    });
-                });
-            }
-        }
-    }
-})

+ 0 - 3
component/iView/steps/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 3
component/iView/steps/index.wxml

@@ -1,3 +0,0 @@
-<view class="i-class i-steps">
-    <slot></slot>
-</view>

+ 0 - 1
component/iView/steps/index.wxss

@@ -1 +0,0 @@
-.i-steps{width:100%}

+ 0 - 40
component/iView/sticky-item/index.js

@@ -1,40 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    options: {
-        multipleSlots: true
-    },
-    relations : {
-        '../sticky/index' : {
-            type : 'parent'
-        }
-    },
-    data : {
-        top : 0,
-        height : 0,
-        isFixed : false,
-        index : -1,
-    },
-    methods: {
-        updateScrollTopChange(scrollTop){
-            const data = this.data;
-            const top = data.top;
-            const height = data.height;
-            this.setData({
-                isFixed : ( scrollTop >= top && scrollTop < top + height ) ? true : false
-            })
-        },
-        updateDataChange(index) {
-            const className = '.i-sticky-item';
-            const query = wx.createSelectorQuery().in(this);
-            query.select( className ).boundingClientRect((res)=>{
-                    if( res ){
-                        this.setData({
-                            top : res.top,
-                            height : res.height,
-                            index : index
-                        })
-                    }
-            }).exec()
-        }
-    }
-})

+ 0 - 3
component/iView/sticky-item/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 10
component/iView/sticky-item/index.wxml

@@ -1,10 +0,0 @@
-<view class="i-sticky-item">
-    <view class="i-sticky-item-header i-class {{ isFixed === true ? 'i-sticky-fixed' : '' }}">
-        <view class="i-sticky-title">
-            <slot name="title"></slot>
-        </view>
-    </view>
-    <view class="i-index-item-content">
-        <slot name="content"></slot>
-    </view>
-</view>

+ 0 - 1
component/iView/sticky-item/index.wxss

@@ -1 +0,0 @@
-.i-sticky-item-header{background:#eee;font-size:14px;width:100%;height:32px;line-height:32px}.i-sticky-item-content{font-size:14px}.i-sticky-title{width:100%;padding:0 15px;box-sizing:border-box;background:#eee}.i-sticky-fixed .i-sticky-title{position:fixed;top:0}

+ 0 - 63
component/iView/sticky/index.js

@@ -1,63 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    properties : {
-        scrollTop : {
-            type : Number,
-            observer(val){
-                this._updateScrollTopChange();
-            }
-        }
-    },
-    relations : {
-        '../sticky-item/index' : {
-            type : 'child',
-            linked(){
-                this._updateDataChange();
-            },
-            linkChanged () {
-                this._updateDataChange();
-            },
-            unlinked () {
-                this._updateDataChange();
-            }
-        }
-    },
-    data : {
-        timer : null,
-        itemLength : 0,
-    },
-    methods : {
-        _updateScrollTopChange(){
-            const stickies = this.getRelationNodes('../sticky-item/index');
-            if( stickies.length > 0 ){
-                stickies.forEach((item) => {
-                    if( item ){
-                        item.updateScrollTopChange( this.data.scrollTop );
-                    }
-                })
-            }
-        },
-        _updateDataChange( ){
-            const stickies = this.getRelationNodes('../sticky-item/index');
-            if( stickies.length > 0 ){
-                if( this.data.timer ){
-                    clearTimeout( this.data.timer )
-                    this.setData({
-                        timer : null
-                    })
-                }
-                this.data.timer = setTimeout(()=>{
-                    stickies.forEach((item,index) => {
-                        if( item ){
-                            item.updateDataChange(index);
-                        }
-                    })
-                },0)
-                this.setData({
-                    timer : this.data.timer
-                })
-            }
-        }
-    }
-        
-})

+ 0 - 3
component/iView/sticky/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 3
component/iView/sticky/index.wxml

@@ -1,3 +0,0 @@
-<view class="i-sticky i-class">
-    <slot></slot>
-</view>

+ 0 - 0
component/iView/sticky/index.wxss


+ 0 - 161
component/iView/swipeout/index.js

@@ -1,161 +0,0 @@
- /*
-* touch事件判断方式
-* https://github.com/madrobby/zepto/blob/master/src/touch.js#files
-*/
-function swipeDirection(x1, x2, y1, y2) {
-    return Math.abs(x1 - x2) >=
-    Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down')
-}
-
-Component({
-    externalClasses: ['i-class'],
-    properties: {
-        actions: {
-            value: [],
-            type: Array,
-            observer : '_updateButtonSize'
-        },
-        unclosable : {
-            value : false,
-            type : Boolean
-        },
-        toggle : {
-            value : false,
-            type : Boolean,
-            observer : 'closeButtonGroup'
-        },
-        operateWidth : {
-            type : Number,
-            value : 160
-        }
-    },
-    options: {
-        // 在组件定义时的选项中启用多slot支持
-        multipleSlots: true
-    },
-    data : {
-        //touch start position
-        tStart : {
-            pageX : 0,
-            pageY : 0
-        },
-        //限制滑动距离
-        limitMove : 0,
-        //element move position
-        position : {
-            pageX : 0,
-            pageY : 0
-        }
-    },
-    methods : {
-        //阻止事件冒泡
-        loop(){},
-        _updateButtonSize(){
-            const actions = this.data.actions;
-            if( actions.length > 0 ){
-                const query = wx.createSelectorQuery().in(this);
-                let limitMovePosition = 0;
-                actions.forEach(item => {
-                    limitMovePosition += item.width || 0;
-                });
-                this.data.limitMove = limitMovePosition;
-                /*
-                    * 动态获取每个传进值的按钮尺寸不能正确获取,在安卓上少了6px
-                    * 暂时实现需要在actions里面传递宽度
-                    * 需要后期调研
-                */
-                //query.selectAll('.i-swipeout-button-right-item').boundingClientRect((rects)=>{
-                //     if( rects ){
-                //         console.log(rects,1111111)
-                //         rects.forEach(item => {
-                //             limitMovePosition += item.width;
-                //         });
-                //         this.data.limitMove = limitMovePosition;
-                //         console.log(limitMovePosition,111111111)
-                //     }
-                // }).exec()
-            }else{
-                this.data.limitMove = this.data.operateWidth;
-                
-            }
-        },
-        handlerTouchstart(event){
-            const touches = event.touches ? event.touches[0] : {};
-            const tStart = this.data.tStart;
-            if( touches ){
-                for( let i in tStart ){
-                    if( touches[i] ){
-                        tStart[i] = touches[i];
-                    }
-                }
-            }
-        },
-        swipper(touches){
-            const data = this.data;
-            const start = data.tStart;
-            const spacing = {
-                pageX : touches.pageX - start.pageX,
-                pageY : touches.pageY - start.pageY
-            }
-            if( data.limitMove <  Math.abs( spacing.pageX ) ){
-                spacing.pageX = -data.limitMove;
-                
-            }
-            this.setData({
-                'position' : spacing
-            })
-        },
-        handlerTouchmove(event){
-            const start = this.data.tStart;
-            const touches = event.touches ? event.touches[0] : {};
-            if( touches ){
-                const direction = swipeDirection( start.pageX,touches.pageX,start.pageY,touches.pageY );
-                if( direction === 'Left' ){
-                    this.swipper( touches );
-                }
-            }
-        },
-        handlerTouchend(event){
-            const start = this.data.tStart;
-            const touches = event.changedTouches ? event.changedTouches[0] : {};
-            if( touches ){
-                const direction = swipeDirection( start.pageX,touches.pageX,start.pageY,touches.pageY );
-                const spacing = {
-                    pageX : touches.pageX - start.pageX,
-                    pageY : touches.pageY - start.pageY
-                }
-                if( Math.abs( spacing.pageX ) >= 40 && direction === "Left" ){
-                    spacing.pageX = spacing.pageX  < 0 ? - this.data.limitMove : this.data.limitMove;
-                }else{
-                    spacing.pageX = 0;
-                }
-                this.setData({
-                    'position' : spacing
-                })
-            }
-        },
-        handlerButton(event){
-            if( !this.data.unclosable ){
-                this.closeButtonGroup();
-            }
-            const dataset = event.currentTarget.dataset;
-            this.triggerEvent('change',{
-                index : dataset.index
-            })
-        },
-        closeButtonGroup(){
-            this.setData({
-                'position' : {pageX : 0,pageY : 0}
-            })
-        },
-        //控制自定义组件
-        handlerParentButton(event){
-            if( !this.data.unclosable ){
-                this.closeButtonGroup();
-            }
-        }
-    },
-    ready(){
-        this._updateButtonSize();
-    }
-});

+ 0 - 7
component/iView/swipeout/index.json

@@ -1,7 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "i-cell": "../cell/index",
-    "i-icon": "../icon/index"
-  }
-}

+ 0 - 39
component/iView/swipeout/index.wxml

@@ -1,39 +0,0 @@
-<view class="i-swipeout-wrap i-class">
-    <view class="i-swipeout-item" bindtouchstart="handlerTouchstart" bindtouchmove="handlerTouchmove" bindtouchend="handlerTouchend" style="{{parse.setPosition(position)}}">
-        <view class="i-swipeout-content">
-            <slot name="content"></slot>
-        </view>
-        <view class="i-swipeout-button-right-group" 
-            wx:if="{{actions.length > 0}}" 
-            catchtouchend="loop" >
-            <view class="i-swipeout-button-right-item" 
-                wx:for="{{actions}}" 
-                style="{{parse.setStyle(item)}};width:{{item.width}}px;" 
-                wx:key="{{index}}" 
-                data-index="{{index}}" 
-                bind:tap="handlerButton">
-                <i-icon 
-                    wx:if="{{item.icon}}" 
-                    type="{{item.icon}}" 
-                    size="{{item.fontsize}}"
-                    color="{{item.color}}">
-                </i-icon>
-                {{item.name}}
-            </view>
-        </view>
-        <view class="i-swipeout-button-right-group" catchtouchend="loop" bind:tap="handlerParentButton"  wx:if="{{actions.length === 0}}" style="width:{{operateWidth}}px;right:-{{operateWidth}}px;">
-            <slot name="button"></slot>
-        </view>
-    </view>
-</view>
-<wxs module="parse">
-    module.exports = {
-        setStyle : function( item ){
-            var defaults = '#f7f7f7';
-            return 'background:' + ( item.background ? item.background : defaults ) +';' + 'color:'+ item.color;
-        },
-        setPosition : function( position ){
-            return 'transform:translate(' + position.pageX + 'px,0);';
-        }
-    }
-</wxs>

+ 0 - 1
component/iView/swipeout/index.wxss

@@ -1 +0,0 @@
-.i-swipeout-wrap{border-bottom:#dddee1 solid 1px;background:#fff;position:relative;overflow:hidden}.i-swipeout-item{width:100%;padding:15px 20px;box-sizing:border-box;transition:transform .2s ease;font-size:14px}.i-swipeout-content{white-space:nowrap;overflow:hidden}.i-swipeout-button-right-group{position:absolute;right:-100%;top:0;height:100%;z-index:1;width:100%}.i-swipeout-button-right-item{height:100%;float:left;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;justify-content:center}

+ 0 - 62
component/iView/tab-bar-item/index.js

@@ -1,62 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-
-    relations: {
-        '../tab-bar/index': {
-            type: 'parent'
-        }
-    },
-
-    properties: {
-        icon: {
-            type: String,
-            value: ''
-        },
-        currentIcon: {
-            type: String,
-            value: ''
-        },
-        img: {
-            type: String,
-            value: ''
-        },
-        currentImg: {
-            type: String,
-            value: ''
-        },
-        key: {
-            type: String,
-            value: ''
-        },
-        title: {
-            type: String,
-            value: ''
-        },
-        dot: {
-            type: Boolean,
-            value: false
-        },
-        count: {
-            type: Number,
-            value: 0
-        }
-    },
-
-    data: {
-        current: false,
-        currentColor: ''
-    },
-
-    methods: {
-        changeCurrent (current) {
-            this.setData({ current });
-        },
-        changeCurrentColor (currentColor) {
-            this.setData({ currentColor });
-        },
-        handleClickItem () {
-            const parent = this.getRelationNodes('../tab-bar/index')[0];
-            parent.emitEvent(this.data.key);
-        }
-    }
-});

+ 0 - 8
component/iView/tab-bar-item/index.json

@@ -1,8 +0,0 @@
-{
-  "component": true,
-  "usingComponents":
-  {
-    "i-badge": "../badge/index",
-    "i-icon": "../icon/index"
-  }
-}

+ 0 - 10
component/iView/tab-bar-item/index.wxml

@@ -1,10 +0,0 @@
-<view class="i-class i-tab-bar-item">
-    <i-badge dot="{{ dot }}" count="{{ dot ? 0 : count }}">
-        <view>
-            <i-icon wx:if="{{ icon || currentIcon }}" i-class="i-tab-bar-item-icon {{ current ? 'item-index--i-tab-bar-item-icon-current' : '' }}" color="{{ current ? currentColor : '' }}" type="{{ current ? currentIcon : icon }}" size="22"></i-icon>
-            <image wx:else class="i-tab-bar-item-img" src="{{ current ? currentImg : img }}"></image>
-            <view class="i-tab-bar-item-title {{ current ? 'i-tab-bar-item-title-current' : '' }}" wx:if="{{ current && currentColor }}" style="color: {{ currentColor }}">{{ title }}</view>
-            <view class="i-tab-bar-item-title {{ current ? 'i-tab-bar-item-title-current' : '' }}" wx:else>{{ title }}</view>
-        </view>
-    </i-badge>
-</view>

+ 0 - 1
component/iView/tab-bar-item/index.wxss

@@ -1 +0,0 @@
-.i-tab-bar-item{flex:1;display:flex;width:100%;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;text-align:center}.i-tab-bar-item-icon{display:flex;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;color:#80848f}.i-tab-bar-item-icon-current{color:#2d8cf0}.i-tab-bar-item-img{display:flex;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;width:22px;height:22px}.i-tab-bar-item-title{font-size:10px;margin:3px 0 0;line-height:1;text-align:center;box-sizing:border-box;color:#80848f}.i-tab-bar-item-title-current{color:#2d8cf0}.i-tab-bar-item-img{display:flex;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;color:#80848f}

+ 0 - 66
component/iView/tab-bar/index.js

@@ -1,66 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-
-    relations: {
-        '../tab-bar-item/index': {
-            type: 'child',
-            linked () {
-                this.changeCurrent();
-            },
-            linkChanged () {
-                this.changeCurrent();
-            },
-            unlinked () {
-                this.changeCurrent();
-            }
-        }
-    },
-
-    properties: {
-        current: {
-            type: String,
-            value: '',
-            observer: 'changeCurrent'
-        },
-        color: {
-            type: String,
-            value: ''
-        },
-        fixed: {
-            type: Boolean,
-            value: false
-        }
-    },
-
-    data: {
-        list: []
-    },
-
-    methods: {
-        changeCurrent (val = this.data.current) {
-            let items = this.getRelationNodes('../tab-bar-item/index');
-            const len = items.length;
-
-            if (len > 0) {
-                const list = [];
-                items.forEach(item => {
-                    item.changeCurrent(item.data.key === val);
-                    item.changeCurrentColor(this.data.color);
-                    list.push({
-                        key: item.data.key
-                    });
-                });
-                this.setData({
-                    list: list
-                });
-            }
-        },
-        emitEvent (key) {
-            this.triggerEvent('change', { key });
-        },
-        handleClickItem (e) {
-            const key = e.currentTarget.dataset.key;
-            this.emitEvent(key);
-        }
-    }
-});

+ 0 - 3
component/iView/tab-bar/index.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 6
component/iView/tab-bar/index.wxml

@@ -1,6 +0,0 @@
-<view class="i-class i-tab-bar {{ fixed ? 'i-tab-bar-fixed' : '' }}">
-    <slot></slot>
-    <view class="i-tab-bar-list">
-        <view class="i-tab-bar-layer" wx:for="{{ list }}" wx:key="{{ item.key }}" data-key="{{ item.key }}" bindtap="handleClickItem" style="width: {{ 100 / list.length }}%"></view>
-    </view>
-</view>

+ 0 - 1
component/iView/tab-bar/index.wxss

@@ -1 +0,0 @@
-.i-tab-bar{display:flex;width:100%;height:50px;box-sizing:border-box;position:relative;justify-content:space-around;align-items:center;-webkit-box-align:center;background:#fff}.i-tab-bar::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-top-width:1px}.i-tab-bar-fixed{position:fixed;bottom:0;z-index:2}.i-tab-bar-list{position:absolute;top:0;bottom:0;left:0;right:0}.i-tab-bar-layer{display:block;float:left;height:100%}

+ 0 - 42
component/iView/tag/index.js

@@ -1,42 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    properties : {
-        //slot name
-        name : {
-            type : String,
-            value : ''
-        },
-        //can click or not click
-        checkable : {
-            type : Boolean,
-            value : false
-        },
-        //is current choose
-        checked : {
-            type : Boolean,
-            value : true
-        },
-        //background and color setting
-        color : {
-            type : String,
-            value : 'default'
-        },
-        //control fill or not
-        type : {
-            type : String,
-            value : 'dot'
-        } 
-    },
-    methods : {
-        tapTag(){
-            const data = this.data;
-            if( data.checkable ){
-                const checked = data.checked ? false : true;
-                this.triggerEvent('change',{
-                    name : data.name || '',
-                    checked : checked
-                });
-            }
-        }
-    }
-})

+ 0 - 3
component/iView/tag/index.json

@@ -1,3 +0,0 @@
-{
-    "component" : true
-}

+ 0 - 27
component/iView/tag/index.wxml

@@ -1,27 +0,0 @@
-<view 
-    class="i-class i-tag {{ parse.getClass(color,type,checked,checkable) }} {{checkable ? '' : 'i-tag-disable'}}" 
-    bindtap="tapTag">
-    <slot></slot>
-</view>
-<wxs module="parse"> 
-module.exports = {
-    getClass : function(color,type,checked,checkable) {
-        var initColorList = ['blue', 'green', 'red', 'yellow', 'default'];
-        var theme = '';
-        var className = 'i-tag-';
-        if( initColorList.indexOf( color ) > -1 ){
-            theme = className + color;
-        }
-        if( type === 'border' ){
-            theme = className+color+'-border';
-        }
-        if( checkable && checked ){
-            theme = className+color+'-checked';
-        }else if( checkable && !checked ){
-            theme =  ( type === 'border' ? className + color +'-border' : className+'none' );
-        }
-
-        return theme;
-    }
-}
-</wxs>

+ 0 - 1
component/iView/tag/index.wxss

@@ -1 +0,0 @@
-.i-tag{display:inline-block;height:18px;line-height:18px;padding:0 4px;border-radius:2px;background:#fff;font-size:11px;vertical-align:middle;border:1rpx solid #dddee1}.i-tag-none{border-color:#fff}.i-tag-default{border-color:#dddee1;background:#e9eaec}.i-tag-red{background:#ed3f14;color:#fff}.i-tag-red-border{color:#ed3f14;background:#fff;border-color:#ed3f14}.i-tag-red-checked{background:#ed3f14;color:#fff;border-color:#ed3f14}.i-tag-green{background:#19be6b;color:#fff;border-color:#19be6b}.i-tag-green-border{color:#19be6b;background:#fff;border-color:#19be6b}.i-tag-green-checked{background:#19be6b;color:#fff;border-color:#19be6b}.i-tag-blue{background:#2d8cf0;color:#fff;border-color:#2d8cf0}.i-tag-blue-border{color:#2d8cf0;background:#fff;border-color:#2d8cf0}.i-tag-blue-checked{background:#2d8cf0;color:#fff;border-color:#2d8cf0}.i-tag-yellow{background:#f90;color:#fff;border-color:#f90}.i-tag-yellow-border{color:#f90;background:#fff;border-color:#f90}.i-tag-yellow-checked{background:#f90;color:#fff;border-color:#f90}.i-tag-default-checked{background:#e9eaec;color:#495060;border-color:#e9eaec}

+ 0 - 48
component/iView/toast/index.js

@@ -1,48 +0,0 @@
-const default_data = {
-    visible: false,
-    content: '',
-    icon: '',
-    image: '',
-    duration: 2,
-    mask: true,
-    type: 'default', // default || success || warning || error || loading
-};
-
-let timmer = null;
-
-Component({
-    externalClasses: ['i-class'],
-
-    data: {
-        ...default_data
-    },
-
-    methods: {
-        handleShow (options) {
-            const { type = 'default', duration = 2 } = options;
-
-            this.setData({
-                ...options,
-                type,
-                duration,
-                visible: true
-            });
-
-            const d = this.data.duration * 1000;
-
-            if (timmer) clearTimeout(timmer);
-            if (d !== 0) {
-                timmer = setTimeout(() => {
-                    this.handleHide();
-                    timmer = null;
-                }, d);
-            }
-        },
-
-        handleHide () {
-            this.setData({
-                ...default_data
-            });
-        }
-    }
-});

+ 0 - 7
component/iView/toast/index.json

@@ -1,7 +0,0 @@
-{
-  "component": true,
-  "usingComponents":
-  {
-    "i-icon": "../icon/index"
-  }
-}

+ 0 - 16
component/iView/toast/index.wxml

@@ -1,16 +0,0 @@
-<view class="i-toast-mask" wx:if="{{ visible && mask }}" bindtap="handleHide"></view>
-<view class="i-class i-toast" wx:if="{{ visible }}">
-    <block wx:if="{{ type !== 'default' }}">
-        <view class="i-toast-type">
-            <i-icon i-class="i-toast-icon" type="success" wx:if="{{ type === 'success' }}"></i-icon>
-            <i-icon i-class="i-toast-icon" type="prompt" wx:elif="{{ type === 'warning' }}"></i-icon>
-            <i-icon i-class="i-toast-icon" type="delete" wx:elif="{{ type === 'error' }}"></i-icon>
-            <view class="i-toast-icon i-toast-loading" wx:elif="{{ type === 'loading' }}"></view>
-        </view>
-    </block>
-    <block wx:else>
-        <i-icon i-class="i-toast-icon" type="{{ icon }}" wx:if="{{ icon }}"></i-icon>
-        <image class="i-toast-image" src="{{ image }}" wx:if="{{ image }}" mode="aspectFit"></image>
-    </block>
-    <view class="i-toast-content" wx:if="{{ content }}">{{ content }}</view>
-</view>

+ 0 - 1
component/iView/toast/index.wxss

@@ -1 +0,0 @@
-.i-toast{position:fixed;top:35%;left:50%;transform:translate3d(-50%,-50%,0);background:rgba(0,0,0,.7);color:#fff;font-size:14px;line-height:1.5em;margin:0 auto;box-sizing:border-box;padding:10px 18px;text-align:center;border-radius:4px;z-index:1010}.i-toast-mask{position:fixed;top:0;bottom:0;left:0;right:0;z-index:1010}.i-toast-icon{font-size:38px!important;margin-bottom:6px}.i-toast-image{max-width:100px;max-height:100px}.i-toast-loading{display:inline-block;vertical-align:middle;width:28px;height:28px;background:0 0;border-radius:50%;border:2px solid #fff;border-color:#fff #fff #fff #2d8cf0;animation:btn-spin .8s linear;animation-iteration-count:infinite}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}

+ 1 - 1
pages/exam/collection/index.js

@@ -37,7 +37,7 @@ Page({
     let list = this.data.list
     list[index].select = +e.detail.value
     this.setData( {list} );
-    if( list[index].select== list[index].result  ) this.delAnswer(list[index].id )
+    if( list[index].select== list[index].result  ) this.delAnswer(+list[index].id )
 
   },
   checkboxChange( e ){

+ 1 - 1
pages/exam/collection/index.json

@@ -14,5 +14,5 @@
     "i-rate": "/component/iView/rate/index"
   },
   "enablePullDownRefresh": true,
-  "navigationBarTitleText": "收藏题库"
+  "navigationBarTitleText": "我的错题"
 }

Some files were not shown because too many files changed in this diff