mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增图表独立配置混合
This commit is contained in:
@@ -5,7 +5,7 @@ import { AsyncLoading, AsyncSkeletonLoading } from '@/components/LoadingComponen
|
||||
* * 动态注册组件
|
||||
*/
|
||||
export const componentInstall = <T> (key:string, node: T) => {
|
||||
if(!window['$vue'].component(key)) {
|
||||
if(!window['$vue'].component(key) && key && node) {
|
||||
window['$vue'].component(key, node)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ import * as CryptoJS from 'crypto-ts'
|
||||
|
||||
export default {
|
||||
AES_KEY: 'mt',
|
||||
encode(data: string): string {
|
||||
cryptoEncode(data: string): string {
|
||||
if (typeof data !== 'string') return ''
|
||||
// 加密
|
||||
const key = CryptoJS.enc.Utf8.parse(this.AES_KEY)
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
return encryptedData.toString()
|
||||
},
|
||||
// 解密
|
||||
decode(data: string): string {
|
||||
cryptoDecode(data: string): string {
|
||||
if (typeof data !== 'string') return ''
|
||||
const encryptedHexStr = CryptoJS.enc.Utf8.parse(data)
|
||||
const encryptedBase64Str = CryptoJS.enc.Utf8.stringify(encryptedHexStr)
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import throttle from 'lodash/throttle'
|
||||
* * 生成一个不重复的ID
|
||||
* @param { Number } randomLength
|
||||
*/
|
||||
export function getUUID(randomLength = 10) {
|
||||
export const getUUID = (randomLength = 10) =>{
|
||||
return Number(
|
||||
Math.random().toString().substr(2, randomLength) + Date.now()
|
||||
).toString(36)
|
||||
|
||||
Reference in New Issue
Block a user