Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pull request #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jp928 wants to merge 16 commits into react-native-studio:master
base: master
Choose a base branch
Loading
from jp928:pull-request
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
99c1db5
feat: bump RN to 0.64
jp928 Mar 23, 2021
8bfebf9
feat: update to SmartRefreshLayout v1.1.2
jp928 Mar 23, 2021
adb6d53
feat: clean up javascript files
jp928 Mar 23, 2021
afb38f5
feat: fix the example
jp928 Mar 23, 2021
11e991c
feat: update to SmartRefreshLayout v1.1.2
jp928 Mar 23, 2021
5a28b51
bug: fix header moving event
jp928 Mar 23, 2021
b351bc9
chore: fix typo
jp928 Mar 23, 2021
89b4ba4
Merge remote-tracking branch 'origin' into pull-request
jp928 Mar 23, 2021
6c0b006
chore: fix typo
jp928 Mar 23, 2021
21641ae
Merge remote-tracking branch 'origin' into pull-request
jp928 Mar 23, 2021
a6c7e58
chore: bump version
jp928 Mar 23, 2021
fabc9ae
bug: revert event name
jp928 Mar 23, 2021
d022888
Merge remote-tracking branch 'origin' into pull-request
jp928 Mar 23, 2021
73955f2
feat: update example
jp928 Mar 23, 2021
5038925
chore: bump version
jp928 Mar 23, 2021
4e9dfb9
Merge remote-tracking branch 'origin' into pull-request
jp928 Mar 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea
.DS_Store
.DS_Store

node_modules/
55 changes: 25 additions & 30 deletions AnyHeader.js
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
import React, {Component} from 'react';
import {
StyleSheet,
View,
Text,
requireNativeComponent,
findNodeHandle,
UIManager,
} from 'react-native';
import PropTypes from 'prop-types';
import {ViewPropTypes} from './Util'

const RCTAnyHeader = requireNativeComponent('RCTAnyHeader', RCTAnyHeader);

class AnyHeader extends Component {

render() {
return (
<RCTAnyHeader
{...this.props}
/>

)
}
}

AnyHeader.propTypes = {
primaryColor:PropTypes.string,
...ViewPropTypes,
}
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import {
requireNativeComponent
} from 'react-native';
import { ViewPropTypes } from './Util';

const RCTAnyHeader = requireNativeComponent('RCTAnyHeader', RCTAnyHeader);

class AnyHeader extends Component {

render() {
return (
<RCTAnyHeader
{...this.props}
/>

)
}
}

AnyHeader.propTypes = {
primaryColor:PropTypes.string,
...ViewPropTypes,
}
export default AnyHeader;
34 changes: 17 additions & 17 deletions ClassicsHeader.js
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React, {Component} from 'react';
import {requireNativeComponent} from 'react-native';
import {ViewPropTypes} from './Util';
import PropTypes from 'prop-types';

const RCTClassicsHeader = requireNativeComponent('RCTClassicsHeader', RCTClassicsHeader);

