chore: 悦码v1增加环境配置

This commit is contained in:
wangxuefeng
2025-03-06 10:28:14 +08:00
parent eecc2b1893
commit 9b2c728d4c
27 changed files with 540 additions and 689 deletions

View File

@@ -13,7 +13,11 @@ const renderer = ref()
const lowCodeService = new LowCodeService()
// Postmate 握手协议
const handshake = new Postmate.Model({})
const postmate = new Postmate.Model({
sayHi: (data: any) => {
console.log('sayHi',data)
}
})
// 数据模型
const model = {
@@ -28,8 +32,12 @@ const model = {
const { data: file, isFetching } = useQuery({
queryKey: ['getFile'],
queryFn: async () => {
await handshake.then((parent) => {
// parent.emit('sync-context', 'Hello, World!')
await postmate.then((parent) => {
parent.emit('some-event', 'sync-context!')
parent.emit('some-event', 'sync-context!')
parent.emit('some-event', 'sync-context!')
parent.emit('some-event', 'sync-context!')
Object.assign(model, parent.model)
// console.log('model', model)

View File

@@ -12,7 +12,6 @@ const app = createApp(App);
// 批量注册组件
Object.entries(VtjUI).forEach(([name, component]) => {
console.log("name", name, component);
app.component(name, component);
});
app