方法1:
:model="ruleForm"
label-position="right"
ref="ruleForm" // 被ref 标记的
status-icon
size="small"
inline
:rules="rules"
label-width="150px"
class="demo-ruleForm"
>
:options="productsDataOptions"
v-model="ruleForm.productKind"
:disabled="isScan"
style="width:300px;"
size="small"
clearable
placeholder="试试搜索:指南"
filterable
ref="cascaderAddr" // 被ref 标记的
@change="handlerSelectProductsWithUnit"
:show-all-levels="false"
>
以上的Form 表单 及其嵌套的联级下拉框都被ref标记 之后形成了refs的组件集合
添加监视可以获取当前的refs集合中包含表单ruleForm及cascaderAddr 两个组件集