mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
优化
This commit is contained in:
parent
112cb37802
commit
f5ca761ed1
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "front-next",
|
||||
"version": "5.1.0",
|
||||
"version": "5.1.1",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"build": "vite build",
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -44,6 +44,13 @@ export default (): UserConfig => {
|
||||
svgBuilder("./src/icons/svg/"),
|
||||
cool()
|
||||
],
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
charset: false
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"/@": resolve("src"),
|
||||
|
Loading…
Reference in New Issue
Block a user