mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2026-07-06 00:01:08 +08:00
重构模型插件,利用@vueuse/core的createSharedComposable实现模型状态共享 移除默认容器模板,改为使用JSX实现的getRootContainer组件 优化路由初始化逻辑,将beforeRender处理移至根容器组件
34 lines
568 B
Vue
34 lines
568 B
Vue
<template>
|
|
<div class="page">
|
|
home
|
|
<FButton class="m-2" @click="go">
|
|
Button
|
|
</FButton>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { defineRouteMeta, useModel, useRouter } from '@fesjs/fes';
|
|
import { FButton } from '@fesjs/fes-design';
|
|
|
|
defineRouteMeta({
|
|
name: 'index',
|
|
title: '$test.test',
|
|
});
|
|
|
|
const initialState = useModel('@@initialState');
|
|
|
|
console.log(initialState);
|
|
|
|
const router = useRouter();
|
|
function go() {
|
|
router.push('/editor');
|
|
}
|
|
</script>
|
|
|
|
<style lang="less">
|
|
.page {
|
|
height: 1000px;
|
|
}
|
|
</style>
|