Skip to content

Commit 18e2c33

Browse files
author
dongshanshan
committed
2 parents 9a3253a + 1048357 commit 18e2c33

File tree

19 files changed

+281
-120
lines changed

19 files changed

+281
-120
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"codemirror",
103103
"commitlint",
104104
"cropperjs",
105+
"echart",
105106
"echarts",
106107
"esnext",
107108
"esno",
@@ -116,10 +117,12 @@
116117
"sider",
117118
"sortablejs",
118119
"stylelint",
120+
"svgs",
119121
"unocss",
120122
"unplugin",
121123
"unref",
122124
"videojs",
125+
"VITE",
123126
"vitejs",
124127
"vueuse",
125128
"wangeditor",

package.json

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@
3636
"@wangeditor/editor-for-vue": "^5.1.10",
3737
"@zxcvbn-ts/core": "^3.0.4",
3838
"animate.css": "^4.1.1",
39-
"axios": "^1.5.1",
39+
"axios": "^1.6.0",
4040
"benz-amr-recorder": "^1.1.5",
4141
"bpmn-js-token-simulation": "^0.10.0",
4242
"camunda-bpmn-moddle": "^7.0.1",
4343
"cropperjs": "^1.6.1",
4444
"crypto-js": "^4.2.0",
4545
"dayjs": "^1.11.10",
46-
"diagram-js": "^12.5.0",
46+
"diagram-js": "^12.6.0",
47+
"driver.js": "^1.3.0",
4748
"echarts": "^5.4.3",
4849
"echarts-wordcloud": "^2.1.0",
4950
"element-plus": "2.4.1",
5051
"fast-xml-parser": "^4.3.2",
5152
"highlight.js": "^11.9.0",
52-
"intro.js": "^7.2.0",
5353
"jsencrypt": "^3.3.2",
5454
"lodash-es": "^4.17.21",
5555
"min-dash": "^4.1.1",
@@ -64,28 +64,27 @@
6464
"video.js": "^7.21.5",
6565
"vue": "^3.3.7",
6666
"vue-dompurify-html": "^4.1.4",
67-
"vue-i18n": "^9.5.0",
67+
"vue-i18n": "^9.6.2",
6868
"vue-router": "^4.2.5",
6969
"vue-types": "^5.1.1",
7070
"vuedraggable": "^4.1.0",
7171
"web-storage-cache": "^1.1.1",
7272
"xml-js": "^1.6.11"
7373
},
7474
"devDependencies": {
75-
"@commitlint/cli": "^18.0.0",
76-
"@commitlint/config-conventional": "^18.0.0",
77-
"@iconify/json": "^2.2.132",
75+
"@commitlint/cli": "^18.2.0",
76+
"@commitlint/config-conventional": "^18.1.0",
77+
"@iconify/json": "^2.2.135",
7878
"@intlify/unplugin-vue-i18n": "^1.4.0",
7979
"@purge-icons/generated": "^0.9.0",
80-
"@types/intro.js": "^5.1.3",
8180
"@types/lodash-es": "^4.17.10",
82-
"@types/node": "^20.8.8",
81+
"@types/node": "^20.8.9",
8382
"@types/nprogress": "^0.2.2",
8483
"@types/qrcode": "^1.5.4",
8584
"@types/qs": "^6.9.9",
8685
"@types/sortablejs": "^1.15.4",
87-
"@typescript-eslint/eslint-plugin": "^6.9.0",
88-
"@typescript-eslint/parser": "^6.9.0",
86+
"@typescript-eslint/eslint-plugin": "^6.9.1",
87+
"@typescript-eslint/parser": "^6.9.1",
8988
"@unocss/transformer-variant-group": "^0.57.1",
9089
"@unocss/eslint-config": "^0.57.1",
9190
"@vitejs/plugin-legacy": "^4.1.1",
@@ -99,24 +98,24 @@
9998
"eslint-config-prettier": "^9.0.0",
10099
"eslint-define-config": "^1.24.1",
101100
"eslint-plugin-prettier": "^5.0.1",
102-
"eslint-plugin-vue": "^9.18.0",
101+
"eslint-plugin-vue": "^9.18.1",
103102
"lint-staged": "^15.0.2",
104103
"postcss": "^8.4.31",
105104
"postcss-html": "^1.5.0",
106105
"postcss-scss": "^4.0.9",
107106
"prettier": "^3.0.3",
108107
"rimraf": "^5.0.5",
109-
"rollup": "^4.1.4",
110-
"sass": "^1.69.4",
108+
"rollup": "^4.1.5",
109+
"sass": "^1.69.5",
111110
"stylelint": "^15.11.0",
112111
"stylelint-config-html": "^1.1.0",
113112
"stylelint-config-recommended": "^13.0.0",
114113
"stylelint-config-standard": "^34.0.0",
115114
"stylelint-order": "^6.0.3",
116-
"terser": "^5.22.0",
115+
"terser": "^5.23.0",
117116
"typescript": "5.2.2",
118117
"unocss": "^0.57.1",
119-
"unplugin-auto-import": "^0.16.6",
118+
"unplugin-auto-import": "^0.16.7",
120119
"unplugin-element-plus": "^0.8.0",
121120
"unplugin-vue-components": "^0.25.2",
122121
"vite": "4.5.0",
@@ -128,7 +127,7 @@
128127
"vite-plugin-svg-icons": "^2.0.1",
129128
"vite-plugin-top-level-await": "^1.3.1",
130129
"vue-eslint-parser": "^9.3.2",
131-
"vue-tsc": "^1.8.20"
130+
"vue-tsc": "^1.8.22"
132131
},
133132
"license": "MIT",
134133
"repository": {

src/components/Card/src/CardTitle.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defineComponent({
33
name: 'CardTitle'
44
})
55
6-
const { title } = defineProps({
6+
defineProps({
77
title: {
88
type: String,
99
required: true

src/components/ConfigGlobal/src/ConfigGlobal.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
<script lang="ts" setup>
1+
<script setup lang="ts">
2+
import { provide, computed, watch, onMounted } from 'vue'
23
import { propTypes } from '@/utils/propTypes'
4+
import { ComponentSize, ElConfigProvider } from 'element-plus'
35
import { useLocaleStore } from '@/store/modules/locale'
6+
import { useWindowSize } from '@vueuse/core'
47
import { useAppStore } from '@/store/modules/app'
58
import { setCssVar } from '@/utils'
69
import { useDesign } from '@/hooks/web/useDesign'
7-
import { ElementPlusSize } from '@/types/elementPlus'
8-
import { useWindowSize } from '@vueuse/core'
9-
10-
defineOptions({ name: 'ConfigGlobal' })
1110
1211
const { variables } = useDesign()
1312
1413
const appStore = useAppStore()
1514
1615
const props = defineProps({
17-
size: propTypes.oneOf<ElementPlusSize>(['default', 'small', 'large']).def('default')
16+
size: propTypes.oneOf<ComponentSize>(['default', 'small', 'large']).def('default')
1817
})
1918
2019
provide('configGlobal', props)
@@ -53,9 +52,9 @@ const currentLocale = computed(() => localeStore.currentLocale)
5352

5453
<template>
5554
<ElConfigProvider
55+
:namespace="variables.elNamespace"
5656
:locale="currentLocale.elLocale"
5757
:message="{ max: 1 }"
58-
:namespace="variables.elNamespace"
5958
:size="size"
6059
>
6160
<slot></slot>

src/components/ShortcutDateRangePicker/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import * as DateUtil from '@/utils/formatTime'
2727
defineOptions({ name: 'ShortcutDateRangePicker' })
2828
2929
const shortcutDays = ref(7) // 日期快捷天数(单选按钮组), 默认7天
30-
const times = ref<[dayjs.ConfigType, dayjs.ConfigType]>(['', '']) // 时间范围参数
30+
const times = ref<[string, string]>(['', '']) // 时间范围参数
3131
defineExpose({ times }) // 暴露时间范围参数
3232
/** 日期快捷选择 */
3333
const shortcuts = [

src/components/Sticky/src/Sticky.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ onMounted(() => {
3232
3333
scrollContainer.value = getScrollContainer(refSticky.value!, true)
3434
useEventListener(scrollContainer, 'scroll', handleScroll)
35-
useEventListener('resize', handleReize)
35+
useEventListener('resize', handleResize)
3636
handleScroll()
3737
})
3838
onActivated(() => {
@@ -103,7 +103,7 @@ const handleScroll = () => {
103103
reset()
104104
}
105105
}
106-
const handleReize = () => {
106+
const handleResize = () => {
107107
if (isSticky.value && refSticky.value) {
108108
width.value = refSticky.value.getBoundingClientRect().width + 'px'
109109
}

src/components/Tooltip/src/Tooltip.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { propTypes } from '@/utils/propTypes'
44
defineOptions({ name: 'Tooltip' })
55
66
defineProps({
7-
titel: propTypes.string.def(''),
7+
title: propTypes.string.def(''),
88
message: propTypes.string.def(''),
99
icon: propTypes.string.def('ep:question-filled')
1010
})
1111
</script>
1212
<template>
13-
<span>{{ titel }}</span>
13+
<span>{{ title }}</span>
1414
<ElTooltip :content="message" placement="top">
1515
<Icon :icon="icon" class="relative top-1px ml-1px" />
1616
</ElTooltip>

src/hooks/web/useGuide.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { Config, driver } from 'driver.js'
2+
import 'driver.js/dist/driver.css'
3+
import { useDesign } from '@/hooks/web/useDesign'
4+
import { useI18n } from '@/hooks/web/useI18n'
5+
6+
const { t } = useI18n()
7+
8+
const { variables } = useDesign()
9+
10+
export const useGuide = (options?: Config) => {
11+
const driverObj = driver(
12+
options || {
13+
showProgress: true,
14+
nextBtnText: t('common.nextLabel'),
15+
prevBtnText: t('common.prevLabel'),
16+
doneBtnText: t('common.doneLabel'),
17+
steps: [
18+
{
19+
element: `#${variables.namespace}-menu`,
20+
popover: {
21+
title: t('common.menu'),
22+
description: t('common.menuDes'),
23+
side: 'right'
24+
}
25+
},
26+
{
27+
element: `#${variables.namespace}-tool-header`,
28+
popover: {
29+
title: t('common.tool'),
30+
description: t('common.toolDes'),
31+
side: 'left'
32+
}
33+
},
34+
{
35+
element: `#${variables.namespace}-tags-view`,
36+
popover: {
37+
title: t('common.tagsView'),
38+
description: t('common.tagsViewDes'),
39+
side: 'bottom'
40+
}
41+
}
42+
]
43+
}
44+
)
45+
46+
return {
47+
...driverObj
48+
}
49+
}

src/hooks/web/useIntro.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/hooks/web/useNetwork.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { ref, onBeforeUnmount } from 'vue'
2+
3+
const useNetwork = () => {
4+
const online = ref(true)
5+
6+
const updateNetwork = () => {
7+
online.value = navigator.onLine
8+
}
9+
10+
window.addEventListener('online', updateNetwork)
11+
window.addEventListener('offline', updateNetwork)
12+
13+
onBeforeUnmount(() => {
14+
window.removeEventListener('online', updateNetwork)
15+
window.removeEventListener('offline', updateNetwork)
16+
})
17+
18+
return { online }
19+
}
20+
21+
export { useNetwork }

0 commit comments

Comments
 (0)