Git Product home page Git Product logo

Comments (7)

robin-dongbin avatar robin-dongbin commented on June 12, 2024

好像知道了,把layout配置里的两个选项都打开就行了,一时没转过来,建议在文档里加个tips之类的,比较方便使用的人

from plugin-layout.

HeskeyBaozi avatar HeskeyBaozi commented on June 12, 2024

好像知道了,把layout配置里的两个选项都打开就行了,一时没转过来,建议在文档里加个tips之类的,比较方便使用的人

哪两个配置选项呀,大哥说清楚呀

from plugin-layout.

robin-dongbin avatar robin-dongbin commented on June 12, 2024

好像知道了,把layout配置里的两个选项都打开就行了,一时没转过来,建议在文档里加个tips之类的,比较方便使用的人

哪两个配置选项呀,大哥说清楚呀

文档里的layout配置项不是就两个么?

from plugin-layout.

HeskeyBaozi avatar HeskeyBaozi commented on June 12, 2024

不止两个呀?编译时配置和运行时配置就不止两个了,比如name, logo, locale。请问能说清楚吗?

from plugin-layout.

robin-dongbin avatar robin-dongbin commented on June 12, 2024

我说的是配置项里有个layout配置项,没看到?

from plugin-layout.

HeskeyBaozi avatar HeskeyBaozi commented on June 12, 2024

现在看到了。hideMenu、hideNav只是隐藏。整个路由还是在pro-layout的布局里。
插件编写里我觉得应该这里不应该写死强制套用在/路由下,应该作为配置项给用户配置

api.modifyRoutes(routes => [
{
path: '/',
component: join(api.paths.absTmpDirPath, DIR_NAME, 'Layout.tsx'),
routes,
},
]);

from plugin-layout.

Hack-Jay avatar Hack-Jay commented on June 12, 2024

`
routes: [

{
  path: '/user',
  component: '../layouts/UserLayout',
  layout: {
    hideMenu: true,
    // hideNav: true,
  },
  routes: [
    {
      name: 'login',
      path: '/user/login',
      component: '@/pages/user/login',
    },
  ],
},
{ path: '/', component: '@/pages/index' },
{ component: '@/pages/404' },

],
`

from plugin-layout.

Related Issues (13)

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.