export default class ClassicsHeader extends Component {
static propTypes = {
primaryColor: PropTypes.string,
accentColor: PropTypes.string,
...ViewPropTypes,
}

render() {
return (<RCTClassicsHeader {...this.props}/>)
}
import React, {Component} from 'react';
import {requireNativeComponent} from 'react-native';
import {ViewPropTypes} from './Util';
import PropTypes from 'prop-types';
const RCTClassicsHeader = requireNativeComponent('RCTClassicsHeader', RCTClassicsHeader);
export default class ClassicsHeader extends Component {
static propTypes = {
primaryColor: PropTypes.string,
accentColor: PropTypes.string,
...ViewPropTypes,
}
render() {
return (<RCTClassicsHeader {...this.props}/>)
}
}
34 changes: 17 additions & 17 deletions DefaultHeader.js
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React, {Component} from 'react';
import {requireNativeComponent} from 'react-native';
import {ViewPropTypes} from './Util';
import PropTypes from 'prop-types';

const RCTDefaultHeader = requireNativeComponent('RCTDefaultHeader', RCTDefaultHeader);

export default class DefaultHeader extends Component {
static propTypes = {
primaryColor: PropTypes.string,
accentColor: PropTypes.string,
...ViewPropTypes,
}

render() {
return (<RCTDefaultHeader {...this.props}/>)
}
import React, {Component} from 'react';
import {requireNativeComponent} from 'react-native';
import {ViewPropTypes} from './Util';
import PropTypes from 'prop-types';
const RCTDefaultHeader = requireNativeComponent('RCTDefaultHeader', RCTDefaultHeader);
export default class DefaultHeader extends Component {
static propTypes = {
primaryColor: PropTypes.string,
accentColor: PropTypes.string,
...ViewPropTypes,
}
render() {
return (<RCTDefaultHeader {...this.props}/>)
}
}
3 changes: 0 additions & 3 deletions Example/.babelrc
View file Open in desktop

This file was deleted.

4 changes: 4 additions & 0 deletions Example/.eslintrc.js
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
};
60 changes: 36 additions & 24 deletions Example/.flowconfig
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,62 @@
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*

; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js

; Ignore polyfills
.*/Libraries/polyfills/.*
node_modules/react-native/Libraries/polyfills/.*

; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js

; Ignore metro
.*/node_modules/metro/.*
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/

[options]
emoji=true

module.system=haste

munge_underscores=true
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
exact_by_default=true

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js
module.file_ext=.ios.js

munge_underscores=true

module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/1円'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
unnecessary-invariant=warn
signature-verification-failure=warn

[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.67.0
^0.137.0
4 changes: 3 additions & 1 deletion Example/.gitattributes
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.pbxproj -text
# Windows files should use crlf line endings
# https://help.github.com/articles/dealing-with-line-endings/
*.bat text eol=crlf
5 changes: 4 additions & 1 deletion Example/.gitignore
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
Expand All @@ -40,6 +39,7 @@ yarn-error.log
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
Expand All @@ -54,3 +54,6 @@ buck-out/

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
7 changes: 7 additions & 0 deletions Example/.prettierrc.js
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
bracketSpacing: false,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
};
108 changes: 53 additions & 55 deletions Example/App.js
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,64 @@
*/

import React, {Component} from 'react';
import {
Platform,
StyleSheet,
Text,
View,
ScrollView,
Animated,
Easing
} from 'react-native';
import HuaWeiRefreshControl from './HuaWeiRefreshControl'
import ListViewExample from './ListViewExample'
import FlatListExample from "./FlatListExample";
import ListViewExample1 from './ListViewExample1'
import {Platform, StyleSheet} from 'react-native';
import ListViewExample1 from './ListViewExample1';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' +
'Cmd+D or shake for dev menu',
android: 'Double tap R on your keyboard to reload,\n' +
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
Date.prototype.Format = function (fmt) { // author: meizz
var o = {
"M+": this.getMonth() + 1, // 月份
"d+": this.getDate(), // 日
"h+": this.getHours(), // 小时
"m+": this.getMinutes(), // 分
"s+": this.getSeconds(), // 秒
"q+": Math.floor((this.getMonth() + 3) / 3), // 季度
"S": this.getMilliseconds() // 毫秒
};
if (/(y+)/.test(fmt))
fmt = fmt.replace(RegExp.1,ドル (this.getFullYear() + "").substr(4 - RegExp.1ドル.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.1,ドル (RegExp.1ドル.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<ListViewExample1/>
);
Date.prototype.Format = function (fmt) {
// author: meizz
var o = {
'M+': this.getMonth() + 1, // 月份
'd+': this.getDate(), // 日
'h+': this.getHours(), // 小时
'm+': this.getMinutes(), // 分
's+': this.getSeconds(), // 秒
'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
S: this.getMilliseconds(), // 毫秒
};
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(
RegExp.1,ドル
(this.getFullYear() + '').substr(4 - RegExp.1ドル.length),
);
}
for (var k in o) {
if (new RegExp('(' + k + ')').test(fmt)) {
fmt = fmt.replace(
RegExp.1,ドル
RegExp.1ドル.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length),
);
}
}
return fmt;
};
type Props = {};
export default class App extends Component {
render() {
return <ListViewExample1 />;
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
height:1000
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
height:1000,
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
Loading

AltStyle によって変換されたページ (->オリジナル) /