[其他] 初始化项目结构
This commit is contained in:
9
src/module/button/index.ts
Normal file
9
src/module/button/index.ts
Normal 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 || 'LayButton ', Component)
|
||||
}
|
||||
|
||||
export default Component as IDefineComponent
|
||||
14
src/module/button/index.vue
Normal file
14
src/module/button/index.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<button class="layui-btn" :class="[type ? 'layui-btn-' + type : '']">
|
||||
<slot></slot>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script setup name="LayButton" lang="ts">
|
||||
import { defineProps } from "@vue/runtime-core";
|
||||
|
||||
const props = defineProps<{
|
||||
type?: string
|
||||
}>()
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user