Files
magic-boot/magic-boot-ui/src/views/examples/editor-table.vue
T
2021-10-24 20:09:53 +08:00

36 lines
669 B
Vue

<template>
<div style="padding: 50px;">
<el-button type="primary" @click="getData" style="margin-bottom: 10px">获取数据</el-button>
<pd-editor-table v-model="tableDatas" :cols="cols" :show-no="false" />
</div>
</template>
<script>
export default {
name: 'EditorTable',
data() {
return {
tableDatas: [],
cols: [{
type: 'input',
field: 'name',
title: '名称'
}, {
type: 'select',
field: 'role',
title: '角色',
properties: {
type: 'dict_type'
}
}]
}
},
methods: {
getData() {
console.log(this.tableDatas)
}
}
}
</script>