1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <template>
- <view class="content">
- <home v-if="tabbarActive === 'home'" @switch-tab="tabbarActive = 'exhibitor'"/>
- <exhibitor v-if="tabbarActive === 'exhibitor'" />
- <activity v-if="tabbarActive === 'activity'" />
- <user v-if="tabbarActive === 'user'" />
- <tab-bar :active.sync="tabbarActive"></tab-bar>
- </view>
- </template>
- <script>
- import TabBar from '@/components/layout/tab-bar.vue'
- import Home from '@/pages/index/home.vue'
- import Exhibitor from '@/pages/exhibitor/index.vue'
- import Activity from '@/pages/activity/index.vue'
- import User from '@/pages/user/index.vue'
- export default {
- options: {
- styleIsolation: 'shared'
- },
- components: {
- TabBar,
- Home,
- Exhibitor,
- Activity,
- User
- },
- data() {
- return {
- tabbarActive: 'home'
- }
- },
- created() {
- uni.loadFontFace({
- family: 'Poppins',
- source: 'url("https://oss.starify.cn/test/Poppins-SemiBold.ttf")',
- desc: {
- fontPath: '', // 本地字体文件的路径
- },
- success: () => {
- console.log('字体加载成功');
- },
- fail: (e) => {
- console.log(e)
- console.error('字体加载失败');
- },
- })
- },
- methods: {
- onClickSearch() {
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- </style>
|