first commit
This commit is contained in:
90
node_modules/vant/lib/tabbar/Tabbar.d.ts
generated
vendored
Normal file
90
node_modules/vant/lib/tabbar/Tabbar.d.ts
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
|
||||
import { type Numeric, type Interceptor } from '../utils';
|
||||
export declare const tabbarProps: {
|
||||
route: BooleanConstructor;
|
||||
fixed: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
border: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
zIndex: (NumberConstructor | StringConstructor)[];
|
||||
placeholder: BooleanConstructor;
|
||||
activeColor: StringConstructor;
|
||||
beforeChange: PropType<Interceptor>;
|
||||
inactiveColor: StringConstructor;
|
||||
modelValue: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
safeAreaInsetBottom: {
|
||||
type: PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
};
|
||||
export type TabbarProps = ExtractPropTypes<typeof tabbarProps>;
|
||||
export type TabbarProvide = {
|
||||
props: TabbarProps;
|
||||
setActive: (active: Numeric, afterChange: () => void) => void;
|
||||
};
|
||||
export declare const TABBAR_KEY: InjectionKey<TabbarProvide>;
|
||||
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
||||
route: BooleanConstructor;
|
||||
fixed: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
border: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
zIndex: (NumberConstructor | StringConstructor)[];
|
||||
placeholder: BooleanConstructor;
|
||||
activeColor: StringConstructor;
|
||||
beforeChange: PropType<Interceptor>;
|
||||
inactiveColor: StringConstructor;
|
||||
modelValue: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
safeAreaInsetBottom: {
|
||||
type: PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
||||
route: BooleanConstructor;
|
||||
fixed: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
border: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
zIndex: (NumberConstructor | StringConstructor)[];
|
||||
placeholder: BooleanConstructor;
|
||||
activeColor: StringConstructor;
|
||||
beforeChange: PropType<Interceptor>;
|
||||
inactiveColor: StringConstructor;
|
||||
modelValue: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
safeAreaInsetBottom: {
|
||||
type: PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
onChange?: ((...args: any[]) => any) | undefined;
|
||||
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
fixed: boolean;
|
||||
border: boolean;
|
||||
modelValue: string | number;
|
||||
placeholder: boolean;
|
||||
safeAreaInsetBottom: boolean | null;
|
||||
route: boolean;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
export default _default;
|
||||
103
node_modules/vant/lib/tabbar/Tabbar.js
generated
vendored
Normal file
103
node_modules/vant/lib/tabbar/Tabbar.js
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
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, {
|
||||
TABBAR_KEY: () => TABBAR_KEY,
|
||||
default: () => stdin_default,
|
||||
tabbarProps: () => tabbarProps
|
||||
});
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
var import_vue = require("vue");
|
||||
var import_utils = require("../utils");
|
||||
var import_use = require("@vant/use");
|
||||
var import_use_placeholder = require("../composables/use-placeholder");
|
||||
const [name, bem] = (0, import_utils.createNamespace)("tabbar");
|
||||
const tabbarProps = {
|
||||
route: Boolean,
|
||||
fixed: import_utils.truthProp,
|
||||
border: import_utils.truthProp,
|
||||
zIndex: import_utils.numericProp,
|
||||
placeholder: Boolean,
|
||||
activeColor: String,
|
||||
beforeChange: Function,
|
||||
inactiveColor: String,
|
||||
modelValue: (0, import_utils.makeNumericProp)(0),
|
||||
safeAreaInsetBottom: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
}
|
||||
};
|
||||
const TABBAR_KEY = Symbol(name);
|
||||
var stdin_default = (0, import_vue.defineComponent)({
|
||||
name,
|
||||
props: tabbarProps,
|
||||
emits: ["change", "update:modelValue"],
|
||||
setup(props, {
|
||||
emit,
|
||||
slots
|
||||
}) {
|
||||
const root = (0, import_vue.ref)();
|
||||
const {
|
||||
linkChildren
|
||||
} = (0, import_use.useChildren)(TABBAR_KEY);
|
||||
const renderPlaceholder = (0, import_use_placeholder.usePlaceholder)(root, bem);
|
||||
const enableSafeArea = () => {
|
||||
var _a;
|
||||
return (_a = props.safeAreaInsetBottom) != null ? _a : props.fixed;
|
||||
};
|
||||
const renderTabbar = () => {
|
||||
var _a;
|
||||
const {
|
||||
fixed,
|
||||
zIndex,
|
||||
border
|
||||
} = props;
|
||||
return (0, import_vue.createVNode)("div", {
|
||||
"ref": root,
|
||||
"role": "tablist",
|
||||
"style": (0, import_utils.getZIndexStyle)(zIndex),
|
||||
"class": [bem({
|
||||
fixed
|
||||
}), {
|
||||
[import_utils.BORDER_TOP_BOTTOM]: border,
|
||||
"van-safe-area-bottom": enableSafeArea()
|
||||
}]
|
||||
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
||||
};
|
||||
const setActive = (active, afterChange) => {
|
||||
(0, import_utils.callInterceptor)(props.beforeChange, {
|
||||
args: [active],
|
||||
done() {
|
||||
emit("update:modelValue", active);
|
||||
emit("change", active);
|
||||
afterChange();
|
||||
}
|
||||
});
|
||||
};
|
||||
linkChildren({
|
||||
props,
|
||||
setActive
|
||||
});
|
||||
return () => {
|
||||
if (props.fixed && props.placeholder) {
|
||||
return renderPlaceholder(renderTabbar);
|
||||
}
|
||||
return renderTabbar();
|
||||
};
|
||||
}
|
||||
});
|
||||
1
node_modules/vant/lib/tabbar/index.css
generated
vendored
Normal file
1
node_modules/vant/lib/tabbar/index.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
:root,:host{--van-tabbar-height: 50px;--van-tabbar-z-index: 1;--van-tabbar-background: var(--van-background-2)}.van-tabbar{z-index:var(--van-tabbar-z-index);display:flex;box-sizing:content-box;width:100%;height:var(--van-tabbar-height);background:var(--van-tabbar-background)}.van-tabbar--fixed{position:fixed;bottom:0;left:0}
|
||||
66
node_modules/vant/lib/tabbar/index.d.ts
generated
vendored
Normal file
66
node_modules/vant/lib/tabbar/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
export declare const Tabbar: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
route: BooleanConstructor;
|
||||
fixed: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
border: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
zIndex: (NumberConstructor | StringConstructor)[];
|
||||
placeholder: BooleanConstructor;
|
||||
activeColor: StringConstructor;
|
||||
beforeChange: import("vue").PropType<import("../utils").Interceptor>;
|
||||
inactiveColor: StringConstructor;
|
||||
modelValue: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
safeAreaInsetBottom: {
|
||||
type: import("vue").PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
route: BooleanConstructor;
|
||||
fixed: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
border: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
zIndex: (NumberConstructor | StringConstructor)[];
|
||||
placeholder: BooleanConstructor;
|
||||
activeColor: StringConstructor;
|
||||
beforeChange: import("vue").PropType<import("../utils").Interceptor>;
|
||||
inactiveColor: StringConstructor;
|
||||
modelValue: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
safeAreaInsetBottom: {
|
||||
type: import("vue").PropType<boolean | null>;
|
||||
default: null;
|
||||
};
|
||||
}>> & Readonly<{
|
||||
onChange?: ((...args: any[]) => any) | undefined;
|
||||
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
fixed: boolean;
|
||||
border: boolean;
|
||||
modelValue: string | number;
|
||||
placeholder: boolean;
|
||||
safeAreaInsetBottom: boolean | null;
|
||||
route: boolean;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
||||
export default Tabbar;
|
||||
export { tabbarProps } from './Tabbar';
|
||||
export type { TabbarProps } from './Tabbar';
|
||||
export type { TabbarThemeVars } from './types';
|
||||
declare module 'vue' {
|
||||
interface GlobalComponents {
|
||||
VanTabbar: typeof Tabbar;
|
||||
}
|
||||
}
|
||||
39
node_modules/vant/lib/tabbar/index.js
generated
vendored
Normal file
39
node_modules/vant/lib/tabbar/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, {
|
||||
Tabbar: () => Tabbar,
|
||||
default: () => stdin_default,
|
||||
tabbarProps: () => import_Tabbar2.tabbarProps
|
||||
});
|
||||
module.exports = __toCommonJS(stdin_exports);
|
||||
var import_utils = require("../utils");
|
||||
var import_Tabbar = __toESM(require("./Tabbar"));
|
||||
var import_Tabbar2 = require("./Tabbar");
|
||||
const Tabbar = (0, import_utils.withInstall)(import_Tabbar.default);
|
||||
var stdin_default = Tabbar;
|
||||
1
node_modules/vant/lib/tabbar/style/index.d.ts
generated
vendored
Normal file
1
node_modules/vant/lib/tabbar/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
2
node_modules/vant/lib/tabbar/style/index.js
generated
vendored
Normal file
2
node_modules/vant/lib/tabbar/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
require("../../style/base.css");
|
||||
require("../index.css");
|
||||
5
node_modules/vant/lib/tabbar/types.d.ts
generated
vendored
Normal file
5
node_modules/vant/lib/tabbar/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export type TabbarThemeVars = {
|
||||
tabbarHeight?: string;
|
||||
tabbarZIndex?: number | string;
|
||||
tabbarBackground?: string;
|
||||
};
|
||||
15
node_modules/vant/lib/tabbar/types.js
generated
vendored
Normal file
15
node_modules/vant/lib/tabbar/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