mirror of
				https://github.com/nsnail/NetAdmin.git
				synced 2025-11-01 03:35:28 +08:00 
			
		
		
		
	fix: 🐛 前端警告
This commit is contained in:
		| @@ -118,4 +118,4 @@ biz-infra-->infra | ||||
| | JavaScript | JavaScript解析器 | [Terser](https://github.com/terser/terser)                                                                                                                                                                            | | ||||
| | JavaScript | 代码质量检查        | [ESLint](https://github.com/eslint/eslint)                                                                                                                                                                            | | ||||
| | JavaScript | 代码格式化工具       | [Prettier](https://github.com/prettier/prettier)                                                                                                                                                                      | | ||||
| | JavaScript | 标准加密库         | [crypto-js](https://github.com/brix/crypto-js)                                                                                                                                                                        | | ||||
| | JavaScript | 标准加密库         | [crypto-js](https://github.com/brix/crypto-js)                                                                                                                                                                        | | ||||
| @@ -11,4 +11,4 @@ | ||||
|       "path": "node_modules/cz-git" | ||||
|     } | ||||
|   } | ||||
| } | ||||
| } | ||||
| @@ -10,12 +10,12 @@ | ||||
|     }, | ||||
|     "dependencies": { | ||||
|         "@element-plus/icons-vue": "2.3.1", | ||||
|         "ace-builds": "1.36.5", | ||||
|         "aieditor": "1.2.8", | ||||
|         "ace-builds": "1.37.1", | ||||
|         "aieditor": "1.3.3", | ||||
|         "axios": "1.7.9", | ||||
|         "crypto-js": "4.2.0", | ||||
|         "echarts": "5.5.1", | ||||
|         "element-plus": "2.9.0", | ||||
|         "element-plus": "2.9.1", | ||||
|         "json-bigint": "1.0.0", | ||||
|         "markdown-it": "14.1.0", | ||||
|         "markdown-it-emoji": "3.0.0", | ||||
| @@ -34,9 +34,9 @@ | ||||
|         "@vitejs/plugin-vue": "5.2.1", | ||||
|         "prettier": "3.4.2", | ||||
|         "prettier-plugin-organize-attributes": "1.0.0", | ||||
|         "sass": "1.82.0", | ||||
|         "sass": "1.83.0", | ||||
|         "terser": "5.37.0", | ||||
|         "vite": "5.1.8" | ||||
|         "vite": "6.0.5" | ||||
|     }, | ||||
|     "browserslist": [ | ||||
|         "> 1%", | ||||
|   | ||||
| @@ -223,11 +223,8 @@ export default { | ||||
|     position: relative; | ||||
|     background: var(--el-bg-color); | ||||
|     text-align: center; | ||||
|     -webkit-box-sizing: content-box; | ||||
|     -moz-box-sizing: content-box; | ||||
|     box-sizing: content-box; | ||||
|     border: 1px solid var(--el-border-color); | ||||
|     -webkit-border-radius: 4px; | ||||
| } | ||||
|  | ||||
| .verify-bar-area .verify-move-block { | ||||
| @@ -236,8 +233,6 @@ export default { | ||||
|     left: 0; | ||||
|     background: var(--el-bg-color); | ||||
|     cursor: pointer; | ||||
|     -webkit-box-sizing: content-box; | ||||
|     -moz-box-sizing: content-box; | ||||
|     box-sizing: content-box; | ||||
| } | ||||
|  | ||||
| @@ -252,16 +247,12 @@ export default { | ||||
|     left: -1px; | ||||
|     background: var(--el-bg-color); | ||||
|     cursor: pointer; | ||||
|     -webkit-box-sizing: content-box; | ||||
|     -moz-box-sizing: content-box; | ||||
|     box-sizing: content-box; | ||||
|     border: 1px solid gainsboro; | ||||
| } | ||||
|  | ||||
| .verify-img-panel { | ||||
|     margin: 0; | ||||
|     -webkit-box-sizing: content-box; | ||||
|     -moz-box-sizing: content-box; | ||||
|     box-sizing: content-box; | ||||
|     border-radius: 3px; | ||||
|     position: relative; | ||||
|   | ||||
| @@ -128,7 +128,7 @@ export default { | ||||
|         }, | ||||
|         linkFile(url, fileName, data = {}) { | ||||
|             let a = document.createElement('a') | ||||
|             a.style = 'display: none' | ||||
|             a.style.display = 'none' | ||||
|             a.target = '_blank' | ||||
|             //a.download = fileName | ||||
|             a.href = url + this.toQueryString(data) | ||||
| @@ -153,7 +153,7 @@ export default { | ||||
|                     this.downLoadProgress = 0 | ||||
|                     let url = URL.createObjectURL(res) | ||||
|                     let a = document.createElement('a') | ||||
|                     a.style = 'display: none' | ||||
|                     a.style.display = 'none' | ||||
|                     a.target = '_blank' | ||||
|                     a.download = fileName | ||||
|                     a.href = url | ||||
|   | ||||
| @@ -359,7 +359,6 @@ export default { | ||||
|     white-space: nowrap; | ||||
|     text-overflow: ellipsis; | ||||
|     overflow: hidden; | ||||
|     -webkit-text-overflow: ellipsis; | ||||
|     text-align: center; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -385,7 +385,7 @@ export default { | ||||
|                 if (!data) return | ||||
|  | ||||
|                 const textarea = document.createElement('textarea') | ||||
|                 textarea.readOnly = 'readonly' | ||||
|                 textarea.readOnly = true | ||||
|                 textarea.style.position = 'absolute' | ||||
|                 textarea.style.left = '-9999px' | ||||
|                 textarea.value = data | ||||
|   | ||||
| @@ -5,7 +5,7 @@ export default { | ||||
|         el.$value = binding.value | ||||
|         el.handler = () => { | ||||
|             const textarea = document.createElement('textarea') | ||||
|             textarea.readOnly = 'readonly' | ||||
|             textarea.readOnly = true | ||||
|             textarea.style.position = 'absolute' | ||||
|             textarea.style.left = '-9999px' | ||||
|             textarea.value = el.$value | ||||
|   | ||||
| @@ -94,7 +94,6 @@ export default { | ||||
|                     this.cursor.index += this.result.length | ||||
|                 } | ||||
|                 e.preventDefault() | ||||
|                 return | ||||
|             } | ||||
|         }, | ||||
|         inputChange(value) { | ||||
| @@ -160,7 +159,7 @@ export default { | ||||
|             if (item.type === 'link') { | ||||
|                 setTimeout(() => { | ||||
|                     let a = document.createElement('a') | ||||
|                     a.style = 'display: none' | ||||
|                     a.style.display = 'none' | ||||
|                     a.target = '_blank' | ||||
|                     a.href = item.path | ||||
|                     document.body.appendChild(a) | ||||
|   | ||||
| @@ -161,7 +161,7 @@ | ||||
|                         <ul> | ||||
|                             <li v-for="item in menu" :class="pmenu.path === item.path ? 'active' : ''" :key="item" @click="showMenu(item)"> | ||||
|                                 <el-icon> | ||||
|                                     <component :is="item.meta.icon || el - icon - menu" /> | ||||
|                                     <component :is="item.meta.icon || 'el-icon-menu'" /> | ||||
|                                 </el-icon> | ||||
|                                 <p>{{ item.meta.title }}</p> | ||||
|                             </li> | ||||
|   | ||||
| @@ -4,14 +4,14 @@ export default { | ||||
|         const svg = document.createElement('svg') | ||||
|         svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg') | ||||
|  | ||||
|         svg.setAttribute('width', 50) | ||||
|         svg.setAttribute('height', 50) | ||||
|         svg.setAttribute('width', '50') | ||||
|         svg.setAttribute('height', '50') | ||||
|  | ||||
|         // <rect> background | ||||
|         const rect = document.createElement('rect') | ||||
|         rect.setAttribute('fill', color) | ||||
|         rect.setAttribute('x', 0) | ||||
|         rect.setAttribute('y', 0) | ||||
|         rect.setAttribute('x', '0') | ||||
|         rect.setAttribute('y', '0') | ||||
|         rect.setAttribute('width', '100%') | ||||
|         rect.setAttribute('height', '100%') | ||||
|  | ||||
|   | ||||
| @@ -132,7 +132,7 @@ axios.interceptors.response.use( | ||||
|             } else if ([401, 403].includes(error.response.status)) { | ||||
|                 // 如果token不存在,说明用户是第一次访问,直接跳转到登录页面 | ||||
|                 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' }) | ||||
|                     return | ||||
|                 } | ||||
| @@ -149,7 +149,7 @@ axios.interceptors.response.use( | ||||
|                                 done() | ||||
|                             }, | ||||
|                         }) | ||||
|                         tool.data.set('LOGIN_REDIRECT', window.location.href) | ||||
|                         await tool.data.set('LOGIN_REDIRECT', window.location.href) | ||||
|                         await router.replace({ path: '/guest/login' }) | ||||
|                     }) | ||||
|                 } | ||||
|   | ||||
| @@ -101,9 +101,8 @@ tool.data = { | ||||
|             content: data, | ||||
|             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() | ||||
|         return ret | ||||
|     }, | ||||
|     get(key) { | ||||
|         try { | ||||
| @@ -126,14 +125,12 @@ tool.data = { | ||||
|         } | ||||
|     }, | ||||
|     async remove(key) { | ||||
|         const ret = localStorage.removeItem(key) | ||||
|         localStorage.removeItem(key) | ||||
|         await this.uploadConfig() | ||||
|         return ret | ||||
|     }, | ||||
|     async clear() { | ||||
|         const ret = localStorage.clear() | ||||
|         localStorage.clear() | ||||
|         await this.uploadConfig() | ||||
|         return ret | ||||
|     }, | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -73,7 +73,7 @@ export default { | ||||
|                 return false | ||||
|             } | ||||
|             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 | ||||
|         }, | ||||
|     }, | ||||
|   | ||||
| @@ -12,7 +12,6 @@ | ||||
|                             role="img" | ||||
|                             viewBox="0 0 512 512" | ||||
|                             width="1em" | ||||
|                             xmlns:xlink="http://www.w3.org/1999/xlink" | ||||
|                             xmlns="http://www.w3.org/2000/svg"> | ||||
|                             <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" | ||||
|   | ||||
| @@ -31,7 +31,7 @@ | ||||
|                     <template #item="{ element }"> | ||||
|                         <li :style="{ background: element.meta.color || 'var(--el-text-color-secondary)' }"> | ||||
|                             <el-icon> | ||||
|                                 <component :is="element.meta.icon || el - icon - menu" /> | ||||
|                                 <component :is="element.meta.icon || 'el-icon-menu'" /> | ||||
|                             </el-icon> | ||||
|                             <p>{{ element.meta.title }}</p> | ||||
|                         </li> | ||||
| @@ -44,7 +44,7 @@ | ||||
|                     <template #item="{ element }"> | ||||
|                         <li :style="{ background: element.meta.color || 'var(--el-text-color-secondary)' }"> | ||||
|                             <el-icon> | ||||
|                                 <component :is="element.meta.icon || el - icon - menu" /> | ||||
|                                 <component :is="element.meta.icon || 'el-icon-menu'" /> | ||||
|                             </el-icon> | ||||
|                             <p>{{ element.meta.title }}</p> | ||||
|                         </li> | ||||
|   | ||||
| @@ -284,7 +284,7 @@ export default { | ||||
|         }, | ||||
|         async share(row) { | ||||
|             const textarea = document.createElement('textarea') | ||||
|             textarea.readOnly = 'readonly' | ||||
|             textarea.readOnly = true | ||||
|             textarea.style.position = 'absolute' | ||||
|             textarea.style.left = '-9999px' | ||||
|             textarea.value = window.location.origin + `/guest/view-doc/${row.id}` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user