接入avue

This commit is contained in:
aixianling
2024-01-22 18:19:56 +08:00
parent ad0a91750c
commit 40860776a0
7 changed files with 180 additions and 48 deletions

View File

@@ -1,23 +1,42 @@
<script>
import {AgGridVue} from "ag-grid-vue";
import "ag-grid-community/styles/ag-grid.min.css"
import "ag-grid-community/styles/ag-theme-balham.min.css"
import Vue from 'vue'
console.log(window.AVUE)
export default {
name: "tableEditor",
model: {
event: "input",
prop: "tableData"
},
props: {
tableData: {default: () => []},
configs: {default: () => []}
},
components: {AgGridVue},
computed: {
columns: v => v.configs
},
created() {
Vue.use(window.AVUE, {
size: 'small',
tableSize: 'small',
calcHeight: 48,
})
}
}
</script>
<template>
<section class="tableEditor">
<ag-grid-vue class="ag-theme-balham" :columnDefs="columns" :rowData="tableData"/>
<avue-crud/>
</section>
</template>
<style scoped lang="scss">
.tableEditor {
width: 100%;
height: auto;
.ag-theme-balham {
height: 300px;
}
}
</style>