After tracing the android code, I found that it was impossible to obtain the class flag for positioning through DomObject.
<text class="hi></text>
<my_component></my_component>
If my component needs to respond to an event or gesture, I need to hide the component with class hi text component. Can it be implemented in the native layer?
Or do we have to trigger the corresponding js event and let js handle it?
Getting references is relatively simple:
WeexSyntax:
VueSyntax:
Also, the display and hiding you mentioned is actually relatively simple. There is no need to obtain a reference. The Weex syntax directly uses
syntax directly setsif
, and theif
,Vue语法直接设置v-if
或v-show
Vuev-if
orv-show
will do the trick. 🎜