chore: 悦码v1增加环境配置
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -12,7 +12,6 @@ const app = createApp(App);
|
||||
|
||||
// 批量注册组件
|
||||
Object.entries(VtjUI).forEach(([name, component]) => {
|
||||
console.log("name", name, component);
|
||||
app.component(name, component);
|
||||
});
|
||||
app
|
||||
|
||||
Reference in New Issue
Block a user