Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>taro-templateNew to Visual Studio Code? Get it now.
taro-template

taro-template

jiangwenbo

|
3,401 installs
| (0) | Free
tarojs模板自动生成
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

tarc

  import Taro from '@tarojs/taro'
  import { View } from '@tarojs/components'
  
  class Test extends Taro.Component {
    constructor(props) {
      super(props)
    }

    static options = {
      addGlobalClass: true
    }

    config = {
      navigationBarTitleText: ''
    }

    componentWillMount() {}

    componentDidMount () {}

    componentDidShow () {}

    componentDidHide () {}

    componentCatchError () {}

    render() {
      return (
        <View> test </View>
      )
    }
  }

  export default Text

tarcr

  import Taro from '@tarojs/taro'
  import { connect } from '@tarojs/redux'
  import { View } from '@tarojs/components'

  class Test extends Taro.Component {
    constructor(props) {
      super(props)
    }

    config = {
      navigationBarTitleText: ''
    }

    componentWillMount() {}

    componentDidMount () {}

    componentDidShow () {}

    componentDidHide () {}

    componentCatchError () {}

    render() {
      return (
        <View> test </View>
      )
    }
  }

  const mapState = () => ({})

  const mapDispatch = () => ({})

  export default connect(mapState, mapDispatch)(Test)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft