Skip to content

ZeeLyn/vue-ui

Repository files navigation

vue-ui

Project setup

npm install @zeelyn/vue-ui

Usage

Modify main.js

import VueUI from "@zeelyn/vue-ui";
import "@zeelyn/vue-ui/dist/index.css";
const app = createApp(App);
app.use(VueUI,{
    theme:"dark",//or light
    minWidth:100,
    maxWidth:300
});
this.$loading.show();
this.$loading.hide();
this.$alert({
            title: "this is title",
            message: "this is content",
            showCancel: true,
            confirmText: "OK",
            cancelText: "Cancel",
            confirmColor: "#fff",
            cancelColor: "#ff0000",
            onConfirm: () => {
                console.warn("click ok");
            },
            onCancel: () => {
                console.warn("click cancel");
            },
        })
            .then(() => {
                console.log("confirm");
            })
            .catch(() => {
                console.log("cancel");
            });
this.$alert("This is message");
this.$toast.show({
                    message: "This is toast content!",
                    icon: "success",
                })
                .then(() => {
                    console.log("toast closed");
                });
this.$toast.success("This is message!");
this.$toast.error("This is message!");
this.$toast.warning("This is message!");
this.$toast.info("This is message!");

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published