feat: 添加设备振动功能,支持多种振动模式和反馈
This commit is contained in:
@@ -10,7 +10,7 @@ import IssuePeriod from "./issue-period.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
const now = useNow();
|
||||
const { data: categories } = await safeClient(() => client.api.rwa.issuance.categories.get());
|
||||
const { data: categories, onFetchResponse } = await safeClient(() => client.api.rwa.issuance.categories.get());
|
||||
|
||||
const step = useRouteQuery<number>("step", 1, { transform: v => Number(v), mode: "push" });
|
||||
const initialData: RwaIssuanceProductBody = {
|
||||
@@ -33,6 +33,12 @@ const initialData: RwaIssuanceProductBody = {
|
||||
};
|
||||
const form = useStorage<RwaIssuanceProductBody>("issuing-apply-form", { ...initialData });
|
||||
|
||||
onFetchResponse(() => {
|
||||
if (!form.value.product.categoryId && categories.value?.data && categories.value?.data.length > 0) {
|
||||
form.value.product.categoryId = categories.value?.data![0].id;
|
||||
}
|
||||
});
|
||||
|
||||
function handleNext(values: GenericObject) {
|
||||
form.value.product = { ...values as any };
|
||||
step.value = 2;
|
||||
|
||||
Reference in New Issue
Block a user