forked from NervJS/taro
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add dep page & jsontree component
- Loading branch information
1 parent
d185223
commit 904bca7
Showing
15 changed files
with
182 additions
and
37 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* @Author: zhiqingchen | ||
* @Date: 2021-07-19 15:54:39 | ||
* @LastEditors: zhiqingchen | ||
* @LastEditTime: 2021-07-28 18:29:49 | ||
* @FilePath: /taro-react-native/src/pages/dep/index.config.ts | ||
*/ | ||
export default { | ||
navigationBarTitleText: '依赖列表', | ||
} |
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,5 @@ | ||
@import '../../styles/variables.scss'; | ||
|
||
.page { | ||
padding: 40px 32px; | ||
} |
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,18 @@ | ||
import { Component } from 'react' | ||
import { View } from '@tarojs/components'; | ||
import { dependencies, devDependencies } from '../../../package.json'; | ||
import Header from '../components/head/head' | ||
import JSONTree from '../components/jsontree' | ||
|
||
import './dep.scss'; | ||
|
||
export default class Index extends Component<any, any> { | ||
render() { | ||
return <View className="page"> | ||
<Header title='dependencies'></Header> | ||
<JSONTree data={dependencies} /> | ||
<Header title='devDependencies'></Header> | ||
<JSONTree data={devDependencies} /> | ||
</View> | ||
} | ||
} |
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
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import JSONTree from 'react-native-json-tree' | ||
import { View } from '@tarojs/components' | ||
|
||
const theme = { | ||
scheme: 'monokai', | ||
author: 'wimer hazenberg (http://www.monokai.nl)', | ||
base00: '#272822', | ||
base01: '#383830', | ||
base02: '#49483e', | ||
base03: '#75715e', | ||
base04: '#a59f85', | ||
base05: '#f8f8f2', | ||
base06: '#f5f4f1', | ||
base07: '#f9f8f5', | ||
base08: '#f92672', | ||
base09: '#fd971f', | ||
base0A: '#f4bf75', | ||
base0B: '#a6e22e', | ||
base0C: '#a1efe4', | ||
base0D: '#66d9ef', | ||
base0E: '#ae81ff', | ||
base0F: '#cc6633' | ||
}; | ||
|
||
export default (props) => { | ||
return (Object.keys(props.data).length > 0 ? <JSONTree {...props} theme={theme} hideRoot /> : <View></View>) | ||
} |
Oops, something went wrong.