Commit eaa4a276 authored by “yiyousong”'s avatar “yiyousong”

fix:修复菜单搜索异常

parent e09647a5
......@@ -553,4 +553,5 @@
.addclass {
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
color: #fff !important;
border:none !important
}
<template>
<div class="menuMgmt">
<div class="header_box">
<a-button type="primary" class="addclass" @click="showEditModal(1)">新增</a-button>
<a-button type="primary" class="addclass" @click="showEditModal(1)"
>新增</a-button
>
<span>
<a-input v-model="searchForm.name" placeholder="请输入菜单名称搜索">
<a-icon slot="prefix" type="search" />
......@@ -13,7 +15,9 @@
</a-select-option>
</a-select>
<a-button type="primary" class="addclass" @click="searchData">搜索</a-button>
<a-button type="primary" class="addclass" @click="searchData"
>搜索</a-button
>
<a-button @click="resetSearch">重置</a-button>
</span>
</div>
......@@ -89,7 +93,7 @@ export default {
api: process.env.VUE_APP_API_IMG_URL,
EditModalVisible: false,
searchForm: {
name: undefined,
name: "",
parentId: "",
},
tableLoading: false,
......@@ -218,8 +222,8 @@ export default {
// 搜索
async searchData() {
if (this.searchForm.parentId || this.searchForm.name) {
let obj = {...this.searchForm}
obj.name = '%'+this.searchForm.name+'%'
let obj = { ...this.searchForm };
obj.name = "%" + this.searchForm.name + "%";
let res = await menuList({
page: this.tablePagination.current,
size: -1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment