mirror of
https://github.com/talktao/Vue3-Vite-Vant-TS-H5.git
synced 2025-04-06 03:57:55 +08:00
style:代码格式更改
This commit is contained in:
parent
0bcc6fbbf4
commit
f988dfb0c4
@ -4,30 +4,30 @@
|
|||||||
*/
|
*/
|
||||||
import { Button, Tabbar, TabbarItem, Sticky, NavBar, Icon, Search, DropdownMenu, DropdownItem, Image, Lazyload, Tabs, Tab, Toast, Field, Cell, CellGroup, Form, List } from 'vant'
|
import { Button, Tabbar, TabbarItem, Sticky, NavBar, Icon, Search, DropdownMenu, DropdownItem, Image, Lazyload, Tabs, Tab, Toast, Field, Cell, CellGroup, Form, List } from 'vant'
|
||||||
const pluginsVant = [
|
const pluginsVant = [
|
||||||
Button,
|
Button,
|
||||||
Tabbar,
|
Tabbar,
|
||||||
TabbarItem,
|
TabbarItem,
|
||||||
Sticky,
|
Sticky,
|
||||||
NavBar,
|
NavBar,
|
||||||
Icon,
|
Icon,
|
||||||
Search,
|
Search,
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownItem,
|
DropdownItem,
|
||||||
Image,
|
Image,
|
||||||
Lazyload,
|
Lazyload,
|
||||||
Tabs,
|
Tabs,
|
||||||
Tab,
|
Tab,
|
||||||
Toast,
|
Toast,
|
||||||
Field,
|
Field,
|
||||||
Cell,
|
Cell,
|
||||||
CellGroup,
|
CellGroup,
|
||||||
Form,
|
Form,
|
||||||
List
|
List
|
||||||
]
|
]
|
||||||
export const vantPlugins = {
|
export const vantPlugins = {
|
||||||
install: function(vm) {
|
install: function(vm) {
|
||||||
pluginsVant.forEach((item:any) => {
|
pluginsVant.forEach((item:any) => {
|
||||||
vm.component(item.name, item);
|
vm.component(item.name, item);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
@ -14,8 +14,6 @@ const childRoutes = Object.keys(viewRouterModules).map((path)=>{
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(childRoutes,'childRouter');
|
|
||||||
|
|
||||||
// 根路由
|
// 根路由
|
||||||
const rootRoutes = Object.keys(mainRouterModules).map((path) => {
|
const rootRoutes = Object.keys(mainRouterModules).map((path) => {
|
||||||
const name = path.match(/\.\.\/layout\/(.*)\.vue$/)[1].toLowerCase();
|
const name = path.match(/\.\.\/layout\/(.*)\.vue$/)[1].toLowerCase();
|
||||||
@ -33,8 +31,6 @@ const rootRoutes = Object.keys(mainRouterModules).map((path) => {
|
|||||||
|
|
||||||
const routes: Array<RouteRecordRaw> = rootRoutes
|
const routes: Array<RouteRecordRaw> = rootRoutes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(),
|
history: createWebHashHistory(),
|
||||||
routes,
|
routes,
|
||||||
|
@ -26,15 +26,6 @@
|
|||||||
}
|
}
|
||||||
const { list } = useShowList()
|
const { list } = useShowList()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const store = useStore()
|
|
||||||
// const name = computed(() => store.state.userNmae)
|
|
||||||
// const handleBtn = () =>{
|
|
||||||
// store.commit('getUserNmae', 'Vue')
|
|
||||||
// }
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -50,9 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-5">
|
<div class="py-5">
|
||||||
<van-list
|
<van-list finished-text="没有更多了">
|
||||||
finished-text="没有更多了"
|
|
||||||
>
|
|
||||||
<van-cell v-for="(item, index) in list" :key="index" :title="item.title" icon="success" />
|
<van-cell v-for="(item, index) in list" :key="index" :title="item.title" icon="success" />
|
||||||
</van-list>
|
</van-list>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user