first commit
This commit is contained in:
90
node_modules/vant/es/tabbar/Tabbar.d.ts
generated
vendored
Normal file
90
node_modules/vant/es/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;
|
||||
84
node_modules/vant/es/tabbar/Tabbar.mjs
generated
vendored
Normal file
84
node_modules/vant/es/tabbar/Tabbar.mjs
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
import { ref, defineComponent, createVNode as _createVNode } from "vue";
|
||||
import { truthProp, numericProp, getZIndexStyle, createNamespace, callInterceptor, makeNumericProp, BORDER_TOP_BOTTOM } from "../utils/index.mjs";
|
||||
import { useChildren } from "@vant/use";
|
||||
import { usePlaceholder } from "../composables/use-placeholder.mjs";
|
||||
const [name, bem] = createNamespace("tabbar");
|
||||
const tabbarProps = {
|
||||
route: Boolean,
|
||||
fixed: truthProp,
|
||||
border: truthProp,
|
||||
zIndex: numericProp,
|
||||
placeholder: Boolean,
|
||||
activeColor: String,
|
||||
beforeChange: Function,
|
||||
inactiveColor: String,
|
||||
modelValue: makeNumericProp(0),
|
||||
safeAreaInsetBottom: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
}
|
||||
};
|
||||
const TABBAR_KEY = Symbol(name);
|
||||
var stdin_default = defineComponent({
|
||||
name,
|
||||
props: tabbarProps,
|
||||
emits: ["change", "update:modelValue"],
|
||||
setup(props, {
|
||||
emit,
|
||||
slots
|
||||
}) {
|
||||
const root = ref();
|
||||
const {
|
||||
linkChildren
|
||||
} = useChildren(TABBAR_KEY);
|
||||
const renderPlaceholder = 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 _createVNode("div", {
|
||||
"ref": root,
|
||||
"role": "tablist",
|
||||
"style": getZIndexStyle(zIndex),
|
||||
"class": [bem({
|
||||
fixed
|
||||
}), {
|
||||
[BORDER_TOP_BOTTOM]: border,
|
||||
"van-safe-area-bottom": enableSafeArea()
|
||||
}]
|
||||
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
||||
};
|
||||
const setActive = (active, afterChange) => {
|
||||
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();
|
||||
};
|
||||
}
|
||||
});
|
||||
export {
|
||||
TABBAR_KEY,
|
||||
stdin_default as default,
|
||||
tabbarProps
|
||||
};
|
||||
1
node_modules/vant/es/tabbar/index.css
generated
vendored
Normal file
1
node_modules/vant/es/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/es/tabbar/index.d.ts
generated
vendored
Normal file
66
node_modules/vant/es/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;
|
||||
}
|
||||
}
|
||||
10
node_modules/vant/es/tabbar/index.mjs
generated
vendored
Normal file
10
node_modules/vant/es/tabbar/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { withInstall } from "../utils/index.mjs";
|
||||
import _Tabbar from "./Tabbar.mjs";
|
||||
const Tabbar = withInstall(_Tabbar);
|
||||
var stdin_default = Tabbar;
|
||||
import { tabbarProps } from "./Tabbar.mjs";
|
||||
export {
|
||||
Tabbar,
|
||||
stdin_default as default,
|
||||
tabbarProps
|
||||
};
|
||||
1
node_modules/vant/es/tabbar/style/index.d.ts
generated
vendored
Normal file
1
node_modules/vant/es/tabbar/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
2
node_modules/vant/es/tabbar/style/index.mjs
generated
vendored
Normal file
2
node_modules/vant/es/tabbar/style/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import "../../style/base.css";
|
||||
import "../index.css";
|
||||
5
node_modules/vant/es/tabbar/types.d.ts
generated
vendored
Normal file
5
node_modules/vant/es/tabbar/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export type TabbarThemeVars = {
|
||||
tabbarHeight?: string;
|
||||
tabbarZIndex?: number | string;
|
||||
tabbarBackground?: string;
|
||||
};
|
||||
0
node_modules/vant/es/tabbar/types.mjs
generated
vendored
Normal file
0
node_modules/vant/es/tabbar/types.mjs
generated
vendored
Normal file
Reference in New Issue
Block a user