-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3161d89
commit 9cf4993
Showing
37 changed files
with
338 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ module.exports = { | |
'selector-type-no-unknown': [ | ||
true, | ||
{ | ||
// 需要忽略的特定的选择器 | ||
ignoreTypes: ['page'], | ||
}, | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"Taro component": { | ||
"prefix": "taro", | ||
"body": [ | ||
"import React from 'react'", | ||
"import { View } from '@tarojs/components'", | ||
"", | ||
"interface $1Props {", | ||
" $2", | ||
"}", | ||
"", | ||
"const $1:React.FC<$1Props> = ({ $3 }) => {", | ||
"", | ||
" return (", | ||
" <View>$4</View>", | ||
" )", | ||
"}", | ||
"", | ||
"export default $1" | ||
], | ||
"description": "Taro component" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
module.exports = { | ||
// yapi 地址 | ||
apiPrefix: 'http://apimock.nanjingzw.cn', | ||
token: 'xxx', | ||
// 项目id | ||
projectId: null, | ||
// 当前项目的token | ||
token: 'xxx', | ||
// 是否去掉生成的service key中的空白符 | ||
trim: true, | ||
// 忽略更新的文件列表 | ||
// ignoreFiles: ['yapi.services.ts'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
// babel-preset-taro 更多选项和默认值: | ||
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md | ||
// eslint-disable-next-line import/no-commonjs | ||
module.exports = { | ||
presets: [ | ||
['taro', { | ||
framework: 'react', | ||
ts: true | ||
}] | ||
] | ||
[ | ||
'taro', | ||
{ | ||
framework: 'react', | ||
ts: true, | ||
}, | ||
], | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,45 @@ | ||
export default { | ||
pages: [ | ||
'pages/index/index' | ||
], | ||
import { Config } from '@tarojs/taro' | ||
|
||
type MinaConfig = Config & { [ke: string]: any } | ||
|
||
const config: MinaConfig = { | ||
lazyCodeLoading: 'requiredComponents', | ||
pages: ['pages/index/index', 'pages/tab/index', 'pages/my/index'], | ||
window: { | ||
backgroundTextStyle: 'light', | ||
navigationBarBackgroundColor: '#fff', | ||
navigationBarTitleText: 'WeChat', | ||
navigationBarTextStyle: 'black' | ||
} | ||
navigationBarTitleText: '标题', | ||
navigationBarTextStyle: 'black', | ||
}, | ||
tabBar: { | ||
color: '#8A8A8A', | ||
selectedColor: '#000', | ||
list: [ | ||
{ | ||
iconPath: 'assets/tabbar/home.png', | ||
selectedIconPath: 'assets/tabbar/home_on.png', | ||
pagePath: 'pages/index/index', | ||
text: '首页', | ||
}, | ||
{ | ||
iconPath: 'assets/tabbar/parlor.png', | ||
selectedIconPath: 'assets/tabbar/parlor_on.png', | ||
pagePath: 'pages/tab/index', | ||
text: 'Tab', | ||
}, | ||
{ | ||
iconPath: 'assets/tabbar/my.png', | ||
selectedIconPath: 'assets/tabbar/my_on.png', | ||
pagePath: 'pages/my/index', | ||
text: '我的', | ||
}, | ||
], | ||
}, | ||
} | ||
|
||
// 开发环境添加组件示例页面 | ||
if (process.env.NODE_ENV === 'development') { | ||
config.pages!.push('pages/components/index') | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
page { | ||
background: #fff; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import { View } from '@tarojs/components' | ||
|
||
interface ButtonProps {} | ||
|
||
const Button: React.FC<ButtonProps> = ({}) => { | ||
return <View>This is a button</View> | ||
} | ||
|
||
export default Button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.loading { | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react' | ||
import { View } from '@tarojs/components' | ||
import './index.less' | ||
|
||
interface LoadingProps {} | ||
|
||
const Loading: React.FC<LoadingProps> = ({}) => { | ||
return <View>Loading ...</View> | ||
} | ||
|
||
export default Loading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// base url | ||
export const BASE_URL = process.env.API_URL | ||
export const BASE_URL = process.env.API_URL! | ||
// common url prefix | ||
export const COMMON_URL_PREFIX = 'api' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { PageConfig } from '@tarojs/taro' | ||
|
||
const config: PageConfig = { | ||
navigationBarTitleText: '组件示例', | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
page { | ||
background: #fff; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import { View } from '@tarojs/components' | ||
|
||
interface DemoProps {} | ||
|
||
const Demo: React.FC<DemoProps> = ({}) => { | ||
return <View></View> | ||
} | ||
|
||
export default Demo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export default { | ||
navigationBarTitleText: '首页' | ||
import { PageConfig } from '@tarojs/taro' | ||
|
||
const config: PageConfig = { | ||
navigationBarTitleText: '首页', | ||
} | ||
|
||
export default config |
Oops, something went wrong.