Mutrix
Mutrix
粗略的看了一下代码,不知道对不对。 对于有返回值的api,wxPromise无法返回同样的值。 如 const task = wx.request({url: url})、const task = wx.downloadFile(url: url)。
我对jest进行了moduleNameMapper配置: ```javascript module.exports = { testURL: 'http://localhost:8000', moduleNameMapper: { "\\.(css|less)$": "/mock/style.js", "\\.(gif|ttf|eot|svg)$": "/mock/file.js" } }; ``` 以上的mock文件是有新建的。 之后运行npm run test:component开始报错,以下为报错信息:  请问如何进行jest的配置? 另:如何进行babel的配置?
之前问的问题,被关了。 #2587 我只是配置了jest.config.js,没有做其他的操作,不知道跟umi的别名有什么关系?我看了umi的文档也没有什么眉目解决这个问题。
**问题描述** promise化带来的问题,promise返回的是Promise对象,对于微信中本身返回task对象的api,promise化如何才能拿到task对象呢? **复现步骤** ```js export default class extends Component { componentDidMount() { const task = Taro.downloadFile({url: 'https://max.book118.com/free_down/0127556342011.pdf'}).then(res => { console.log('res: ', res); }); console.log('task: ', task); task.onProgressUpdate(res => { console.log('res:...
**问题描述** Taro.request返回类型的结构固定为{ data, statusCode, header },使用interceptor进行response解析,将使得返回类型不可用,应该如何在这种情况下正确使用? **复现步骤** ```js // utils/interceptors.ts import { Chain } from "@tarojs/taro"; export function parseInterceptor(chain: Chain) { const requestParams = chain.requestParams return chain.proceed(requestParams) .then(res => {...
**问题描述** taro小程序对false、true的渲染与react不一致 **复现步骤** ```js {false} ``` 将渲染成"false"文本 **期望行为** react 对于null、undefined、true、false都不会渲染。 **系统信息** Taro CLI 1.2.17 environment info: System: OS: macOS 10.14.3 Shell: 2.7.1 - /usr/local/bin/fish Binaries: Node: 10.8.0 - /usr/local/bin/node Yarn:...
**问题描述** 升级到1.3.4(估计1.3.0以上都有这问题),之前使用mobx写的observe数组的地方均报错,数组更新,但是无法取得数组内的item。报错undefined; **复现步骤** [复现问题的步骤] 1. 使用1.2.26版本,集成mobx,采用mobx5.9.4以上, 2. 编写class observable其某个数组的属性 3. 使用该属性的map方法进行页面渲染,并验证使用正常 4. 升级taro所有库的版本到1.3.4 5. 报错 ```js export default class SomeClass { ... @observable someArr: [] = [] ... } ```...
## Symptom During a long editing session, tool calls repeatedly failed with: ``` Tool execution was aborted: Request was aborted ``` with **no user-initiated cancel** (no Esc, no stop button)....
遇到一个问题,不知道是不是使用的姿势不对,现在要对特定的子路由进行页面鉴权,进行了如下配置 ```javascript { path: '/', component: '../layouts/BasicLayout', // Routes: ['src/pages/Authorized'], // authority: ['admin', 'user'], routes: [ // audit { path: '/', redirect: '/audit/index' }, { path: '/audit', name: 'audit', icon:...
## What happens? 如题 ## How To Reproduce 在chainwebpack中配置: ```javascript config.merge({ optimization: { minimize: true, splitChunks: { chunks: 'all', minSize: 30000, minChunks: 2, automaticNameDelimiter: '.', cacheGroups: { vendor: { name:...