[新增] button-group 按钮组

This commit is contained in:
就眠仪式
2021-09-27 13:35:53 +08:00
parent 663cb908b5
commit 5479eabf66
5 changed files with 105 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
<template>
<button
class="layui-btn"
:class="[type ? 'layui-btn-' + type : '', size ? 'layui-btn-' + size : '']"
:class="[type ? 'layui-btn-' + type : '', size ? 'layui-btn-' + size : '',fluid ? 'layui-btn-fluid':'',radius ? 'layui-btn-radius':'']"
>
<slot></slot>
</button>
@@ -14,5 +14,7 @@ const props =
defineProps<{
type?: string
size?: string
fluid?: boolean
radius?: boolean
}>()
</script>

View File

@@ -0,0 +1,9 @@
import type { App } from 'vue'
import Component from './index.vue'
import type { IDefineComponent } from '../type/index'
Component.install = (app: App) => {
app.component(Component.name || 'LayButtonGroup', Component)
}
export default Component as IDefineComponent

View File

@@ -0,0 +1,9 @@
<template>
<div class="layui-btn-group">
<slot></slot>
</div>
</template>
<script setup name="LayButtonGroup" lang="ts">
</script>