mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
优化
This commit is contained in:
parent
112cb37802
commit
f5ca761ed1
@ -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",
|
||||||
|
@ -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
|
||||||
})
|
})
|
||||||
|
@ -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"),
|
||||||
|
Loading…
Reference in New Issue
Block a user