This commit is contained in:
parent
07ed5286a3
commit
e68d41c6a3
10
src/App.vue
10
src/App.vue
|
|
@ -12,8 +12,9 @@ import colorTool from '@/utils/color'
|
|||
|
||||
const {locale, messages} = useI18n()
|
||||
|
||||
|
||||
const config = ref({
|
||||
size: "default",
|
||||
size: 'default',
|
||||
zIndex: 2000,
|
||||
button: {
|
||||
autoInsertSpace: false
|
||||
|
|
@ -28,16 +29,15 @@ const locale2 = computed(() => {
|
|||
})
|
||||
|
||||
console.log('%c PI %c 里派提供技术支持', 'background:#4caf50;color:#fff;border-radius:3px;', '')
|
||||
if(app_color){
|
||||
if (app_color) {
|
||||
document.documentElement.style.setProperty('--el-color-primary', app_color);
|
||||
for (let i = 1; i <= 9; i++) {
|
||||
document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, colorTool.lighten(app_color,i/10));
|
||||
document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, colorTool.lighten(app_color, i / 10));
|
||||
}
|
||||
for (let i = 1; i <= 9; i++) {
|
||||
document.documentElement.style.setProperty(`--el-color-primary-dark-${i}`, colorTool.darken(app_color,i/10));
|
||||
document.documentElement.style.setProperty(`--el-color-primary-dark-${i}`, colorTool.darken(app_color, i / 10));
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
<el-tag type="danger" v-if="task.state=='3'">失败</el-tag>
|
||||
</div>
|
||||
<div class="handler">
|
||||
<el-button v-if="task.state=='2'" type="danger" circle icon="el-icon-delete"
|
||||
@click="remove(task)"></el-button>
|
||||
<el-button v-if="task.state=='2'" type="primary" circle icon="el-icon-download"
|
||||
@click="download(task)"></el-button>
|
||||
</div>
|
||||
|
|
@ -100,6 +102,10 @@ function download(row) {
|
|||
a.click()
|
||||
document.body.removeChild(a)
|
||||
}
|
||||
|
||||
function remove(val) {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@
|
|||
import {getCurrentInstance, ref, onMounted, watch} from 'vue'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import {useRouter, useRoute} from 'vue-router';
|
||||
import tools from "@/utils/tools.js";
|
||||
import sysConfig from "@/config/index.js";
|
||||
import api from "@/api/index.js";
|
||||
import tools from "@/utils/tools";
|
||||
import sysConfig from "@/config/index";
|
||||
import api from "@/api/index";
|
||||
|
||||
defineOptions({
|
||||
name: 'login'
|
||||
|
|
@ -92,7 +92,6 @@ let lang = ref(tools.data.get('APP_LANG') || sysConfig.LANG)
|
|||
let dark = ref(false)
|
||||
const redirect = ref(undefined);
|
||||
|
||||
|
||||
const langs = ref([
|
||||
{
|
||||
name: '简体中文',
|
||||
|
|
@ -129,7 +128,7 @@ const darkConfig = localStorage.getItem('APP_DARK') || sysConfig.DARK
|
|||
|
||||
if (darkConfig == "dark") {
|
||||
dark.value = true
|
||||
}else if (darkConfig == 'follow') {
|
||||
} else if (darkConfig == 'follow') {
|
||||
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)')
|
||||
if (systemTheme.matches) {
|
||||
dark.value = true
|
||||
|
|
@ -152,7 +151,7 @@ watch(
|
|||
(newRoute) => {
|
||||
redirect.value = newRoute.query && newRoute.query.redirect;
|
||||
},
|
||||
{ immediate: true }
|
||||
{immediate: true}
|
||||
);
|
||||
|
||||
function rememberMe() {
|
||||
|
|
@ -173,7 +172,8 @@ async function getCode() {
|
|||
|
||||
async function login() {
|
||||
// 校验登录
|
||||
const validate = await proxy.$refs.loginForm.validate().catch(() => {});
|
||||
const validate = await proxy.$refs.loginForm.validate().catch(() => {
|
||||
});
|
||||
if (!validate) {
|
||||
return false
|
||||
}
|
||||
|
|
@ -224,6 +224,7 @@ function configDark() {
|
|||
localStorage.setItem("APP_DARK", 'light')
|
||||
}
|
||||
}
|
||||
|
||||
function configLang(command) {
|
||||
lang.value = command.value
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue