fix: 修复eslint检测问题和生产打包问题

Former-commit-id: dbba543597dd24d5c8b61287590cdc43db22874a
This commit is contained in:
郝先瑞
2022-04-15 00:52:21 +08:00
parent dd93144788
commit 7bad15f185
5 changed files with 21 additions and 71 deletions

View File

@@ -112,7 +112,7 @@ export function getDictItemDetail(id: number): AxiosPromise<DictItemFormData> {
* *
* @param data * @param data
*/ */
export function addDictItem(data: DictFormData) { export function addDictItem(data: any) {
return request({ return request({
url: '/youlai-admin/api/v2/dict/items', url: '/youlai-admin/api/v2/dict/items',
method: 'post', method: 'post',
@@ -126,7 +126,7 @@ export function addDictItem(data: DictFormData) {
* @param id * @param id
* @param data * @param data
*/ */
export function updateDictItem(id: number, data: DictFormData) { export function updateDictItem(id: number, data: any) {
return request({ return request({
url: '/youlai-admin/api/v2/dict/items/' + id, url: '/youlai-admin/api/v2/dict/items/' + id,
method: 'put', method: 'put',

View File

@@ -1,13 +1,7 @@
<template> <template>
<div class="login-container"> <div class="login-container">
<el-form <el-form ref="loginFormRef" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on"
ref="loginFormRef" label-position="left">
:model="loginForm"
:rules="loginRules"
class="login-form"
auto-complete="on"
label-position="left"
>
<div class="title-container"> <div class="title-container">
<h3 class="title">{{ $t("login.title") }}</h3> <h3 class="title">{{ $t("login.title") }}</h3>
<lang-select class="set-language" /> <lang-select class="set-language" />
@@ -17,43 +11,20 @@
<span class="svg-container"> <span class="svg-container">
<svg-icon icon-class="user" /> <svg-icon icon-class="user" />
</span> </span>
<el-input <el-input ref="username" v-model="loginForm.username" :placeholder="$t('login.username')" name="username"
ref="username" type="text" tabindex="1" auto-complete="on" />
v-model="loginForm.username"
:placeholder="$t('login.username')"
name="username"
type="text"
tabindex="1"
auto-complete="on"
/>
</el-form-item> </el-form-item>
<el-tooltip <el-tooltip :disabled="capslockTooltipDisabled" content="Caps lock is On" placement="right">
:disabled="capslockTooltipDisabled"
content="Caps lock is On"
placement="right"
>
<el-form-item prop="password"> <el-form-item prop="password">
<span class="svg-container"> <span class="svg-container">
<svg-icon icon-class="password" /> <svg-icon icon-class="password" />
</span> </span>
<el-input <el-input ref="passwordRef" :key="passwordType" v-model="loginForm.password" :type="passwordType"
ref="passwordRef" placeholder="Password" name="password" tabindex="2" auto-complete="on" @keyup="checkCapslock"
:key="passwordType" @blur="capslockTooltipDisabled = true" @keyup.enter="handleLogin" />
v-model="loginForm.password"
:type="passwordType"
placeholder="Password"
name="password"
tabindex="2"
auto-complete="on"
@keyup="checkCapslock"
@blur="capslockTooltipDisabled = true"
@keyup.enter="handleLogin"
/>
<span class="show-pwd" @click="showPwd"> <span class="show-pwd" @click="showPwd">
<svg-icon <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
/>
</span> </span>
</el-form-item> </el-form-item>
</el-tooltip> </el-tooltip>
@@ -63,36 +34,20 @@
<span class="svg-container"> <span class="svg-container">
<svg-icon icon-class="validCode" /> <svg-icon icon-class="validCode" />
</span> </span>
<el-input <el-input v-model="loginForm.code" auto-complete="off" :placeholder="$t('login.code')" style="width: 65%"
v-model="loginForm.code" @keyup.enter="handleLogin" />
auto-complete="off"
:placeholder="$t('login.code')"
style="width: 65%"
@keyup.enter="handleLogin"
/>
<div class="captcha"> <div class="captcha">
<img <img :src="captchaBase64" @click="handleCaptchaGenerate" height="38px" />
:src="captchaBase64"
@click="handleCaptchaGenerate"
height="38px"
/>
</div> </div>
</el-form-item> </el-form-item>
<el-button <el-button size="default" :loading="loading" type="primary" style="width: 100%; margin-bottom: 30px"
size="default" @click.prevent="handleLogin">{{ $t("login.login") }}
:loading="loading"
type="primary"
style="width: 100%; margin-bottom: 30px"
@click.prevent="handleLogin"
>{{ $t("login.login") }}
</el-button> </el-button>
<div class="tips"> <div class="tips">
<span style="margin-right: 20px" <span style="margin-right: 20px">{{ $t("login.username") }}: admin</span>
>{{ $t("login.username") }}: admin</span
>
<span> {{ $t("login.password") }}: 123456</span> <span> {{ $t("login.password") }}: 123456</span>
</div> </div>
</el-form> </el-form>
@@ -128,6 +83,7 @@ const loginFormRef = ref(ElForm);
const passwordRef = ref(ElInput); const passwordRef = ref(ElInput);
const state = reactive({ const state = reactive({
redirect: "",
loginForm: { loginForm: {
username: "admin", username: "admin",
password: "123456", password: "123456",
@@ -306,6 +262,7 @@ $cursor: #fff;
border-color: var(--el-input-hover-border, var(--el-border-color-hover)); border-color: var(--el-input-hover-border, var(--el-border-color-hover));
box-shadow: none; box-shadow: none;
} }
box-shadow: none; box-shadow: none;
} }

View File

@@ -27,7 +27,6 @@ import { CaretRight } from '@element-plus/icons-vue';
// API 引用 // API 引用
import { listCascadeCategories } from "@/api/pms/category"; import { listCascadeCategories } from "@/api/pms/category";
import { computed } from "@vue/reactivity"; import { computed } from "@vue/reactivity";
import { GoodsDetail } from "@/types";
const emit = defineEmits(['next', "update:modelValue"]) const emit = defineEmits(['next', "update:modelValue"])
const props = defineProps({ const props = defineProps({

View File

@@ -28,12 +28,6 @@ import { useRoute } from "vue-router";
import { GoodsDetail } from "@/types"; import { GoodsDetail } from "@/types";
const route = useRoute(); const route = useRoute();
const props = defineProps({
goodsId: {
type: String,
default: () => ''
}
})
const state = reactive({ const state = reactive({
loaded: false, loaded: false,

View File

@@ -132,7 +132,7 @@ const state = reactive({
dictCode: props.dictCode, dictCode: props.dictCode,
dictName: props.dictName, dictName: props.dictName,
status: 1, status: 1,
sort: 1, sort: 1
} as DictItemFormData, } as DictItemFormData,
rules: { rules: {
name: [{ required: true, message: "请输入字典项名称", trigger: "blur" }], name: [{ required: true, message: "请输入字典项名称", trigger: "blur" }],