chore: 更新底层引擎
This commit is contained in:
		
							parent
							
								
									db10bb6a6c
								
							
						
					
					
						commit
						99015ecbd2
					
				| @ -13,17 +13,17 @@ | ||||
|     "clean": "rimraf node_modules" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@vtj/core": "^0.10.9", | ||||
|     "@vtj/designer": "0.10.9", | ||||
|     "@vtj/icons": "0.10.9", | ||||
|     "@vtj/local": "^0.10.9", | ||||
|     "@vtj/materials": "^0.10.9", | ||||
|     "@vtj/core": "^0.10.10", | ||||
|     "@vtj/designer": "0.10.10", | ||||
|     "@vtj/icons": "0.10.10", | ||||
|     "@vtj/local": "^0.10.10", | ||||
|     "@vtj/materials": "^0.10.10", | ||||
|     "@vtj/node": "0.10.2", | ||||
|     "@vtj/pro": "^0.10.9", | ||||
|     "@vtj/renderer": "^0.10.9", | ||||
|     "@vtj/ui": "^0.10.9", | ||||
|     "@vtj/utils": "0.10.9", | ||||
|     "@vtj/web": "^0.10.9", | ||||
|     "@vtj/pro": "^0.10.10", | ||||
|     "@vtj/renderer": "^0.10.10", | ||||
|     "@vtj/ui": "^0.10.10", | ||||
|     "@vtj/utils": "0.10.10", | ||||
|     "@vtj/web": "^0.10.10", | ||||
|     "axios": "^1.8.1", | ||||
|     "element-plus": "^2.9.4", | ||||
|     "licia-es": "^1.46.0", | ||||
|  | ||||
| @ -8,7 +8,7 @@ export const pinia = createPinia(); | ||||
| // 用户模块 store
 | ||||
