Commit a5ca43ec by qlintonger xeno

feat: 修复额外内容

parent fb7284af
// 引入 TreeRenderResult 类型,该类型定义在 @/lib/XMLProcessor/src/typing 模块中 // 引入 TreeRenderResult 类型,该类型定义在 @/lib/XMLProcessor/src/typing 模块中
import { NewTreeModification, OldTreeModification, TreeRenderResult, TreeRenderResultFlatted } from '@/lib/XMLProcessor/src/typing' import { NewTreeModification, OldTreeModification, TreeRenderResult, TreeRenderResultFlatted } from '@/lib/XMLProcessor/src/typing'
import { md5 } from 'js-md5' import { md5 } from 'js-md5'
import { getUUID } from '@/utils' import {getUUID} from '../utils/uuid.ts'
// 定义 Processing 类,用于处理 XML 数据 // 定义 Processing 类,用于处理 XML 数据
export class Processing { export class Processing {
......
import { UUID } from 'uuidjs'
export const getUUID = () => {
return 'g-' + UUID.generate()
}
...@@ -3,7 +3,6 @@ import { nodeSet } from '@/configs/node.config' ...@@ -3,7 +3,6 @@ import { nodeSet } from '@/configs/node.config'
import { IDomEditor } from '@wangeditor/editor' import { IDomEditor } from '@wangeditor/editor'
import { treeData, treeRef, treeSelectedKeys } from '../constants/tree' import { treeData, treeRef, treeSelectedKeys } from '../constants/tree'
import { dropdownConfig, editorRef, editorHtml } from '../constants' import { dropdownConfig, editorRef, editorHtml } from '../constants'
import { UUID } from 'uuidjs'
import { getUUID } from '@/utils' import { getUUID } from '@/utils'
export const handleCreated = (editor: IDomEditor) => { export const handleCreated = (editor: IDomEditor) => {
...@@ -34,8 +33,8 @@ export const setEditorActive = (key: string, callBack?: Function) => { ...@@ -34,8 +33,8 @@ export const setEditorActive = (key: string, callBack?: Function) => {
//获取节点的key //获取节点的key
export const getKey = (elem: any): string => { export const getKey = (elem: any): string => {
if (!elem) return '' if (!elem) return ''
const key = elem.getAttribute('data-key') const key = elem?.getAttribute('data-key')
if (key && elem != null) { if (key) {
return key return key
} else { } else {
elem = elem.parentElement elem = elem.parentElement
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment