ivue-material-plus
Version:
A high quality UI components Library with Vue.js
26 lines (23 loc) • 649 B
JavaScript
import { h } from 'vue';
const genPickerButton = (emit, propsValue, value, updateName, content, readonly = false, staticClass = "") => {
const active = propsValue === value;
const click = (event) => {
event.stopPropagation();
emit(`update:${updateName}`, value);
};
return h(
"div",
{
class: {
[`ivue-picker-title-btn ${staticClass}`]: true,
["ivue-picker-readonly"]: readonly
},
onClick: active || readonly ? void 0 : click
},
{
default: () => Array.isArray(content) ? content : [content]
}
);
};
export { genPickerButton };
//# sourceMappingURL=picker-button.mjs.map