mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-14 12:45:41 +08:00
优化调整
This commit is contained in:
@@ -12,16 +12,17 @@ import { TOKEN } from '@/config/cachekey'
|
||||
const eventResponse = {
|
||||
// 成功
|
||||
success: ({ show, msg, data }: any): Promise<any> => {
|
||||
if (show * 1) {
|
||||
ElMessage({ type: 'success', message: msg })
|
||||
}
|
||||
// if (show * 1) {
|
||||
// ElMessage({ type: 'success', message: msg })
|
||||
// }
|
||||
|
||||
return data
|
||||
},
|
||||
// 失败
|
||||
error: ({ show, msg }: any): Promise<any> => {
|
||||
if (show * 1) {
|
||||
ElMessage({ type: 'error', message: msg })
|
||||
}
|
||||
error: ({ msg }: any): Promise<any> => {
|
||||
console.log(msg, 'msg')
|
||||
ElMessage({ type: 'error', message: msg })
|
||||
|
||||
return Promise.reject(msg)
|
||||
},
|
||||
// 重定向
|
||||
@@ -77,7 +78,7 @@ request.interceptors.response.use(
|
||||
case 403:
|
||||
case 404:
|
||||
case 500:
|
||||
return eventResponse.error(response.data)
|
||||
return eventResponse.error(response)
|
||||
case -1:
|
||||
case 330:
|
||||
case 331:
|
||||
|
||||
@@ -85,6 +85,7 @@ import FooterBtns from '@/components/footer-btns/index.vue'
|
||||
import { apiRoleLists, apiAdminDetail, apiAdminAdd, apiAdminEdit } from '@/api/auth'
|
||||
import { ElForm } from 'element-plus'
|
||||
import { useAdmin } from '@/core/hooks/app'
|
||||
import { ElMessage } from 'element-plus'
|
||||
export default defineComponent({
|
||||
components: {
|
||||
MaterialSelect,
|
||||
@@ -184,6 +185,7 @@ export default defineComponent({
|
||||
: apiAdminAdd(formData.value)
|
||||
promise.then(() => {
|
||||
setTimeout(() => router.go(-1), 500)
|
||||
ElMessage({ type: 'success', message: '保存成功' })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -54,12 +54,16 @@
|
||||
</el-form-item>
|
||||
|
||||
<div v-if="(formData.menuType == menuDataType.BUTTON) == ''">
|
||||
<el-form-item label="请选择图标">
|
||||
<!-- <el-form-item label="请选择图标">
|
||||
<el-input
|
||||
v-model="formData.menuIcon"
|
||||
show-word-limit
|
||||
placeholder="请输入图标"
|
||||
></el-input>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="请选择图标">
|
||||
<select-icon></select-icon>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
<template>
|
||||
<div class="select-icon">
|
||||
<div>
|
||||
<span class="m-r-20">选择图标</span>
|
||||
|
||||
<el-popover placement="bottom" :width="500" trigger="click">
|
||||
<el-popover placement="bottom" :width="400" trigger="click">
|
||||
<template #reference>
|
||||
<el-button style="margin-right: 16px">
|
||||
<el-icon><arrow-down /> </el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<div>goerb</div>
|
||||
<div v-for="(item, index) in selectIcon" :key="index"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
|
||||
const selectIcon = ref<any>([])
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</template>
|
||||
<div>
|
||||
<div class="m-b-20">版本号:{{ workbenchData.version.version }}</div>
|
||||
<div>官网地址:{{ workbenchData.version.website }}</div>
|
||||
<div>官网名称:{{ workbenchData.version.website }}</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="flex-3 m-l-15" shadow="never">
|
||||
|
||||
Reference in New Issue
Block a user