Commit 878ee200 by qlintonger xeno

feat: 新增xmlDOM的ref变量导出

parent 88d3f29c
......@@ -10,7 +10,7 @@
</template>
<script setup lang="ts">
import { searchKey, treeData, realComposableData } from '../constants'
import { searchKey, treeData, realComposableData, xmlDOM } from '../constants'
import FileXML from "@/assets/file/CES-QEC-V250-A.xml?raw"
import type { TreeOption } from 'naive-ui'
......@@ -43,7 +43,8 @@ const expandedKeys = ref<string[]>([])
onMounted(function() {
const res = xmlProcessing.processXML(FileXML, nodeSet)
treeData.value = res.treeData
console.log('all-node', res)
xmlDOM.value = res.xmlDOM
console.log('all-node', xmlDOM.value)
})
function getAllKeys(item: TreeOption[]) {
return item.reduce(function(q, w) {
......
......@@ -5,6 +5,7 @@ import { TreeRenderResult } from '@/lib/XMLProcessor/src/typing'
// 菜单相关
export const searchKey = ref('')
export const treeData: Ref<TreeOption[]> = ref([])
export const xmlDOM :Ref<Document>= ref()
//编辑器相关
export const editorRef = ref()
export const formData = reactive({
......
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