ItemModal.vue 690 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <el-dialog
  3. :title="title"
  4. :visible.sync="modal"
  5. width="80%"
  6. @close="
  7. res => {
  8. $emit('cancel');
  9. }
  10. "
  11. >
  12. <span>这是一段信息</span>
  13. <span slot="footer" class="dialog-footer">
  14. <el-button @click="modal = false">取消</el-button>
  15. <el-button type="primary" @click="modal = false">确定</el-button>
  16. </span>
  17. </el-dialog>
  18. </template>
  19. <script>
  20. export default {
  21. name: 'ItemModal',
  22. props: {
  23. id: {
  24. type: String,
  25. default: ''
  26. }
  27. },
  28. data() {
  29. return {
  30. modal: true,
  31. title: '',
  32. };
  33. },
  34. mounted() {
  35. },
  36. methods: {
  37. };
  38. </script>
  39. <style lang="scss" scoped></style>