Frans 7 years ago
parent
commit
27237d7f1b

+ 1 - 1
package.json

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

File diff suppressed because it is too large
+ 2 - 2
sites/demo/view/demonav.vue


+ 2 - 2
sites/demo/view/index.vue

@@ -108,7 +108,7 @@ export default {
       height: 10px;
       width: 10px;
       transform: rotate(0deg);
-      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#848484' viewBox='0 0 30 11'%3E%3Cpath d='M15 7.757L27.737.21a1.5 1.5 0 0 1 1.53 2.58c-4.5 2.668-9 5.334-13.5 8a1.503 1.503 0 0 1-1.53 0c-4.5-2.666-9-5.332-13.5-8A1.5 1.5 0 1 1 2.266.21C6.51 2.726 10.756 5.24 15 7.757' fill-rule='evenodd'/%3E%3C/svg%3E")
+      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='rgb(132,132,132)' viewBox='0 0 30 11'%3E%3Cpath d='M15 7.757L27.737.21a1.5 1.5 0 0 1 1.53 2.58c-4.5 2.668-9 5.334-13.5 8a1.503 1.503 0 0 1-1.53 0c-4.5-2.666-9-5.332-13.5-8A1.5 1.5 0 1 1 2.266.21C6.51 2.726 10.756 5.24 15 7.757' fill-rule='evenodd'/%3E%3C/svg%3E")
         no-repeat center;
       background-size: contain;
       transition: transform 0.3s;
@@ -131,7 +131,7 @@ export default {
     overflow: hidden;
     border-top: 1px solid #edeef1;
     border-radius: 2px;
-    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 30'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M-11 0h30v30h-30z'/%3E%3Cpath d='M7.757 15C5.241 10.755 2.727 6.51.21 2.266A1.5 1.5 0 0 1 2.79.736l8 13.499c.28.472.28 1.058 0 1.53l-8 13.5a1.499 1.499 0 1 1-2.58-1.53L7.757 15z' fill='#848484' /%3E%3C/g%3E%3C/svg%3E")
+    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 30'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M-11 0h30v30h-30z'/%3E%3Cpath d='M7.757 15C5.241 10.755 2.727 6.51.21 2.266A1.5 1.5 0 0 1 2.79.736l8 13.499c.28.472.28 1.058 0 1.53l-8 13.5a1.499 1.499 0 1 1-2.58-1.53L7.757 15z' fill='rgb(132,132,132)' /%3E%3C/g%3E%3C/svg%3E")
       no-repeat right 15px center;
     background-size: 10px 10px;
     a {

+ 0 - 20
src/packages/radio/__test__/radio.spec.js

@@ -1,23 +1,3 @@
 import { shallowMount } from '@vue/test-utils'
 import Radio from '../radio.vue';
 import Vue from 'vue';
-
-
-// describe('Radio.vue', () => {
-//     const wrapper = shallowMount(Radio, {
-//         propsData: {
-//             value:'a',
-            
-//         }
-//     });
-
-
-//     it('选中状态', () => {
-//         wrapper.setProps({ label: 'a' });
-
-//         return Vue.nextTick().then(function () {
-//             expect(wrapper.find('input').attributes('checked')).toBe(true);
-//         })
-//     });
-
-// });

+ 2 - 2
src/packages/rating/demo.vue

@@ -47,8 +47,8 @@ export default {
         return{
             val:4,
             result:'',
-            icon1:`url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23ff0000' d='M10 20a10 10 0 1 1 0-20 10 10 0 0 1 0 20zM6.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm7 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm2.16 3H4.34a6 6 0 0 0 11.32 0z'/%3E%3C/svg%3E")`,
-            icon2:`url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23ff0000' d='M10 20a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM6.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm7 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM7 13h6a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2z'/%3E%3C/svg%3E")`
+            icon1:`url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='rgb(255,0,0)' d='M10 20a10 10 0 1 1 0-20 10 10 0 0 1 0 20zM6.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm7 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm2.16 3H4.34a6 6 0 0 0 11.32 0z'/%3E%3C/svg%3E")`,
+            icon2:`url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='rgb(255,0,0)' d='M10 20a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM6.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm7 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM7 13h6a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2z'/%3E%3C/svg%3E")`
         }
     },
    

+ 19 - 7
src/packages/slider/slider.vue

@@ -1,11 +1,23 @@
 <template>
-    <div class="nut-slider">
-        <div class="nut-slider-left-text" v-if="showRangeTxt">{{ range[0] }}</div>
-        <div class="nut-slider-box" @click="onClick">
-            <div :class="['nut-slider-Handle',{'nut-slider-ani':ani}]" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" @click="onTouchEnd" :style="{'left':posi+'px'}"><span :class="['nut-slider-label',{'nut-slider-label-always':showLabelAlways}]" v-if="showLabel">{{current}}</span></div>
-        </div>
-        <div class="nut-slider-right-text" v-if="showRangeTxt">{{ range[1] }}</div>
+  <div class="nut-slider">
+    <div class="nut-slider-left-text" v-if="showRangeTxt">{{ range[0] }}</div>
+    <div class="nut-slider-box" @click="onClick">
+      <div
+        :class="['nut-slider-Handle',{'nut-slider-ani':ani}]"
+        @touchstart="onTouchStart"
+        @touchmove="onTouchMove"
+        @touchend="onTouchEnd"
+        @click="onTouchEnd"
+        :style="{'left':posi+'px'}"
+      >
+        <span
+          :class="['nut-slider-label',{'nut-slider-label-always':showLabelAlways}]"
+          v-if="showLabel"
+        >{{current}}</span>
+      </div>
     </div>
+    <div class="nut-slider-right-text" v-if="showRangeTxt">{{ range[1] }}</div>
+  </div>
 </template>
 <script>
 export default {
@@ -75,7 +87,7 @@ export default {
       this.setPosi(posi);
     },
     setVal(posi) {
-      const trans = posi / this.box.clientWidth * this.total;
+      const trans = (posi / this.box.clientWidth) * this.total;
       this.current = Math.round(trans / this.cell) * this.cell + this.range[0];
       this.$emit("input", this.current);
     },

File diff suppressed because it is too large
+ 1 - 1
src/packages/toast/demo.vue


File diff suppressed because it is too large
+ 1 - 1
src/packages/toast/toast.scss