baybreezy
baybreezy
NNuxt
Created by baybreezy on 12/26/2024 in #❓・help
Prevent Full Page Reload & Stop sidebar from scrolling to top
I am having an issue with my documentation. You can see more about the issue here: https://github.com/BayBreezy/ui-thing/issues/52 When I click a link from the navigation on the left, a full page reload is triggered. How do i prevent this? The reload causes the navigation to scroll back to the top of the page. You can visit this website to see what I am talking about : https://ui-thing.behonbaker.com/getting-started/introduction
5 replies
NNuxt
Created by baybreezy on 5/22/2023 in #❓・help
Render function for VCalendar
Hey, can anyone help me with creating a render function for this VCalendar package? The issue I am having is with getting the slots to work. This is the code I have that is not working. Idk how to pass the slots so that when i use it in my template files, it will actually use the slot
import { setupCalendar, Calendar, DatePicker } from "v-calendar";
import { ClientOnly } from "#components";

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(setupCalendar, {});

nuxtApp.vueApp.component("VCalendar", {
setup(props, ctx) {
const slots = ctx.slots.default ? ctx.slots.default() : ctx.slots;

return () =>
h(ClientOnly, () =>
h(
Calendar,
{
...props,
...ctx.attrs,
color: "gray",
isDark: { selector: "html", darkClass: "dark" },
}
// slots area
)
);
},
});
});
import { setupCalendar, Calendar, DatePicker } from "v-calendar";
import { ClientOnly } from "#components";

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(setupCalendar, {});

nuxtApp.vueApp.component("VCalendar", {
setup(props, ctx) {
const slots = ctx.slots.default ? ctx.slots.default() : ctx.slots;

return () =>
h(ClientOnly, () =>
h(
Calendar,
{
...props,
...ctx.attrs,
color: "gray",
isDark: { selector: "html", darkClass: "dark" },
}
// slots area
)
);
},
});
});
1 replies
NNuxt
Created by baybreezy on 2/14/2023 in #❓・help
`types` are not exported by default from `utils` folder
I have a few types in a validation file inside the utils folder. The schemas that I exported are auto-imported but the types are not. How do i declare types globally? here is a snapshot of the validation.ts file:
import { object, string, number, date, boolean, InferType } from "yup";

export const PaymentSchema = object({
paymentMethod: string().oneOf(["Direct Payment", "Bank Transfer"]).required("Select a method"),
transactionId: string().min(3).required("Enter the receipt ID"),
});
// This is not auto-imported in any file
export type TPayment = InferType<typeof PaymentSchema>;
import { object, string, number, date, boolean, InferType } from "yup";

export const PaymentSchema = object({
paymentMethod: string().oneOf(["Direct Payment", "Bank Transfer"]).required("Select a method"),
transactionId: string().min(3).required("Enter the receipt ID"),
});
// This is not auto-imported in any file
export type TPayment = InferType<typeof PaymentSchema>;
Thanks for the help.
3 replies
NNuxt
Created by baybreezy on 11/22/2022 in #❓・help
Toast notification that appears when you copy install code in modules page
Can someone point me to the code/package that displays the little toast that pops up at the bottom on the page here: https://nuxt.com/modules/tailwindcss When you click on yarn add @nuxtjs/tailwindcss button, the toast appears.
5 replies