CN-71 feat:用户,角色,i18n,操作记录列表页面 添加搜索框

This commit is contained in:
晶晶 张
2021-07-27 09:19:44 +08:00
parent df61269616
commit 6f5016872d
6 changed files with 24 additions and 15 deletions

View File

@@ -9,9 +9,14 @@
<slot name="top-tool-left"></slot>
</div>
<div class="top-tool-right">
<el-input v-model="keyWord" value="keyWord"></el-input>
<el-button @click="onSearch" icon="el-icon-search" type="info" size="mini" style="margin-right: 10px"></el-button>
<div v-if="showLayout.indexOf('searchInput') > -1" class="top-tool-search margin-r-20"></div>
<div style="margin-right: 10px;display: flex">
<input type="text" v-model="keyWord"/>
<button><i class="el-icon-search" @click="onsearch" ></i></button>
</div>
<!-- <el-input v-model="keyWord" value="keyWord"></el-input>
<el-button @click="onsearch" icon="el-icon-search" type="info" size="mini" style="margin-right: 10px"></el-button>-->
<div v-if="showLayout.indexOf('searchInput') > -1" class="top-tool-search margin-r-20">
</div>
<slot name="top-tool-right"></slot>
<button v-if="showLayout.indexOf('elementSet') > -1" class="top-tool-btn"
type="button" @click="tools.showCustomTableTitle = true">
@@ -45,7 +50,6 @@
<script>
import columnCustomize from '@/components/table/ColumnCustomize'
import { fromRoute } from '@/utils/constants'
import { get } from '@/utils/http'
export default {
name: 'cnDataList',
@@ -78,20 +82,15 @@ export default {
tools: {
showCustomTableTitle: false // 自定义列弹框是否显示
},
showLayout: [],
Search:[],
showLayout: []
}
},
methods: {
updateCustomTableTitle (custom) {
this.$emit('update:customTableTitle', custom)
},
onSearch () {
get('sys/log?pageNo=1&pageSize=30').then(res => {
if(res.code === 200){
this.Search = res.data.list
}
})
onsearch () {
this.$emit('search', this.keyWord)
}
},
watch: {
@@ -106,4 +105,7 @@ export default {
}
</script>
<style>
input:focus{
outline: none;
}
</style>