How does vue control the click events that trigger el-button through js?

html:

<el-button ref="inputResult" @click="inputResult"></el-button>

js:

this.$nextTick(() => {
    this.$refs.inputResult.click()
})

error log:

Vue warn]: Error in nextTick: "TypeError: _this.$refs.inputResult.click is not a function"

how to trigger the click time of el-button through js?

May.14,2021

I don't understand why not directly

 this.inputResult()

, do you have to rely on the event of button to trigger it?

-asseek 5 days ago
replied to asseek:
@ asseek brain seems to have a short circuit.

-coder94 5 days ago


this.$refs.inputResult.$emit('click')


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