diff --git a/src/components/Tinymce/src/helper.ts b/src/components/Tinymce/src/helper.ts
index 363d39d7..873c5236 100644
--- a/src/components/Tinymce/src/helper.ts
+++ b/src/components/Tinymce/src/helper.ts
@@ -74,7 +74,7 @@ export const bindHandlers = (initEvent: Event, listeners: any, editor: any): voi
if (key === 'onInit') {
handler(initEvent, editor)
} else {
- editor.on(key.substring(2), (e: any) => handler(e, editor))
+ editor.on(key.slice(2), (e: any) => handler(e, editor))
}
}
})
diff --git a/src/components/Tree/src/BasicTree.vue b/src/components/Tree/src/BasicTree.vue
index a291209c..8a750650 100644
--- a/src/components/Tree/src/BasicTree.vue
+++ b/src/components/Tree/src/BasicTree.vue
@@ -358,9 +358,9 @@ export default defineComponent({
const titleDom = isHighlight ? (
- {title.substr(0, searchIdx)}
+ {title.slice(0, searchIdx)}
{searchText}
- {title.substr(searchIdx + (searchText as string).length)}
+ {title.slice(searchIdx + (searchText as string).length)}
) : (
title
diff --git a/src/locales/helper.ts b/src/locales/helper.ts
index ffc74d84..7f3898f7 100644
--- a/src/locales/helper.ts
+++ b/src/locales/helper.ts
@@ -19,7 +19,7 @@ export function genMessage(langs: Record>, prefix =
const langFileModule = langs[key].default
let fileName = key.replace(`./${prefix}/`, '').replace(/^\.\//, '')
const lastIndex = fileName.lastIndexOf('.')
- fileName = fileName.substring(0, lastIndex)
+ fileName = fileName.slice(0, lastIndex)
const keyList = fileName.split('/')
const moduleName = keyList.shift()
const objKey = keyList.join('.')
diff --git a/src/logics/error-handle/index.ts b/src/logics/error-handle/index.ts
index 2f06099a..b7a912e0 100644
--- a/src/logics/error-handle/index.ts
+++ b/src/logics/error-handle/index.ts
@@ -92,7 +92,7 @@ export function scriptErrorHandler(event: Event | string, source?: string, linen
} else {
errorInfo.stack = ''
}
- const name = source ? source.substr(source.lastIndexOf('/') + 1) : 'script'
+ const name = source ? source.slice(source.lastIndexOf('/') + 1) : 'script'
const errorLogStore = useErrorLogStoreWithOut()
errorLogStore.addErrorLogInfo({
type: ErrorTypeEnum.SCRIPT,
diff --git a/src/router/helper/menuHelper.ts b/src/router/helper/menuHelper.ts
index 0ab6ab45..7b0ddd90 100644
--- a/src/router/helper/menuHelper.ts
+++ b/src/router/helper/menuHelper.ts
@@ -91,7 +91,7 @@ export function configureDynamicParamsMenu(menu: Menu, params: RouteParams) {
const matchArr = realPath.match(menuParamRegex)
matchArr?.forEach((it) => {
- const realIt = it.substr(1)
+ const realIt = it.slice(1)
if (params[realIt]) {
realPath = realPath.replace(`:${realIt}`, params[realIt] as string)
}
diff --git a/src/router/helper/routeHelper.ts b/src/router/helper/routeHelper.ts
index 6967f32c..a5b1a68d 100644
--- a/src/router/helper/routeHelper.ts
+++ b/src/router/helper/routeHelper.ts
@@ -53,7 +53,7 @@ function dynamicImport(dynamicViewsModules: Record Promise= 0 ? color.substring(1, color.length) : color
+ color = color.indexOf('#') >= 0 ? color.slice(1, color.length) : color
amount = Math.trunc((255 * amount) / 100)
- return `#${subtractLight(color.substring(0, 2), amount)}${subtractLight(color.substring(2, 4), amount)}${subtractLight(
- color.substring(4, 6),
+ return `#${subtractLight(color.slice(0, 2), amount)}${subtractLight(color.slice(2, 4), amount)}${subtractLight(
+ color.slice(4, 6),
amount
)}`
}
@@ -80,9 +80,9 @@ export function darken(color: string, amount: number) {
* @returns {string} The processed color represented as HEX
*/
export function lighten(color: string, amount: number) {
- color = color.indexOf('#') >= 0 ? color.substring(1, color.length) : color
+ color = color.indexOf('#') >= 0 ? color.slice(1, color.length) : color
amount = Math.trunc((255 * amount) / 100)
- return `#${addLight(color.substring(0, 2), amount)}${addLight(color.substring(2, 4), amount)}${addLight(color.substring(4, 6), amount)}`
+ return `#${addLight(color.slice(0, 2), amount)}${addLight(color.slice(2, 4), amount)}${addLight(color.slice(4, 6), amount)}`
}
/* Suma el porcentaje indicado a un color (RR, GG o BB) hexadecimal para aclararlo */
@@ -126,7 +126,7 @@ function contrast(rgb1: string[], rgb2: number[]) {
* @param hexColor - Last selected color by the user
*/
export function calculateBestTextColor(hexColor: string) {
- const rgbColor = hexToRGB(hexColor.substring(1))
+ const rgbColor = hexToRGB(hexColor.slice(1))
const contrastWithBlack = contrast(rgbColor.split(','), [0, 0, 0])
return contrastWithBlack >= 12 ? '#000000' : '#FFFFFF'
diff --git a/src/utils/file/download.ts b/src/utils/file/download.ts
index e328363c..d8dbaf6b 100644
--- a/src/utils/file/download.ts
+++ b/src/utils/file/download.ts
@@ -69,7 +69,7 @@ export function downloadByUrl({ url, target = '_blank', fileName }: { url: strin
link.target = target
if (link.download !== undefined) {
- link.download = fileName || url.substring(url.lastIndexOf('/') + 1, url.length)
+ link.download = fileName || url.slice(url.lastIndexOf('/') + 1, url.length)
}
if (document.createEvent) {
diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts
index de858b0b..c5a37456 100644
--- a/src/views/system/tenant/tenant.data.ts
+++ b/src/views/system/tenant/tenant.data.ts
@@ -47,7 +47,7 @@ export const columns: BasicColumn[] = [
{
title: '绑定域名',
dataIndex: 'domain',
- width: 120
+ width: 200
},
{
title: '租户状态',