找回密码
 立即注册
首页 资源区 代码 vue 表格 vxe-table 加载数据的几种方式,更新数据的用 ...

vue 表格 vxe-table 加载数据的几种方式,更新数据的用法

杼氖 昨天 18:55
vue 表格 vxe-table 加载数据的几种方式,更新数据的用法,vue 最强大的表格组件,支持 vue2 和 vue3,功能太多,这里介绍基础用法
https://vxetable.cn
双向绑定 data 方式

数据是双向同步的,修改 data 就可以自动刷新
1.gif
  1. <template>
  2.   
  3.     <vxe-button status="primary" @click="loadList1Event">修改1</vxe-button>
  4.     <vxe-button status="primary" @click="loadList2Event">修改2</vxe-button>
  5.     <vxe-button status="primary" @click="loadList3Event">修改3</vxe-button>
  6.     <vxe-grid v-bind="gridOptions"></vxe-grid>
  7.   
  8. </template>
复制代码
调用方法刷新数据

除了修改 data 之外,还可以通过调用 loadData、reloadData 方法刷新数据
2.gif
  1. <template>
  2.   
  3.     <vxe-button status="primary" @click="loadList1Event">修改1</vxe-button>
  4.     <vxe-button status="primary" @click="loadList2Event">修改2</vxe-button>
  5.     <vxe-button status="primary" @click="loadList3Event">修改3</vxe-button>
  6.     <vxe-grid v-bind="gridOptions"></vxe-grid>
  7.   
  8. </template>
复制代码
来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

相关推荐

您需要登录后才可以回帖 登录 | 立即注册