How to bind v-if or v-show to vue render function

the table component of iview is used in the vue project. You need to generate a button when you use the render function to customize the table, but this button requires v-if or v-show to show hidden

.

knows how to bind click, but not how to bind v-if

consult

iview Custom form

Feb.28,2021

The display of the

button is hidden. Can you see if you can do this?

style: {
      marginRight: '5px',
      display:(params.row.picNames==null)?"none":"inline-block",
   },

with the ternary operator, you may need to add a field to the object to determine what is being done to determine whether to show or hide


ide/render-function.html-sharpv-if-%E5%92%8C-v-for" rel=" nofollow noreferrer "> https://cn.vuejs.org/v2/guide.


write the if () statement directly, wrap the entire return content with {}, and then write another return, in else {}, but it works


the description in the vue document is as follows:

I understand that there is no v-if in the render function, which is a practical application of API,. You can use two answers, ternary expressions or if () statements in the upper floor
.

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-1ea4c41-1d00.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-1ea4c41-1d00.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?