feat(vite): 引入 @uni-helper/vite-plugin-uni-layouts
This commit is contained in:
6
src/layouts/default.vue
Normal file
6
src/layouts/default.vue
Normal file
@@ -0,0 +1,6 @@
|
||||
<template>
|
||||
<view class="default-layout">
|
||||
<slot />
|
||||
<view class="mx-auto mt-5 text-center text-sm opacity-25"> [Default Layout] </view>
|
||||
</view>
|
||||
</template>
|
||||
6
src/layouts/home.vue
Normal file
6
src/layouts/home.vue
Normal file
@@ -0,0 +1,6 @@
|
||||
<template>
|
||||
<view class="home-layout">
|
||||
<slot />
|
||||
<view class="mx-auto mt-5 text-center text-sm opacity-25"> [Home Layout] </view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -3,6 +3,7 @@
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"type": "home",
|
||||
"layout": "home",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我才是标题"
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
<route lang="json">
|
||||
{
|
||||
"layout": "home",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我才是标题"
|
||||
}
|
||||
@@ -25,6 +26,9 @@ import { useCountStore } from '@/store/count'
|
||||
|
||||
const countStore = useCountStore()
|
||||
const title = ref('Hello')
|
||||
|
||||
const uniLayout = ref()
|
||||
console.log(uniLayout)
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user