Coder Social home page Coder Social logo

elegant-router's People

Contributors

honghuangdc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

elegant-router's Issues

多参数页面名称应该如何定义

[id].vue 可以接收一个参数,且能自动生成相应的router配置
当修改elegant-router.ts 下路由的参数名称和添加参数名称时重启项目修改的部分会被重置
请问如何定义多个参数
例如修改那部分代码可以支持多参数 或者 在哪里可以配置某些路由配置重启项目不被删除(多参数)

关于动态router params

我有个路由是edit/:id?,但使用了elegant-router之后必须创建两个文件,

edit/index.vue

edit/[id].vue

但其实这两个文件内容分基本都是一样,这种情况下有什么好的解决方案吗?

预期之外的import

文件树:
├─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"),
};

增加组件所属layout的自动配置

  1. 现在的版本,顶层组件所属的layout需要手动修改路由定义文件,希望可以增加转化函数或者配置项来替代手动工作
  2. 目前设定顶层路由的逻辑有一定的问题,以‘’_‘’作为顶层路由的规定的话,如果不是默认在‘‘src/views’’下,生成的路由定义文件会产生报错,希望能够对此进行优化

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.