| export const useUserStore = defineStore('user', () => { | ||||
|   // 状态定义
 | ||||
|   const token = ref<string>(localStorage.getItem('token') || ''); | ||||
|   const token = ref<string>(localStorage.getItem('y-code-access-token') || ''); | ||||
|   const userProfile = ref<null>(null); | ||||
| 
 | ||||
|   // getter 计算属性
 | ||||
| @ -17,14 +17,14 @@ export const useUserStore = defineStore('user', () => { | ||||
|   // 同步 action
 | ||||
|   const setToken = (newToken: string) => { | ||||
|     token.value = newToken; | ||||
|     localStorage.setItem('token', newToken); | ||||
|     localStorage.setItem('y-code-access-token', newToken); | ||||
|   }; | ||||
| 
 | ||||
|   // 清理方法
 | ||||
|   const logout = () => { | ||||
|     token.value = ''; | ||||
|     userProfile.value = null; | ||||
|     localStorage.removeItem('token'); | ||||
|     localStorage.removeItem('y-code-access-token'); | ||||
|   }; | ||||
| 
 | ||||
|   return { | ||||
|  | ||||
| @ -60,7 +60,10 @@ onMounted(async () => { | ||||
| </script> | ||||
| 
 | ||||
| <template> | ||||
|   <div class="designer-container" ref="container"></div> | ||||
|   <div | ||||
|     class="designer-container" | ||||
|     ref="container" | ||||
|     :token="userStore.token"></div> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <template> | ||||
|   <component v-if="renderer" :is="renderer"></component> | ||||
|   <component v-if="renderer" :is="renderer" v-bind="$attrs"></component> | ||||
| </template> | ||||
| <script lang="ts" setup> | ||||
| import { ref, getCurrentInstance } from 'vue'; | ||||
|  | ||||
| @ -27,7 +27,7 @@ instance.interceptors.response.use( | ||||
|     if (response.data.code === 401) { | ||||
|       const userStore = useUserStore(); | ||||
|       console.log('用户未授权或登录已过期,即将跳转...'); | ||||
|       userStore.logout(); | ||||
|       // userStore.logout();
 | ||||
|       // 返回一个永远不会resolve的Promise,防止后续代码执行
 | ||||
|       return new Promise(() => {}); | ||||
|     } | ||||
|  | ||||
| @ -29,7 +29,7 @@ const routes: Array<RouteRecordRaw> = [ | ||||
|             // degrade: true,
 | ||||
|             applicationId: LOW_CODE_APPLICATION_ID, | ||||
|             projectId: LOW_CODE_PROJECT_ID, | ||||
|             fileId: 'b91ra0ej4', | ||||
|             fileId: '1hsd0407hf', | ||||
|           }, | ||||
|         }, | ||||
|         component: () => import('@/components/renderer-adapter/index.vue'), | ||||
|  | ||||
| @ -34,6 +34,26 @@ const routes: Array<RouteRecordRaw> = [ | ||||
|         }, | ||||
|         component: () => import('@/components/renderer-adapter/index.vue'), | ||||
|       }, | ||||
|       { | ||||
|         path: 'file', | ||||
|         name: `${moduleName}-file`, | ||||
|         meta: { | ||||
|           title: 'dsl 文件列表', | ||||
|           keepAlive: true, | ||||
|           icon: 'ant-design:file', | ||||
|           app: { | ||||
|             url: Y_CODE_RENDERER_URL, | ||||
|             name: 'y-code-platform-project-file', | ||||
|             // sync: true,
 | ||||
|             // alive: true,
 | ||||
|             // degrade: true,
 | ||||
|             applicationId: LOW_CODE_APPLICATION_ID, | ||||
|             projectId: LOW_CODE_PROJECT_ID, | ||||
|             fileId: '7pftwojzu', | ||||
|           }, | ||||
|         }, | ||||
|         component: () => import('@/components/renderer-adapter/index.vue'), | ||||
|       }, | ||||
|     ], | ||||
|   }, | ||||
| ]; | ||||
|  | ||||
| @ -11,7 +11,7 @@ const routes: Array<RouteRecordRaw> = [ | ||||
|     name: moduleName, | ||||
|     meta: { | ||||
|       title: '静态文件管理', | ||||
|       icon: 'ant-design:file-outlined', | ||||
|       icon: 'ant-design:file', | ||||
|     }, | ||||
|     children: [ | ||||
|       { | ||||
| @ -20,7 +20,7 @@ const routes: Array<RouteRecordRaw> = [ | ||||
|         meta: { | ||||
|           title: '静态文件列表', | ||||
|           keepAlive: true, | ||||
|           icon: 'ant-design:list', | ||||
|           icon: 'ant-design:file', | ||||
|           app: { | ||||
|             url: Y_CODE_RENDERER_URL, | ||||
|             name: 'y-code-platform-application-list', | ||||
|  | ||||
| @ -18,14 +18,14 @@ | ||||
|     "@sy/low-code-shared": "workspace:*", | ||||
|     "@sy/web-vitals": "workspace:*", | ||||
|     "@tanstack/vue-query": "^5.66.9", | ||||
|     "@vtj/core": "^0.10.9", | ||||
|     "@vtj/icons": "0.10.9", | ||||
|     "@vtj/materials": "^0.10.9", | ||||
|     "@vtj/pro": "^0.10.9", | ||||
|     "@vtj/renderer": "^0.10.9", | ||||
|     "@vtj/ui": "^0.10.9", | ||||
|     "@vtj/web": "^0.10.9", | ||||
|     "@vtj/utils": "^0.10.9", | ||||
|     "@vtj/core": "^0.10.10", | ||||
|     "@vtj/icons": "0.10.10", | ||||
|     "@vtj/materials": "^0.10.10", | ||||
|     "@vtj/pro": "^0.10.10", | ||||
|     "@vtj/renderer": "^0.10.10", | ||||
|     "@vtj/ui": "^0.10.10", | ||||
|     "@vtj/utils": "^0.10.10", | ||||
|     "@vtj/web": "^0.10.10", | ||||
|     "axios": "^1.8.1", | ||||
|     "core-js": "^3.40.0", | ||||
|     "element-plus": "^2.9.4", | ||||
| @ -36,10 +36,10 @@ | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@farmfe/cli": "^1.0.4", | ||||
|     "@vtj/cli": "^0.10.2", | ||||
|     "@farmfe/core": "^1.6.6", | ||||
|     "@sy/vite-plugin-http2-proxy": "workspace:*", | ||||
|     "@vitejs/plugin-vue": "^5.2.1", | ||||
|     "@vtj/cli": "^0.10.2", | ||||
|     "vite-plugin-mkcert": "^1.17.6" | ||||
|   } | ||||
| } | ||||
| @ -37,7 +37,7 @@ const { data: file, isFetching } = useQuery({ | ||||
|     await postmate.then((parent) => { | ||||
|       parent.emit('some-event', 'y-code-renderer is ready') | ||||
|       Object.assign(model, parent.model) | ||||
|       // console.log('model', model) | ||||
|       localStorage.setItem('y-code-access-token', model.accessToken || '') | ||||
|     }) | ||||
| 
 | ||||
|     return getFile(model.fileId).then(() => { | ||||
|  | ||||
							
								
								
									
										541
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										541
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 wangxuefeng
						wangxuefeng