我想将所有项目或错误从subject1传递给subject2。我的想法是这样的:
val subject1 = BehaviorSubject.create<Int>()
val subject2 = BehaviorSubject.create<Int>()
subject1.subscribe(
{ subject2.onNext(it) },
{ subject2.onError(it) },
{ subject2.onComplete() },
{ subject2.onSubscribe(it)}
)
有什么办法可以简化这种转换?谢谢。
答案 0 :(得分:1)
getStyle : function() {
var el = ... ? // how do I get the native TD dom element?
}
实现<?php
'presentation_type' => array(
'label' => esc_html__( 'Presentation Type', 'et_builder' ),
'renderer' => 'et_builder_include_categories_option',
'option_category' => 'basic_option',
'description' => esc_html__( 'Select the presentation type for this event.', 'et_builder' ),
'computed_affects' => array(
'__ots',
),
'taxonomy_name' => 'presentation_type',
'toggle_slug' => 'details',
),
?>
,因此您可以执行add_action( 'init', 'create_ots_tax' );
function create_ots_tax() {
register_taxonomy(
'presentation_type',
'ots',
array(
'label' => __( 'Type of Presentation' ),
'rewrite' => array( 'slug' => 'presentation_type' ),
'hierarchical' => true,
)
);
}
来获取Subject
,Observer
和subject1.subscribe(subject2)
事件。如果您还需要转发onNext
,则可以添加一个onError
呼叫:
onComplete