fixbug: 修改bug: 🐛 发送请求时主体颜色改变

This commit is contained in:
bunny 2024-02-19 17:14:16 +08:00
parent 4adf21a794
commit 1da1c78649
11 changed files with 10269 additions and 9820 deletions

2
auto-imports.d.ts vendored
View File

@ -5,5 +5,5 @@
// Generated by unplugin-auto-import // Generated by unplugin-auto-import
export {} export {}
declare global { declare global {
const ElMessage: typeof import('element-plus/es')['ElMessage'];
} }

38
components.d.ts vendored
View File

@ -7,21 +7,27 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
ElAside: typeof import('element-plus/es')['ElAside'] ElAside: typeof import('element-plus/es')['ElAside'];
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton'];
ElContainer: typeof import('element-plus/es')['ElContainer'] ElContainer: typeof import('element-plus/es')['ElContainer'];
ElHeader: typeof import('element-plus/es')['ElHeader'] ElDialog: typeof import('element-plus/es')['ElDialog'];
ElIcon: typeof import('element-plus/es')['ElIcon'] ElDropdown: typeof import('element-plus/es')['ElDropdown'];
ElMain: typeof import('element-plus/es')['ElMain'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'];
ElMenu: typeof import('element-plus/es')['ElMenu'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'];
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElForm: typeof import('element-plus/es')['ElForm'];
ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] ElFormItem: typeof import('element-plus/es')['ElFormItem'];
ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElHeader: typeof import('element-plus/es')['ElHeader'];
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElIcon: typeof import('element-plus/es')['ElIcon'];
ElRow: typeof import('element-plus/es')['ElRow'] ElInput: typeof import('element-plus/es')['ElInput'];
ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElMain: typeof import('element-plus/es')['ElMain'];
ElText: typeof import('element-plus/es')['ElText'] ElMenu: typeof import('element-plus/es')['ElMenu'];
RouterLink: typeof import('vue-router')['RouterLink'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'];
RouterView: typeof import('vue-router')['RouterView'] ElRadio: typeof import('element-plus/es')['ElRadio'];
ElRadioButton: typeof import('element-plus/es')['ElRadioButton'];
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'];
ElTable: typeof import('element-plus/es')['ElTable'];
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'];
RouterLink: typeof import('vue-router')['RouterLink'];
RouterView: typeof import('vue-router')['RouterView'];
} }
} }

View File

@ -1,26 +0,0 @@
const path = require('path');
module.exports = {
webpack: {
alias: {
'@': path.join(__dirname, 'src'),
},
},
style: {
postcss: {
mode: 'extends',
loaderOptions: {
postcssOptions: {
ident: 'postcss',
plugins: [
// require('postcss-mobile-forever', {
// viewportWidth: 2560,
// appSelector: '#root',
// maxDisplayWidth: 1920,
// }),
],
},
},
},
},
};

View File

