mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	Merge branch 'main' into gitee
This commit is contained in:
		
						commit
						c8686999f5
					
				@ -157,7 +157,7 @@ menus:
 | 
				
			|||||||
  pureTimeline: Time Line
 | 
					  pureTimeline: Time Line
 | 
				
			||||||
  pureLineTree: LineTree
 | 
					  pureLineTree: LineTree
 | 
				
			||||||
  pureList: List Page
 | 
					  pureList: List Page
 | 
				
			||||||
  pureListCard: Card List Page
 | 
					  pureCardList: Card List Page
 | 
				
			||||||
  pureDebounce: Debounce & Throttle
 | 
					  pureDebounce: Debounce & Throttle
 | 
				
			||||||
  pureFormDesign: Form Design
 | 
					  pureFormDesign: Form Design
 | 
				
			||||||
  pureBarcode: Barcode
 | 
					  pureBarcode: Barcode
 | 
				
			||||||
 | 
				
			|||||||
@ -157,7 +157,7 @@ menus:
 | 
				
			|||||||
  pureTimeline: 时间线
 | 
					  pureTimeline: 时间线
 | 
				
			||||||
  pureLineTree: 树形连接线
 | 
					  pureLineTree: 树形连接线
 | 
				
			||||||
  pureList: 列表页面
 | 
					  pureList: 列表页面
 | 
				
			||||||
  pureListCard: 卡片列表页
 | 
					  pureCardList: 卡片列表页
 | 
				
			||||||
  pureDebounce: 防抖节流
 | 
					  pureDebounce: 防抖节流
 | 
				
			||||||
  pureFormDesign: 表单设计器
 | 
					  pureFormDesign: 表单设计器
 | 
				
			||||||
  pureBarcode: 条形码
 | 
					  pureBarcode: 条形码
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										30
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								package.json
									
									
									
									
									
								
							@ -82,10 +82,10 @@
 | 
				
			|||||||
    "nprogress": "^0.2.0",
 | 
					    "nprogress": "^0.2.0",
 | 
				
			||||||
    "path": "^0.12.7",
 | 
					    "path": "^0.12.7",
 | 
				
			||||||
    "pinia": "^2.1.7",
 | 
					    "pinia": "^2.1.7",
 | 
				
			||||||
    "pinyin-pro": "^3.20.0",
 | 
					    "pinyin-pro": "^3.20.1",
 | 
				
			||||||
    "plus-pro-components": "^0.0.10",
 | 
					    "plus-pro-components": "^0.0.11",
 | 
				
			||||||
    "qrcode": "^1.5.3",
 | 
					    "qrcode": "^1.5.3",
 | 
				
			||||||
    "qs": "^6.12.0",
 | 
					    "qs": "^6.12.1",
 | 
				
			||||||
    "responsive-storage": "^2.2.0",
 | 
					    "responsive-storage": "^2.2.0",
 | 
				
			||||||
    "sortablejs": "^1.15.2",
 | 
					    "sortablejs": "^1.15.2",
 | 
				
			||||||
    "swiper": "^11.1.1",
 | 
					    "swiper": "^11.1.1",
 | 
				
			||||||
@ -93,11 +93,11 @@
 | 
				
			|||||||
    "v-contextmenu": "^3.2.0",
 | 
					    "v-contextmenu": "^3.2.0",
 | 
				
			||||||
    "v3-infinite-loading": "^1.3.1",
 | 
					    "v3-infinite-loading": "^1.3.1",
 | 
				
			||||||
    "version-rocket": "^1.7.1",
 | 
					    "version-rocket": "^1.7.1",
 | 
				
			||||||
    "vue": "^3.4.21",
 | 
					    "vue": "^3.4.23",
 | 
				
			||||||
    "vue-i18n": "^9.12.0",
 | 
					    "vue-i18n": "^9.12.1",
 | 
				
			||||||
    "vue-json-pretty": "^2.4.0",
 | 
					    "vue-json-pretty": "^2.4.0",
 | 
				
			||||||
    "vue-pdf-embed": "^2.0.3",
 | 
					    "vue-pdf-embed": "^2.0.3",
 | 
				
			||||||
    "vue-router": "^4.3.0",
 | 
					    "vue-router": "^4.3.1",
 | 
				
			||||||
    "vue-tippy": "^6.4.1",
 | 
					    "vue-tippy": "^6.4.1",
 | 
				
			||||||
    "vue-types": "^5.1.1",
 | 
					    "vue-types": "^5.1.1",
 | 
				
			||||||
    "vue-virtual-scroller": "2.0.0-beta.8",
 | 
					    "vue-virtual-scroller": "2.0.0-beta.8",
 | 
				
			||||||
