Comments (16)
可以给个最小的复现仓库吗
from tarojs-router-next.
你用taro创建个demo工程加入分包试试 这是我的配置 subpackages: [
{
name: 'home',
root: 'subpackages',
pagesPath: 'subpackages/pages',
pages: ['pages/home/index'],
},
],
from tarojs-router-next.
https://github.com/lblblong/tarojs-router-next/blob/master/examples/react/src/app.config.ts
示例里是有分包的代码的,我本地运行没有问题
看起来像是你的 src/subpackages/pages
下有一个 .DS_Store 的文件夹,这个文件夹也是页面吗
from tarojs-router-next.
没有这个文件夹 我看了你的配置感觉我的配置也没有问题
from tarojs-router-next.
可能是你的 IDE 自动隐藏了这个文件夹,建议进资源管理器里看看是否存在这个文件夹
from tarojs-router-next.
你是 Mac 系统吗
from tarojs-router-next.
是的 没有看到这个文件
from tarojs-router-next.
那你把 node_module/tarojs-router-next/dist/router/index.js
的 177 到 181 行截图给我看下,应该是 mac 系统上的隐藏文件/文件夹导致的,如果是这个问题我需要做一下过滤
from tarojs-router-next.
我感觉需要过滤一下
from tarojs-router-next.
/** 获取上一个页面携带过来的参数 */
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.
改好回复一下
from tarojs-router-next.
刚刚发布了 2.2.4 版本,你升级 tarojs-router-next
和 tarojs-router-next-plugin
的版本再试试看
from tarojs-router-next.
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.
不行
from tarojs-router-next.
find . -name '*.DS_Store' -type f -delete 执行这个可以了
from tarojs-router-next.
那应该就是目录下存在隐藏文件的问题,我刚刚发布了 2.2.5 ,你再更新版本试试
from tarojs-router-next.
Related Issues (20)
- 路由中间件似乎对程序启动后加载的第一个页面不生效 HOT 1
- Taro 3x 运行时报错 HOT 2
- taro升级3.4.5时报错 HOT 10
- 谁在使用 tarojs-router-next ? HOT 1
- back 方法没有页面回退时如何自定义返回页面? HOT 4
- taro3.5.2已无法适配 HOT 2
- Vue3案例运行错误 HOT 1
- 路由参数丢失问题 HOT 1
- `route.config.ts`不支持导入类型? HOT 5
- windows系统 出现path问题 HOT 1
- 问一个问题 HOT 2
- 页面自检 HOT 4
- Can't resolve 'src/lib/compose' HOT 5
- 异常无法捕获 HOT 4
- Router.to*方法问题 HOT 15
- 定义附加数据问题 HOT 1
- build:weapp 白屏
- build:weapp 白屏 HOT 21
- 真的是一个好库 HOT 5
- taro升级3.6拉 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tarojs-router-next.