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", "name": "front-next",
"version": "5.1.0", "version": "5.1.1",
"scripts": { "scripts": {
"dev": "vite --host", "dev": "vite --host",
"build": "vite build", "build": "vite build",

View File

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

View File

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