修复: 修复表格搜索问题
This commit is contained in:
parent
3b0a68c739
commit
39de7fe1ac
Binary file not shown.
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 189 KiB |
|
|
@ -36,6 +36,7 @@
|
|||
(e: 'update:modelValue', value: any): void
|
||||
}>()
|
||||
|
||||
|
||||
const value = computed({
|
||||
get() {
|
||||
return props?.modelValue
|
||||
|
|
|
|||
|
|
@ -21,13 +21,12 @@
|
|||
:border="true"
|
||||
>
|
||||
<template v-for="item in columns">
|
||||
<el-table-column v-if="item.type" v-bind="{ ...item }" />
|
||||
<el-table-column v-else v-bind="{ ...item }">
|
||||
<el-table-column v-bind="{ ...item, ...{ prop: item.name } }" v-if="item.slot">
|
||||
<template #default="scope">
|
||||
<span v-if="!item.slot">{{ scope.row[item.name] }}</span>
|
||||
<slot v-else :name="item.name" :item="item" :row="scope.row"></slot>
|
||||
<slot :name="item.name" :item="item" :row="scope.row"></slot>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-else v-bind="{ ...item, ...{ prop: item.name } }" />
|
||||
</template>
|
||||
</el-table>
|
||||
</div>
|
||||
|
|
@ -118,7 +117,6 @@
|
|||
const formInline = reactive(obj)
|
||||
|
||||
const onSubmit = () => {
|
||||
console.log('submit!', formInline)
|
||||
emit('onSubmit', formInline)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,11 +18,13 @@ export const columns = [
|
|||
name: 'age',
|
||||
label: '年龄',
|
||||
align: 'right',
|
||||
|
||||
span: 8,
|
||||
},
|
||||
{
|
||||
name: 'sex',
|
||||
label: '性别',
|
||||
|
||||
slot: true,
|
||||
search: true,
|
||||
span: 8,
|
||||
|
|
@ -42,6 +44,7 @@ export const columns = [
|
|||
name: 'price',
|
||||
label: '价格',
|
||||
search: true,
|
||||
sortable: true,
|
||||
valueType: 'input',
|
||||
span: 8,
|
||||
attrs: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue