1.编写封装组件
<template>
<el-button
v-permission="permission"
:type="addbtnType"
:icon="icon"
:label="label"
:long="btnLong"
:style="Style"
:disabled="disabled"
:loading="btnLoading"
@click="addbtnSubmit('')"
>
{
{ addbtnText }}
</el-button>
<!-- 插槽按钮-->
<!-- <slot name="footer" v-if="permission"></slot> -->
</template>
<script>
import { ref, reactive, toRefs, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { Search, Delete, Edit } from "@element-plus/icons";
export default {
components: {
Search,
},
name: "ikechen-form",
props: {
addbtnText: {
type: String,
default: "",
}, // 按钮文字