wip fix
This commit is contained in:
parent
f58ee518c1
commit
4eebe5bb99
|
|
@ -99,6 +99,9 @@ export const Tab: FC<{
|
||||||
value={idx + ""}
|
value={idx + ""}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
local.activeIndex = idx.toString();
|
local.activeIndex = idx.toString();
|
||||||
|
if (local.mode === "hash") {
|
||||||
|
location.hash = `#${local.activeIndex}`;
|
||||||
|
}
|
||||||
local.render();
|
local.render();
|
||||||
if (e.navigate) {
|
if (e.navigate) {
|
||||||
navigate(e.navigate);
|
navigate(e.navigate);
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,15 @@ export const Form: FC<{
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FForm {...form_hook}>
|
<FForm {...form_hook}>
|
||||||
<div
|
<form
|
||||||
className={
|
className={
|
||||||
"flex-1 flex flex-col w-full items-stretch relative overflow-auto"
|
"flex-1 flex flex-col w-full items-stretch relative overflow-auto"
|
||||||
}
|
}
|
||||||
|
onSubmit={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
on_submit({ form: form.hook.getValues(), error: {} });
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div className="absolute inset-0">
|
<div className="absolute inset-0">
|
||||||
<PassProp
|
<PassProp
|
||||||
|
|
@ -31,7 +36,7 @@ export const Form: FC<{
|
||||||
{body}
|
{body}
|
||||||
</PassProp>
|
</PassProp>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</FForm>
|
</FForm>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ export const List: FC<ListProp> = (_arg) => {
|
||||||
{local.list === null ? (
|
{local.list === null ? (
|
||||||
<ListDummy {..._arg} />
|
<ListDummy {..._arg} />
|
||||||
) : (
|
) : (
|
||||||
local.list.map((item, idx) => {
|
(local.list || []).map((item, idx) => {
|
||||||
const val = (...arg: any[]) => {
|
const val = (...arg: any[]) => {
|
||||||
const value = get(map_val(item), `${arg.join("")}`);
|
const value = get(map_val(item), `${arg.join("")}`);
|
||||||
return value;
|
return value;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import {
|
||||||
} from "react-hook-form"
|
} from "react-hook-form"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "@/utils"
|
||||||
import { Label } from "@/comps//ui/label"
|
import { Label } from "@/comps/ui/label"
|
||||||
|
|
||||||
const Form = FormProvider
|
const Form = FormProvider
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ export const getPathname = () => {
|
||||||
if (["localhost", "prasi.avolut.com"].includes(location.hostname)) {
|
if (["localhost", "prasi.avolut.com"].includes(location.hostname)) {
|
||||||
if (
|
if (
|
||||||
location.pathname.startsWith("/vi") ||
|
location.pathname.startsWith("/vi") ||
|
||||||
|
location.pathname.startsWith("/prod") ||
|
||||||
location.pathname.startsWith("/deploy")
|
location.pathname.startsWith("/deploy")
|
||||||
) {
|
) {
|
||||||
return "/" + location.pathname.split("/").slice(3).join("/");
|
return "/" + location.pathname.split("/").slice(3).join("/");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue