mirror of
https://gitee.com/openharmony/napi_generator
synced 2024-11-27 02:30:36 +00:00
showInputBox输入有效性判断
Signed-off-by: chen-zhongwei050 <chenzhongwei050@chinasoftinc.com>
This commit is contained in:
parent
b6ca5e34f5
commit
4dff021267
@ -151,9 +151,12 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
if (!input) {
|
||||
return "Input cannot be empty";
|
||||
}
|
||||
if (input !== value) {
|
||||
return "Inconsistent input"
|
||||
}
|
||||
}
|
||||
});
|
||||
if (value === what && value === 'Hdf Framework') {
|
||||
if (value === 'Hdf Framework') {
|
||||
// ÊäÈë°æ±¾
|
||||
let versionTag = '4.1';
|
||||
const version = await vscode.window.showQuickPick(['OpenHarmony 4.1 release'], { placeHolder: 'Please select the version...' })
|
||||
@ -161,7 +164,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
versionTag === '4.1'
|
||||
}
|
||||
generateHdf(hdfInputPath, versionTag);
|
||||
} else if (value === what && value === 'SystemAbility Framework') {
|
||||
} else if (value === 'SystemAbility Framework') {
|
||||
// ÊäÈë°æ±¾
|
||||
let versionTag = '3.2';
|
||||
const version = await vscode.window.showQuickPick(['OpenHarmony 3.2 release', 'OpenHarmony 4.1 release'], { placeHolder: 'Please select the version...' })
|
||||
@ -182,10 +185,8 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
}
|
||||
});
|
||||
generateSa(hPath, versionTag, serviceId as string);
|
||||
} else if (value === what && value === 'N-API Framework') {
|
||||
} else if (value === 'N-API Framework') {
|
||||
generateDtscpp(hPath);
|
||||
} else {
|
||||
vscode.window.showInformationMessage('请重新输入...');
|
||||
}
|
||||
});
|
||||
context.subscriptions.push(ohGenerator);
|
||||
|
Loading…
Reference in New Issue
Block a user