对比新文件 |
| | |
| | | <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> |