import { render, createVNode } from "vue";
import notification from "../views/dialog/updateAnnouncement.vue";
// import auth from '@/plugins/auth'
const div = document.createElement('div')
div.setAttribute('class', 'my-message-contsiner')
// div.setAttribute('style', 'z-index: 2007;position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);')
document.body.appendChild(div)

export default (data) => {
  // 有某个权限则不显示
  // if (auth.hasPermi('')) {
  //   return
  // }
  // console.log(data)
  const { title, content, updateContent } = data
  // console.log(notification)
  console.log(div)
  // 创建虚拟 DOM
  const VNode = createVNode(notification, { title, content: updateContent })
  // console.log(VNode)
  // 通过 render 函数挂载到页面中
  render(VNode, div)
}
