![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Taro
idomyway
这个作者很懒,什么都没留下…
展开
-
Taro - 别名引入路径方式
config/index.jsconst path = require('path') // eslint-disable-lineconst config = { alias: { '@/api': path.resolve(__dirname, '..', 'src/api'), '@/components': path.resolve(__dirname, '..',...原创 2019-12-08 22:01:08 · 3508 阅读 · 0 评论 -
Taro -报错error An unexpected error occurred: "EPERM: operation not permitted, unlink。。。
前言 使用Taro报错:error An unexpected error occurred: "EPERM: operation not permitted, unlink 'D:\\taro-app\\node_modules\\degenerator\\node_modules\\.bin'".info If you think thi...原创 2019-12-08 21:54:56 · 5165 阅读 · 0 评论 -
Taro+TypeScript - state 和 props声明使用
import { ComponentType } from 'react'import Taro, { Component, Config } from '@tarojs/taro'import { View, Button, Text } from '@tarojs/components'import { observer, inject } from '@tarojs/mobx'im...原创 2019-07-01 21:57:33 · 5021 阅读 · 0 评论 -
Taro - 报错:regeneratorRuntime is not defined
前言 在Taro中使用async中,报错如下解决方法yarn add @tarojs/async-await 在app.tsx中添加if (process.env.TARO_ENV !== 'alipay') { require('@tarojs/async-await')}...原创 2019-07-01 22:05:55 · 3461 阅读 · 0 评论 -
Taro+TypeScript - Mobx实践
前言 在使用Mobx中,可以使用componentWillReact(生命周期钩子),当组件计划re-render (数据发生变换,页面进行渲染的时候)时会触发.使用observable、@observable (Taro中官网实例化) 1、在store下新建counter.tsimport { o...原创 2019-07-01 22:17:00 · 6203 阅读 · 0 评论 -
Taro - 方法使用
react中this的指向问题 – 规避可能出现的this指向丢失的问题//假想定义一个ToggleButton开关组件class ToggleButton extends React.Component{ constructor(props){ super(props); this.state = {isToggleOn: true}; ...原创 2019-07-02 22:10:46 · 4545 阅读 · 0 评论