feat: sketch生成事件
This commit is contained in:
@@ -283,7 +283,7 @@
|
||||
|
||||
let isNodeIdEvent = eventName === 'nodeId'
|
||||
|
||||
let hasSketch = eventName === 'sketch'
|
||||
let hasSketch = eventName === 'sketchIDAndUrl'
|
||||
|
||||
const dataLines = event
|
||||
.split(/\n/)
|
||||
@@ -317,6 +317,8 @@
|
||||
}
|
||||
|
||||
if (hasSketch) {
|
||||
console.log('sketch事件-----', jsonData);
|
||||
|
||||
sketchList.value.push({
|
||||
[Object.keys(jsonData)[0]]: jsonData[Object.keys(jsonData)[0]]
|
||||
})
|
||||
|
||||
@@ -226,17 +226,15 @@
|
||||
const handleLoadingSketch = () => {
|
||||
showLoading.value = true
|
||||
}
|
||||
watch(
|
||||
() => props.sketchList,
|
||||
(val) => {
|
||||
console.log('sketchList-----', val);
|
||||
|
||||
if (val.length > 0) {
|
||||
showLoading.value = false
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
// watch(
|
||||
// () => props.sketchList,
|
||||
// (val) => {
|
||||
// if (val.length > 0) {
|
||||
// showLoading.value = false
|
||||
// }
|
||||
// },
|
||||
// { deep: true }
|
||||
// )
|
||||
onMounted(() => {
|
||||
MyEvent.add('loading-sketch', handleLoadingSketch)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user