使用自定义指令v-popover指向 Popover 的索引ref的例子:
[HTML] 纯文本查看 复制代码 <el-form-item label="链接:" prop="dbUrl">
<el-input
v-model="dataSourceDetail.dbUrl"
v-popover:popover1
placeholder="请输入链接"
>
</el-input>
<el-popover
ref="popover1"
placement="bottom"
width="450"
trigger="hover"
:content="dbUrlTip"
>
</el-popover>
</el-form-item>
<el-form-item label="驱动类名:" v-popover:popover2 prop="driverClass">
<el-input
v-model="dataSourceDetail.driverClass"
placeholder="请输入驱动类名"
>
</el-input>
<el-popover
ref="popover2"
placement="bottom"
width="450"
trigger="hover"
:content="driverClassTip"
>
</el-popover>
|