soybeanjs / elegant-router Goto Github PK
View Code? Open in Web Editor NEWA plugin to create router elegantly, support Vue, React, Solid and Svelte
A plugin to create router elegantly, support Vue, React, Solid and Svelte
以下是我的 js代码
document.title = XXX
这样设置以后本地是可以看到页面标题变化的,但是部署到服务器上在线在手机看并没有正确显示还是显示的路由表里写死的 title
考虑到微前端的能力,每个模块自身都可以独立运行,可能需要将src/views的视图分割到src/modules/views下面,当时目前pagePatterns貌似不支持这项能力,是否可以支持?
如果目前有菜单树状接口,能和elegant-router做适配吗
请问下目前有办法添加外链
自动生成后的文件中meta中的属性信息是不是需要再手动更改,比如icon、constant、roles等。
我把一个页面的 index.vue 修改为 [id].vue 后 routes.ts自动被清空了,而且项目无法启动
[id].vue 可以接收一个参数,且能自动生成相应的router配置
当修改elegant-router.ts 下路由的参数名称和添加参数名称时重启项目修改的部分会被重置
请问如何定义多个参数
例如修改那部分代码可以支持多参数 或者 在哪里可以配置某些路由配置重启项目不被删除(多参数)
我有个路由是edit/:id?,但使用了elegant-router之后必须创建两个文件,
edit/index.vue
edit/[id].vue
但其实这两个文件内容分基本都是一样,这种情况下有什么好的解决方案吗?
如何指定自动生成的elegant/routes.ts文件路由使用的component,比如需要layout.blank$view.403,而每次生成的是layout.base$view.403
文件树:
├─home
│ │ index.vue
│ │
│ └─_responsive
│ ├─components
│ │ ├─bill-add
│ │ │ index.vue
│ │ │
│ │ └─bill-list-item
│ │ index.vue
│ │
│ ├─_mobile
│ │ index.vue
│ │
│ └─_pc
│ index.vue
使用下划线让插件忽略路由的生成是正常的,但是elegant/imports.ts中还是会自动import,而且还是三个home
...
export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<RouteComponent>)> = {
home: () => import("@/views/home/_responsive/_mobile/index.vue"),
home: () => import("@/views/home/_responsive/_pc/index.vue"),
home: () => import("@/views/home/index.vue"),
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.