xqq_ele
Version:
框架
25 lines (24 loc) • 492 B
JavaScript
import { defineComponent as s, computed as r } from "vue";
import c from "./config.js";
const m = s({
name: "XButton",
components: {},
props: c,
emits: ["click"],
setup(t, { emit: n }) {
const o = (e) => {
t.disabled && e.preventDefault(), n("click", e);
};
return {
classes: r(() => ({
["x-button"]: !0,
[`x-${t.type || "default"}`]: !0,
["x-danger"]: !!t.danger
})),
onClick: o
};
}
});
export {
m as default
};