first commit
This commit is contained in:
101
node_modules/vant/lib/submit-bar/SubmitBar.d.ts
generated
vendored
Normal file
101
node_modules/vant/lib/submit-bar/SubmitBar.d.ts
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
import { type PropType, type ExtractPropTypes } from 'vue';
|
||||
import { ButtonType } from '../button';
|
||||
export type SubmitBarTextAlign = 'left' | 'right';
|
||||
export declare const submitBarProps: {
|
||||
tip: StringConstructor;
|
||||
label: StringConstructor;
|
||||
price: NumberConstructor;
|
||||
tipIcon: StringConstructor;
|
||||
loading: BooleanConstructor;
|
||||
currency: {
|
||||
type: PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
disabled: BooleanConstructor;
|
||||
textAlign: PropType<SubmitBarTextAlign>;
|
||||
buttonText: StringConstructor;
|
||||
buttonType: {
|
||||
type: PropType<ButtonType>;
|
||||
default: ButtonType;
|
||||
};
|
||||
buttonColor: StringConstructor;
|
||||
suffixLabel: StringConstructor;
|
||||
placeholder: BooleanConstructor;
|
||||
decimalLength: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
safeAreaInsetBottom: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
};
|
||||
export type SubmitBarProps = ExtractPropTypes<typeof submitBarProps>;
|
||||
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
||||
tip: StringConstructor;
|
||||
label: StringConstructor;
|
||||
price: NumberConstructor;
|
||||
tipIcon: StringConstructor;
|
||||
loading: BooleanConstructor;
|
||||
currency: {
|
||||
type: PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
disabled: BooleanConstructor;
|
||||
textAlign: PropType<SubmitBarTextAlign>;
|
||||
buttonText: StringConstructor;
|
||||
buttonType: {
|
||||
type: PropType<ButtonType>;
|
||||
default: ButtonType;
|
||||
};
|
||||
buttonColor: StringConstructor;
|
||||
suffixLabel: StringConstructor;
|
||||
placeholder: BooleanConstructor;
|
||||
decimalLength: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
safeAreaInsetBottom: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "submit"[], "submit", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
||||
tip: StringConstructor;
|
||||
label: StringConstructor;
|
||||
price: NumberConstructor;
|
||||
tipIcon: StringConstructor;
|
||||
loading: BooleanConstructor;
|
||||
currency: {
|
||||
type: PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
disabled: BooleanConstructor;
|
||||
textAlign: PropType<SubmitBarTextAlign>;
|
||||
buttonText: StringConstructor;
|
||||
buttonType: {
|
||||
type: PropType<ButtonType>;
|
||||
default: ButtonType;
|
||||
};
|
||||
buttonColor: StringConstructor;
|
||||
suffixLabel: StringConstructor;
|
||||
placeholder: BooleanConstructor;
|
||||
decimalLength: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
safeAreaInsetBottom: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
onSubmit?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
disabled: boolean;
|
||||
placeholder: boolean;
|
||||
safeAreaInsetBottom: boolean;
|
||||
loading: boolean;
|
||||
currency: string;
|
||||
decimalLength: string | number;
|
||||
buttonType: ButtonType;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
export default _default;
|
||||
134
node_modules/vant/lib/submit-bar/SubmitBar.js
generated
vendored
Normal file
134
node_modules/vant/lib/submit-bar/SubmitBar.js
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name2 in all)
|
||||
__defProp(target, name2, { get: all[name2], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var stdin_exports = {};
|
||||
__export(stdin_exports, {
|
||||
default: () => stdin_default,
|
||||
submitBarProps: () => submitBarProps
|
||||
});
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
var import_vue = require("vue");
|
||||
var import_utils = require("../utils");
|
||||
var import_icon = require("../icon");
|
||||
var import_button = require("../button");
|
||||
var import_use_placeholder = require("../composables/use-placeholder");
|
||||
const [name, bem, t] = (0, import_utils.createNamespace)("submit-bar");
|
||||
const submitBarProps = {
|
||||
tip: String,
|
||||
label: String,
|
||||
price: Number,
|
||||
tipIcon: String,
|
||||
loading: Boolean,
|
||||
currency: (0, import_utils.makeStringProp)("\xA5"),
|
||||
disabled: Boolean,
|
||||
textAlign: String,
|
||||
buttonText: String,
|
||||
buttonType: (0, import_utils.makeStringProp)("danger"),
|
||||
buttonColor: String,
|
||||
suffixLabel: String,
|
||||
placeholder: Boolean,
|
||||
decimalLength: (0, import_utils.makeNumericProp)(2),
|
||||
safeAreaInsetBottom: import_utils.truthProp
|
||||
};
|
||||
var stdin_default = (0, import_vue.defineComponent)({
|
||||
name,
|
||||
props: submitBarProps,
|
||||
emits: ["submit"],
|
||||
setup(props, {
|
||||
emit,
|
||||
slots
|
||||
}) {
|
||||
const root = (0, import_vue.ref)();
|
||||
const renderPlaceholder = (0, import_use_placeholder.usePlaceholder)(root, bem);
|
||||
const renderText = () => {
|
||||
const {
|
||||
price,
|
||||
label,
|
||||
currency,
|
||||
textAlign,
|
||||
suffixLabel,
|
||||
decimalLength
|
||||
} = props;
|
||||
if (typeof price === "number") {
|
||||
const pricePair = (price / 100).toFixed(+decimalLength).split(".");
|
||||
const decimal = decimalLength ? `.${pricePair[1]}` : "";
|
||||
return (0, import_vue.createVNode)("div", {
|
||||
"class": bem("text"),
|
||||
"style": {
|
||||
textAlign
|
||||
}
|
||||
}, [(0, import_vue.createVNode)("span", null, [label || t("label")]), (0, import_vue.createVNode)("span", {
|
||||
"class": bem("price")
|
||||
}, [currency, (0, import_vue.createVNode)("span", {
|
||||
"class": bem("price-integer")
|
||||
}, [pricePair[0]]), decimal]), suffixLabel && (0, import_vue.createVNode)("span", {
|
||||
"class": bem("suffix-label")
|
||||
}, [suffixLabel])]);
|
||||
}
|
||||
};
|
||||
const renderTip = () => {
|
||||
var _a;
|
||||
const {
|
||||
tip,
|
||||
tipIcon
|
||||
} = props;
|
||||
if (slots.tip || tip) {
|
||||
return (0, import_vue.createVNode)("div", {
|
||||
"class": bem("tip")
|
||||
}, [tipIcon && (0, import_vue.createVNode)(import_icon.Icon, {
|
||||
"class": bem("tip-icon"),
|
||||
"name": tipIcon
|
||||
}, null), tip && (0, import_vue.createVNode)("span", {
|
||||
"class": bem("tip-text")
|
||||
}, [tip]), (_a = slots.tip) == null ? void 0 : _a.call(slots)]);
|
||||
}
|
||||
};
|
||||
const onClickButton = () => emit("submit");
|
||||
const renderButton = () => {
|
||||
if (slots.button) {
|
||||
return slots.button();
|
||||
}
|
||||
return (0, import_vue.createVNode)(import_button.Button, {
|
||||
"round": true,
|
||||
"type": props.buttonType,
|
||||
"text": props.buttonText,
|
||||
"class": bem("button", props.buttonType),
|
||||
"color": props.buttonColor,
|
||||
"loading": props.loading,
|
||||
"disabled": props.disabled,
|
||||
"onClick": onClickButton
|
||||
}, null);
|
||||
};
|
||||
const renderSubmitBar = () => {
|
||||
var _a, _b;
|
||||
return (0, import_vue.createVNode)("div", {
|
||||
"ref": root,
|
||||
"class": [bem(), {
|
||||
"van-safe-area-bottom": props.safeAreaInsetBottom
|
||||
}]
|
||||
}, [(_a = slots.top) == null ? void 0 : _a.call(slots), renderTip(), (0, import_vue.createVNode)("div", {
|
||||
"class": bem("bar")
|
||||
}, [(_b = slots.default) == null ? void 0 : _b.call(slots), renderText(), renderButton()])]);
|
||||
};
|
||||
return () => {
|
||||
if (props.placeholder) {
|
||||
return renderPlaceholder(renderSubmitBar);
|
||||
}
|
||||
return renderSubmitBar();
|
||||
};
|
||||
}
|
||||
});
|
||||
1
node_modules/vant/lib/submit-bar/index.css
generated
vendored
Normal file
1
node_modules/vant/lib/submit-bar/index.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
:root,:host{--van-submit-bar-height: 50px;--van-submit-bar-z-index: 100;--van-submit-bar-background: var(--van-background-2);--van-submit-bar-button-width: 110px;--van-submit-bar-price-color: var(--van-danger-color);--van-submit-bar-price-font-size: var(--van-font-size-sm);--van-submit-bar-price-integer-font-size: 20px;--van-submit-bar-price-font: var(--van-price-font);--van-submit-bar-text-color: var(--van-text-color);--van-submit-bar-text-font-size: var(--van-font-size-md);--van-submit-bar-tip-padding: var(--van-padding-xs) var(--van-padding-sm);--van-submit-bar-tip-font-size: var(--van-font-size-sm);--van-submit-bar-tip-line-height: 1.5;--van-submit-bar-tip-color: var(--van-orange-dark);--van-submit-bar-tip-background: var(--van-orange-light);--van-submit-bar-tip-icon-size: 12px;--van-submit-bar-button-height: 40px;--van-submit-bar-padding: 0 var(--van-padding-md)}.van-submit-bar{position:fixed;bottom:0;left:0;z-index:var(--van-submit-bar-z-index);width:100%;background:var(--van-submit-bar-background);-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:var(--van-submit-bar-tip-padding);color:var(--van-submit-bar-tip-color);font-size:var(--van-submit-bar-tip-font-size);line-height:var(--van-submit-bar-tip-line-height);background:var(--van-submit-bar-tip-background)}.van-submit-bar__tip-icon{margin-right:var(--van-padding-base);font-size:var(--van-submit-bar-tip-icon-size);vertical-align:middle}.van-submit-bar__tip-text{vertical-align:middle}.van-submit-bar__bar{display:flex;align-items:center;justify-content:flex-end;height:var(--van-submit-bar-height);padding:var(--van-submit-bar-padding);font-size:var(--van-submit-bar-text-font-size)}.van-submit-bar__text{flex:1;padding-right:var(--van-padding-sm);color:var(--van-submit-bar-text-color);text-align:right}.van-submit-bar__text span{display:inline-block}.van-submit-bar__suffix-label{margin-left:var(--van-padding-base);font-weight:var(--van-font-bold)}.van-submit-bar__price{color:var(--van-submit-bar-price-color);font-weight:var(--van-font-bold);font-size:var(--van-submit-bar-price-font-size);margin-left:var(--van-padding-base)}.van-submit-bar__price-integer{font-size:var(--van-submit-bar-price-integer-font-size);font-family:var(--van-submit-bar-price-font)}.van-submit-bar__button{width:var(--van-submit-bar-button-width);height:var(--van-submit-bar-button-height);font-weight:var(--van-font-bold);border:none}.van-submit-bar__button--danger{background:var(--van-gradient-red)}
|
||||
76
node_modules/vant/lib/submit-bar/index.d.ts
generated
vendored
Normal file
76
node_modules/vant/lib/submit-bar/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
export declare const SubmitBar: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
tip: StringConstructor;
|
||||
label: StringConstructor;
|
||||
price: NumberConstructor;
|
||||
tipIcon: StringConstructor;
|
||||
loading: BooleanConstructor;
|
||||
currency: {
|
||||
type: import("vue").PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
disabled: BooleanConstructor;
|
||||
textAlign: import("vue").PropType<import("./SubmitBar").SubmitBarTextAlign>;
|
||||
buttonText: StringConstructor;
|
||||
buttonType: {
|
||||
type: import("vue").PropType<import("..").ButtonType>;
|
||||
default: import("..").ButtonType;
|
||||
};
|
||||
buttonColor: StringConstructor;
|
||||
suffixLabel: StringConstructor;
|
||||
placeholder: BooleanConstructor;
|
||||
decimalLength: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
safeAreaInsetBottom: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "submit"[], "submit", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
tip: StringConstructor;
|
||||
label: StringConstructor;
|
||||
price: NumberConstructor;
|
||||
tipIcon: StringConstructor;
|
||||
loading: BooleanConstructor;
|
||||
currency: {
|
||||
type: import("vue").PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
disabled: BooleanConstructor;
|
||||
textAlign: import("vue").PropType<import("./SubmitBar").SubmitBarTextAlign>;
|
||||
buttonText: StringConstructor;
|
||||
buttonType: {
|
||||
type: import("vue").PropType<import("..").ButtonType>;
|
||||
default: import("..").ButtonType;
|
||||
};
|
||||
buttonColor: StringConstructor;
|
||||
suffixLabel: StringConstructor;
|
||||
placeholder: BooleanConstructor;
|
||||
decimalLength: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
safeAreaInsetBottom: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
onSubmit?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
disabled: boolean;
|
||||
placeholder: boolean;
|
||||
safeAreaInsetBottom: boolean;
|
||||
loading: boolean;
|
||||
currency: string;
|
||||
decimalLength: string | number;
|
||||
buttonType: import("..").ButtonType;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
||||
export default SubmitBar;
|
||||
export { submitBarProps } from './SubmitBar';
|
||||
export type { SubmitBarProps, SubmitBarTextAlign } from './SubmitBar';
|
||||
export type { SubmitBarThemeVars } from './types';
|
||||
declare module 'vue' {
|
||||
interface GlobalComponents {
|
||||
VanSubmitBar: typeof SubmitBar;
|
||||
}
|
||||
}
|
||||
39
node_modules/vant/lib/submit-bar/index.js
generated
vendored
Normal file
39
node_modules/vant/lib/submit-bar/index.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var stdin_exports = {};
|
||||
__export(stdin_exports, {
|
||||
SubmitBar: () => SubmitBar,
|
||||
default: () => stdin_default,
|
||||
submitBarProps: () => import_SubmitBar2.submitBarProps
|
||||
});
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
var import_utils = require("../utils");
|
||||
var import_SubmitBar = __toESM(require("./SubmitBar"));
|
||||
var import_SubmitBar2 = require("./SubmitBar");
|
||||
const SubmitBar = (0, import_utils.withInstall)(import_SubmitBar.default);
|
||||
var stdin_default = SubmitBar;
|
||||
1
node_modules/vant/lib/submit-bar/style/index.d.ts
generated
vendored
Normal file
1
node_modules/vant/lib/submit-bar/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
6
node_modules/vant/lib/submit-bar/style/index.js
generated
vendored
Normal file
6
node_modules/vant/lib/submit-bar/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
require("../../style/base.css");
|
||||
require("../../badge/index.css");
|
||||
require("../../icon/index.css");
|
||||
require("../../loading/index.css");
|
||||
require("../../button/index.css");
|
||||
require("../index.css");
|
||||
20
node_modules/vant/lib/submit-bar/types.d.ts
generated
vendored
Normal file
20
node_modules/vant/lib/submit-bar/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
export type SubmitBarThemeVars = {
|
||||
submitBarHeight?: string;
|
||||
submitBarZIndex?: number | string;
|
||||
submitBarBackground?: string;
|
||||
submitBarButtonWidth?: string;
|
||||
submitBarPriceColor?: string;
|
||||
submitBarPriceFontSize?: string;
|
||||
submitBarPriceIntegerFontSize?: string;
|
||||
submitBarPriceFont?: string;
|
||||
submitBarTextColor?: string;
|
||||
submitBarTextFontSize?: string;
|
||||
submitBarTipPadding?: string;
|
||||
submitBarTipFontSize?: string;
|
||||
submitBarTipLineHeight?: number | string;
|
||||
submitBarTipColor?: string;
|
||||
submitBarTipBackground?: string;
|
||||
submitBarTipIconSize?: string;
|
||||
submitBarButtonHeight?: string;
|
||||
submitBarPadding?: string;
|
||||
};
|
||||
15
node_modules/vant/lib/submit-bar/types.js
generated
vendored
Normal file
15
node_modules/vant/lib/submit-bar/types.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var stdin_exports = {};
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
Reference in New Issue
Block a user