修改id为ref
This commit is contained in:
parent
899a0b7240
commit
7cd61b744f
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "code-brick-zj",
|
"name": "code-brick-zj",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "组件封装",
|
"description": "组件封装",
|
||||||
"main": "index.js"
|
"main": "index.js"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="searchBarBox divHeight" id='searchBarBox' :style="{ paddingRight: isFold ? '55px' : '0px' }">
|
<div class="searchBarBox divHeight" ref="searchBarRef" :style="{ paddingRight: isFold ? '55px' : '0px' }">
|
||||||
<el-form
|
<el-form
|
||||||
:inline="true"
|
:inline="true"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@ -69,6 +69,7 @@
|
|||||||
v-if="item.type === 'autocomplete'"
|
v-if="item.type === 'autocomplete'"
|
||||||
v-model="formInline[item.param]"
|
v-model="formInline[item.param]"
|
||||||
:value-key="item.valueKey ? item.valueKey : 'value'"
|
:value-key="item.valueKey ? item.valueKey : 'value'"
|
||||||
|
:size="item.size ? item.size : 'small'"
|
||||||
:fetch-suggestions="item.querySearch"
|
:fetch-suggestions="item.querySearch"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
:clearable="item.clearable === false ? false : true"
|
:clearable="item.clearable === false ? false : true"
|
||||||
@ -80,6 +81,7 @@
|
|||||||
v-model="formInline[item.param]"
|
v-model="formInline[item.param]"
|
||||||
:options="item.selectOptions"
|
:options="item.selectOptions"
|
||||||
:props="item.cascaderProps"
|
:props="item.cascaderProps"
|
||||||
|
:size="item.size ? item.size : 'small'"
|
||||||
:clearable="item.clearable === false ? false : true"
|
:clearable="item.clearable === false ? false : true"
|
||||||
:show-all-levels="item.showAllLevels === false ? false : true"
|
:show-all-levels="item.showAllLevels === false ? false : true"
|
||||||
:collapse-tags="item.collapseTags === true ? true : false"
|
:collapse-tags="item.collapseTags === true ? true : false"
|
||||||
@ -242,7 +244,7 @@ export default {
|
|||||||
},
|
},
|
||||||
switchMode() {// 展开和收起切换
|
switchMode() {// 展开和收起切换
|
||||||
this.isExpand = !this.isExpand
|
this.isExpand = !this.isExpand
|
||||||
const element = document.getElementById('searchBarBox')
|
const element = this.$refs.searchBarRef
|
||||||
if (this.isExpand) {
|
if (this.isExpand) {
|
||||||
element.classList.remove('divHeight')
|
element.classList.remove('divHeight')
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user