mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-21 14:13:36 +08:00
Merge branch 'main' into gitee
This commit is contained in:
@@ -3,8 +3,12 @@ import { http } from "@/utils/http";
|
||||
export type UserResult = {
|
||||
success: boolean;
|
||||
data: {
|
||||
/** 头像 */
|
||||
avatar: string;
|
||||
/** 用户名 */
|
||||
username: string;
|
||||
/** 昵称 */
|
||||
nickname: string;
|
||||
/** 当前登录用户的角色 */
|
||||
roles: Array<string>;
|
||||
/** `token` */
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
// Export,
|
||||
// Keyboard,
|
||||
// Validator,
|
||||
Custom,
|
||||
// 可选组件
|
||||
Icon,
|
||||
Column,
|
||||
@@ -64,14 +65,15 @@ VXETable.config({
|
||||
|
||||
export function useVxeTable(app: App) {
|
||||
// 表格功能
|
||||
// app.use(Filter)
|
||||
// .use(Edit)
|
||||
// .use(Menu)
|
||||
// .use(Export)
|
||||
// .use(Keyboard)
|
||||
// .use(Validator)
|
||||
// 可选组件
|
||||
app
|
||||
// .use(Filter)
|
||||
// .use(Edit)
|
||||
// .use(Menu)
|
||||
// .use(Export)
|
||||
// .use(Keyboard)
|
||||
// .use(Validator)
|
||||
.use(Custom)
|
||||
// 可选组件
|
||||
.use(Icon)
|
||||
.use(Column)
|
||||
// .use(Colgroup)
|
||||
|
||||
@@ -95,22 +95,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/able/word",
|
||||
name: "Word",
|
||||
component: () => import("@/views/able/word.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureWord")
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/able/excels",
|
||||
name: "Excels",
|
||||
component: () => import("@/views/able/excels.vue"),
|
||||
meta: {
|
||||
title: $t("menus.pureExcels")
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/able/pdf",
|
||||
name: "Pdf",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineStore } from "pinia";
|
||||
import {
|
||||
type appType,
|
||||
store,
|
||||
getConfig,
|
||||
defineStore,
|
||||
storageLocal,
|
||||
deviceDetection,
|
||||
responsiveStorageNameSpace
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from "pinia";
|
||||
import {
|
||||
store,
|
||||
getConfig,
|
||||
defineStore,
|
||||
storageLocal,
|
||||
responsiveStorageNameSpace
|
||||
} from "../utils";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { defineStore } from "pinia";
|
||||
import {
|
||||
type multiType,
|
||||
type positionType,
|
||||
@@ -7,7 +8,6 @@ import {
|
||||
isNumber,
|
||||
isBoolean,
|
||||
getConfig,
|
||||
defineStore,
|
||||
routerArrays,
|
||||
storageLocal,
|
||||
responsiveStorageNameSpace
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { defineStore } from "pinia";
|
||||
import {
|
||||
type cacheType,
|
||||
store,
|
||||
@@ -5,7 +6,6 @@ import {
|
||||
ascending,
|
||||
getKeyList,
|
||||
filterTree,
|
||||
defineStore,
|
||||
constantMenus,
|
||||
filterNoPermissionTree,
|
||||
formatFlatteningRoutes
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type setType, store, defineStore, getConfig } from "../utils";
|
||||
import { defineStore } from "pinia";
|
||||
import { type setType, store, getConfig } from "../utils";
|
||||
|
||||
export const useSettingStore = defineStore({
|
||||
id: "pure-setting",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineStore } from "pinia";
|
||||
import {
|
||||
type userType,
|
||||
store,
|
||||
router,
|
||||
defineStore,
|
||||
resetRouter,
|
||||
routerArrays,
|
||||
storageLocal
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export { store } from "@/store";
|
||||
export { defineStore } from "pinia";
|
||||
export { routerArrays } from "@/layout/types";
|
||||
export { router, resetRouter, constantMenus } from "@/router";
|
||||
export { getConfig, responsiveStorageNameSpace } from "@/config";
|
||||
|
||||
@@ -86,7 +86,8 @@ html.dark {
|
||||
background: var(--el-bg-color) !important;
|
||||
}
|
||||
|
||||
.app-main {
|
||||
.app-main,
|
||||
.app-main-nofixed-header {
|
||||
background: #020409 !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import "@vue-office/excel/lib/index.css";
|
||||
import VueOfficeExcel from "@vue-office/excel";
|
||||
|
||||
defineOptions({
|
||||
name: "Excels"
|
||||
});
|
||||
|
||||
const excel = "https://xiaoxian521.github.io/hyperlink/other/excel.xlsx";
|
||||
|
||||
function renderedHandler() {
|
||||
console.log("渲染完成");
|
||||
}
|
||||
|
||||
function errorHandler() {
|
||||
console.log("渲染失败");
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<vue-office-excel
|
||||
:src="excel"
|
||||
style="height: 100vh"
|
||||
@rendered="renderedHandler"
|
||||
@error="errorHandler"
|
||||
/>
|
||||
</template>
|
||||
@@ -1,18 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import "@vue-office/docx/lib/index.css";
|
||||
import VueOfficeDocx from "@vue-office/docx";
|
||||
|
||||
defineOptions({
|
||||
name: "Word"
|
||||
});
|
||||
|
||||
const docx = "https://xiaoxian521.github.io/hyperlink/other/word.docx";
|
||||
|
||||
function rendered() {
|
||||
console.log("渲染完成");
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<vue-office-docx :src="docx" @rendered="rendered" />
|
||||
</template>
|
||||
@@ -13,7 +13,7 @@ defineOptions({
|
||||
});
|
||||
|
||||
const imgSrc = ref("");
|
||||
const cropperInfo = ref();
|
||||
const cropperBlob = ref();
|
||||
const cropRef = ref();
|
||||
const uploadRef = ref();
|
||||
const isShow = ref(false);
|
||||
@@ -66,11 +66,11 @@ const handleClose = () => {
|
||||
isShow.value = false;
|
||||
};
|
||||
|
||||
const onCropper = info => (cropperInfo.value = info);
|
||||
const onCropper = ({ blob }) => (cropperBlob.value = blob);
|
||||
|
||||
const handleSubmitImage = () => {
|
||||
const formData = createFormData({
|
||||
files: new File([cropperInfo.value], "avatar")
|
||||
files: new File([cropperBlob.value], "avatar")
|
||||
});
|
||||
formUpload(formData)
|
||||
.then(({ success, data }) => {
|
||||
|
||||
Reference in New Issue
Block a user