fix: 修复项目运行时eslint报错的提示

This commit is contained in:
刘洪洪
2023-03-02 17:55:47 +08:00
parent 5685e6b2c0
commit 3fc6a42d99
5 changed files with 21 additions and 23 deletions

View File

@@ -532,14 +532,14 @@ export function getUserDrilldownTableGeo (userId) {
return data[userId]
}
function JSONParse (data) {
const firstParse = JSON.parse(data)
if (typeof firstParse === 'string') {
return JSON.parse(firstParse)
} else {
return firstParse
}
}
// function JSONParse (data) {
// const firstParse = JSON.parse(data)
// if (typeof firstParse === 'string') {
// return JSON.parse(firstParse)
// } else {
// return firstParse
// }
// }
export function copyValue (item) {
const str = item
@@ -879,8 +879,8 @@ export async function getDnsMapData (type) {
export function handleSpecialValue (value) {
if (value) {
value.replace(/\'/g, "\\\\'")
.replace(/\"/g, '\\"')
.replace(/\&/g, '%26')
.replace(/\"/g, '\\"')
.replace(/\&/g, '%26')
}
return value
}
@@ -894,13 +894,13 @@ export function combineTabList (tableType, list, commonTabList) {
const commonTab = commonTabList.find(item => item.name === tabName)
tab.label = commonTab ? commonTab.i18n : ''
tab.prop = commonTab ? commonTab.prop : ''
if (!tab.hasOwnProperty('checked')) {
if (!Object.prototype.hasOwnProperty.call(tab, 'checked')) {
tab.checked = tab ? tab.show : true
}
if (!tab.hasOwnProperty('disabled')) {
if (!Object.prototype.hasOwnProperty.call(tab, 'disabled')) {
tab.disabled = tab ? !tab.enable : false
}
if (!tab.hasOwnProperty('panelId')) {
if (!Object.prototype.hasOwnProperty.call(tab, 'panelId')) {
tab.panelId = tab ? tab.panelIdOfFourthMenu : null
}
// 代码里写死的