Ant Design of Vue 【v1】

4 阅读1分钟

一、Notification 通知提醒框

Notification 通知提醒框的description、message、closeIcon类型VNode

this.$notification.open({
          message: (h) => {
            return h('div', { style: 'width:462px;font-size: 18px;text-align:center;' }, message.title)
          },
          description: (h) => {
            return h('div', { class: 'notice-content', style: 'font-size: 14px;margin: 10px 0;max-height:400px;overflow-y:auto;' }, [
              h('div', { domProps: { innerHTML: message.content }, on: { click: (e) => { this.copyPhone(e) } } }),
              h('div', { class: 'date', style: 'text-align: end;' }, date)
            ])
          },
          closeIcon: h => {
            return h('span')
          }
        })**

二、Modal 对话框

Notification 通知提醒框的content类型VNode

this.$error({
            title: '标题
            content: h => {
              return h('div', { style: {
                height: '500px'
                overflow: 'auto'
              },
              domProps: { innerHTML: res.message } })
            }
          })