From 9057e04efad1b7d61c77a72e5c37a504d0aee935 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 26 九月 2025 09:24:03 +0800
Subject: [PATCH] H5静态化

---
 admin/src/components/common/ImportButton.vue |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/admin/src/components/common/ImportButton.vue b/admin/src/components/common/ImportButton.vue
new file mode 100644
index 0000000..c81eb37
--- /dev/null
+++ b/admin/src/components/common/ImportButton.vue
@@ -0,0 +1,37 @@
+<template>
+  <div class="import-button">
+    <el-button @click="$refs.importWindow.open(text)">{{text}}</el-button>
+    <ImportWindow :action="action" :template-path="templatePath" :template-name="templateName" ref="importWindow" @success="handleSuccess"/>
+  </div>
+</template>
+
+<script>
+import ImportWindow from './ImportWindow'
+export default {
+  name: 'ImportButton',
+  components: { ImportWindow },
+  props: {
+    // 鎸夐挳鏂囨
+    text: {
+      default: '瀵煎叆'
+    },
+    // 妯$増鍦板潃
+    templatePath: {
+      required: true
+    },
+    // 涓嬭浇鍚庣殑妯$増鏂囦欢鍚嶇О
+    templateName: {
+      required: true
+    },
+    // 瀵煎叆鎺ュ彛鍦板潃
+    action: {
+      required: true
+    }
+  },
+  methods: {
+    handleSuccess () {
+      this.$emit('success')
+    }
+  }
+}
+</script>

--
Gitblit v1.9.3