mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
feat(数据大屏、仪表板): div嵌入方式,资源列表增加加载完的回调事件
This commit is contained in:
@@ -1019,12 +1019,12 @@ export function findComponentById(componentId) {
|
||||
return result
|
||||
}
|
||||
|
||||
export function onInitReady(params) {
|
||||
export function onInitReady(params, eventName = 'canvas_init_ready') {
|
||||
try {
|
||||
console.info('Canvas initReady')
|
||||
console.info('event:' + eventName)
|
||||
const targetPm = {
|
||||
type: 'dataease-embedded-interactive',
|
||||
eventName: 'canvas_init_ready',
|
||||
eventName: eventName,
|
||||
args: params
|
||||
}
|
||||
window.parent.postMessage(targetPm, '*')
|
||||
|
||||
@@ -48,7 +48,7 @@ import { useI18n } from '@/hooks/web/useI18n'
|
||||
import _ from 'lodash'
|
||||
import DeResourceCreateOptV2 from '@/views/common/DeResourceCreateOptV2.vue'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import { findParentIdByChildIdRecursive } from '@/utils/canvasUtils'
|
||||
import { findParentIdByChildIdRecursive, onInitReady } from '@/utils/canvasUtils'
|
||||
import { XpackComponent } from '@/components/plugin'
|
||||
import treeSort, { treeParentWeight } from '@/utils/treeSortUtils'
|
||||
import router from '@/router'
|
||||
@@ -371,6 +371,7 @@ const afterTreeInit = () => {
|
||||
expandedArray.value = getDefaultExpandedKeys()
|
||||
returnMounted.value = false
|
||||
}
|
||||
onInitReady({ type: curCanvasType.value }, 'resource_tree_init_ready')
|
||||
nextTick(() => {
|
||||
resourceListTree.value.setCurrentKey(selectedNodeKey.value)
|
||||
resourceListTree.value.filter(filterText.value)
|
||||
|
||||
Reference in New Issue
Block a user