1. Background
Recently the process of doing the project, we use the Object control, but at the same time and wrote a select drop-down box, click the drop-down box so each time we find that part of Object drop-down box controls to be obscured,
survey after the study found that we can use iFrame tag Object blocking controls, the specific code as follows:
2, the basic use
- HTML
//下拉框 <div class="select"> <el-select v-model="value" > <el-option v-for="item in item" :key="item.value" :label="item.label" :value="item.value" ></el-option> </el-select> </div> <div> <object :parentCaseData="caseData"></object> </div>
- Renderings
3, the solution
-
- HTML
// drop-down box <div class = " the SELECT " > <EL- the SELECT v -model = " value the Filterable // custom filter events must be added to the property without filtration requirements do not need to write : = filter-Method, " filterDoc " // the SELECT within a custom filter needs no filter does not need to write @ Change = " clickDoc " @visible -change = " visibleChange " // monitor the drop-down box to show hidden > <EL- the Option v - for = "item in item" :key="item.value" :label="item.label" :value="item.value" ></el-option> </el-select> </div> <div> <object :parentCaseData="caseData"></object>
<iframestyle="position:absolute;width:100%;height:70%;left:0;bottom:0;transparent;"ref="iframe"frameborder="0"v-if="SelectVisible"></iframe></div>
- HTML
- Script
- data
SelectVisible: false
- methods
/ * * * [VisibleChange instruments print drop-down box to show hidden] * @return {[type]} [Description] * / visibleChange (Val) { the this .docSelectVisible = Val; },
- data
4, problems encountered
No