Skip to content

Commit

Permalink
Auto fill device name
Browse files Browse the repository at this point in the history
Signed-off-by: rovast <rovast@163.com>
  • Loading branch information
rovast committed Sep 1, 2023
1 parent e2781db commit d278d4e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/IgntCrudCreate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ const itemFieldsFiltered = computed(() => {
allFields.splice(index, 1);
}
// hide device name
try {
const deviceIndex = allFields.findIndex(
(f: any) => f.name === "deviceName"
);
allFields.splice(deviceIndex, 1);
} catch (e) {
// ignore error
}
return allFields;
});
const creator = address.value;
Expand All @@ -74,6 +84,9 @@ const submitItem = async () => {
cloneFormData["payload"] = window.btoa(cloneFormData["payload"]);
}
// auto fill device name value
cloneFormData["deviceName"] = route.params.name;
await (
client[
props.storeName as keyof Omit<
Expand Down

0 comments on commit d278d4e

Please sign in to comment.