first
This commit is contained in:
1
node_modules/vant/lib/radio/index.css
generated
vendored
Normal file
1
node_modules/vant/lib/radio/index.css
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
.van-radio{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-radio--disabled{cursor:not-allowed}.van-radio--label-disabled{cursor:default}.van-radio--horizontal{margin-right:12px}.van-radio__icon{-webkit-box-flex:0;-webkit-flex:none;flex:none;height:1em;font-size:20px;line-height:1em;cursor:pointer}.van-radio__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid #c8c9cc;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:color,border-color,background-color;transition-property:color,border-color,background-color}.van-radio__icon--round .van-icon{border-radius:100%}.van-radio__icon--checked .van-icon{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-radio__icon--disabled{cursor:not-allowed}.van-radio__icon--disabled .van-icon{background-color:#ebedf0;border-color:#c8c9cc}.van-radio__icon--disabled.van-radio__icon--checked .van-icon{color:#c8c9cc}.van-radio__label{margin-left:8px;color:#323233;line-height:20px}.van-radio__label--left{margin:0 8px 0 0}.van-radio__label--disabled{color:#c8c9cc}
|
40
node_modules/vant/lib/radio/index.js
generated
vendored
Normal file
40
node_modules/vant/lib/radio/index.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
|
||||
var _utils = require("../utils");
|
||||
|
||||
var _checkbox = require("../mixins/checkbox");
|
||||
|
||||
var _createNamespace = (0, _utils.createNamespace)('radio'),
|
||||
createComponent = _createNamespace[0],
|
||||
bem = _createNamespace[1];
|
||||
|
||||
var _default = createComponent({
|
||||
mixins: [(0, _checkbox.CheckboxMixin)({
|
||||
bem: bem,
|
||||
role: 'radio',
|
||||
parent: 'vanRadio'
|
||||
})],
|
||||
computed: {
|
||||
currentValue: {
|
||||
get: function get() {
|
||||
return this.parent ? this.parent.value : this.value;
|
||||
},
|
||||
set: function set(val) {
|
||||
(this.parent || this).$emit('input', val);
|
||||
}
|
||||
},
|
||||
checked: function checked() {
|
||||
return this.currentValue === this.name;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggle: function toggle() {
|
||||
this.currentValue = this.name;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
exports.default = _default;
|
86
node_modules/vant/lib/radio/index.less
generated
vendored
Normal file
86
node_modules/vant/lib/radio/index.less
generated
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van-radio {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
|
||||
&--disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
&--label-disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&--horizontal {
|
||||
margin-right: @padding-sm;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
flex: none;
|
||||
height: 1em;
|
||||
font-size: @radio-size;
|
||||
line-height: 1em;
|
||||
cursor: pointer;
|
||||
|
||||
.van-icon {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
color: transparent;
|
||||
font-size: 0.8em;
|
||||
line-height: 1.25;
|
||||
text-align: center;
|
||||
border: 1px solid @radio-border-color;
|
||||
transition-duration: @radio-transition-duration;
|
||||
transition-property: color, border-color, background-color;
|
||||
}
|
||||
|
||||
&--round {
|
||||
.van-icon {
|
||||
border-radius: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&--checked {
|
||||
.van-icon {
|
||||
color: @white;
|
||||
background-color: @radio-checked-icon-color;
|
||||
border-color: @radio-checked-icon-color;
|
||||
}
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
cursor: not-allowed;
|
||||
|
||||
.van-icon {
|
||||
background-color: @radio-disabled-background-color;
|
||||
border-color: @radio-disabled-icon-color;
|
||||
}
|
||||
}
|
||||
|
||||
&--disabled&--checked {
|
||||
.van-icon {
|
||||
color: @radio-disabled-icon-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__label {
|
||||
margin-left: @radio-label-margin;
|
||||
color: @radio-label-color;
|
||||
line-height: @radio-size;
|
||||
|
||||
&--left {
|
||||
margin: 0 @radio-label-margin 0 0;
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
color: @radio-disabled-label-color;
|
||||
}
|
||||
}
|
||||
}
|
4
node_modules/vant/lib/radio/style/index.js
generated
vendored
Normal file
4
node_modules/vant/lib/radio/style/index.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
require('../../style/base.css');
|
||||
require('../../info/index.css');
|
||||
require('../../icon/index.css');
|
||||
require('../index.css');
|
4
node_modules/vant/lib/radio/style/less.js
generated
vendored
Normal file
4
node_modules/vant/lib/radio/style/less.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
require('../../style/base.less');
|
||||
require('../../info/index.less');
|
||||
require('../../icon/index.less');
|
||||
require('../index.less');
|
Reference in New Issue
Block a user