How can the render function implement Modal, add parameters to it? For example, add style to Modal.

The Modal of

iView uses the render function to display Modal. Here you can have the parameters of the sub-block Input :

methods: {
            handleRender () {
                this.$Modal.confirm({
                    render: (h) => {
                        return h("Input", {
                            props: {
                                value: this.value,
                                autofocus: true,
                                placeholder: "Please enter your name..."
                            },
                            on: {
                                input: (val) => {
                                    this.value = val;
                                }
                            }
                        })
                    }
                })
            }
        }
        

but excuse me, how can I add parameters to Modal? For example, add style to Modal. Please enter the code

Feb.27,2021

see the official documentation, and the link is here ide/render-function.html-sharp%E6%B7%B1%E5%85%A5-data-%E5%AF%B9%E8%B1%A1" rel=" nofollow noreferrer "> https://cn.vuejs.org/v2/guide.


Thank you, yuanxiaowa,. I made it in combination with iView's modal document:

context.$Modal.info({
    render: (h) => {
      return h('img', {
          attrs: {
            src: img_url,
            style: img_style
          },
          on: {},
        },
      )
    },
    title: "",
    styles: "{width: '100%';}"
  })
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-1b2b8f5-2ae09.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-1b2b8f5-2ae09.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?