Skip to content

Commit

Permalink
refactor: 带来更美观精致的首页 (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 authored Jan 7, 2024
1 parent bd8e90e commit 4fa6a47
Show file tree
Hide file tree
Showing 24 changed files with 774 additions and 1,411 deletions.
1 change: 0 additions & 1 deletion build/optimize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const include = [
"sortablejs",
"swiper/vue",
"mint-filter",
"md-editor-v3",
"@vueuse/core",
"vue3-danmaku",
"v-contextmenu",
Expand Down
224 changes: 0 additions & 224 deletions mock/list.ts

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"preview": "vite preview",
"preview:build": "pnpm build && vite preview",
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
"svgo": "svgo -f src/assets/svg -o src/assets/svg",
"svgo": "svgo -f src/assets/svg",
"cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
"clean:cache": "rimraf .eslintcache && rimraf pnpm-lock.yaml && rimraf node_modules && pnpm store prune && pnpm install",
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
Expand Down Expand Up @@ -54,7 +54,7 @@
"@logicflow/extension": "^1.2.19",
"@pureadmin/descriptions": "^1.2.0",
"@pureadmin/table": "^3.0.0",
"@pureadmin/utils": "^2.1.1",
"@pureadmin/utils": "^2.1.2",
"@vueuse/core": "^10.7.1",
"@vueuse/motion": "^2.0.0",
"@wangeditor/editor": "^5.1.23",
Expand All @@ -72,7 +72,6 @@
"js-cookie": "^3.0.5",
"jsbarcode": "^3.11.6",
"localforage": "^1.10.0",
"md-editor-v3": "2.7.2",
"mint-filter": "^4.0.3",
"mitt": "^3.0.1",
"nprogress": "^0.2.0",
Expand Down
16 changes: 4 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/api/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ type Result = {
export const getCardList = (data?: object) => {
return http.request<Result>("post", "/get-card-list", { data });
};

/** 版本日志 */
export const getReleases = () => {
return http.request<Result>("get", "/releases");
};
18 changes: 6 additions & 12 deletions src/plugins/echarts/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import type { App } from "vue";
import * as echarts from "echarts/core";
import { CanvasRenderer } from "echarts/renderers";
import { CanvasRenderer, SVGRenderer } from "echarts/renderers";
import { PieChart, BarChart, LineChart } from "echarts/charts";
import {
GridComponent,
TitleComponent,
PolarComponent,
LegendComponent,
GraphicComponent,
ToolboxComponent,
Expand All @@ -14,15 +15,16 @@ import {
} from "echarts/components";

const { use } = echarts;
// const { use, registerTheme } = echarts;

use([
PieChart,
BarChart,
LineChart,
CanvasRenderer,
SVGRenderer,
GridComponent,
TitleComponent,
PolarComponent,
LegendComponent,
GraphicComponent,
ToolboxComponent,
Expand All @@ -32,16 +34,8 @@ use([
]);

/**
* @description 自定义主题
* @see {@link https://echarts.apache.org/zh/download-theme.html}
*/
// import theme from "./theme.json";
// registerTheme("ovilia-green", theme);

/**
* @description 按需引入echarts
* @see {@link https://echarts.apache.org/handbook/zh/basics/import#%E6%8C%89%E9%9C%80%E5%BC%95%E5%85%A5-echarts-%E5%9B%BE%E8%A1%A8%E5%92%8C%E7%BB%84%E4%BB%B6}
* @see 温馨提示:必须将 `$echarts` 添加到全局 `globalProperties` ,为了配合 https://pure-admin-utils.netlify.app/hooks/useEcharts/useEcharts.html 使用
* @description 按需引入echarts,具体看 https://echarts.apache.org/handbook/zh/basics/import/#%E5%9C%A8-typescript-%E4%B8%AD%E6%8C%89%E9%9C%80%E5%BC%95%E5%85%A5
* @see 温馨提示:必须将 `$echarts` 添加到全局 `globalProperties` ,具体看 https://pure-admin-utils.netlify.app/hooks/useECharts/useECharts#%E4%BD%BF%E7%94%A8%E5%89%8D%E6%8F%90
*/
export function useEcharts(app: App) {
app.config.globalProperties.$echarts = echarts;
Expand Down
Loading

0 comments on commit 4fa6a47

Please sign in to comment.