我有一个实体,其中有两个单独的事件订阅者侦听 postPersist 和 postUpdate 事件以触发特定操作。在 Symfony 的 EventDispatcher 组件中,监听器可以附加优先级,但我似乎没有找到 Doctrine 事件的优先级选项。有没有办法让订阅者优先,或者 Doctrine 事件调度程序不支持它,我似乎真的找不到合适的选项。
我正在将 React Navigation 2 用于一个带有 Expo 的简单 RN 项目。我试图让底部的标题和选项卡显示在模糊的背景上,所以我做了一个 HOC 来用 BlurView 包装库标题以提供该功能。它使模糊效果很好,但不幸的是标题、后退按钮等在此过程中丢失了。有没有办法在 React Navigation 中做到这一点,我使用的代码如下:
const wrappedHeader = props => (
<BlurView tint="light" intensity={80} style={styles.header}>
<Header {...props}/>
</BlurView>
);
class HomeScreen extends React.Component {
static navigationOptions = {
header: props => wrappedHeader(props),
headerTitle: "Home Screen",
};
....
}
Run Code Online (Sandbox Code Playgroud)