guhongwei 2 gadi atpakaļ
vecāks
revīzija
5a2297e066
1 mainītis faili ar 9 papildinājumiem un 9 dzēšanām
  1. 9 9
      src/components/frame/btn-1.vue

+ 9 - 9
src/components/frame/btn-1.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="btn">
+  <div id="c-button">
     <el-button type="primary" @click="toAdd()" v-if="isAdd">新增</el-button>
     <el-button type="warning" v-if="isEdit">修改</el-button>
     <el-button type="danger" v-if="isDel">删除</el-button>
@@ -7,19 +7,19 @@
   </div>
 </template>
 <script setup lang="ts">
-import { toRefs } from 'vue';
+import { toRefs } from 'vue'
 const props = defineProps({
   isAdd: { type: Boolean, default: () => true },
   isEdit: { type: Boolean, default: () => false },
   isDel: { type: Boolean, default: () => false },
   isExport: { type: Boolean, default: () => false }
-});
-const { isAdd } = toRefs(props);
-const emit = defineEmits(['toAdd', 'toExport']);
+})
+const { isAdd } = toRefs(props)
+const emit = defineEmits(['toAdd', 'toExport'])
 const toAdd = () => {
-  emit('toAdd');
-};
+  emit('toAdd')
+}
 const toExport = () => {
-  emit('toExport');
-};
+  emit('toExport')
+}
 </script>