Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
StarksJohn committed Sep 21, 2021
1 parent d37424b commit 2b67afb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
44 changes: 22 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
module.exports = {
"env": {
"es2021": true,
"node": true
env: {
es2021: true,
node: true
},
extends: [
'plugin:react/recommended',
'standard'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
"extends": [
"plugin:react/recommended",
"standard"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
}
};
ecmaVersion: 12,
sourceType: 'module'
},
plugins: [
'react',
'@typescript-eslint'
],
rules: {
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-common-tools",
"version": "1.0.35",
"version": "1.0.36",
"description": "Contains some modules commonly used in react native",
"main": "index.ts",
"scripts": {
Expand Down
11 changes: 8 additions & 3 deletions tools/tool.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Platform } from 'react-native'
import asyncStorage from './asyncStorage'
// @ts-ignore
import _ from 'lodash'
import dva from '../dva/dva'

Expand Down Expand Up @@ -34,6 +35,7 @@ export default {
* @returns {*}
*/
uri: (imgUrl = '') => {
// @ts-ignore
if (Platform.OS === 'ios' && imgUrl.startsWith('http:')) {
imgUrl = imgUrl.replace(/http/, 'https')
}
Expand Down Expand Up @@ -97,8 +99,6 @@ export default {
return false
},



/**
* 缓存 initState 的某个属性,如果这个属性再 attributesToBeCached 里注册了的话
* @param key
Expand All @@ -116,7 +116,12 @@ export default {
* 在 Component 外 的任何地方 发 dispatch
* @param p
*/
dispatchAnyWhere: p => {
dispatchAnyWhere: (p: {
type: string, // effect: string
action: string,
payload: object,
callback?: Function,
}) => {
return dva.getDispatch(p)
},
getStore: () => {
Expand Down

0 comments on commit 2b67afb

Please sign in to comment.