diff --git a/package.json b/package.json index 583f1f02..8189a0dd 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,8 @@ "update-pkg": "sa update-pkg" }, "dependencies": { + "@antv/data-set": "^0.11.8", + "@antv/g2": "^5.1.19", "@better-scroll/core": "2.5.1", "@iconify/vue": "4.1.2", "@sa/axios": "workspace:*", @@ -61,17 +63,24 @@ "naive-ui": "2.38.2", "nprogress": "0.2.0", "pinia": "2.1.7", + "print-js": "^1.6.0", + "swiper": "^11.1.1", + "vditor": "^3.10.4", "vue": "3.4.26", "vue-draggable-plus": "0.4.0", "vue-i18n": "9.13.1", - "vue-router": "4.3.2" + "vue-router": "4.3.2", + "wangeditor": "^4.7.15", + "xgplayer": "^3.0.17" }, "devDependencies": { + "@amap/amap-jsapi-types": "^0.0.8", "@elegant-router/vue": "0.3.6", "@iconify/json": "2.2.207", "@sa/scripts": "workspace:*", "@sa/uno-preset": "workspace:*", "@soybeanjs/eslint-config": "1.3.4", + "@types/bmapgl": "^0.0.5", "@types/lodash-es": "4.17.12", "@types/node": "20.12.10", "@types/nprogress": "0.2.3", diff --git a/src/components/custom/github-link.vue b/src/components/custom/github-link.vue new file mode 100644 index 00000000..3463800c --- /dev/null +++ b/src/components/custom/github-link.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/src/components/custom/icon-select.vue b/src/components/custom/icon-select.vue new file mode 100644 index 00000000..74d71b43 --- /dev/null +++ b/src/components/custom/icon-select.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/components/custom/web-site-link.vue b/src/components/custom/web-site-link.vue new file mode 100644 index 00000000..13b8c475 --- /dev/null +++ b/src/components/custom/web-site-link.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/src/constants/map-sdk.ts b/src/constants/map-sdk.ts new file mode 100644 index 00000000..eea25d27 --- /dev/null +++ b/src/constants/map-sdk.ts @@ -0,0 +1,8 @@ +/** baidu map sdk url */ +export const BAIDU_MAP_SDK_URL = `https://api.map.baidu.com/getscript?v=3.0&ak=KSezYymXPth1DIGILRX3oYN9PxbOQQmU&services=&t=20210201100830&s=1`; + +/** Amap sdk url */ +export const AMAP_SDK_URL = 'https://webapi.amap.com/maps?v=2.0&key=e7bd02bd504062087e6563daf4d6721d'; + +/** tencent sdk url */ +export const TENCENT_MAP_SDK_URL = 'https://map.qq.com/api/gljs?v=1.exp&key=A6DBZ-KXPLW-JKSRY-ONZF4-CPHY3-K6BL7'; diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index e4b25797..9bd83fa6 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -181,7 +181,15 @@ const local: App.I18n.Schema = { plugin: 'Plugin', plugin_copy: 'Copy', plugin_charts: 'Charts', - plugin_charts_echarts: 'ECharts' + plugin_charts_echarts: 'ECharts', + plugin_editor: 'Editor', + plugin_editor_quill: 'Quill', + plugin_editor_markdown: 'Markdown', + plugin_icon: 'Icon', + plugin_map: 'Map', + plugin_print: 'Print', + plugin_swiper: 'Swiper', + plugin_video: 'Video' }, page: { login: { diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index a28c3cf6..0513e5b9 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -181,7 +181,15 @@ const local: App.I18n.Schema = { plugin: '插件示例', plugin_copy: '剪贴板', plugin_charts: '图表', - plugin_charts_echarts: 'ECharts' + plugin_charts_echarts: 'ECharts', + plugin_editor: '编辑器', + plugin_editor_quill: '富文本编辑器', + plugin_editor_markdown: 'MD 编辑器', + plugin_icon: '图标', + plugin_map: '地图', + plugin_print: '打印', + plugin_swiper: 'Swiper', + plugin_video: '视频' }, page: { login: { diff --git a/src/plugins/assets.ts b/src/plugins/assets.ts index 904aa6a2..f1e477a5 100644 --- a/src/plugins/assets.ts +++ b/src/plugins/assets.ts @@ -1,3 +1,6 @@ import 'virtual:svg-icons-register'; import 'uno.css'; import '../styles/css/global.css'; +import 'swiper/css'; +import 'swiper/css/navigation'; +import 'swiper/css/pagination'; diff --git a/src/router/elegant/imports.ts b/src/router/elegant/imports.ts index ea5ed5e3..feec5914 100644 --- a/src/router/elegant/imports.ts +++ b/src/router/elegant/imports.ts @@ -38,5 +38,12 @@ export const views: Record Promise import("@/views/multi-menu/second_child_home/index.vue"), plugin_charts_echarts: () => import("@/views/plugin/charts/echarts/index.vue"), plugin_copy: () => import("@/views/plugin/copy/index.vue"), + plugin_editor_markdown: () => import("@/views/plugin/editor/markdown/index.vue"), + plugin_editor_quill: () => import("@/views/plugin/editor/quill/index.vue"), + plugin_icon: () => import("@/views/plugin/icon/index.vue"), + plugin_map: () => import("@/views/plugin/map/index.vue"), + plugin_print: () => import("@/views/plugin/print/index.vue"), + plugin_swiper: () => import("@/views/plugin/swiper/index.vue"), + plugin_video: () => import("@/views/plugin/video/index.vue"), "user-center": () => import("@/views/user-center/index.vue"), }; diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts index 130479de..2d57abe6 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -367,9 +367,90 @@ export const generatedRoutes: GeneratedRoute[] = [ path: '/plugin/copy', component: 'view.plugin_copy', meta: { - title: '剪贴板', - icon: 'mdi:clipboard-outline', - i18nKey: 'route.plugin_copy' + title: 'plugin_copy', + i18nKey: 'route.plugin_copy', + icon: 'mdi:clipboard-outline' + } + }, + { + name: 'plugin_editor', + path: '/plugin/editor', + meta: { + title: 'plugin_editor', + i18nKey: 'route.plugin_editor', + icon: 'icon-park-outline:editor' + }, + children: [ + { + name: 'plugin_editor_markdown', + path: '/plugin/editor/markdown', + component: 'view.plugin_editor_markdown', + meta: { + title: 'plugin_editor_markdown', + i18nKey: 'route.plugin_editor_markdown', + icon: 'ri:markdown-line' + } + }, + { + name: 'plugin_editor_quill', + path: '/plugin/editor/quill', + component: 'view.plugin_editor_quill', + meta: { + title: 'plugin_editor_quill', + i18nKey: 'route.plugin_editor_quill', + icon: 'mdi:file-document-edit-outline' + } + } + ] + }, + { + name: 'plugin_icon', + path: '/plugin/icon', + component: 'view.plugin_icon', + meta: { + title: 'plugin_icon', + i18nKey: 'route.plugin_icon', + localIcon: 'custom-icon' + } + }, + { + name: 'plugin_map', + path: '/plugin/map', + component: 'view.plugin_map', + meta: { + title: 'plugin_map', + i18nKey: 'route.plugin_map', + icon: 'mdi:map' + } + }, + { + name: 'plugin_print', + path: '/plugin/print', + component: 'view.plugin_print', + meta: { + title: 'plugin_print', + i18nKey: 'route.plugin_print', + icon: 'mdi:printer' + } + }, + { + name: 'plugin_swiper', + path: '/plugin/swiper', + component: 'view.plugin_swiper', + meta: { + title: 'plugin_swiper', + i18nKey: 'route.plugin_swiper', + icon: 'simple-icons:swiper' + } + }, + { + name: 'plugin_video', + path: '/plugin/video', + component: 'view.plugin_video', + meta: { + title: 'plugin_video', + i18nKey: 'route.plugin_video', + icon: 'mdi:video' } } ] diff --git a/src/router/elegant/transform.ts b/src/router/elegant/transform.ts index 9568307c..c8b84245 100644 --- a/src/router/elegant/transform.ts +++ b/src/router/elegant/transform.ts @@ -187,6 +187,14 @@ const routeMap: RouteMap = { "plugin_charts": "/plugin/charts", "plugin_charts_echarts": "/plugin/charts/echarts", "plugin_copy": "/plugin/copy", + "plugin_editor": "/plugin/editor", + "plugin_editor_markdown": "/plugin/editor/markdown", + "plugin_editor_quill": "/plugin/editor/quill", + "plugin_icon": "/plugin/icon", + "plugin_map": "/plugin/map", + "plugin_print": "/plugin/print", + "plugin_swiper": "/plugin/swiper", + "plugin_video": "/plugin/video", "user-center": "/user-center" }; diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts index 06ad42c2..31594b3e 100644 --- a/src/typings/components.d.ts +++ b/src/typings/components.d.ts @@ -1,10 +1,10 @@ /* eslint-disable */ +/* prettier-ignore */ // @ts-nocheck // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 export {} -/* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { AppProvider: typeof import('./../components/common/app-provider.vue')['default'] @@ -14,6 +14,7 @@ declare module 'vue' { DarkModeContainer: typeof import('./../components/common/dark-mode-container.vue')['default'] ExceptionBase: typeof import('./../components/common/exception-base.vue')['default'] FullScreen: typeof import('./../components/common/full-screen.vue')['default'] + GithubLink: typeof import('./../components/custom/github-link.vue')['default'] IconAntDesignEnterOutlined: typeof import('~icons/ant-design/enter-outlined')['default'] IconAntDesignReloadOutlined: typeof import('~icons/ant-design/reload-outlined')['default'] IconAntDesignSettingOutlined: typeof import('~icons/ant-design/setting-outlined')['default'] @@ -25,7 +26,9 @@ declare module 'vue' { IconIcRoundRefresh: typeof import('~icons/ic/round-refresh')['default'] IconIcRoundRemove: typeof import('~icons/ic/round-remove')['default'] IconIcRoundSearch: typeof import('~icons/ic/round-search')['default'] + IconLocalActivity: typeof import('~icons/local/activity')['default'] IconLocalBanner: typeof import('~icons/local/banner')['default'] + IconLocalCast: typeof import('~icons/local/cast')['default'] IconLocalLogo: typeof import('~icons/local/logo')['default'] IconMdiArrowDownThin: typeof import('~icons/mdi/arrow-down-thin')['default'] IconMdiArrowUpThin: typeof import('~icons/mdi/arrow-up-thin')['default'] @@ -33,6 +36,7 @@ declare module 'vue' { IconMdiKeyboardEsc: typeof import('~icons/mdi/keyboard-esc')['default'] IconMdiKeyboardReturn: typeof import('~icons/mdi/keyboard-return')['default'] IconMdiRefresh: typeof import('~icons/mdi/refresh')['default'] + IconSelect: typeof import('./../components/custom/icon-select.vue')['default'] IconUilSearch: typeof import('~icons/uil/search')['default'] LangSwitch: typeof import('./../components/common/lang-switch.vue')['default'] LookForward: typeof import('./../components/custom/look-forward.vue')['default'] @@ -78,6 +82,7 @@ declare module 'vue' { NStatistic: typeof import('naive-ui')['NStatistic'] NSwitch: typeof import('naive-ui')['NSwitch'] NTab: typeof import('naive-ui')['NTab'] + NTabPane: typeof import('naive-ui')['NTabPane'] NTabs: typeof import('naive-ui')['NTabs'] NTag: typeof import('naive-ui')['NTag'] NThing: typeof import('naive-ui')['NThing'] @@ -94,5 +99,6 @@ declare module 'vue' { TableHeaderOperation: typeof import('./../components/advanced/table-header-operation.vue')['default'] ThemeSchemaSwitch: typeof import('./../components/common/theme-schema-switch.vue')['default'] WaveBg: typeof import('./../components/custom/wave-bg.vue')['default'] + WebSiteLink: typeof import('./../components/custom/web-site-link.vue')['default'] } } diff --git a/src/typings/elegant-router.d.ts b/src/typings/elegant-router.d.ts index efb7d2fd..c3472149 100644 --- a/src/typings/elegant-router.d.ts +++ b/src/typings/elegant-router.d.ts @@ -61,6 +61,14 @@ declare module "@elegant-router/types" { "plugin_charts": "/plugin/charts"; "plugin_charts_echarts": "/plugin/charts/echarts"; "plugin_copy": "/plugin/copy"; + "plugin_editor": "/plugin/editor"; + "plugin_editor_markdown": "/plugin/editor/markdown"; + "plugin_editor_quill": "/plugin/editor/quill"; + "plugin_icon": "/plugin/icon"; + "plugin_map": "/plugin/map"; + "plugin_print": "/plugin/print"; + "plugin_swiper": "/plugin/swiper"; + "plugin_video": "/plugin/video"; "user-center": "/user-center"; }; @@ -158,6 +166,13 @@ declare module "@elegant-router/types" { | "multi-menu_second_child_home" | "plugin_charts_echarts" | "plugin_copy" + | "plugin_editor_markdown" + | "plugin_editor_quill" + | "plugin_icon" + | "plugin_map" + | "plugin_print" + | "plugin_swiper" + | "plugin_video" | "user-center" >; diff --git a/src/typings/package.d.ts b/src/typings/package.d.ts new file mode 100644 index 00000000..c0a75af1 --- /dev/null +++ b/src/typings/package.d.ts @@ -0,0 +1,9 @@ +/// +/// + +declare namespace BMap { + class Map extends BMapGL.Map {} + class Point extends BMapGL.Point {} +} + +declare const TMap: any; diff --git a/src/views/plugin/editor/markdown/index.vue b/src/views/plugin/editor/markdown/index.vue new file mode 100644 index 00000000..9639db12 --- /dev/null +++ b/src/views/plugin/editor/markdown/index.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/src/views/plugin/editor/quill/index.vue b/src/views/plugin/editor/quill/index.vue new file mode 100644 index 00000000..8da958b7 --- /dev/null +++ b/src/views/plugin/editor/quill/index.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/src/views/plugin/icon/icons.ts b/src/views/plugin/icon/icons.ts new file mode 100644 index 00000000..1af75741 --- /dev/null +++ b/src/views/plugin/icon/icons.ts @@ -0,0 +1,32 @@ +export const icons = [ + 'mdi:emoticon', + 'mdi:ab-testing', + 'ph:alarm', + 'ph:android-logo', + 'ph:align-bottom', + 'ph:archive-box-light', + 'uil:basketball', + 'uil:brightness-plus', + 'uil:capture', + 'mdi:apps-box', + 'mdi:alert', + 'mdi:airballoon', + 'mdi:airplane-edit', + 'mdi:alpha-f-box-outline', + 'mdi:arm-flex-outline', + 'ic:baseline-10mp', + 'ic:baseline-access-time', + 'ic:baseline-brightness-4', + 'ic:baseline-brightness-5', + 'ic:baseline-credit-card', + 'ic:baseline-filter-1', + 'ic:baseline-filter-2', + 'ic:baseline-filter-3', + 'ic:baseline-filter-4', + 'ic:baseline-filter-5', + 'ic:baseline-filter-6', + 'ic:baseline-filter-7', + 'ic:baseline-filter-8', + 'ic:baseline-filter-9', + 'ic:baseline-filter-9-plus' +]; diff --git a/src/views/plugin/icon/index.vue b/src/views/plugin/icon/index.vue new file mode 100644 index 00000000..79c1ec32 --- /dev/null +++ b/src/views/plugin/icon/index.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/plugin/map/components/baidu-map.vue b/src/views/plugin/map/components/baidu-map.vue new file mode 100644 index 00000000..ee7fcbca --- /dev/null +++ b/src/views/plugin/map/components/baidu-map.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/views/plugin/map/components/gaode-map.vue b/src/views/plugin/map/components/gaode-map.vue new file mode 100644 index 00000000..37ca75c4 --- /dev/null +++ b/src/views/plugin/map/components/gaode-map.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/views/plugin/map/components/index.ts b/src/views/plugin/map/components/index.ts new file mode 100644 index 00000000..b4a518f0 --- /dev/null +++ b/src/views/plugin/map/components/index.ts @@ -0,0 +1,5 @@ +import BaiduMap from './baidu-map.vue'; +import GaodeMap from './gaode-map.vue'; +import TencentMap from './tencent-map.vue'; + +export { BaiduMap, GaodeMap, TencentMap }; diff --git a/src/views/plugin/map/components/tencent-map.vue b/src/views/plugin/map/components/tencent-map.vue new file mode 100644 index 00000000..e958f27d --- /dev/null +++ b/src/views/plugin/map/components/tencent-map.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/views/plugin/map/index.vue b/src/views/plugin/map/index.vue new file mode 100644 index 00000000..995ac0be --- /dev/null +++ b/src/views/plugin/map/index.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/views/plugin/print/index.vue b/src/views/plugin/print/index.vue new file mode 100644 index 00000000..f36575a4 --- /dev/null +++ b/src/views/plugin/print/index.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/src/views/plugin/swiper/index.vue b/src/views/plugin/swiper/index.vue new file mode 100644 index 00000000..da98c359 --- /dev/null +++ b/src/views/plugin/swiper/index.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/views/plugin/video/index.vue b/src/views/plugin/video/index.vue new file mode 100644 index 00000000..5a6c8942 --- /dev/null +++ b/src/views/plugin/video/index.vue @@ -0,0 +1,40 @@ + + + + +