注意了是vue-EasyUI 不是Jquery版本
vue-EasyUI文档地址:https://www.jeasyui.cn/document/vue/index.html
效果贴图
代码
<!--数据表格-->
<DataGrid :data="data" :loading="isLoading" loadMsg="数据加载中。。。">
<!--多选框-->
<GridColumn field="ck" :width="10" align="center">
<template slot="header" slot-scope="scope">
<CheckBox v-model="allChecked" @checkedChange="onAllCheckedChange($event)" ></CheckBox>
</template>
<template slot="body" slot-scope="scope">
<CheckBox v-model="scope.row.selected" @checkedChange="onCheckedChange($event)"></CheckBox>
</template>
</GridColumn>
<GridColumn :field="item.field" :title="item.title" :index="index" v-for="(item,index) in column" :width="item.width" align="center"></GridColumn>
<!--自定义列-->
<GridColumn field="operation" title="操作" align="center" width="15">
<template slot="cell" slot-scope="row,column,rowIndex">
<LinkButton iconCls="icon-edit" @click="getRow(row.row)" title="编辑数据">编辑</LinkButton>
</template>
</GridColumn>
</DataGrid>