Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>taroSnippetsNew to Visual Studio Code? Get it now.
taroSnippets

taroSnippets

刘剑

|
2,244 installs
| (1) | Free
taro的用户代码片段,快速生成页面基本代码
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

taroSnippets

taroSnippets 是一款快速生成 taro 页面结构的用户代码片段插件

效果图:

图片

taroPage

import Taro from '@tarojs/taro';
import { View, Button } from '@tarojs/components';

export default class template extends Taro.Component {
  constructor(props) {
    super(props);
  }
  componentWillMount() {}
  render() {
    return (
      <View>
        <Button>template</Button>
      </View>
    );
  }
}

taroPageLess

import Taro from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import styles from './index.module.less'

export default class Template extends Taro.Component {
  constructor (props) {
    super(props)
  }
  componentWillMount () {}
  render () {
    return (
      <View className={styles.container}>
        <Text>Template</Text>
      </View>
    )
  }
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft