提交 27237d7f 编写于 作者: F Frans

update

上级 1636bb59
{
"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",
......
......@@ -81,7 +81,7 @@ export default {
display: block;
width: 26px;
height: 26px;
background: url("data:image/svg+xml, %3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23999' d='M959.39 527.762c0 23.128-18.419 41.874-41.138 41.874-12.336 0-23.277-5.64-30.818-14.394L541.09 202.729a40.629 40.629 0 0 0-58.18 0L237.802 452.204c2.878 5.636 4.654 11.927 4.654 18.69v165.477c0 .328-.089.635-.097.961h.298v163.004c0 23.126 18.506 41.872 41.337 41.872h82.569v-164.47c0-22.85 18.52-41.368 41.369-41.368h206.844c22.848 0 41.369 18.518 41.369 41.369 0 22.846-18.52 41.369-41.37 41.369H449.3v165.474c0 22.427-17.875 40.583-40.142 41.246v.122h-146.01c-57.116 0-103.418-46.864-103.418-104.678v-183.94h.085c-.006-.327-.097-.634-.097-.962V531.68l-23.163 23.576c-7.542 8.745-18.476 14.38-30.808 14.38-22.719 0-41.139-18.746-41.139-41.874 0-11.862 4.896-22.52 12.688-30.141l-.237-.242L439.275 128.71c40.164-40.88 105.286-40.88 145.45 0l361.57 368.011-.3.306c8.18 7.653 13.395 18.536 13.395 30.735zM614.734 842.207c.443 0 .854.12 1.294.132v-.132h122.683c22.83 0 41.338-18.746 41.338-41.872V637.33h.534c-.016-.496-.145-.961-.145-1.464 0-23.126 18.417-41.874 41.139-41.874 22.72 0 41.137 18.748 41.137 41.874 0 .503-.126.968-.146 1.464h.406v183.94c0 57.813-46.3 104.679-103.419 104.679H616.026v-.132c-.44.014-.852.132-1.294.132-22.72 0-41.14-18.744-41.14-41.87.003-23.124 18.422-41.873 41.142-41.873z'/%3E%3C/svg%3E") no-repeat center;
background: url("data:image/svg+xml, %3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='rgb(153,153,153)' d='M959.39 527.762c0 23.128-18.419 41.874-41.138 41.874-12.336 0-23.277-5.64-30.818-14.394L541.09 202.729a40.629 40.629 0 0 0-58.18 0L237.802 452.204c2.878 5.636 4.654 11.927 4.654 18.69v165.477c0 .328-.089.635-.097.961h.298v163.004c0 23.126 18.506 41.872 41.337 41.872h82.569v-164.47c0-22.85 18.52-41.368 41.369-41.368h206.844c22.848 0 41.369 18.518 41.369 41.369 0 22.846-18.52 41.369-41.37 41.369H449.3v165.474c0 22.427-17.875 40.583-40.142 41.246v.122h-146.01c-57.116 0-103.418-46.864-103.418-104.678v-183.94h.085c-.006-.327-.097-.634-.097-.962V531.68l-23.163 23.576c-7.542 8.745-18.476 14.38-30.808 14.38-22.719 0-41.139-18.746-41.139-41.874 0-11.862 4.896-22.52 12.688-30.141l-.237-.242L439.275 128.71c40.164-40.88 105.286-40.88 145.45 0l361.57 368.011-.3.306c8.18 7.653 13.395 18.536 13.395 30.735zM614.734 842.207c.443 0 .854.12 1.294.132v-.132h122.683c22.83 0 41.338-18.746 41.338-41.872V637.33h.534c-.016-.496-.145-.961-.145-1.464 0-23.126 18.417-41.874 41.139-41.874 22.72 0 41.137 18.748 41.137 41.874 0 .503-.126.968-.146 1.464h.406v183.94c0 57.813-46.3 104.679-103.419 104.679H616.026v-.132c-.44.014-.852.132-1.294.132-22.72 0-41.14-18.744-41.14-41.87.003-23.124 18.422-41.873 41.142-41.873z'/%3E%3C/svg%3E") no-repeat center;
background-size: contain;
}
.title{
......@@ -98,7 +98,7 @@ export default {
text-decoration:none;
color:#000;
padding-left:20px;
background:url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#999' %3E%3Cpath d='M8 .198a8 8 0 0 0-2.529 15.591c.4.074.547-.174.547-.385 0-.191-.008-.821-.011-1.489-2.226.484-2.695-.944-2.695-.944-.364-.925-.888-1.171-.888-1.171-.726-.497.055-.486.055-.486.803.056 1.226.824 1.226.824.714 1.223 1.872.869 2.328.665.072-.517.279-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.954 0-.873.313-1.587.824-2.147-.083-.202-.357-1.015.077-2.117 0 0 .672-.215 2.201.82A7.672 7.672 0 0 1 8 4.066c.68.003 1.365.092 2.004.269 1.527-1.035 2.198-.82 2.198-.82.435 1.102.162 1.916.079 2.117.513.56.823 1.274.823 2.147 0 3.073-1.872 3.749-3.653 3.947.287.248.543.735.543 1.481 0 1.07-.009 1.932-.009 2.195 0 .213.144.462.55.384A8 8 0 0 0 8.001.196z'/%3E%3C/svg%3E") no-repeat center;
background:url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='rgb(153,153,153)' %3E%3Cpath d='M8 .198a8 8 0 0 0-2.529 15.591c.4.074.547-.174.547-.385 0-.191-.008-.821-.011-1.489-2.226.484-2.695-.944-2.695-.944-.364-.925-.888-1.171-.888-1.171-.726-.497.055-.486.055-.486.803.056 1.226.824 1.226.824.714 1.223 1.872.869 2.328.665.072-.517.279-.87.508-1.07-1.777-.202-3.645-.888-3.645-3.954 0-.873.313-1.587.824-2.147-.083-.202-.357-1.015.077-2.117 0 0 .672-.215 2.201.82A7.672 7.672 0 0 1 8 4.066c.68.003 1.365.092 2.004.269 1.527-1.035 2.198-.82 2.198-.82.435 1.102.162 1.916.079 2.117.513.56.823 1.274.823 2.147 0 3.073-1.872 3.749-3.653 3.947.287.248.543.735.543 1.481 0 1.07-.009 1.932-.009 2.195 0 .213.144.462.55.384A8 8 0 0 0 8.001.196z'/%3E%3C/svg%3E") no-repeat center;
background-size:100% auto;
background-origin:content-box;
}
......
......@@ -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 {
......
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);
// })
// });
// });
\ No newline at end of file
......@@ -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")`
}
},
......
<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);
},
......
......@@ -137,7 +137,7 @@ export default {
cusIconToast(msg) {
this.$toast.loading(msg, {
icon:
"data:image/svg+xml, %3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23e6e6e6' d='M626.345 121.83c0 53.151-43.08 96.23-96.23 96.23-53.146 0-96.23-43.079-96.23-96.23.004-53.15 43.084-96.23 96.23-96.23 53.145 0 96.23 43.085 96.23 96.23zm-96.23 712.167c-46.505 0-84.199 37.698-84.199 84.198s37.699 84.199 84.199 84.199 84.198-37.699 84.198-84.199-37.693-84.198-84.198-84.198zm398.187-253.84c-33.218 0-60.145-26.92-60.145-60.144 0-33.219 26.927-60.145 60.145-60.145 33.224 0 60.145 26.926 60.145 60.145-.005 33.218-26.931 60.144-60.145 60.144zm-700.145-60.144c0-53.146-43.08-96.23-96.23-96.23-53.146 0-96.23 43.08-96.23 96.23 0 53.145 43.08 96.23 96.23 96.23 53.15 0 96.23-43.085 96.23-96.23zm88.448-349.599c37.581 37.58 37.581 98.509 0 136.085-37.58 37.58-98.508 37.58-136.09 0s-37.58-98.51 0-136.09 98.51-37.58 136.09.005zm444.038 580.127c-28.186 28.185-28.186 73.881-.006 102.067 28.186 28.186 73.882 28.186 102.068 0 28.185-28.186 28.185-73.882 0-102.067-28.18-28.19-73.877-28.19-102.062 0zM845.7 272.476c-18.79 18.79-49.26 18.79-68.04 0-18.795-18.795-18.795-49.26 0-68.045a48.097 48.097 0 0 1 68.04 0c18.79 18.79 18.79 49.26 0 68.045zM316.605 733.527c-37.58-37.58-98.508-37.58-136.09 0s-37.58 98.509 0 136.085c37.582 37.58 98.51 37.58 136.085 0 37.581-37.576 37.581-98.504.005-136.085z'/%3E%3C/svg%3E",
"data:image/svg+xml, %3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='rgb(230,230,230)' d='M626.345 121.83c0 53.151-43.08 96.23-96.23 96.23-53.146 0-96.23-43.079-96.23-96.23.004-53.15 43.084-96.23 96.23-96.23 53.145 0 96.23 43.085 96.23 96.23zm-96.23 712.167c-46.505 0-84.199 37.698-84.199 84.198s37.699 84.199 84.199 84.199 84.198-37.699 84.198-84.199-37.693-84.198-84.198-84.198zm398.187-253.84c-33.218 0-60.145-26.92-60.145-60.144 0-33.219 26.927-60.145 60.145-60.145 33.224 0 60.145 26.926 60.145 60.145-.005 33.218-26.931 60.144-60.145 60.144zm-700.145-60.144c0-53.146-43.08-96.23-96.23-96.23-53.146 0-96.23 43.08-96.23 96.23 0 53.145 43.08 96.23 96.23 96.23 53.15 0 96.23-43.085 96.23-96.23zm88.448-349.599c37.581 37.58 37.581 98.509 0 136.085-37.58 37.58-98.508 37.58-136.09 0s-37.58-98.51 0-136.09 98.51-37.58 136.09.005zm444.038 580.127c-28.186 28.185-28.186 73.881-.006 102.067 28.186 28.186 73.882 28.186 102.068 0 28.185-28.186 28.185-73.882 0-102.067-28.18-28.19-73.877-28.19-102.062 0zM845.7 272.476c-18.79 18.79-49.26 18.79-68.04 0-18.795-18.795-18.795-49.26 0-68.045a48.097 48.097 0 0 1 68.04 0c18.79 18.79 18.79 49.26 0 68.045zM316.605 733.527c-37.58-37.58-98.508-37.58-136.09 0s-37.58 98.509 0 136.085c37.582 37.58 98.51 37.58 136.085 0 37.581-37.576 37.581-98.504.005-136.085z'/%3E%3C/svg%3E",
duration: 3000,
loadingRotate: true
});
......
......@@ -61,7 +61,7 @@
background-image: url("data:image/svg+xml,%3Csvg width='46' height='46' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M8 0h18c11.046 0 20 8.954 20 20v18a8 8 0 0 1-8 8H20C8.954 46 0 37.046 0 26V8a8 8 0 0 1 8-8z' fill='%23FFF'/%3E%3Cpath d='M23 23V12' stroke='%232C2A35' stroke-width='6' stroke-linecap='round'/%3E%3Cpath d='M21 30h3a2 2 0 0 1 2 2v3a1 1 0 0 1-1 1h-3a2 2 0 0 1-2-2v-3a1 1 0 0 1 1-1z' fill='%232C2A35'/%3E%3C/g%3E%3C/svg%3E");
}
&.loading {
background: url("data:image/svg+xml, %3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23e6e6e6' d='M874.667 533.333h-192c-12.8 0-21.334-8.533-21.334-21.333 0-12.8 8.534-21.333 21.334-21.333h192c12.8 0 21.333 8.533 21.333 21.333 0 12.8-8.533 21.333-21.333 21.333zM648.533 407.467C640 416 627.2 416 618.667 407.467c-8.534-8.534-8.534-21.334 0-29.867L755.2 241.067c8.533-8.534 21.333-8.534 29.867 0 8.533 8.533 8.533 21.333 0 29.866L648.533 407.467zM512 896c-12.8 0-21.333-8.533-21.333-21.333v-192c0-12.8 8.533-21.334 21.333-21.334s21.333 8.534 21.333 21.334v192c0 12.8-8.533 21.333-21.333 21.333zm0-533.333c-12.8 0-21.333-8.534-21.333-21.334v-192c0-12.8 8.533-21.333 21.333-21.333s21.333 8.533 21.333 21.333v192c0 12.8-8.533 21.334-21.333 21.334zM270.933 782.933c-8.533 8.534-21.333 8.534-29.866 0s-8.534-21.333 0-29.866L377.6 616.533c8.533-8.533 21.333-8.533 29.867 0 8.533 8.534 8.533 21.334 0 29.867L270.933 782.933zm104.534-375.466L238.933 270.933c-8.533-8.533-8.533-21.333 0-29.866s21.334-8.534 29.867 0L405.333 377.6c8.534 8.533 8.534 21.333 0 29.867-6.4 6.4-21.333 6.4-29.866 0zM362.667 512c0 12.8-8.534 21.333-21.334 21.333h-192C136.533 533.333 128 524.8 128 512c0-12.8 8.533-21.333 21.333-21.333h192c12.8 0 21.334 8.533 21.334 21.333zm285.866 104.533l136.534 136.534c8.533 8.533 8.533 21.333 0 29.866-8.534 8.534-21.334 8.534-29.867 0L618.667 646.4c-8.534-8.533-8.534-21.333 0-29.867 6.4-6.4 21.333-6.4 29.866 0z'/%3E%3C/svg%3E") no-repeat;
background: url("data:image/svg+xml, %3Csvg class='icon' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='rgb(230,230,230)' d='M874.667 533.333h-192c-12.8 0-21.334-8.533-21.334-21.333 0-12.8 8.534-21.333 21.334-21.333h192c12.8 0 21.333 8.533 21.333 21.333 0 12.8-8.533 21.333-21.333 21.333zM648.533 407.467C640 416 627.2 416 618.667 407.467c-8.534-8.534-8.534-21.334 0-29.867L755.2 241.067c8.533-8.534 21.333-8.534 29.867 0 8.533 8.533 8.533 21.333 0 29.866L648.533 407.467zM512 896c-12.8 0-21.333-8.533-21.333-21.333v-192c0-12.8 8.533-21.334 21.333-21.334s21.333 8.534 21.333 21.334v192c0 12.8-8.533 21.333-21.333 21.333zm0-533.333c-12.8 0-21.333-8.534-21.333-21.334v-192c0-12.8 8.533-21.333 21.333-21.333s21.333 8.533 21.333 21.333v192c0 12.8-8.533 21.334-21.333 21.334zM270.933 782.933c-8.533 8.534-21.333 8.534-29.866 0s-8.534-21.333 0-29.866L377.6 616.533c8.533-8.533 21.333-8.533 29.867 0 8.533 8.534 8.533 21.334 0 29.867L270.933 782.933zm104.534-375.466L238.933 270.933c-8.533-8.533-8.533-21.333 0-29.866s21.334-8.534 29.867 0L405.333 377.6c8.534 8.533 8.534 21.333 0 29.867-6.4 6.4-21.333 6.4-29.866 0zM362.667 512c0 12.8-8.534 21.333-21.334 21.333h-192C136.533 533.333 128 524.8 128 512c0-12.8 8.533-21.333 21.333-21.333h192c12.8 0 21.334 8.533 21.334 21.333zm285.866 104.533l136.534 136.534c8.533 8.533 8.533 21.333 0 29.866-8.534 8.534-21.334 8.534-29.867 0L618.667 646.4c-8.534-8.533-8.534-21.333 0-29.867 6.4-6.4 21.333-6.4 29.866 0z'/%3E%3C/svg%3E") no-repeat;
background-size: cover;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册