@ -106,13 +106,13 @@
 | 
				
			|||||||
    "vue3-puzzle-vcode": "^1.1.7",
 | 
					    "vue3-puzzle-vcode": "^1.1.7",
 | 
				
			||||||
    "vuedraggable": "^4.1.0",
 | 
					    "vuedraggable": "^4.1.0",
 | 
				
			||||||
    "vxe-table": "^4.5.22",
 | 
					    "vxe-table": "^4.5.22",
 | 
				
			||||||
    "wavesurfer.js": "^7.7.10",
 | 
					    "wavesurfer.js": "^7.7.11",
 | 
				
			||||||
    "xgplayer": "^3.0.16",
 | 
					    "xgplayer": "^3.0.16",
 | 
				
			||||||
    "xlsx": "^0.18.5"
 | 
					    "xlsx": "^0.18.5"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@commitlint/cli": "^19.2.1",
 | 
					    "@commitlint/cli": "^19.2.2",
 | 
				
			||||||
    "@commitlint/config-conventional": "^19.1.0",
 | 
					    "@commitlint/config-conventional": "^19.2.2",
 | 
				
			||||||
    "@commitlint/types": "^19.0.3",
 | 
					    "@commitlint/types": "^19.0.3",
 | 
				
			||||||
    "@eslint/js": "^9.0.0",
 | 
					    "@eslint/js": "^9.0.0",
 | 
				
			||||||
    "@faker-js/faker": "^8.4.1",
 | 
					    "@faker-js/faker": "^8.4.1",
 | 
				
			||||||
@ -128,10 +128,10 @@
 | 
				
			|||||||
    "@types/node": "^20.12.7",
 | 
					    "@types/node": "^20.12.7",
 | 
				
			||||||
    "@types/nprogress": "^0.2.3",
 | 
					    "@types/nprogress": "^0.2.3",
 | 
				
			||||||
    "@types/qrcode": "^1.5.5",
 | 
					    "@types/qrcode": "^1.5.5",
 | 
				
			||||||
    "@types/qs": "^6.9.14",
 | 
					    "@types/qs": "^6.9.15",
 | 
				
			||||||
    "@types/sortablejs": "^1.15.8",
 | 
					    "@types/sortablejs": "^1.15.8",
 | 
				
			||||||
    "@typescript-eslint/eslint-plugin": "^7.6.0",
 | 
					    "@typescript-eslint/eslint-plugin": "^7.7.0",
 | 
				
			||||||
    "@typescript-eslint/parser": "^7.6.0",
 | 
					    "@typescript-eslint/parser": "^7.7.0",
 | 
				
			||||||
    "@vitejs/plugin-vue": "^5.0.4",
 | 
					    "@vitejs/plugin-vue": "^5.0.4",
 | 
				
			||||||
    "@vitejs/plugin-vue-jsx": "^3.1.0",
 | 
					    "@vitejs/plugin-vue-jsx": "^3.1.0",
 | 
				
			||||||
    "autoprefixer": "^10.4.19",
 | 
					    "autoprefixer": "^10.4.19",
 | 
				
			||||||
@ -142,7 +142,7 @@
 | 
				
			|||||||
    "eslint-config-prettier": "^9.1.0",
 | 
					    "eslint-config-prettier": "^9.1.0",
 | 
				
			||||||
    "eslint-define-config": "^2.1.0",
 | 
					    "eslint-define-config": "^2.1.0",
 | 
				
			||||||
    "eslint-plugin-prettier": "^5.1.3",
 | 
					    "eslint-plugin-prettier": "^5.1.3",
 | 
				
			||||||
    "eslint-plugin-vue": "^9.24.1",
 | 
					    "eslint-plugin-vue": "^9.25.0",
 | 
				
			||||||
    "gradient-string": "^2.0.2",
 | 
					    "gradient-string": "^2.0.2",
 | 
				
			||||||
    "husky": "^9.0.11",
 | 
					    "husky": "^9.0.11",
 | 
				
			||||||
    "lint-staged": "^15.2.2",
 | 
					    "lint-staged": "^15.2.2",
 | 
				
			||||||
