Git Product home page Git Product logo

Comments (5)

Ares-Chang avatar Ares-Chang commented on May 24, 2024

你好,你的 package version 与示例文件并没有不一样,效果参考 主页示例 web

如果你重装依赖并重启项目后依旧有问题,请提示一个 demo repo 否则我无法准确复现你的问题,感谢。

请提供最小重现

from uni-vitesse.

sharebravery avatar sharebravery commented on May 24, 2024

我刚才发现了问题 我在

<route lang="yaml">
name: Demo
layout: default
style:
  navigationBarTitleText: Demo
tabBar:
  iconPath: static/images/tabBar/demo.png
  selectedIconPath: static/images/tabBar/selectedDemo.png
</route> 

加入了基本信息之外的信息tabBar 导致它运行不正确 令我困惑的是即便我撤销了更改也不生效了 我去问一下这个库的吧

from uni-vitesse.

Ares-Chang avatar Ares-Chang commented on May 24, 2024

这个插件其实还没有热更新,你修改后需要重启项目.

你的 layout 没有正确加载,应该不是这个问题导致的,我按你説的修改了配置,但是依旧没有问题。

image
image

如果你想让我了解更多的话,请务必提供一个 demo repo ,或在线编辑器链接,因为我无法模拟出你遇见的问题,感谢。

from uni-vitesse.

sharebravery avatar sharebravery commented on May 24, 2024

找到问题了 吐血! 居然是头部注释的问题!

<!--
 * @Description: 头部不能有这个注释。。。
 * @Author:
 * @Date: 2023-06-30 09:05:38
-->

我本来还以为是我加上对tabbar的处理造成的 一直找一直找 o(╥﹏╥)o

    UniPages({
      dir: 'src/pages',
      routeBlockLang: 'yaml',
      exclude: ['**/components/*.vue'],
      subPackages: [
        'src/pages-sub',
      ],
      onBeforeWriteFile(ctx) {
        type PageMeta = (PageMetaDatum & { name: string; tabBar?: { text?: string; iconPath: string; selectedIconPath: string } })

        const pageMetaData = ctx.pageMetaData as PageMeta[]

        ctx.pagesGlobConfig!.tabBar!.list = pageMetaData.flatMap(e => 'tabBar' in e
          ? {
              pagePath: e.path,
              text: e.tabBar?.text ? e.tabBar.text : e.style?.navigationBarTitleText,
              iconPath: e.tabBar!.iconPath,
              selectedIconPath: e.tabBar!.selectedIconPath,
            }
          : [])
      },
    }),

from uni-vitesse.

Ares-Chang avatar Ares-Chang commented on May 24, 2024

... 这种东西见仁见智,我是并不推荐文件头部注释的,没什么用,而且时间作者,你改代码也并一一定记得会改。

不如做好 git commit ,推荐在 VSCode 中安装个插件更实用。

GitLens

image

可以参考一下我的 use 里面用很多我觉得实用的插件。

from uni-vitesse.

Related Issues (20)

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.