|
@@ -33,8 +33,10 @@
|
|
|
<component :is="CDialog" :dialog="dialog" @handleClose="handleClose">
|
|
|
<template v-slot:info>
|
|
|
<el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
|
|
|
- <el-input placeholder="请输入内容" v-model="search_name" class="input-with-select" size="small">
|
|
|
- <el-button icon="el-icon-search" @click="toSubmit"></el-button>
|
|
|
+ <el-input placeholder="请输入内容" v-model="search_name" class="input-with-select">
|
|
|
+ <template #append>
|
|
|
+ <el-button :icon="Search" @click="toSubmit" />
|
|
|
+ </template>
|
|
|
</el-input>
|
|
|
<el-col :span="24" class="list">
|
|
|
<span v-for="(item, index) in userList" :key="index" class="direction">
|
|
@@ -52,6 +54,7 @@ import partsSearch from '@/components/c-search.vue';
|
|
|
import CTable from '@/components/c-table.vue';
|
|
|
import btn from '@/components/btn-1.vue';
|
|
|
import CDialog from '@/components/c-dialog.vue';
|
|
|
+import { Search } from '@element-plus/icons-vue';
|
|
|
// #endregion
|
|
|
import type { Ref } from 'vue';
|
|
|
import { ref, onMounted, getCurrentInstance } from 'vue';
|
|
@@ -129,7 +132,7 @@ const toAdd = () => {
|
|
|
// 搜索用户
|
|
|
const toSubmit = () => {
|
|
|
if (search_name.value) {
|
|
|
- let info = users.value.filter((f) => f.name.includes(search_name));
|
|
|
+ let info = users.value.filter((f) => f.name.includes(search_name.value));
|
|
|
userList.value = info;
|
|
|
} else userList = users;
|
|
|
};
|
|
@@ -154,6 +157,7 @@ const toDel = async (data: { _id: string }) => {
|
|
|
};
|
|
|
// 关闭弹窗
|
|
|
const handleClose = () => {
|
|
|
+ search_name.value = '';
|
|
|
search({ skip, limit });
|
|
|
dialog.value = { title: '信息管理', show: false, type: '' };
|
|
|
};
|