mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-23 14:42:51 +08:00
fix: 🐛 前端警告
This commit is contained in:
parent
ac4bb50b66
commit
9c81ce6f9f
@ -10,12 +10,12 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "2.3.1",
|
"@element-plus/icons-vue": "2.3.1",
|
||||||
"ace-builds": "1.36.5",
|
"ace-builds": "1.37.1",
|
||||||
"aieditor": "1.2.8",
|
"aieditor": "1.3.3",
|
||||||
"axios": "1.7.9",
|
"axios": "1.7.9",
|
||||||
"crypto-js": "4.2.0",
|
"crypto-js": "4.2.0",
|
||||||
"echarts": "5.5.1",
|
"echarts": "5.5.1",
|
||||||
"element-plus": "2.9.0",
|
"element-plus": "2.9.1",
|
||||||
"json-bigint": "1.0.0",
|
"json-bigint": "1.0.0",
|
||||||
"markdown-it": "14.1.0",
|
"markdown-it": "14.1.0",
|
||||||
"markdown-it-emoji": "3.0.0",
|
"markdown-it-emoji": "3.0.0",
|
||||||
@ -34,9 +34,9 @@
|
|||||||
"@vitejs/plugin-vue": "5.2.1",
|
"@vitejs/plugin-vue": "5.2.1",
|
||||||
"prettier": "3.4.2",
|
"prettier": "3.4.2",
|
||||||
"prettier-plugin-organize-attributes": "1.0.0",
|
"prettier-plugin-organize-attributes": "1.0.0",
|
||||||
"sass": "1.82.0",
|
"sass": "1.83.0",
|
||||||
"terser": "5.37.0",
|
"terser": "5.37.0",
|
||||||
"vite": "5.1.8"
|
"vite": "6.0.5"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"> 1%",
|
"> 1%",
|
||||||
|
@ -223,11 +223,8 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
background: var(--el-bg-color);
|
background: var(--el-bg-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
-webkit-box-sizing: content-box;
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
border: 1px solid var(--el-border-color);
|
border: 1px solid var(--el-border-color);
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.verify-bar-area .verify-move-block {
|
.verify-bar-area .verify-move-block {
|
||||||
@ -236,8 +233,6 @@ export default {
|
|||||||
left: 0;
|
left: 0;
|
||||||
background: var(--el-bg-color);
|
background: var(--el-bg-color);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
-webkit-box-sizing: content-box;
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,16 +247,12 @@ export default {
|
|||||||
left: -1px;
|
left: -1px;
|
||||||
background: var(--el-bg-color);
|
background: var(--el-bg-color);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
-webkit-box-sizing: content-box;
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
border: 1px solid gainsboro;
|
border: 1px solid gainsboro;
|
||||||
}
|
}
|
||||||
|
|
||||||
.verify-img-panel {
|
.verify-img-panel {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
-webkit-box-sizing: content-box;
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -128,7 +128,7 @@ export default {
|
|||||||
},
|
},
|
||||||
linkFile(url, fileName, data = {}) {
|
linkFile(url, fileName, data = {}) {
|
||||||
let a = document.createElement('a')
|
let a = document.createElement('a')
|
||||||
a.style = 'display: none'
|
a.style.display = 'none'
|
||||||
a.target = '_blank'
|
a.target = '_blank'
|
||||||
//a.download = fileName
|
//a.download = fileName
|
||||||
a.href = url + this.toQueryString(data)
|
a.href = url + this.toQueryString(data)
|
||||||
@ -153,7 +153,7 @@ export default {
|
|||||||
this.downLoadProgress = 0
|
this.downLoadProgress = 0
|
||||||
let url = URL.createObjectURL(res)
|
let url = URL.createObjectURL(res)
|
||||||
let a = document.createElement('a')
|
let a = document.createElement('a')
|
||||||
a.style = 'display: none'
|
a.style.display = 'none'
|
||||||
a.target = '_blank'
|
a.target = '_blank'
|
||||||
a.download = fileName
|
a.download = fileName
|
||||||
a.href = url
|
a.href = url
|
||||||
|
@ -359,7 +359,6 @@ export default {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
-webkit-text-overflow: ellipsis;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,7 +385,7 @@ export default {
|
|||||||
if (!data) return
|
if (!data) return
|
||||||
|
|
||||||
const textarea = document.createElement('textarea')
|
const textarea = document.createElement('textarea')
|
||||||
textarea.readOnly = 'readonly'
|
textarea.readOnly = true
|
||||||
textarea.style.position = 'absolute'
|
textarea.style.position = 'absolute'
|
||||||
textarea.style.left = '-9999px'
|
textarea.style.left = '-9999px'
|
||||||
textarea.value = data
|
textarea.value = data
|
||||||
|
@ -5,7 +5,7 @@ export default {
|
|||||||
el.$value = binding.value
|
el.$value = binding.value
|
||||||
el.handler = () => {
|
el.handler = () => {
|
||||||
const textarea = document.createElement('textarea')
|
const textarea = document.createElement('textarea')
|
||||||
textarea.readOnly = 'readonly'
|
textarea.readOnly = true
|
||||||
textarea.style.position = 'absolute'
|
textarea.style.position = 'absolute'
|
||||||
textarea.style.left = '-9999px'
|
textarea.style.left = '-9999px'
|
||||||
textarea.value = el.$value
|
textarea.value = el.$value
|
||||||
|
@ -94,7 +94,6 @@ export default {
|
|||||||
this.cursor.index += this.result.length
|
this.cursor.index += this.result.length
|
||||||
}
|
}
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
return
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
inputChange(value) {
|
inputChange(value) {
|
||||||
@ -160,7 +159,7 @@ export default {
|
|||||||
if (item.type === 'link') {
|
if (item.type === 'link') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let a = document.createElement('a')
|
let a = document.createElement('a')
|
||||||
a.style = 'display: none'
|
a.style.display = 'none'
|
||||||
a.target = '_blank'
|
a.target = '_blank'
|
||||||
a.href = item.path
|
a.href = item.path
|
||||||
document.body.appendChild(a)
|
document.body.appendChild(a)
|
||||||
|
@ -161,7 +161,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li v-for="item in menu" :class="pmenu.path === item.path ? 'active' : ''" :key="item" @click="showMenu(item)">
|
<li v-for="item in menu" :class="pmenu.path === item.path ? 'active' : ''" :key="item" @click="showMenu(item)">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<component :is="item.meta.icon || el - icon - menu" />
|
<component :is="item.meta.icon || 'el-icon-menu'" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<p>{{ item.meta.title }}</p>
|
<p>{{ item.meta.title }}</p>
|
||||||
</li>
|
</li>
|
||||||
|
@ -4,14 +4,14 @@ export default {
|
|||||||
const svg = document.createElement('svg')
|
const svg = document.createElement('svg')
|
||||||
svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg')
|
svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg')
|
||||||
|
|
||||||
svg.setAttribute('width', 50)
|
svg.setAttribute('width', '50')
|
||||||
svg.setAttribute('height', 50)
|
svg.setAttribute('height', '50')
|
||||||
|
|
||||||
// <rect> background
|
// <rect> background
|
||||||
const rect = document.createElement('rect')
|
const rect = document.createElement('rect')
|
||||||
rect.setAttribute('fill', color)
|
rect.setAttribute('fill', color)
|
||||||
rect.setAttribute('x', 0)
|
rect.setAttribute('x', '0')
|
||||||
rect.setAttribute('y', 0)
|
rect.setAttribute('y', '0')
|
||||||
rect.setAttribute('width', '100%')
|
rect.setAttribute('width', '100%')
|
||||||
rect.setAttribute('height', '100%')
|
rect.setAttribute('height', '100%')
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ axios.interceptors.response.use(
|
|||||||
} else if ([401, 403].includes(error.response.status)) {
|
} else if ([401, 403].includes(error.response.status)) {
|
||||||
// 如果token不存在,说明用户是第一次访问,直接跳转到登录页面
|
// 如果token不存在,说明用户是第一次访问,直接跳转到登录页面
|
||||||
if (!tool.cookie.get('ACCESS-TOKEN') && window.location.href.indexOf('guest') < 0) {
|
if (!tool.cookie.get('ACCESS-TOKEN') && window.location.href.indexOf('guest') < 0) {
|
||||||
tool.data.set('LOGIN_REDIRECT', window.location.href)
|
await tool.data.set('LOGIN_REDIRECT', window.location.href)
|
||||||
await router.replace({ path: '/guest/login' })
|
await router.replace({ path: '/guest/login' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -149,7 +149,7 @@ axios.interceptors.response.use(
|
|||||||
done()
|
done()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
tool.data.set('LOGIN_REDIRECT', window.location.href)
|
await tool.data.set('LOGIN_REDIRECT', window.location.href)
|
||||||
await router.replace({ path: '/guest/login' })
|
await router.replace({ path: '/guest/login' })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -101,9 +101,8 @@ tool.data = {
|
|||||||
content: data,
|
content: data,
|
||||||
datetime: parseInt(datetime) === 0 ? 0 : new Date().getTime() + parseInt(datetime) * 1000,
|
datetime: parseInt(datetime) === 0 ? 0 : new Date().getTime() + parseInt(datetime) * 1000,
|
||||||
}
|
}
|
||||||
const ret = localStorage.setItem(key, JSON.stringify(cacheValue))
|
localStorage.setItem(key, JSON.stringify(cacheValue))
|
||||||
await this.uploadConfig()
|
await this.uploadConfig()
|
||||||
return ret
|
|
||||||
},
|
},
|
||||||
get(key) {
|
get(key) {
|
||||||
try {
|
try {
|
||||||
@ -126,14 +125,12 @@ tool.data = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async remove(key) {
|
async remove(key) {
|
||||||
const ret = localStorage.removeItem(key)
|
localStorage.removeItem(key)
|
||||||
await this.uploadConfig()
|
await this.uploadConfig()
|
||||||
return ret
|
|
||||||
},
|
},
|
||||||
async clear() {
|
async clear() {
|
||||||
const ret = localStorage.clear()
|
localStorage.clear()
|
||||||
await this.uploadConfig()
|
await this.uploadConfig()
|
||||||
return ret
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const redirect = this.$TOOL.data.get('LOGIN_REDIRECT') ?? '/'
|
const redirect = this.$TOOL.data.get('LOGIN_REDIRECT') ?? '/'
|
||||||
this.$TOOL.data.remove('LOGIN_REDIRECT')
|
await this.$TOOL.data.remove('LOGIN_REDIRECT')
|
||||||
window.location.href = redirect
|
window.location.href = redirect
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
role="img"
|
role="img"
|
||||||
viewBox="0 0 512 512"
|
viewBox="0 0 512 512"
|
||||||
width="1em"
|
width="1em"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
<path
|
<path
|
||||||
d="M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z"
|
d="M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z"
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<template #item="{ element }">
|
<template #item="{ element }">
|
||||||
<li :style="{ background: element.meta.color || 'var(--el-text-color-secondary)' }">
|
<li :style="{ background: element.meta.color || 'var(--el-text-color-secondary)' }">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<component :is="element.meta.icon || el - icon - menu" />
|
<component :is="element.meta.icon || 'el-icon-menu'" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<p>{{ element.meta.title }}</p>
|
<p>{{ element.meta.title }}</p>
|
||||||
</li>
|
</li>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<template #item="{ element }">
|
<template #item="{ element }">
|
||||||
<li :style="{ background: element.meta.color || 'var(--el-text-color-secondary)' }">
|
<li :style="{ background: element.meta.color || 'var(--el-text-color-secondary)' }">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<component :is="element.meta.icon || el - icon - menu" />
|
<component :is="element.meta.icon || 'el-icon-menu'" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<p>{{ element.meta.title }}</p>
|
<p>{{ element.meta.title }}</p>
|
||||||
</li>
|
</li>
|
||||||
|
@ -284,7 +284,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async share(row) {
|
async share(row) {
|
||||||
const textarea = document.createElement('textarea')
|
const textarea = document.createElement('textarea')
|
||||||
textarea.readOnly = 'readonly'
|
textarea.readOnly = true
|
||||||
textarea.style.position = 'absolute'
|
textarea.style.position = 'absolute'
|
||||||
textarea.style.left = '-9999px'
|
textarea.style.left = '-9999px'
|
||||||
textarea.value = window.location.origin + `/guest/view-doc/${row.id}`
|
textarea.value = window.location.origin + `/guest/view-doc/${row.id}`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user