12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <template>
- <div id="e-dialog">
- <el-dialog :title="dialog.title" :visible.sync="dialog.show" width="40%" :before-close="toClose" :close-on-click-modal="false" :append-to-body="true">
- <slot name="info"></slot>
- </el-dialog>
- </div>
- </template>
- <script>
- import { mapState, createNamespacedHelpers } from 'vuex';
- export default {
- name: 'e-dialog',
- props: {
- dialog: { type: Object, default: () => {} },
- },
- components: {},
- data: function() {
- return {};
- },
- created() {},
- methods: {
- toClose() {
- this.$emit('toClose');
- },
- },
- computed: {
- ...mapState(['user']),
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- watch: {
- test: {
- deep: true,
- immediate: true,
- handler(val) {},
- },
- },
- };
- </script>
- <style lang="less" scoped>
- /deep/.el-dialog__body {
- padding: 10px;
- min-height: 30px;
- max-height: 400px;
- overflow-y: auto;
- }
- </style>
|