@arco-design/web-vue
Version:
Arco Design Vue 2.0: A Vue.js 3 UI Library
52 lines (51 loc) • 1.22 kB
JavaScript
"use strict";
var vue = require("vue");
var globalConfig = require("../_utils/global-config.js");
var context = require("./context.js");
var pluginVue_exportHelper = require("../_virtual/plugin-vue_export-helper.js");
const _sfc_main = vue.defineComponent({
name: "ButtonGroup",
props: {
type: {
type: String
},
status: {
type: String
},
shape: {
type: String
},
size: {
type: String
},
disabled: {
type: Boolean
}
},
setup(props) {
const { type, size, status, disabled, shape } = vue.toRefs(props);
const prefixCls = globalConfig.getPrefixCls("btn-group");
vue.provide(
context.buttonGroupInjectionKey,
vue.reactive({
type,
size,
shape,
status,
disabled
})
);
return {
prefixCls
};
}
});
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("div", {
class: vue.normalizeClass(_ctx.prefixCls)
}, [
vue.renderSlot(_ctx.$slots, "default")
], 2);
}
var ButtonGroup = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["render", _sfc_render]]);
module.exports = ButtonGroup;