[新增] icon 组件
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { App } from 'vue'
|
||||
import Component from './index.vue'
|
||||
import type { IDefineComponent } from '../../type/index'
|
||||
import type { IDefineComponent } from '../type/index'
|
||||
|
||||
Component.install = (app: App) => {
|
||||
app.component(Component.name || 'LayButton ', Component)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<button class="layui-btn" :class="[type ? 'layui-btn-' + type : '']">
|
||||
<button class="layui-btn" :class="[type ? 'layui-btn-' + type : '',size ? 'layui-btn-' + size : '']">
|
||||
<slot></slot>
|
||||
</button>
|
||||
</template>
|
||||
@@ -8,7 +8,8 @@
|
||||
import { defineProps } from "@vue/runtime-core";
|
||||
|
||||
const props = defineProps<{
|
||||
type?: string
|
||||
type?: string,
|
||||
size?: string
|
||||
}>()
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<button class="layui-btn">按钮</button>
|
||||
<i class="layui-icon" :class="[type]"></i>
|
||||
</template>
|
||||
|
||||
<script setup name="LayButton" lang="ts">
|
||||
|
||||
const props =
|
||||
defineProps<{
|
||||
type?: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user