Skip to content

Template Capability Matrix

Directive Support Matrix

DirectiveStatusTypical Conversion BehaviorKey Limitations
v-if / ...SupportedGenerates conditional expressions/branch nodesv-else(-if) must be adjacent to valid branches
v-forSupportedGenerates map or Object.entries(...).map(...)Source expressions must be analyzable
v-on / @SupportedMaps to React event props-
v-modelSupportedGenerates value binding + React eventsSemantics need validation for different elements/components
v-showSupportedGenerates style show/hide expressionsPay attention to override order when merging with original styles
v-htmlSupportedConverts to dangerouslySetInnerHTMLContent security must be guaranteed by the user
v-textSupportedConverts to text node output-
v-slot / #Partially SupportedGenerates children or callback slotsDynamic slot keys/props may be downgraded
v-memo / v-onceSupportedGenerates useMemo paths-
is / :isSupportedDynamic components use Component adaptationDynamic values must be analyzable
preNot Supported-Cannot retrieve this node from the parser

Component Support Matrix

TypeStatusRemarks
TransitionSupportedChild node structure is validated against rules
TransitionGroupSupportedRequires key usage (automatically injected by the compiler)
KeepAliveSupportedDepends on runtime adaptation
TeleportSupportedDepends on runtime adaptation
SuspenseSupportedDepends on runtime adaptation
ComponentSupportedDynamic component, depends on runtime adaptation
RouterLink / RouterViewSupportedTakes effect with routing project integration

Alert and Degradation List

  1. Unknown directives: Will trigger alerts
  2. Unanalyzable Vue $xxx runtime variables: Will throw errors
  3. Dynamic key and dynamic slot scenarios: May be downgraded to conservative output
  4. Transition structure not as expected: Will trigger alerts or errors

Recommended:

vue
<button @click="increment">+1</button>
<div v-if="visible">A</div>
<div v-else>B</div>

High-Risk:

vue
<div v-else>orphan else</div>
<slot :[dynamicKey]="value"></slot>

Practical Recommendations

  • Prioritize explicit, readable, and analyzable template expressions
  • Treat all template alerts as blocking items before release
  • For routing-related template issues, check Routing Adaptation in conjunction

Released under the MIT License