In the elementUI MessageBox pop-up box, the problem occurs when the custom message is VNode

href of a tag in VNode does not work

related codes

    const h = this.$createElement;
    this.$msgbox({
      title: "",
      message: h("p", null, [
        h("span", null, ""),
        h("a", { style: "color: teal", href:"https://segmentfault.com"}, "")
      ]),
      showCancelButton: false
    })


to write in attrs

this.$msgbox({
  title: '',
  message: h('p', null, [
    h('span', null, ''),
    h('a', {style: 'color: teal', attrs: {href: 'https://segmentfault.com'}}, ''),
  ]),
  showCancelButton: false,
});

see the object description below, copied from ide/render-function.html-sharp%E6%B7%B1%E5%85%A5-data-%E5%AF%B9%E8%B1%A1" rel=" nofollow noreferrer "> document

{
  // `v-bind:class` API
  // 
  'class': {
    foo: true,
    bar: false
  },
  // `v-bind:style` API
  // 
  style: {
    color: 'red',
    fontSize: '14px'
  },
  //  HTML 
  attrs: {
    id: 'foo'
  },
  //  props
  props: {
    myProp: 'bar'
  },
  // DOM 
  domProps: {
    innerHTML: 'baz'
  },
  //  `on`
  //  `v-on:keyup.enter` 
  //  keyCode
  on: {
    click: this.clickHandler
  },
  // 
  // `vm.$emit` 
  nativeOn: {
    click: this.nativeClickHandler
  },
  //  `binding`  `oldValue`
  //  Vue 
  directives: [
    {
      name: 'my-custom-directive',
      value: '2',
      expression: '1 + 1',
      arg: 'foo',
      modifiers: {
        bar: true
      }
    }
  ],
  // 
  // { name: props => VNode | Array<VNode> }
  scopedSlots: {
    default: props => createElement('span', props.text)
  },
  // 
  slot: 'name-of-slot',
  // 
  key: 'myKey',
  ref: 'myRef',
  //  ref 
  //  `$refs.myRef` 
  refInFor: true
}

recommended Dialog dialog

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf0d5b-31d19.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf0d5b-31d19.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?