feat: 新增图表独立配置混合

This commit is contained in:
mtruning
2022-02-26 17:38:24 +08:00
parent f8095ca52a
commit 4e9e492c29
43 changed files with 271 additions and 170 deletions
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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)