Skip to content

Commit

Permalink
- [x] [发现] 支持自定义菜单排序
Browse files Browse the repository at this point in the history
  • Loading branch information
czy0729 committed Oct 19, 2021
1 parent c48de6c commit 3d1f487
Show file tree
Hide file tree
Showing 18 changed files with 1,063 additions and 351 deletions.
12 changes: 9 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-03-13 05:15:36
* @Last Modified by: czy0729
* @Last Modified time: 2021-10-18 11:56:56
* @Last Modified time: 2021-10-19 18:22:44
*/
module.exports = {
root: true,
Expand All @@ -11,14 +11,20 @@ module.exports = {
extends: ['@react-native-community', 'prettier'],
ignorePatterns: [
'/node_modules',
// '/components/@/*',
'/components/@/*',
// '/src/assets/*',
// '/src/utils/thirdParty/*',
'babel.config.js',
'jsconfig.json'
],
globals: {
rerender: 1
rerender: true,
warn: true,
log: true
},
rules: {
radix: 0, // parseInt允许不填进制
'no-shadow': 0 // 允许相同变量名
}
}

Expand Down
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-06-02 14:42:28
* @Last Modified by: czy0729
* @Last Modified time: 2021-10-18 23:09:16
* @Last Modified time: 2021-10-19 22:11:02
*/
export const INIT_DEV_DARK = '' // '' 不控制 | true 强制黑暗 | false 强制白天
export const INIT_ROUTE = 'Home'
Expand Down
54 changes: 54 additions & 0 deletions src/components/@/react-native-draggable-grid/block.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/** @format */

import * as React from 'react'
import {
Animated,
StyleProp,
TouchableWithoutFeedback,
StyleSheet,
GestureResponderHandlers
} from 'react-native'
import { FunctionComponent } from 'react'

interface BlockProps {
style?: StyleProp<any>
dragStartAnimationStyle: StyleProp<any>
onPress?: () => void
onLongPress: () => void
panHandlers: GestureResponderHandlers
delayLongPress: number
}

export const Block: FunctionComponent<BlockProps> = ({
style,
dragStartAnimationStyle,
// onPress,
onLongPress,
children,
panHandlers,
delayLongPress
}) => {
return (
<Animated.View
style={[styles.blockContainer, style, dragStartAnimationStyle]}
{...panHandlers}
>
<Animated.View>
<TouchableWithoutFeedback
// onPress={onPress}
delayLongPress={delayLongPress}
delayPressIn={0}
onPressIn={onLongPress}
>
{children}
</TouchableWithoutFeedback>
</Animated.View>
</Animated.View>
)
}

const styles = StyleSheet.create({
blockContainer: {
alignItems: 'center'
}
})
Loading

0 comments on commit 3d1f487

Please sign in to comment.