birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
47 lines (46 loc) • 1.35 kB
JavaScript
;
const vue = require("vue");
const birdpaperIcon = require("birdpaper-icon");
const _hoisted_1 = ["textContent"];
const __default__ = vue.defineComponent({
name: "PaginationNext"
});
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
...__default__,
props: {
text: { type: String, default: "" },
disabled: { type: Boolean, default: false }
},
emits: ["click"],
setup(__props, { emit: emits }) {
const props = __props;
const name = "bp-pagination";
const clsName = vue.computed(() => {
let cls = [`${name}-item`, `${name}-next`];
if (props.disabled) {
cls.push(`${name}-item-disabled`);
}
return cls;
});
const handleClick = () => {
if (props.disabled)
return;
emits("click");
};
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("li", {
class: vue.normalizeClass(clsName.value),
onClick: handleClick
}, [
__props.text ? (vue.openBlock(), vue.createElementBlock("span", {
key: 0,
textContent: vue.toDisplayString(__props.text)
}, null, 8, _hoisted_1)) : (vue.openBlock(), vue.createBlock(vue.unref(birdpaperIcon.IconArrowRightSLine), {
key: 1,
size: "16px"
}))
], 2);
};
}
});
module.exports = _sfc_main;