mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-26 04:38:34 +08:00
我们发布啦
This commit is contained in:
22
admin/src/components/articleList/articleFrom/index.js
Normal file
22
admin/src/components/articleList/articleFrom/index.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import Element from 'element-ui'
|
||||
import '@/styles/element-variables.scss'
|
||||
import articleFromComponent from './index.vue'
|
||||
import Vue from 'vue'
|
||||
import Cookies from 'js-cookie'
|
||||
Vue.use(Element, {
|
||||
size: Cookies.get('size') || 'medium' // set element-ui default size
|
||||
})
|
||||
const articleFrom = {}
|
||||
articleFrom.install = function(Vue, options) {
|
||||
const ToastConstructor = Vue.extend(articleFromComponent)
|
||||
// 生成一个该子类的实例
|
||||
const instance = new ToastConstructor()
|
||||
instance.$mount(document.createElement('div'))
|
||||
document.body.appendChild(instance.$el)
|
||||
Vue.prototype.$modalArticle = function(callback, handle) {
|
||||
instance.visible = true
|
||||
instance.callback = callback
|
||||
instance.handle = handle
|
||||
}
|
||||
}
|
||||
export default articleFrom
|
||||
48
admin/src/components/articleList/articleFrom/index.vue
Normal file
48
admin/src/components/articleList/articleFrom/index.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="visible"
|
||||
width="896px"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<article-list v-if="visible" :handle="handle" :userIds="userIds" :couponId="couponId" @getArticle="getArticle" :keyNum="keyNum"></article-list>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import articleList from '../index.vue'
|
||||
export default {
|
||||
name: 'CouponFrom',
|
||||
components:{ articleList },
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
callback: function() {},
|
||||
handle: '',
|
||||
keyNum: 0,
|
||||
couponId: [],
|
||||
userIds: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// show() {
|
||||
// this.visible = this.show
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.visible = false
|
||||
},
|
||||
getArticle(couponObj) {
|
||||
this.callback(couponObj)
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user