Giter Site home page Giter Site logo

Comments (16)

lblblong avatar lblblong commented on June 1, 2024

可以给个最小的复现仓库吗

from tarojs-router-next.

576 avatar 576 commented on June 1, 2024

你用taro创建个demo工程加入分包试试 这是我的配置 subpackages: [
{
name: 'home',
root: 'subpackages',
pagesPath: 'subpackages/pages',
pages: ['pages/home/index'],
},
],

from tarojs-router-next.

lblblong avatar lblblong commented on June 1, 2024

https://github.com/lblblong/tarojs-router-next/blob/master/examples/react/src/app.config.ts

示例里是有分包的代码的,我本地运行没有问题
看起来像是你的 src/subpackages/pages 下有一个 .DS_Store 的文件夹,这个文件夹也是页面吗

from tarojs-router-next.

576 avatar 576 commented on June 1, 2024

没有这个文件夹 我看了你的配置感觉我的配置也没有问题

from tarojs-router-next.

lblblong avatar lblblong commented on June 1, 2024

可能是你的 IDE 自动隐藏了这个文件夹,建议进资源管理器里看看是否存在这个文件夹

from tarojs-router-next.

lblblong avatar lblblong commented on June 1, 2024

你是 Mac 系统吗

from tarojs-router-next.

576 avatar 576 commented on June 1, 2024

是的 没有看到这个文件

from tarojs-router-next.

lblblong avatar lblblong commented on June 1, 2024

那你把 node_module/tarojs-router-next/dist/router/index.js 的 177 到 181 行截图给我看下,应该是 mac 系统上的隐藏文件/文件夹导致的,如果是这个问题我需要做一下过滤

from tarojs-router-next.

576 avatar 576 commented on June 1, 2024

我感觉需要过滤一下

from tarojs-router-next.

576 avatar 576 commented on June 1, 2024

/** 获取上一个页面携带过来的参数 */
Router.getParams = function () {
var _a;
var instance = taro_1.getCurrentInstance();
var params = Object.assign({}, (_a = instance.router) === null || _a === void 0 ? void 0 : _a.params);
delete params.route_key;
return params;
};
Router.toIndex = function (options) { return Router.navigate({ url: "/pages/index/index" }, options); };
Router.toLogin = function (options) { return Router.navigate({ url: "/pages/login/index" }, options); };
return Router;
}());
exports.Router = Router;

from tarojs-router-next.

576 avatar 576 commented on June 1, 2024

改好回复一下

from tarojs-router-next.

lblblong avatar lblblong commented on June 1, 2024

刚刚发布了 2.2.4 版本,你升级 tarojs-router-nexttarojs-router-next-plugin 的版本再试试看

from tarojs-router-next.

576 avatar 576 commented on June 1, 2024

Router.home = {
175 | to: to,

176 | : .DSStore,
| ^
177 | function: function (options) { return Router.navigate({ url: "/subpackages/pages/.DS_Store/index" }, options); }
178 | };
179 | return Router;

from tarojs-router-next.

576 avatar 576 commented on June 1, 2024

不行

from tarojs-router-next.

576 avatar 576 commented on June 1, 2024

find . -name '*.DS_Store' -type f -delete 执行这个可以了

from tarojs-router-next.

lblblong avatar lblblong commented on June 1, 2024

那应该就是目录下存在隐藏文件的问题,我刚刚发布了 2.2.5 ,你再更新版本试试

from tarojs-router-next.

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.