update
This commit is contained in:
parent
66e1b54cc3
commit
1f7e5b8b7d
@ -143,14 +143,16 @@ const generateMockData = async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 生成mock数据
|
// 生成mock数据
|
||||||
const mockData = await JSONSchemaFaker.resolve(currentTool.value.inputSchema as any);
|
// TODO: as any ?
|
||||||
|
const mockData = await JSONSchemaFaker.resolve(currentTool.value.inputSchema as any) as any;
|
||||||
|
|
||||||
console.log(mockData);
|
// 将 mock 数据绑定到表单
|
||||||
|
Object.keys(mockData).forEach(key => {
|
||||||
|
tabStorage.formData[key] = mockData[key];
|
||||||
|
});
|
||||||
|
|
||||||
// 更新表单数据
|
// 如果需要刷新表单校验,可以加上
|
||||||
// Object.keys(mockData).forEach(key => {
|
formRef.value?.clearValidate?.();
|
||||||
// tabStorage.formData[key] = mockData[key];
|
|
||||||
// });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
async function handleExecute() {
|
async function handleExecute() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user