This commit is contained in:
2023-08-11 10:45:20 +08:00
commit 161ca982f3
31850 changed files with 2706500 additions and 0 deletions

1
node_modules/vant/es/checkbox/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-checkbox{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-checkbox--disabled{cursor:not-allowed}.van-checkbox--label-disabled{cursor:default}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon{-webkit-box-flex:0;-webkit-flex:none;flex:none;height:1em;font-size:20px;line-height:1em;cursor:pointer}.van-checkbox__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-checkbox__icon--round .van-icon{border-radius:100%}.van-checkbox__icon--checked .van-icon{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-checkbox__icon--disabled{cursor:not-allowed}.van-checkbox__icon--disabled .van-icon{background-color:#ebedf0;border-color:#c8c9cc}.van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon{color:#c8c9cc}.van-checkbox__label{margin-left:8px;color:#323233;line-height:20px}.van-checkbox__label--left{margin:0 8px 0 0}.van-checkbox__label--disabled{color:#c8c9cc}

80
node_modules/vant/es/checkbox/index.js generated vendored Normal file
View File

@ -0,0 +1,80 @@
import { createNamespace } from '../utils';
import { CheckboxMixin } from '../mixins/checkbox';
var _createNamespace = createNamespace('checkbox'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
export default createComponent({
mixins: [CheckboxMixin({
bem: bem,
role: 'checkbox',
parent: 'vanCheckbox'
})],
computed: {
checked: {
get: function get() {
if (this.parent) {
return this.parent.value.indexOf(this.name) !== -1;
}
return this.value;
},
set: function set(val) {
if (this.parent) {
this.setParentValue(val);
} else {
this.$emit('input', val);
}
}
}
},
watch: {
value: function value(val) {
this.$emit('change', val);
}
},
methods: {
// @exposed-api
toggle: function toggle(checked) {
var _this = this;
if (checked === void 0) {
checked = !this.checked;
}
// When toggle method is called multiple times at the same time,
// only the last call is valid.
// This is a hack for usage inside Cell.
clearTimeout(this.toggleTask);
this.toggleTask = setTimeout(function () {
_this.checked = checked;
});
},
setParentValue: function setParentValue(val) {
var parent = this.parent;
var value = parent.value.slice();
if (val) {
if (parent.max && value.length >= parent.max) {
return;
}
/* istanbul ignore else */
if (value.indexOf(this.name) === -1) {
value.push(this.name);
parent.$emit('input', value);
}
} else {
var index = value.indexOf(this.name);
/* istanbul ignore else */
if (index !== -1) {
value.splice(index, 1);
parent.$emit('input', value);
}
}
}
}
});

86
node_modules/vant/es/checkbox/index.less generated vendored Normal file
View File

@ -0,0 +1,86 @@
@import '../style/var';
.van-checkbox {
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: @checkbox-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 @checkbox-border-color;
transition-duration: @checkbox-transition-duration;
transition-property: color, border-color, background-color;
}
&--round {
.van-icon {
border-radius: 100%;
}
}
&--checked {
.van-icon {
color: @white;
background-color: @checkbox-checked-icon-color;
border-color: @checkbox-checked-icon-color;
}
}
&--disabled {
cursor: not-allowed;
.van-icon {
background-color: @checkbox-disabled-background-color;
border-color: @checkbox-disabled-icon-color;
}
}
&--disabled&--checked {
.van-icon {
color: @checkbox-disabled-icon-color;
}
}
}
&__label {
margin-left: @checkbox-label-margin;
color: @checkbox-label-color;
line-height: @checkbox-size;
&--left {
margin: 0 @checkbox-label-margin 0 0;
}
&--disabled {
color: @checkbox-disabled-label-color;
}
}
}

4
node_modules/vant/es/checkbox/style/index.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
import '../../style/base.css';
import '../../info/index.css';
import '../../icon/index.css';
import '../index.css';

4
node_modules/vant/es/checkbox/style/less.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
import '../../style/base.less';
import '../../info/index.less';
import '../../icon/index.less';
import '../index.less';