Skip to content

Commit

Permalink
fix: 修复模板
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Nov 24, 2023
1 parent d46c73f commit b554153
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion default-youshu/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Component{{#if typescript }}, PropsWithChildren{{/if}} } from 'react'
import { View, Text } from '@tarojs/components'
import './index.{{ cssExt }}'

export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren> {{else}} Component{{/if}} {
export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentDidMount () { }

componentWillUnmount () { }
Expand Down
2 changes: 1 addition & 1 deletion h5-youshu/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { View, Text } from '@tarojs/components'

import './index.{{ cssExt }}'

export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren> {{else}} Component{{/if}} {
export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentDidMount () { }

componentWillUnmount () { }
Expand Down
2 changes: 1 addition & 1 deletion harmony/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ interface {{ to_pascal_case pageName }} {
dispatch(asyncAdd())
}
}))
class {{ to_pascal_case pageName }} extends {{#if typescript}}Component<PropsWithChildren> {{else}} Component{{/if}} {
class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentWillReceiveProps (nextProps) {
console.log(this.props, nextProps)
}
Expand Down
2 changes: 1 addition & 1 deletion mobx/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface {{ to_pascal_case pageName }} {

@inject('store')
@observer
class {{ to_pascal_case pageName }} extends {{#if typescript}}Component<PropsWithChildren> {{else}} Component{{/if}} {
class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentDidMount () { }

componentWillUnmount () { }
Expand Down
2 changes: 1 addition & 1 deletion pwa/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Component{{#if typescript }}, PropsWithChildren{{/if}} } from 'react'
import { View, Text } from '@tarojs/components'
import './index.{{ cssExt }}'

export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren> {{else}} Component{{/if}} {
export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentDidMount () { }

componentWillUnmount () { }
Expand Down
3 changes: 1 addition & 2 deletions react-native/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { Component{{#if typescript }}, PropsWithChildren{{/if}} } from 'react'
import { View, Text } from '@tarojs/components'
import './index.{{ cssExt }}'

export default {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren> {{else}} Component{{/if}} {

export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentDidMount () { }

componentWillUnmount () { }
Expand Down
2 changes: 1 addition & 1 deletion redux/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ interface {{ to_pascal_case pageName }} {
dispatch(asyncAdd())
}
}))
class {{ to_pascal_case pageName }} extends {{#if typescript}}Component<PropsWithChildren> {{else}} Component{{/if}} {
class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentWillReceiveProps (nextProps) {
console.log(this.props, nextProps)
}
Expand Down
2 changes: 1 addition & 1 deletion taro-ui-vue/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AtButton } from 'taro-ui'
import "taro-ui/dist/style/components/button.scss" // 按需引入
import './{{ pageName }}.{{ cssExt }}'

export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren> {{else}} Component{{/if}} {
export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentDidMount () { }

componentWillUnmount () { }
Expand Down
2 changes: 1 addition & 1 deletion taro-ui/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AtButton } from 'taro-ui'
import "taro-ui/dist/style/components/button.scss" // 按需引入
import './{{ pageName }}.{{ cssExt }}'

export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren> {{else}} Component{{/if}} {
export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentDidMount () { }

componentWillUnmount () { }
Expand Down
2 changes: 1 addition & 1 deletion wxcloud/client/src/components/login/index.weapp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Component{{#if typescript }}, PropsWithChildren{{/if}} } from 'react'
import Taro from '@tarojs/taro'
import { View, Text, Button } from '@tarojs/components'

export default class {{ to_pascal_case pageName }} extends {{#if typescript}}Component<PropsWithChildren> {{else}} Component{{/if}} {
export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
state = {
context: {}
}
Expand Down
2 changes: 1 addition & 1 deletion wxcloud/client/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import './{{ pageName }}.{{ cssExt }}'

import Login from '../../components/login/index'

export default class {{ to_pascal_case pageName }} extends {{#if typescript}}Component<PropsWithChildren> {{else}} Component{{/if}} {
export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentDidMount () { }

componentWillUnmount () { }
Expand Down
2 changes: 1 addition & 1 deletion wxplugin/src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import './{{ pageName }}.{{ cssExt }}'

const myPluginInterface = Taro.requirePlugin('myPlugin')

export default class {{ to_pascal_case pageName }} extends {{#if typescript}}Component<PropsWithChildren> {{else}} Component{{/if}} {
export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
componentDidMount () {
myPluginInterface.sayHello()
const answer = myPluginInterface.answer
Expand Down
2 changes: 1 addition & 1 deletion wxplugin/src/plugin/pages/list/list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { View } from '@tarojs/components'
import ListItem from '../../components/listItem/listItem'
import './list.{{ cssExt }}'

export default class {{ to_pascal_case pageName }} extends {{#if typescript}}Component<PropsWithChildren> {{else}} Component{{/if}} {
export default class {{ to_pascal_case pageName }} extends {{#if typescript }}Component<PropsWithChildren>{{else}}Component{{/if}} {
state = {
list: [{
name: 'A',
Expand Down

0 comments on commit b554153

Please sign in to comment.