小编Shu*_*ood的帖子

命名空间Bootstrap4 CSS和JS组件

有没有任何方法可用作基于Bootstrap4 scss的构建的一部分,为每个引导类添加前缀cssjs避免名称冲突.

我使用过https://github.com/faucamp/bootstrap_namespace_prefixer

但是这只支持基于bootstrap3的css和js文件.

css bootstrap-4

8
推荐指数
1
解决办法
1080
查看次数

react-native TouchableNativeFeedback onPress 不起作用

我创建了一个组合组件来将 TouchableNativeFeedback 组合到 wrapperComponent。

export default function withFeedback2(
    WrappedComponent
) {
    return class extends BaseComponent {
        constructor(props) {
            super(props);
        }

        render() {
            return (
                <View>
                    <TouchableNativeFeedback
                        onPress={() => this.props.onContainerViewPress()}

                    >
                        <WrappedComponent {...this.props} />
                    </TouchableNativeFeedback>
                    {/* <TouchableOpacity
                        onPress={this.props.onContainerViewPress ? () => this.props.onContainerViewPress() : null}

 >
                        <WrappedComponent {...this.props} />
                    </TouchableOpacity> */}
                </View>
            );
        }
    };
}
Run Code Online (Sandbox Code Playgroud)

但是TochableNativeFeedback 的 OnPress事件没有触发。而 OnPress 事件被正确触发,并且如果 wrappercomponent 包装在 TouchableOpacity 下,则调用 wrappercomponent 的onContainerViewPress道具。

我正在 Android 平台上对此进行测试。

react-native react-native-android touchableopacity react-navigation touchablewithoutfeedback

1
推荐指数
2
解决办法
3825
查看次数