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

@ -0,0 +1 @@
.van-action-sheet{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;max-height:80%;overflow:hidden;color:#323233}.van-action-sheet__content{-webkit-box-flex:1;-webkit-flex:1 auto;flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.van-action-sheet__cancel,.van-action-sheet__item{display:block;width:100%;padding:14px 16px;font-size:16px;background-color:#fff;border:none;cursor:pointer}.van-action-sheet__cancel:active,.van-action-sheet__item:active{background-color:#f2f3f5}.van-action-sheet__item{line-height:22px}.van-action-sheet__item--disabled,.van-action-sheet__item--loading{color:#c8c9cc}.van-action-sheet__item--disabled:active,.van-action-sheet__item--loading:active{background-color:#fff}.van-action-sheet__item--disabled{cursor:not-allowed}.van-action-sheet__item--loading{cursor:default}.van-action-sheet__cancel{-webkit-flex-shrink:0;flex-shrink:0;box-sizing:border-box;color:#646566}.van-action-sheet__subname{margin-top:8px;color:#969799;font-size:12px;line-height:18px}.van-action-sheet__gap{display:block;height:8px;background-color:#f7f8fa}.van-action-sheet__header{-webkit-flex-shrink:0;flex-shrink:0;font-weight:500;font-size:16px;line-height:48px;text-align:center}.van-action-sheet__description{position:relative;-webkit-flex-shrink:0;flex-shrink:0;padding:20px 16px;color:#969799;font-size:14px;line-height:20px;text-align:center}.van-action-sheet__description::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-action-sheet__loading-icon .van-loading__spinner{width:22px;height:22px}.van-action-sheet__close{position:absolute;top:0;right:0;z-index:1;padding:0 16px;color:#c8c9cc;font-size:22px;line-height:inherit}.van-action-sheet__close:active{color:#969799}

198
node_modules/vant/lib/action-sheet/index.js generated vendored Normal file
View File

@ -0,0 +1,198 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _babelHelperVueJsxMergeProps = _interopRequireDefault(require("@vue/babel-helper-vue-jsx-merge-props"));
var _vue = _interopRequireDefault(require("vue"));
var _utils = require("../utils");
var _functional = require("../utils/functional");
var _popup = require("../mixins/popup");
var _icon = _interopRequireDefault(require("../icon"));
var _popup2 = _interopRequireDefault(require("../popup"));
var _loading = _interopRequireDefault(require("../loading"));
// Utils
// Mixins
// Components
var _createNamespace = (0, _utils.createNamespace)('action-sheet'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
function ActionSheet(h, props, slots, ctx) {
var title = props.title,
cancelText = props.cancelText,
closeable = props.closeable;
function onCancel() {
(0, _functional.emit)(ctx, 'input', false);
(0, _functional.emit)(ctx, 'cancel');
}
function Header() {
if (title) {
return h("div", {
"class": bem('header')
}, [title, closeable && h(_icon.default, {
"attrs": {
"name": props.closeIcon
},
"class": bem('close'),
"on": {
"click": onCancel
}
})]);
}
}
function Option(item, index) {
var disabled = item.disabled,
loading = item.loading,
callback = item.callback;
function onClickOption(event) {
event.stopPropagation();
if (disabled || loading) {
return;
}
if (callback) {
callback(item);
}
if (props.closeOnClickAction) {
(0, _functional.emit)(ctx, 'input', false);
}
_vue.default.nextTick(function () {
(0, _functional.emit)(ctx, 'select', item, index);
});
}
function OptionContent() {
if (loading) {
return h(_loading.default, {
"class": bem('loading-icon')
});
}
return [h("span", {
"class": bem('name')
}, [item.name]), item.subname && h("div", {
"class": bem('subname')
}, [item.subname])];
}
return h("button", {
"attrs": {
"type": "button"
},
"class": [bem('item', {
disabled: disabled,
loading: loading
}), item.className],
"style": {
color: item.color
},
"on": {
"click": onClickOption
}
}, [OptionContent()]);
}
function CancelText() {
if (cancelText) {
return [h("div", {
"class": bem('gap')
}), h("button", {
"attrs": {
"type": "button"
},
"class": bem('cancel'),
"on": {
"click": onCancel
}
}, [cancelText])];
}
}
function Description() {
var description = (slots.description == null ? void 0 : slots.description()) || props.description;
if (description) {
return h("div", {
"class": bem('description')
}, [description]);
}
}
return h(_popup2.default, (0, _babelHelperVueJsxMergeProps.default)([{
"class": bem(),
"attrs": {
"position": "bottom",
"round": props.round,
"value": props.value,
"overlay": props.overlay,
"duration": props.duration,
"lazyRender": props.lazyRender,
"lockScroll": props.lockScroll,
"getContainer": props.getContainer,
"closeOnPopstate": props.closeOnPopstate,
"closeOnClickOverlay": props.closeOnClickOverlay,
"safeAreaInsetBottom": props.safeAreaInsetBottom
}
}, (0, _functional.inherit)(ctx, true)]), [Header(), Description(), h("div", {
"class": bem('content')
}, [props.actions && props.actions.map(Option), slots.default == null ? void 0 : slots.default()]), CancelText()]);
}
ActionSheet.props = (0, _extends2.default)({}, _popup.popupMixinProps, {
title: String,
actions: Array,
duration: [Number, String],
cancelText: String,
description: String,
getContainer: [String, Function],
closeOnPopstate: Boolean,
closeOnClickAction: Boolean,
round: {
type: Boolean,
default: true
},
closeable: {
type: Boolean,
default: true
},
closeIcon: {
type: String,
default: 'cross'
},
safeAreaInsetBottom: {
type: Boolean,
default: true
},
overlay: {
type: Boolean,
default: true
},
closeOnClickOverlay: {
type: Boolean,
default: true
}
});
var _default = createComponent(ActionSheet);
exports.default = _default;

113
node_modules/vant/lib/action-sheet/index.less generated vendored Normal file
View File

@ -0,0 +1,113 @@
@import '../style/var';
@import '../style/mixins/hairline';
.van-action-sheet {
display: flex;
flex-direction: column;
max-height: @action-sheet-max-height;
overflow: hidden;
color: @action-sheet-item-text-color;
&__content {
flex: 1 auto;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
&__item,
&__cancel {
display: block;
width: 100%;
padding: 14px @padding-md;
font-size: @action-sheet-item-font-size;
background-color: @action-sheet-item-background;
border: none;
cursor: pointer;
&:active {
background-color: @active-color;
}
}
&__item {
line-height: @action-sheet-item-line-height;
&--loading,
&--disabled {
color: @action-sheet-item-disabled-text-color;
&:active {
background-color: @action-sheet-item-background;
}
}
&--disabled {
cursor: not-allowed;
}
&--loading {
cursor: default;
}
}
&__cancel {
flex-shrink: 0;
box-sizing: border-box;
color: @action-sheet-cancel-text-color;
}
&__subname {
margin-top: @padding-xs;
color: @action-sheet-subname-color;
font-size: @action-sheet-subname-font-size;
line-height: @action-sheet-subname-line-height;
}
&__gap {
display: block;
height: @action-sheet-cancel-padding-top;
background-color: @action-sheet-cancel-padding-color;
}
&__header {
flex-shrink: 0;
font-weight: @font-weight-bold;
font-size: @action-sheet-header-font-size;
line-height: @action-sheet-header-height;
text-align: center;
}
&__description {
position: relative;
flex-shrink: 0;
padding: 20px @padding-md;
color: @action-sheet-description-color;
font-size: @action-sheet-description-font-size;
line-height: @action-sheet-description-line-height;
text-align: center;
&::after {
.hairline-bottom(@cell-border-color, @padding-md, @padding-md);
}
}
&__loading-icon .van-loading__spinner {
width: @action-sheet-loading-icon-size;
height: @action-sheet-loading-icon-size;
}
&__close {
position: absolute;
top: 0;
right: 0;
z-index: 1;
padding: @action-sheet-close-icon-padding;
color: @action-sheet-close-icon-color;
font-size: @action-sheet-close-icon-size;
line-height: inherit;
&:active {
color: @action-sheet-close-icon-active-color;
}
}
}

7
node_modules/vant/lib/action-sheet/style/index.js generated vendored Normal file
View File

@ -0,0 +1,7 @@
require('../../style/base.css');
require('../../overlay/index.css');
require('../../info/index.css');
require('../../icon/index.css');
require('../../popup/index.css');
require('../../loading/index.css');
require('../index.css');

7
node_modules/vant/lib/action-sheet/style/less.js generated vendored Normal file
View File

@ -0,0 +1,7 @@
require('../../style/base.less');
require('../../overlay/index.less');
require('../../info/index.less');
require('../../icon/index.less');
require('../../popup/index.less');
require('../../loading/index.less');
require('../index.less');