mt-ck-wms-ui/src/views/report-manage/components/HeadForm.vue
2022-03-10 21:15:33 +08:00

68 lines
1.4 KiB
Vue

<!--
* @Descripttion:
* @version:
* @Author: fzq
* @Date: 2022-03-06 17:06:51
* @LastEditors: fzq
* @LastEditTime: 2022-03-07 10:35:29
-->
<template>
<el-form :inline="true" @keyup.enter.native="getDataList()">
<el-form-item :label="keyName">
<el-input v-model="key" style="width:300px" :placeholder="placeholderName" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{ 'btn.search' | i18nFilter }}</el-button>
<el-button v-if="showAdd" type="primary" @click="add()">{{ 'btn.add' | i18nFilter }}</el-button>
<el-button type="success" @click="downl()">{{ 'btn.export' | i18nFilter }}</el-button>
</el-form-item>
</el-form>
</template>
<script>
import { string } from 'jszip/lib/support'
export default {
props: {
keyName: {
type: string,
default: () => {
return '关键字'
}
},
showAdd: {
type: Boolean,
default: () => {
return true
}
},
placeholderName: {
type: string,
default: () => {
return '请输入关键字'
}
}
},
data() {
return {
key: ''
}
},
methods: {
getDataList() {
this.$emit('getDataList', this.key)
},
add() {
this.$emit('add')
},
downl() {
this.$emit('downl', this.key)
}
}
}
</script>
<style>
</style>