There is a question that the component written by vue needs $emit to modify the value of the parent component, but the UI framework does not need me to do this. How can I write it like the UI framework?

vue write component
props after receiving the parameters, if you need to modify the parameters
for example, the following figure

$emit
add minus
UI
element-ui UI add minus

$emit

as above, the InputNumber of element-ui
does not need to enter add and minus, but can change the value normally

Jun.28,2022

provide/inject find out. ide-inject" rel=" nofollow noreferrer "> https://cn.vuejs.org/v2/api/-sharp...


at least element-ui and iview are useful to $emit, but we don't need to use $emit
such as @ current-change= "handleCurrentChange"
code address in the following code: http://element-cn.eleme.io/-sharp/...

.
<template>
  <el-table
    ref="singleTable"
    :data="tableData"
    highlight-current-row
    @current-change="handleCurrentChange"
    style="width: 100%">
    <el-table-column
      type="index"
      width="50">
    </el-table-column>
    <el-table-column
      property="date"
      label=""
      width="120">
    </el-table-column>
    <el-table-column
      property="name"
      label=""
      width="120">
    </el-table-column>
    <el-table-column
      property="address"
      label="">
    </el-table-column>
  </el-table>
  <div style="margin-top: 20px">
    <el-button @click="setCurrent(tableData[1])"></el-button>
    <el-button @click="setCurrent()"></el-button>
  </div>
</template>

is implemented in the el-table component through the following code

table.$emit('current-change', null, oldCurrentRow);
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-1b3b7c5-2c293.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-1b3b7c5-2c293.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?