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/lib/step/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-step{position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#969799;font-size:14px}.van-step__circle{display:block;width:5px;height:5px;background-color:#969799;border-radius:50%}.van-step__line{position:absolute;background-color:#ebedf0;-webkit-transition:background-color .3s;transition:background-color .3s}.van-step--horizontal{float:left}.van-step--horizontal:first-child .van-step__title{margin-left:0;-webkit-transform:none;transform:none}.van-step--horizontal:last-child{position:absolute;right:1px;width:auto}.van-step--horizontal:last-child .van-step__title{margin-left:0;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:-9px;left:auto}.van-step--horizontal .van-step__circle-container{position:absolute;top:30px;left:-8px;z-index:1;padding:0 8px;background-color:#fff;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.van-step--horizontal .van-step__title{display:inline-block;margin-left:3px;font-size:12px;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media (max-width:321px){.van-step--horizontal .van-step__title{font-size:11px}}.van-step--horizontal .van-step__line{top:30px;left:0;width:100%;height:1px}.van-step--horizontal .van-step__icon{display:block;font-size:12px}.van-step--horizontal .van-step--process{color:#323233}.van-step--vertical{display:block;float:none;padding:10px 10px 10px 0;line-height:18px}.van-step--vertical:not(:last-child)::after{border-bottom-width:1px}.van-step--vertical .van-step__circle-container{position:absolute;top:19px;left:-15px;z-index:1;font-size:12px;line-height:1;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-step--vertical .van-step__line{top:16px;left:-15px;width:1px;height:100%}.van-step:last-child .van-step__line{width:0}.van-step--finish{color:#323233}.van-step--finish .van-step__circle,.van-step--finish .van-step__line{background-color:#07c160}.van-step__icon,.van-step__title{-webkit-transition:color .3s;transition:color .3s}.van-step__icon--active,.van-step__icon--finish,.van-step__title--active,.van-step__title--finish{color:#07c160}

157
node_modules/vant/lib/step/index.js generated vendored Normal file
View File

@ -0,0 +1,157 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _utils = require("../utils");
var _constant = require("../utils/constant");
var _relation = require("../mixins/relation");
var _icon = _interopRequireDefault(require("../icon"));
var _createNamespace = (0, _utils.createNamespace)('step'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
var _default = createComponent({
mixins: [(0, _relation.ChildrenMixin)('vanSteps')],
computed: {
status: function status() {
if (this.index < this.parent.active) {
return 'finish';
}
if (this.index === +this.parent.active) {
return 'process';
}
},
active: function active() {
return this.status === 'process';
},
lineStyle: function lineStyle() {
var _this$parent = this.parent,
activeColor = _this$parent.activeColor,
inactiveColor = _this$parent.inactiveColor,
center = _this$parent.center,
direction = _this$parent.direction;
var style = {
background: this.status === 'finish' ? activeColor : inactiveColor
};
if (center && direction === 'vertical') {
style.top = '50%';
}
return style;
},
circleContainerStyle: function circleContainerStyle() {
if (this.parent.center && this.parent.direction === 'vertical') {
return {
top: '50%'
};
}
},
titleStyle: function titleStyle() {
if (this.active) {
return {
color: this.parent.activeColor
};
}
if (!this.status) {
return {
color: this.parent.inactiveColor
};
}
}
},
methods: {
genCircle: function genCircle() {
var h = this.$createElement;
var _this$parent2 = this.parent,
activeIcon = _this$parent2.activeIcon,
iconPrefix = _this$parent2.iconPrefix,
activeColor = _this$parent2.activeColor,
finishIcon = _this$parent2.finishIcon,
inactiveIcon = _this$parent2.inactiveIcon;
if (this.active) {
return this.slots('active-icon') || h(_icon.default, {
"class": bem('icon', 'active'),
"attrs": {
"name": activeIcon,
"color": activeColor,
"classPrefix": iconPrefix
}
});
}
var finishIconSlot = this.slots('finish-icon');
if (this.status === 'finish' && (finishIcon || finishIconSlot)) {
return finishIconSlot || h(_icon.default, {
"class": bem('icon', 'finish'),
"attrs": {
"name": finishIcon,
"color": activeColor,
"classPrefix": iconPrefix
}
});
}
var inactiveIconSlot = this.slots('inactive-icon');
if (inactiveIcon || inactiveIconSlot) {
return inactiveIconSlot || h(_icon.default, {
"class": bem('icon'),
"attrs": {
"name": inactiveIcon,
"classPrefix": iconPrefix
}
});
}
return h("i", {
"class": bem('circle'),
"style": this.lineStyle
});
},
onClickStep: function onClickStep() {
this.parent.$emit('click-step', this.index);
}
},
render: function render() {
var _ref;
var h = arguments[0];
var status = this.status,
active = this.active;
var direction = this.parent.direction;
return h("div", {
"class": [_constant.BORDER, bem([direction, (_ref = {}, _ref[status] = status, _ref)])]
}, [h("div", {
"class": bem('title', {
active: active
}),
"style": this.titleStyle,
"on": {
"click": this.onClickStep
}
}, [this.slots()]), h("div", {
"class": bem('circle-container'),
"on": {
"click": this.onClickStep
},
"style": this.circleContainerStyle
}, [this.genCircle()]), h("div", {
"class": bem('line'),
"style": this.lineStyle
})]);
}
});
exports.default = _default;

139
node_modules/vant/lib/step/index.less generated vendored Normal file
View File

@ -0,0 +1,139 @@
@import '../style/var';
.van-step {
position: relative;
flex: 1;
color: @step-text-color;
font-size: @step-font-size;
&__circle {
display: block;
width: @step-circle-size;
height: @step-circle-size;
background-color: @step-circle-color;
border-radius: 50%;
}
&__line {
position: absolute;
background-color: @step-line-color;
transition: background-color @animation-duration-base;
}
&--horizontal {
float: left;
&:first-child {
.van-step__title {
margin-left: 0;
transform: none;
}
}
&:last-child {
position: absolute;
right: 1px;
width: auto;
.van-step__title {
margin-left: 0;
transform: none;
}
.van-step__circle-container {
right: -9px;
left: auto;
}
}
.van-step__circle-container {
position: absolute;
top: 30px;
left: -@padding-xs;
z-index: 1;
padding: 0 @padding-xs;
background-color: @white;
transform: translateY(-50%);
}
.van-step__title {
display: inline-block;
margin-left: 3px;
font-size: @step-horizontal-title-font-size;
transform: translateX(-50%);
@media (max-width: 321px) {
font-size: @step-horizontal-title-font-size - 1px;
}
}
.van-step__line {
top: 30px;
left: 0;
width: 100%;
height: 1px;
}
.van-step__icon {
display: block;
font-size: @step-icon-size;
}
.van-step--process {
color: @step-process-text-color;
}
}
&--vertical {
display: block;
float: none;
padding: 10px 10px 10px 0;
line-height: @line-height-sm;
&:not(:last-child)::after {
border-bottom-width: 1px;
}
.van-step__circle-container {
position: absolute;
top: 19px;
left: -15px;
z-index: 1;
font-size: @step-icon-size;
line-height: 1;
transform: translate(-50%, -50%);
}
.van-step__line {
top: 16px;
left: -15px;
width: 1px;
height: 100%;
}
}
&:last-child {
.van-step__line {
width: 0;
}
}
&--finish {
color: @step-finish-text-color;
.van-step__circle,
.van-step__line {
background-color: @step-finish-line-color;
}
}
&__icon,
&__title {
transition: color @animation-duration-base;
&--active,
&--finish {
color: @step-active-color;
}
}
}

4
node_modules/vant/lib/step/style/index.js generated vendored Normal file
View 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/step/style/less.js generated vendored Normal file
View File

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