@ -10,10 +10,10 @@ export const reqLogin = (data: any) => {
/** /**
* *
* @param data * @param params
*/ */
export const reqGetEmployeePage = (data: any) => { export const reqGetEmployeePage = (params: any) => {
return Request({ url: '/admin/employee/page', method: 'GET', params: data }); return Request({ url: '/admin/employee/page', method: 'GET', params });
}; };
/** /**

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,7 @@ const store = headerStore();
max-width: 200px; max-width: 200px;
min-width: 63px; min-width: 63px;
height: 100%; height: 100%;
background: #343744; background: #343744 !important;
.el-menu-item { .el-menu-item {
color: #bfcbd9; color: #bfcbd9;

View File

@ -1,4 +1,3 @@
<!-- tablePlus:二次封装table -->
<template> <template>
<el-table :data="tableData" v-bind="$attrs"> <el-table :data="tableData" v-bind="$attrs">
<el-table-column v-for="item in column" :key="item.prop" v-bind="item"> <el-table-column v-for="item in column" :key="item.prop" v-bind="item">
@ -28,5 +27,3 @@ defineProps<{
column: Column[]; column: Column[];
}>(); }>();
</script> </script>
<style lang="scss" scoped></style>

View File

@ -5,7 +5,6 @@ import { createPinia } from 'pinia';
import ElementPlus from 'element-plus'; import ElementPlus from 'element-plus';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'; import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
import './assets/css/reset.css'; import './assets/css/reset.css';
import './assets/css/index.scss';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'; import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import '@/config/globalProperties'; import '@/config/globalProperties';

View File

@ -15,6 +15,7 @@ export const employeeStore = defineStore('employeeStore', {
* @param data * @param data
*/ */
async login(data: any) { async login(data: any) {
try {
const response: any = await reqLogin(data); const response: any = await reqLogin(data);
if (response.code === 1) { if (response.code === 1) {
Cookies.set('token', response.data.token); Cookies.set('token', response.data.token);
@ -24,14 +25,21 @@ export const employeeStore = defineStore('employeeStore', {
} else { } else {
ElMessage.error(response.msg); ElMessage.error(response.msg);
} }
} catch (e: any) {
ElMessage.error(e.message);
}
}, },
/** /**
* *
* @param data * @param data
*/ */
async getEmployeePage(data: any) { async getEmployeePage(data: any) {
try {
const response: any = await reqGetEmployeePage(data); const response: any = await reqGetEmployeePage(data);
this.employeeList = response.data.records; this.employeeList = response.data.records;
} catch (e: any) {
ElMessage.error(e.message);
}
}, },
/** /**

View File

@ -8,9 +8,9 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import TablePlus from '@/commpent/table/table-plus.vue';
import { employeeStore } from '@/store/employee'; import { employeeStore } from '@/store/employee';
import { onMounted, reactive, toRaw } from 'vue'; import { onMounted, reactive, toRaw } from 'vue';
import TablePlus from '@/commpent/table/table-plus.vue';
const store = employeeStore(); const store = employeeStore();
const requestData = reactive({ const requestData = reactive({

View File

@ -1,8 +1,8 @@
const {defineConfig} = require('@vue/cli-service'); const { defineConfig } = require('@vue/cli-service');
const AutoImport = require('unplugin-auto-import/webpack'); const AutoImport = require('unplugin-auto-import/webpack');
const Components = require('unplugin-vue-components/webpack'); const Components = require('unplugin-vue-components/webpack');
const {ElementPlusResolver} = require('unplugin-vue-components/resolvers'); const { ElementPlusResolver } = require('unplugin-vue-components/resolvers');
const ElementPlus = require('unplugin-element-plus/webpack') const ElementPlus = require('unplugin-element-plus/webpack');
module.exports = defineConfig({ module.exports = defineConfig({
transpileDependencies: true, transpileDependencies: true,
@ -11,28 +11,28 @@ module.exports = defineConfig({
'/api': { '/api': {
target: 'http://localhost:8080', target: 'http://localhost:8080',
changeOrigin: true, changeOrigin: true,
pathRewrite: {'^/api': ''}, pathRewrite: { '^/api': '' },
}, },
}, },
}, },
chainWebpack: (config) => { chainWebpack: config => {
config.plugin('define').tap((definitions) => { config.plugin('define').tap(definitions => {
Object.assign(definitions[0], { Object.assign(definitions[0], {
__VUE_OPTIONS_API__: 'true', __VUE_OPTIONS_API__: 'true',
__VUE_PROD_DEVTOOLS__: 'false', __VUE_PROD_DEVTOOLS__: 'false',
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false' __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false',
}) });
return definitions return definitions;
}) });
},
css: {
loaderOptions: {
scss: {
additionalData: `@use "~@/assets/css/index.scss" as *;`,
},
},
}, },
// css: {
// loaderOptions: {
// scss: {
// additionalData: `@use "~@/styles/index.scss" as *;`,
// },
// },
// },
configureWebpack: { configureWebpack: {
plugins: [ plugins: [
AutoImport({ AutoImport({