允许在模板中使用<template>标记吗?
我得检查一下价值。
<template>
<div>
<template v-for="category_field in category_fields">
<template v-if="category_field.show_type == 'new-row'">
//and also here can be more nested template tag
我能对vue模板中的事件做出反应吗?假设一个子组件分派一个事件$dispatch('userAdded'),我可以在父组件中这样做吗:
<div class="alert alert-info" v-if="userAdded">
User was created!
</div>
或者,如果没有,我可以访问子组件的变量吗?
<div class="alert alert-info" v-if="$refs.addView.form.successful">
Use