This commit is contained in:
icssoa 2022-04-13 01:57:36 +08:00
parent 112cb37802
commit f5ca761ed1
3 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "front-next",
"version": "5.1.0",
"version": "5.1.1",
"scripts": {
"dev": "vite --host",
"build": "vite build",

View File

@ -15,8 +15,10 @@
</template>
<script lang="ts">
import { useCrud } from "@cool-vue/crud";
import { defineComponent, inject, ref } from "vue";
import { currentDate, export_json_to_excel } from "../utils";
import { service } from "../../../cool/service/index";
export default defineComponent({
name: "cl-export-btn",
@ -52,7 +54,7 @@ export default defineComponent({
setup(props) {
const loading = ref<boolean>(false);
const crud = inject<any>("crud");
const Crud = useCrud();
async function getHeader(columns: any[], fields: any[]) {
return (
@ -67,9 +69,9 @@ export default defineComponent({
if (props.data) {
return props.data;
} else {
return crud.service
return Crud.value?.service
.page({
...crud.paramsReplace(crud.params),
...Crud.value?.paramsReplace(Crud.value.params),
maxExportLimit: props.maxExportLimit,
isExport: true
})

View File

@ -44,6 +44,13 @@ export default (): UserConfig => {
svgBuilder("./src/icons/svg/"),
cool()
],
css: {
preprocessorOptions: {
scss: {
charset: false
}
}
},
resolve: {
alias: {
"/@": resolve("src"),