Vue.component('train-add', { template: `
{{item.title}}
{{item.contact}}
{{item.mobile}}
{{item.address}}
`, data() { return {} }, props: { list: { type: Array, default: [], }, }, methods: { onAdd(id) { this.$dialog.confirm({ title: '提示', message: '确定添加?', }).then(() => { this.$emit('add', id); }) }, }, });