mirror of
https://github.com/talktao/Vue3-Vite-Vant-TS-H5.git
synced 2025-05-01 23:32:44 +08:00
init:vant
This commit is contained in:
parent
812dff161d
commit
eee8740348
31
src/plugins/vant.ts
Normal file
31
src/plugins/vant.ts
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* @author TalkTao
|
||||||
|
* @description 按需引入Vant
|
||||||
|
*/
|
||||||
|
import { Button, Tabbar, TabbarItem, Sticky, NavBar, Icon, Search, DropdownMenu, DropdownItem, Image, Lazyload, Tabs, Tab, Toast, Field, CellGroup, Form } from 'vant'
|
||||||
|
const pluginsVant = [
|
||||||
|
Button,
|
||||||
|
Tabbar,
|
||||||
|
TabbarItem,
|
||||||
|
Sticky,
|
||||||
|
NavBar,
|
||||||
|
Icon,
|
||||||
|
Search,
|
||||||
|
DropdownMenu,
|
||||||
|
DropdownItem,
|
||||||
|
Image,
|
||||||
|
Lazyload,
|
||||||
|
Tabs,
|
||||||
|
Tab,
|
||||||
|
Toast,
|
||||||
|
Field,
|
||||||
|
CellGroup,
|
||||||
|
Form
|
||||||
|
]
|
||||||
|
export const vantPlugins = {
|
||||||
|
install: function(vm) {
|
||||||
|
pluginsVant.forEach((item:any) => {
|
||||||
|
vm.component(item.name, item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user