@ -155,14 +155,14 @@
 | 
				
			|||||||
    "rollup-plugin-visualizer": "^5.12.0",
 | 
					    "rollup-plugin-visualizer": "^5.12.0",
 | 
				
			||||||
    "sass": "^1.75.0",
 | 
					    "sass": "^1.75.0",
 | 
				
			||||||
    "stylelint": "^16.3.1",
 | 
					    "stylelint": "^16.3.1",
 | 
				
			||||||
    "stylelint-config-recess-order": "^5.0.0",
 | 
					    "stylelint-config-recess-order": "^5.0.1",
 | 
				
			||||||
    "stylelint-config-recommended-vue": "^1.5.0",
 | 
					    "stylelint-config-recommended-vue": "^1.5.0",
 | 
				
			||||||
    "stylelint-config-standard-scss": "^13.1.0",
 | 
					    "stylelint-config-standard-scss": "^13.1.0",
 | 
				
			||||||
    "stylelint-prettier": "^5.0.0",
 | 
					    "stylelint-prettier": "^5.0.0",
 | 
				
			||||||
    "svgo": "^3.2.0",
 | 
					    "svgo": "^3.2.0",
 | 
				
			||||||
    "tailwindcss": "^3.4.3",
 | 
					    "tailwindcss": "^3.4.3",
 | 
				
			||||||
    "typescript": "^5.4.5",
 | 
					    "typescript": "^5.4.5",
 | 
				
			||||||
    "vite": "^5.2.8",
 | 
					    "vite": "^5.2.9",
 | 
				
			||||||
    "vite-plugin-cdn-import": "^0.3.5",
 | 
					    "vite-plugin-cdn-import": "^0.3.5",
 | 
				
			||||||
    "vite-plugin-compression": "^0.5.1",
 | 
					    "vite-plugin-compression": "^0.5.1",
 | 
				
			||||||
    "vite-plugin-fake-server": "^2.1.1",
 | 
					    "vite-plugin-fake-server": "^2.1.1",
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										655
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										655
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -12,11 +12,11 @@ export default {
 | 
				
			|||||||
  children: [
 | 
					  children: [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      path: "/list/card",
 | 
					      path: "/list/card",
 | 
				
			||||||
      name: "ListCard",
 | 
					      name: "CardList",
 | 
				
			||||||
      component: () => import("@/views/list/card/index.vue"),
 | 
					      component: () => import("@/views/list/card/index.vue"),
 | 
				
			||||||
      meta: {
 | 
					      meta: {
 | 
				
			||||||
        icon: "ri:bank-card-line",
 | 
					        icon: "ri:bank-card-line",
 | 
				
			||||||
        title: $t("menus.pureListCard"),
 | 
					        title: $t("menus.pureCardList"),
 | 
				
			||||||
        showParent: true
 | 
					        showParent: true
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -264,8 +264,9 @@
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    & > .el-menu {
 | 
					    & > .el-menu {
 | 
				
			||||||
      i {
 | 
					      i,
 | 
				
			||||||
        margin-right: 20px;
 | 
					      svg {
 | 
				
			||||||
 | 
					        margin-right: 5px;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -40,7 +40,7 @@ export function getToken(): DataInfo<number> {
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
 * @description 设置`token`以及一些必要信息并采用无感刷新`token`方案
 | 
					 * @description 设置`token`以及一些必要信息并采用无感刷新`token`方案
 | 
				
			||||||
 * 无感刷新:后端返回`accessToken`(访问接口使用的`token`)、`refreshToken`(用于调用刷新`accessToken`的接口时所需的`token`,`refreshToken`的过期时间(比如30天)应大于`accessToken`的过期时间(比如2小时))、`expires`(`accessToken`的过期时间)
 | 
					 * 无感刷新:后端返回`accessToken`(访问接口使用的`token`)、`refreshToken`(用于调用刷新`accessToken`的接口时所需的`token`,`refreshToken`的过期时间(比如30天)应大于`accessToken`的过期时间(比如2小时))、`expires`(`accessToken`的过期时间)
 | 
				
			||||||
 * 将`accessToken`、`expires`这两条信息放在key值为authorized-token的cookie里(过期自动销毁)
 | 
					 * 将`accessToken`、`expires`、`refreshToken`这三条信息放在key值为authorized-token的cookie里(过期自动销毁)
 | 
				
			||||||
 * 将`avatar`、`username`、`nickname`、`roles`、`refreshToken`、`expires`这六条信息放在key值为`user-info`的localStorage里(利用`multipleTabsKey`当浏览器完全关闭后自动销毁)
 | 
					 * 将`avatar`、`username`、`nickname`、`roles`、`refreshToken`、`expires`这六条信息放在key值为`user-info`的localStorage里(利用`multipleTabsKey`当浏览器完全关闭后自动销毁)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export function setToken(data: DataInfo<Date>) {
 | 
					export function setToken(data: DataInfo<Date>) {
 | 
				
			||||||
@ -48,7 +48,7 @@ export function setToken(data: DataInfo<Date>) {
 | 
				
			|||||||
  const { accessToken, refreshToken } = data;
 | 
					  const { accessToken, refreshToken } = data;
 | 
				
			||||||
  const { isRemembered, loginDay } = useUserStoreHook();
 | 
					  const { isRemembered, loginDay } = useUserStoreHook();
 | 
				
			||||||
  expires = new Date(data.expires).getTime(); // 如果后端直接设置时间戳,将此处代码改为expires = data.expires,然后把上面的DataInfo<Date>改成DataInfo<number>即可
 | 
					  expires = new Date(data.expires).getTime(); // 如果后端直接设置时间戳,将此处代码改为expires = data.expires,然后把上面的DataInfo<Date>改成DataInfo<number>即可
 | 
				
			||||||
  const cookieString = JSON.stringify({ accessToken, expires });
 | 
					  const cookieString = JSON.stringify({ accessToken, expires, refreshToken });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  expires > 0
 | 
					  expires > 0
 | 
				
			||||||
    ? Cookies.set(TokenKey, cookieString, {
 | 
					    ? Cookies.set(TokenKey, cookieString, {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,6 +3,10 @@ import { ref } from "vue";
 | 
				
			|||||||
import { message } from "@/utils/message";
 | 
					import { message } from "@/utils/message";
 | 
				
			||||||
import { deviceDetection } from "@pureadmin/utils";
 | 
					import { deviceDetection } from "@pureadmin/utils";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					defineOptions({
 | 
				
			||||||
 | 
					  name: "AccountManagement"
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const list = ref([
 | 
					const list = ref([
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: "账户密码",
 | 
					    title: "账户密码",
 | 
				
			||||||
@ -3,6 +3,10 @@ import { ref } from "vue";
 | 
				
			|||||||
import { message } from "@/utils/message";
 | 
					import { message } from "@/utils/message";
 | 
				
			||||||
import { deviceDetection } from "@pureadmin/utils";
 | 
					import { deviceDetection } from "@pureadmin/utils";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					defineOptions({
 | 
				
			||||||
 | 
					  name: "Preferences"
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const list = ref([
 | 
					const list = ref([
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: "账户密码",
 | 
					    title: "账户密码",
 | 
				
			||||||
@ -8,6 +8,10 @@ import ReCropperPreview from "@/components/ReCropperPreview";
 | 
				
			|||||||
import { createFormData, deviceDetection } from "@pureadmin/utils";
 | 
					import { createFormData, deviceDetection } from "@pureadmin/utils";
 | 
				
			||||||
import uploadLine from "@iconify-icons/ri/upload-line";
 | 
					import uploadLine from "@iconify-icons/ri/upload-line";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					defineOptions({
 | 
				
			||||||
 | 
					  name: "Profile"
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const imgSrc = ref("");
 | 
					const imgSrc = ref("");
 | 
				
			||||||
const cropperInfo = ref();
 | 
					const cropperInfo = ref();
 | 
				
			||||||
const cropRef = ref();
 | 
					const cropRef = ref();
 | 
				
			||||||
@ -5,6 +5,10 @@ import { reactive, ref, onMounted } from "vue";
 | 
				
			|||||||
import { deviceDetection } from "@pureadmin/utils";
 | 
					import { deviceDetection } from "@pureadmin/utils";
 | 
				
			||||||
import type { PaginationProps } from "@pureadmin/table";
 | 
					import type { PaginationProps } from "@pureadmin/table";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					defineOptions({
 | 
				
			||||||
 | 
					  name: "SecurityLog"
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const loading = ref(true);
 | 
					const loading = ref(true);
 | 
				
			||||||
const dataList = ref([]);
 | 
					const dataList = ref([]);
 | 
				
			||||||
const pagination = reactive<PaginationProps>({
 | 
					const pagination = reactive<PaginationProps>({
 | 
				
			||||||
@ -3,11 +3,11 @@ import { getMine } from "@/api/user";
 | 
				
			|||||||
import { useRouter } from "vue-router";
 | 
					import { useRouter } from "vue-router";
 | 
				
			||||||
import { ref, onBeforeMount } from "vue";
 | 
					import { ref, onBeforeMount } from "vue";
 | 
				
			||||||
import { ReText } from "@/components/ReText";
 | 
					import { ReText } from "@/components/ReText";
 | 
				
			||||||
import Profile from "./components/profile.vue";
 | 
					import Profile from "./components/Profile.vue";
 | 
				
			||||||
import Preferences from "./components/preferences.vue";
 | 
					import Preferences from "./components/Preferences.vue";
 | 
				
			||||||
import SecurityLog from "./components/securityLog.vue";
 | 
					import SecurityLog from "./components/SecurityLog.vue";
 | 
				
			||||||
import { useGlobal, deviceDetection } from "@pureadmin/utils";
 | 
					import { useGlobal, deviceDetection } from "@pureadmin/utils";
 | 
				
			||||||
import AccountManagement from "./components/accountManagement.vue";
 | 
					import AccountManagement from "./components/AccountManagement.vue";
 | 
				
			||||||
import TopCollapse from "@/layout/components/sidebar/topCollapse.vue";
 | 
					import TopCollapse from "@/layout/components/sidebar/topCollapse.vue";
 | 
				
			||||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
 | 
					import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,3 @@
 | 
				
			|||||||
import base from "./base.vue";
 | 
					export { default as EditorBase } from "./EditorBase.vue";
 | 
				
			||||||
import multi from "./multi.vue";
 | 
					export { default as EditorMulti } from "./EditorMulti.vue";
 | 
				
			||||||
import picUpload from "./picUpload.vue";
 | 
					export { default as EditorUpload } from "./EditorUpload.vue";
 | 
				
			||||||
 | 
					 | 
				
			||||||
const Base = base;
 | 
					 | 
				
			||||||
const Multi = multi;
 | 
					 | 
				
			||||||
const PicUpload = picUpload;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export { Base, Multi, PicUpload };
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
<script setup lang="ts">
 | 
					<script setup lang="ts">
 | 
				
			||||||
import { ref } from "vue";
 | 
					import { ref } from "vue";
 | 
				
			||||||
import { Base, Multi, PicUpload } from "./components";
 | 
					import { EditorBase, EditorMulti, EditorUpload } from "./components";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defineOptions({
 | 
					defineOptions({
 | 
				
			||||||
  name: "Editor"
 | 
					  name: "Editor"
 | 
				
			||||||
@ -34,13 +34,13 @@ const activeNames = ref("1");
 | 
				
			|||||||
    </template>
 | 
					    </template>
 | 
				
			||||||
    <el-collapse v-model="activeNames" accordion>
 | 
					    <el-collapse v-model="activeNames" accordion>
 | 
				
			||||||
      <el-collapse-item title="基础用法" name="1">
 | 
					      <el-collapse-item title="基础用法" name="1">
 | 
				
			||||||
        <Base v-if="activeNames === '1'" />
 | 
					        <EditorBase v-if="activeNames === '1'" />
 | 
				
			||||||
      </el-collapse-item>
 | 
					      </el-collapse-item>
 | 
				
			||||||
      <el-collapse-item title="多个富文本" name="2">
 | 
					      <el-collapse-item title="多个富文本" name="2">
 | 
				
			||||||
        <Multi v-if="activeNames === '2'" />
 | 
					        <EditorMulti v-if="activeNames === '2'" />
 | 
				
			||||||
      </el-collapse-item>
 | 
					      </el-collapse-item>
 | 
				
			||||||
      <el-collapse-item title="自定义图片上传" name="3">
 | 
					      <el-collapse-item title="自定义图片上传" name="3">
 | 
				
			||||||
        <PicUpload v-if="activeNames === '3'" />
 | 
					        <EditorUpload v-if="activeNames === '3'" />
 | 
				
			||||||
      </el-collapse-item>
 | 
					      </el-collapse-item>
 | 
				
			||||||
    </el-collapse>
 | 
					    </el-collapse>
 | 
				
			||||||
  </el-card>
 | 
					  </el-card>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,15 +1,15 @@
 | 
				
			|||||||
<script setup lang="ts">
 | 
					<script setup lang="ts">
 | 
				
			||||||
import Card from "./components/Card.vue";
 | 
					 | 
				
			||||||
import { getCardList } from "@/api/list";
 | 
					import { getCardList } from "@/api/list";
 | 
				
			||||||
import { message } from "@/utils/message";
 | 
					import { message } from "@/utils/message";
 | 
				
			||||||
import { ElMessageBox } from "element-plus";
 | 
					import { ElMessageBox } from "element-plus";
 | 
				
			||||||
import { ref, onMounted, nextTick } from "vue";
 | 
					import { ref, onMounted, nextTick } from "vue";
 | 
				
			||||||
import dialogForm from "./components/DialogForm.vue";
 | 
					import ListCard from "./components/ListCard.vue";
 | 
				
			||||||
 | 
					import ListDialogForm from "./components/ListDialogForm.vue";
 | 
				
			||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
 | 
					import { useRenderIcon } from "@/components/ReIcon/src/hooks";
 | 
				
			||||||
import AddFill from "@iconify-icons/ri/add-circle-line";
 | 
					import AddFill from "@iconify-icons/ri/add-circle-line";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defineOptions({
 | 
					defineOptions({
 | 
				
			||||||
  name: "ListCard"
 | 
					  name: "CardList"
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const svg = `
 | 
					const svg = `
 | 
				
			||||||
@ -152,7 +152,7 @@ const handleManageProduct = product => {
 | 
				
			|||||||
            :lg="6"
 | 
					            :lg="6"
 | 
				
			||||||
            :xl="4"
 | 
					            :xl="4"
 | 
				
			||||||
          >
 | 
					          >
 | 
				
			||||||
            <Card
 | 
					            <ListCard
 | 
				
			||||||
              :product="product"
 | 
					              :product="product"
 | 
				
			||||||
              @delete-item="handleDeleteItem"
 | 
					              @delete-item="handleDeleteItem"
 | 
				
			||||||
              @manage-product="handleManageProduct"
 | 
					              @manage-product="handleManageProduct"
 | 
				
			||||||
@ -172,6 +172,6 @@ const handleManageProduct = product => {
 | 
				
			|||||||
        />
 | 
					        />
 | 
				
			||||||
      </template>
 | 
					      </template>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <dialogForm v-model:visible="formDialogVisible" :data="formData" />
 | 
					    <ListDialogForm v-model:visible="formDialogVisible" :data="formData" />
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
				
			|||||||
@ -4,18 +4,18 @@ import Motion from "./utils/motion";
 | 
				
			|||||||
import { useRouter } from "vue-router";
 | 
					import { useRouter } from "vue-router";
 | 
				
			||||||
import { message } from "@/utils/message";
 | 
					import { message } from "@/utils/message";
 | 
				
			||||||
import { loginRules } from "./utils/rule";
 | 
					import { loginRules } from "./utils/rule";
 | 
				
			||||||
import phone from "./components/phone.vue";
 | 
					 | 
				
			||||||
import TypeIt from "@/components/ReTypeit";
 | 
					import TypeIt from "@/components/ReTypeit";
 | 
				
			||||||
import { debounce } from "@pureadmin/utils";
 | 
					import { debounce } from "@pureadmin/utils";
 | 
				
			||||||
import qrCode from "./components/qrCode.vue";
 | 
					 | 
				
			||||||
import regist from "./components/regist.vue";
 | 
					 | 
				
			||||||
import update from "./components/update.vue";
 | 
					 | 
				
			||||||
import { useNav } from "@/layout/hooks/useNav";
 | 
					import { useNav } from "@/layout/hooks/useNav";
 | 
				
			||||||
import { useEventListener } from "@vueuse/core";
 | 
					import { useEventListener } from "@vueuse/core";
 | 
				
			||||||
import type { FormInstance } from "element-plus";
 | 
					import type { FormInstance } from "element-plus";
 | 
				
			||||||
import { $t, transformI18n } from "@/plugins/i18n";
 | 
					import { $t, transformI18n } from "@/plugins/i18n";
 | 
				
			||||||
import { operates, thirdParty } from "./utils/enums";
 | 
					import { operates, thirdParty } from "./utils/enums";
 | 
				
			||||||
import { useLayout } from "@/layout/hooks/useLayout";
 | 
					import { useLayout } from "@/layout/hooks/useLayout";
 | 
				
			||||||
 | 
					import LoginPhone from "./components/LoginPhone.vue";
 | 
				
			||||||
 | 
					import LoginRegist from "./components/LoginRegist.vue";
 | 
				
			||||||
 | 
					import LoginUpdate from "./components/LoginUpdate.vue";
 | 
				
			||||||
 | 
					import LoginQrCode from "./components/LoginQrCode.vue";
 | 
				
			||||||
import { useUserStoreHook } from "@/store/modules/user";
 | 
					import { useUserStoreHook } from "@/store/modules/user";
 | 
				
			||||||
import { initRouter, getTopMenu } from "@/router/utils";
 | 
					import { initRouter, getTopMenu } from "@/router/utils";
 | 
				
			||||||
import { bg, avatar, illustration } from "./utils/static";
 | 
					import { bg, avatar, illustration } from "./utils/static";
 | 
				
			||||||
@ -318,13 +318,13 @@ watch(loginDay, value => {
 | 
				
			|||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </Motion>
 | 
					          </Motion>
 | 
				
			||||||
          <!-- 手机号登录 -->
 | 
					          <!-- 手机号登录 -->
 | 
				
			||||||
          <phone v-if="currentPage === 1" />
 | 
					          <LoginPhone v-if="currentPage === 1" />
 | 
				
			||||||
          <!-- 二维码登录 -->
 | 
					          <!-- 二维码登录 -->
 | 
				
			||||||
          <qrCode v-if="currentPage === 2" />
 | 
					          <LoginQrCode v-if="currentPage === 2" />
 | 
				
			||||||
          <!-- 注册 -->
 | 
					          <!-- 注册 -->
 | 
				
			||||||
          <regist v-if="currentPage === 3" />
 | 
					          <LoginRegist v-if="currentPage === 3" />
 | 
				
			||||||
          <!-- 忘记密码 -->
 | 
					          <!-- 忘记密码 -->
 | 
				
			||||||
          <update v-if="currentPage === 4" />
 | 
					          <LoginUpdate v-if="currentPage === 4" />
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								src/views/welcome/components/WelcomeCharts/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/views/welcome/components/WelcomeCharts/index.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					export { default as ChartBar } from "./ChartBar.vue";
 | 
				
			||||||
 | 
					export { default as ChartLine } from "./ChartLine.vue";
 | 
				
			||||||
 | 
					export { default as ChartRound } from "./ChartRound.vue";
 | 
				
			||||||
| 
		 Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB  | 
@ -1,3 +0,0 @@
 | 
				
			|||||||
export { default as barChart } from "./bar.vue";
 | 
					 | 
				
			||||||
export { default as lineChart } from "./line.vue";
 | 
					 | 
				
			||||||
export { default as roundChart } from "./round.vue";
 | 
					 | 
				
			||||||
@ -2,11 +2,11 @@
 | 
				
			|||||||
import { ref, markRaw } from "vue";
 | 
					import { ref, markRaw } from "vue";
 | 
				
			||||||
import ReCol from "@/components/ReCol";
 | 
					import ReCol from "@/components/ReCol";
 | 
				
			||||||
import { useDark, randomGradient } from "./utils";
 | 
					import { useDark, randomGradient } from "./utils";
 | 
				
			||||||
import PureTable from "./components/table/index.vue";
 | 
					 | 
				
			||||||
import { ReNormalCountTo } from "@/components/ReCountTo";
 | 
					import { ReNormalCountTo } from "@/components/ReCountTo";
 | 
				
			||||||
import { useRenderFlicker } from "@/components/ReFlicker";
 | 
					import { useRenderFlicker } from "@/components/ReFlicker";
 | 
				
			||||||
import { barChart, lineChart, roundChart } from "./components/chart";
 | 
					import WelcomeTable from "./components/WelcomeTable/index.vue";
 | 
				
			||||||
import Segmented, { type OptionsType } from "@/components/ReSegmented";
 | 
					import Segmented, { type OptionsType } from "@/components/ReSegmented";
 | 
				
			||||||
 | 
					import { ChartBar, ChartLine, ChartRound } from "./components/WelcomeCharts";
 | 
				
			||||||
import { chartData, barChartData, progressData, latestNewsData } from "./data";
 | 
					import { chartData, barChartData, progressData, latestNewsData } from "./data";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defineOptions({
 | 
					defineOptions({
 | 
				
			||||||
@ -78,13 +78,13 @@ const optionsBasis: Array<OptionsType> = [
 | 
				
			|||||||
              />
 | 
					              />
 | 
				
			||||||
              <p class="font-medium text-green-500">{{ item.percent }}</p>
 | 
					              <p class="font-medium text-green-500">{{ item.percent }}</p>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <lineChart
 | 
					            <ChartLine
 | 
				
			||||||
              v-if="item.data.length > 1"
 | 
					              v-if="item.data.length > 1"
 | 
				
			||||||
              class="!w-1/2"
 | 
					              class="!w-1/2"
 | 
				
			||||||
              :color="item.color"
 | 
					              :color="item.color"
 | 
				
			||||||
              :data="item.data"
 | 
					              :data="item.data"
 | 
				
			||||||
            />
 | 
					            />
 | 
				
			||||||
            <roundChart v-else class="!w-1/2" />
 | 
					            <ChartRound v-else class="!w-1/2" />
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </el-card>
 | 
					        </el-card>
 | 
				
			||||||
      </re-col>
 | 
					      </re-col>
 | 
				
			||||||
@ -112,7 +112,7 @@ const optionsBasis: Array<OptionsType> = [
 | 
				
			|||||||
            <Segmented v-model="curWeek" :options="optionsBasis" />
 | 
					            <Segmented v-model="curWeek" :options="optionsBasis" />
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <div class="flex justify-between items-start mt-3">
 | 
					          <div class="flex justify-between items-start mt-3">
 | 
				
			||||||
            <barChart
 | 
					            <ChartBar
 | 
				
			||||||
              :requireData="barChartData[curWeek].requireData"
 | 
					              :requireData="barChartData[curWeek].requireData"
 | 
				
			||||||
              :questionData="barChartData[curWeek].questionData"
 | 
					              :questionData="barChartData[curWeek].questionData"
 | 
				
			||||||
            />
 | 
					            />
 | 
				
			||||||
@ -188,7 +188,7 @@ const optionsBasis: Array<OptionsType> = [
 | 
				
			|||||||
          <div class="flex justify-between">
 | 
					          <div class="flex justify-between">
 | 
				
			||||||
            <span class="text-md font-medium">数据统计</span>
 | 
					            <span class="text-md font-medium">数据统计</span>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <PureTable class="mt-3" />
 | 
					          <WelcomeTable class="mt-3" />
 | 
				
			||||||
        </el-card>
 | 
					        </el-card>
 | 
				
			||||||
      </re-col>
 | 
					      </re-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user