feat:新增点击示例直接发送之前加一层工作区检测逻辑
This commit is contained in:
@ -635,6 +635,14 @@ export function getWebviewContent(
|
||||
if (typeof hasWorkspace !== 'undefined') {
|
||||
hasWorkspace = message.hasWorkspace;
|
||||
console.log('[WebView] 工作区状态:', hasWorkspace);
|
||||
|
||||
// 如果有待发送的示例,且工作区存在,则发送
|
||||
if (hasWorkspace && typeof pendingExampleIndex !== 'undefined' && pendingExampleIndex >= 0) {
|
||||
if (typeof doSendExample === 'function') {
|
||||
doSendExample(pendingExampleIndex);
|
||||
pendingExampleIndex = -1; // 重置
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user