提交 e9b73251 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 377de966
...@@ -19,8 +19,10 @@ ...@@ -19,8 +19,10 @@
"controlledRef": true, "controlledRef": true,
"createApp": true, "createApp": true,
"createEventHook": true, "createEventHook": true,
"createGenericProjection": true,
"createGlobalState": true, "createGlobalState": true,
"createInjectionState": true, "createInjectionState": true,
"createProjection": true,
"createReactiveFn": true, "createReactiveFn": true,
"createSharedComposable": true, "createSharedComposable": true,
"createUnrefFn": true, "createUnrefFn": true,
...@@ -42,6 +44,9 @@ ...@@ -42,6 +44,9 @@
"isReactive": true, "isReactive": true,
"isReadonly": true, "isReadonly": true,
"isRef": true, "isRef": true,
"logicAnd": true,
"logicNot": true,
"logicOr": true,
"makeDestructurable": true, "makeDestructurable": true,
"markRaw": true, "markRaw": true,
"nextTick": true, "nextTick": true,
...@@ -101,6 +106,7 @@ ...@@ -101,6 +106,7 @@
"unref": true, "unref": true,
"unrefElement": true, "unrefElement": true,
"until": true, "until": true,
"useAbs": true,
"useActiveElement": true, "useActiveElement": true,
"useArrayEvery": true, "useArrayEvery": true,
"useArrayFilter": true, "useArrayFilter": true,
...@@ -113,6 +119,7 @@ ...@@ -113,6 +119,7 @@
"useAsyncQueue": true, "useAsyncQueue": true,
"useAsyncState": true, "useAsyncState": true,
"useAttrs": true, "useAttrs": true,
"useAverage": true,
"useBase64": true, "useBase64": true,
"useBattery": true, "useBattery": true,
"useBluetooth": true, "useBluetooth": true,
...@@ -120,6 +127,8 @@ ...@@ -120,6 +127,8 @@
"useBroadcastChannel": true, "useBroadcastChannel": true,
"useBrowserLocation": true, "useBrowserLocation": true,
"useCached": true, "useCached": true,
"useCeil": true,
"useClamp": true,
"useClipboard": true, "useClipboard": true,
"useCloned": true, "useCloned": true,
"useColorMode": true, "useColorMode": true,
...@@ -156,6 +165,7 @@ ...@@ -156,6 +165,7 @@
"useFetch": true, "useFetch": true,
"useFileDialog": true, "useFileDialog": true,
"useFileSystemAccess": true, "useFileSystemAccess": true,
"useFloor": true,
"useFocus": true, "useFocus": true,
"useFocusWithin": true, "useFocusWithin": true,
"useFps": true, "useFps": true,
...@@ -173,10 +183,13 @@ ...@@ -173,10 +183,13 @@
"useLocalStorage": true, "useLocalStorage": true,
"useMagicKeys": true, "useMagicKeys": true,
"useManualRefHistory": true, "useManualRefHistory": true,
"useMath": true,
"useMax": true,
"useMediaControls": true, "useMediaControls": true,
"useMediaQuery": true, "useMediaQuery": true,
"useMemoize": true, "useMemoize": true,
"useMemory": true, "useMemory": true,
"useMin": true,
"useMounted": true, "useMounted": true,
"useMouse": true, "useMouse": true,
"useMouseInElement": true, "useMouseInElement": true,
...@@ -193,14 +206,17 @@ ...@@ -193,14 +206,17 @@
"usePermission": true, "usePermission": true,
"usePointer": true, "usePointer": true,
"usePointerSwipe": true, "usePointerSwipe": true,
"usePrecision": true,
"usePreferredColorScheme": true, "usePreferredColorScheme": true,
"usePreferredContrast": true, "usePreferredContrast": true,
"usePreferredDark": true, "usePreferredDark": true,
"usePreferredLanguages": true, "usePreferredLanguages": true,
"usePreferredReducedMotion": true, "usePreferredReducedMotion": true,
"useProjection": true,
"useRafFn": true, "useRafFn": true,
"useRefHistory": true, "useRefHistory": true,
"useResizeObserver": true, "useResizeObserver": true,
"useRound": true,
"useRoute": true, "useRoute": true,
"useRouter": true, "useRouter": true,
"useScreenOrientation": true, "useScreenOrientation": true,
...@@ -217,6 +233,7 @@ ...@@ -217,6 +233,7 @@
"useStorage": true, "useStorage": true,
"useStorageAsync": true, "useStorageAsync": true,
"useStyleTag": true, "useStyleTag": true,
"useSum": true,
"useSupported": true, "useSupported": true,
"useSwipe": true, "useSwipe": true,
"useTemplateRefsList": true, "useTemplateRefsList": true,
...@@ -232,10 +249,12 @@ ...@@ -232,10 +249,12 @@
"useTimeoutPoll": true, "useTimeoutPoll": true,
"useTimestamp": true, "useTimestamp": true,
"useTitle": true, "useTitle": true,
"useToFixed": true,
"useToNumber": true, "useToNumber": true,
"useToString": true, "useToString": true,
"useToggle": true, "useToggle": true,
"useTransition": true, "useTransition": true,
"useTrunc": true,
"useUrlSearchParams": true, "useUrlSearchParams": true,
"useUserMedia": true, "useUserMedia": true,
"useVModel": true, "useVModel": true,
......
...@@ -20,8 +20,10 @@ declare global { ...@@ -20,8 +20,10 @@ declare global {
const controlledRef: typeof import('@vueuse/core')['controlledRef'] const controlledRef: typeof import('@vueuse/core')['controlledRef']
const createApp: typeof import('vue')['createApp'] const createApp: typeof import('vue')['createApp']
const createEventHook: typeof import('@vueuse/core')['createEventHook'] const createEventHook: typeof import('@vueuse/core')['createEventHook']
const createGenericProjection: typeof import('@vueuse/math')['createGenericProjection']
const createGlobalState: typeof import('@vueuse/core')['createGlobalState'] const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
const createInjectionState: typeof import('@vueuse/core')['createInjectionState'] const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
const createProjection: typeof import('@vueuse/math')['createProjection']
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn'] const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable'] const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn'] const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
...@@ -43,6 +45,9 @@ declare global { ...@@ -43,6 +45,9 @@ declare global {
const isReactive: typeof import('vue')['isReactive'] const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly'] const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef'] const isRef: typeof import('vue')['isRef']
const logicAnd: typeof import('@vueuse/math')['logicAnd']
const logicNot: typeof import('@vueuse/math')['logicNot']
const logicOr: typeof import('@vueuse/math')['logicOr']
const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable'] const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
const markRaw: typeof import('vue')['markRaw'] const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick'] const nextTick: typeof import('vue')['nextTick']
...@@ -102,6 +107,7 @@ declare global { ...@@ -102,6 +107,7 @@ declare global {
const unref: typeof import('vue')['unref'] const unref: typeof import('vue')['unref']
const unrefElement: typeof import('@vueuse/core')['unrefElement'] const unrefElement: typeof import('@vueuse/core')['unrefElement']
const until: typeof import('@vueuse/core')['until'] const until: typeof import('@vueuse/core')['until']
const useAbs: typeof import('@vueuse/math')['useAbs']
const useActiveElement: typeof import('@vueuse/core')['useActiveElement'] const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery'] const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter'] const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
...@@ -114,6 +120,7 @@ declare global { ...@@ -114,6 +120,7 @@ declare global {
const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue'] const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
const useAsyncState: typeof import('@vueuse/core')['useAsyncState'] const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
const useAttrs: typeof import('vue')['useAttrs'] const useAttrs: typeof import('vue')['useAttrs']
const useAverage: typeof import('@vueuse/math')['useAverage']
const useBase64: typeof import('@vueuse/core')['useBase64'] const useBase64: typeof import('@vueuse/core')['useBase64']
const useBattery: typeof import('@vueuse/core')['useBattery'] const useBattery: typeof import('@vueuse/core')['useBattery']
const useBluetooth: typeof import('@vueuse/core')['useBluetooth'] const useBluetooth: typeof import('@vueuse/core')['useBluetooth']
...@@ -121,6 +128,8 @@ declare global { ...@@ -121,6 +128,8 @@ declare global {
const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel'] const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation'] const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
const useCached: typeof import('@vueuse/core')['useCached'] const useCached: typeof import('@vueuse/core')['useCached']
const useCeil: typeof import('@vueuse/math')['useCeil']
const useClamp: typeof import('@vueuse/math')['useClamp']
const useClipboard: typeof import('@vueuse/core')['useClipboard'] const useClipboard: typeof import('@vueuse/core')['useClipboard']
const useCloned: typeof import('@vueuse/core')['useCloned'] const useCloned: typeof import('@vueuse/core')['useCloned']
const useColorMode: typeof import('@vueuse/core')['useColorMode'] const useColorMode: typeof import('@vueuse/core')['useColorMode']
...@@ -157,6 +166,7 @@ declare global { ...@@ -157,6 +166,7 @@ declare global {
const useFetch: typeof import('@vueuse/core')['useFetch'] const useFetch: typeof import('@vueuse/core')['useFetch']
const useFileDialog: typeof import('@vueuse/core')['useFileDialog'] const useFileDialog: typeof import('@vueuse/core')['useFileDialog']
const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess'] const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess']
const useFloor: typeof import('@vueuse/math')['useFloor']
const useFocus: typeof import('@vueuse/core')['useFocus'] const useFocus: typeof import('@vueuse/core')['useFocus']
const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin'] const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin']
const useFps: typeof import('@vueuse/core')['useFps'] const useFps: typeof import('@vueuse/core')['useFps']
...@@ -174,10 +184,13 @@ declare global { ...@@ -174,10 +184,13 @@ declare global {
const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage'] const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys'] const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory'] const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
const useMath: typeof import('@vueuse/math')['useMath']
const useMax: typeof import('@vueuse/math')['useMax']
const useMediaControls: typeof import('@vueuse/core')['useMediaControls'] const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery'] const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
const useMemoize: typeof import('@vueuse/core')['useMemoize'] const useMemoize: typeof import('@vueuse/core')['useMemoize']
const useMemory: typeof import('@vueuse/core')['useMemory'] const useMemory: typeof import('@vueuse/core')['useMemory']
const useMin: typeof import('@vueuse/math')['useMin']
const useMounted: typeof import('@vueuse/core')['useMounted'] const useMounted: typeof import('@vueuse/core')['useMounted']
const useMouse: typeof import('@vueuse/core')['useMouse'] const useMouse: typeof import('@vueuse/core')['useMouse']
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement'] const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
...@@ -194,14 +207,17 @@ declare global { ...@@ -194,14 +207,17 @@ declare global {
const usePermission: typeof import('@vueuse/core')['usePermission'] const usePermission: typeof import('@vueuse/core')['usePermission']
const usePointer: typeof import('@vueuse/core')['usePointer'] const usePointer: typeof import('@vueuse/core')['usePointer']
const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe'] const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
const usePrecision: typeof import('@vueuse/math')['usePrecision']
const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme'] const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast'] const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast']
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark'] const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages'] const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion'] const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
const useProjection: typeof import('@vueuse/math')['useProjection']
const useRafFn: typeof import('@vueuse/core')['useRafFn'] const useRafFn: typeof import('@vueuse/core')['useRafFn']
const useRefHistory: typeof import('@vueuse/core')['useRefHistory'] const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver'] const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
const useRound: typeof import('@vueuse/math')['useRound']
const useRoute: typeof import('vue-router')['useRoute'] const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter'] const useRouter: typeof import('vue-router')['useRouter']
const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation'] const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
...@@ -218,6 +234,7 @@ declare global { ...@@ -218,6 +234,7 @@ declare global {
const useStorage: typeof import('@vueuse/core')['useStorage'] const useStorage: typeof import('@vueuse/core')['useStorage']
const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync'] const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
const useStyleTag: typeof import('@vueuse/core')['useStyleTag'] const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
const useSum: typeof import('@vueuse/math')['useSum']
const useSupported: typeof import('@vueuse/core')['useSupported'] const useSupported: typeof import('@vueuse/core')['useSupported']
const useSwipe: typeof import('@vueuse/core')['useSwipe'] const useSwipe: typeof import('@vueuse/core')['useSwipe']
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList'] const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
...@@ -233,10 +250,12 @@ declare global { ...@@ -233,10 +250,12 @@ declare global {
const useTimeoutPoll: typeof import('@vueuse/core')['useTimeoutPoll'] const useTimeoutPoll: typeof import('@vueuse/core')['useTimeoutPoll']
const useTimestamp: typeof import('@vueuse/core')['useTimestamp'] const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
const useTitle: typeof import('@vueuse/core')['useTitle'] const useTitle: typeof import('@vueuse/core')['useTitle']
const useToFixed: typeof import('@vueuse/math')['useToFixed']
const useToNumber: typeof import('@vueuse/core')['useToNumber'] const useToNumber: typeof import('@vueuse/core')['useToNumber']
const useToString: typeof import('@vueuse/core')['useToString'] const useToString: typeof import('@vueuse/core')['useToString']
const useToggle: typeof import('@vueuse/core')['useToggle'] const useToggle: typeof import('@vueuse/core')['useToggle']
const useTransition: typeof import('@vueuse/core')['useTransition'] const useTransition: typeof import('@vueuse/core')['useTransition']
const useTrunc: typeof import('@vueuse/math')['useTrunc']
const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams'] const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
const useUserMedia: typeof import('@vueuse/core')['useUserMedia'] const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
const useVModel: typeof import('@vueuse/core')['useVModel'] const useVModel: typeof import('@vueuse/core')['useVModel']
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
"@tinymce/tinymce-vue": "^5.0.0", "@tinymce/tinymce-vue": "^5.0.0",
"@vant/area-data": "^1.3.2", "@vant/area-data": "^1.3.2",
"@vueuse/core": "^9.2.0", "@vueuse/core": "^9.2.0",
"@vueuse/math": "^9.3.0",
"ali-oss": "^6.17.1", "ali-oss": "^6.17.1",
"axios": "^0.27.2", "axios": "^0.27.2",
"blueimp-md5": "^2.19.0", "blueimp-md5": "^2.19.0",
...@@ -886,6 +887,54 @@ ...@@ -886,6 +887,54 @@
} }
} }
}, },
"node_modules/@vueuse/math": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/math/-/math-9.3.0.tgz",
"integrity": "sha512-uCHxm9t3cNLQNKXZBHCxT9fJXDYiZcNn9PegpCei4bpxMcLR8QCbNzoAggxmI7m4M6qaFSz8am3cqAM+6Ecy8Q==",
"dependencies": {
"@vueuse/shared": "9.3.0",
"vue-demi": "*"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/math/node_modules/@vueuse/shared": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.3.0.tgz",
"integrity": "sha512-caGUWLY0DpPC6l31KxeUy6vPVNA0yKxx81jFYLoMpyP6cF84FG5Dkf69DfSUqL57wX8JcUkJDMnQaQIZPWFEQQ==",
"dependencies": {
"vue-demi": "*"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/math/node_modules/vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vueuse/metadata": { "node_modules/@vueuse/metadata": {
"version": "9.2.0", "version": "9.2.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.2.0.tgz", "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.2.0.tgz",
...@@ -5501,6 +5550,31 @@ ...@@ -5501,6 +5550,31 @@
} }
} }
}, },
"@vueuse/math": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/math/-/math-9.3.0.tgz",
"integrity": "sha512-uCHxm9t3cNLQNKXZBHCxT9fJXDYiZcNn9PegpCei4bpxMcLR8QCbNzoAggxmI7m4M6qaFSz8am3cqAM+6Ecy8Q==",
"requires": {
"@vueuse/shared": "9.3.0",
"vue-demi": "*"
},
"dependencies": {
"@vueuse/shared": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.3.0.tgz",
"integrity": "sha512-caGUWLY0DpPC6l31KxeUy6vPVNA0yKxx81jFYLoMpyP6cF84FG5Dkf69DfSUqL57wX8JcUkJDMnQaQIZPWFEQQ==",
"requires": {
"vue-demi": "*"
}
},
"vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"requires": {}
}
}
},
"@vueuse/metadata": { "@vueuse/metadata": {
"version": "9.2.0", "version": "9.2.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.2.0.tgz", "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.2.0.tgz",
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
"@tinymce/tinymce-vue": "^5.0.0", "@tinymce/tinymce-vue": "^5.0.0",
"@vant/area-data": "^1.3.2", "@vant/area-data": "^1.3.2",
"@vueuse/core": "^9.2.0", "@vueuse/core": "^9.2.0",
"@vueuse/math": "^9.3.0",
"ali-oss": "^6.17.1", "ali-oss": "^6.17.1",
"axios": "^0.27.2", "axios": "^0.27.2",
"blueimp-md5": "^2.19.0", "blueimp-md5": "^2.19.0",
......
...@@ -127,8 +127,7 @@ const handlePreview: UploadProps['onPreview'] = uploadFile => { ...@@ -127,8 +127,7 @@ const handlePreview: UploadProps['onPreview'] = uploadFile => {
:on-preview="handlePreview" :on-preview="handlePreview"
:on-success="handleSuccess" :on-success="handleSuccess"
:file-list="fileList" :file-list="fileList"
class="uploader" class="uploader">
>
<slot> <slot>
<template v-if="showFileList"> <template v-if="showFileList">
<template v-if="$attrs['list-type'] === 'picture-card'"> <template v-if="$attrs['list-type'] === 'picture-card'">
...@@ -152,6 +151,7 @@ const handlePreview: UploadProps['onPreview'] = uploadFile => { ...@@ -152,6 +151,7 @@ const handlePreview: UploadProps['onPreview'] = uploadFile => {
<style lang="scss"> <style lang="scss">
.uploader { .uploader {
flex: 1; flex: 1;
overflow: hidden;
} }
.avatar-uploader { .avatar-uploader {
width: 178px; width: 178px;
......
...@@ -52,8 +52,7 @@ const logout = async () => { ...@@ -52,8 +52,7 @@ const logout = async () => {
:popper-offset="0" :popper-offset="0"
popper-class="sub-menu-popper" popper-class="sub-menu-popper"
v-permission="item.tag" v-permission="item.tag"
v-if="item.children" v-if="item.children">
>
<template #title> <template #title>
{{ item.name }} {{ item.name }}
</template> </template>
...@@ -61,8 +60,7 @@ const logout = async () => { ...@@ -61,8 +60,7 @@ const logout = async () => {
:index="subitem.path" :index="subitem.path"
v-for="subitem in item.children" v-for="subitem in item.children"
:key="subitem.path" :key="subitem.path"
v-permission="subitem.tag" v-permission="subitem.tag">
>
{{ subitem.name }} {{ subitem.name }}
</el-menu-item> </el-menu-item>
</el-sub-menu> </el-sub-menu>
...@@ -129,6 +127,7 @@ const logout = async () => { ...@@ -129,6 +127,7 @@ const logout = async () => {
font-weight: 500; font-weight: 500;
line-height: 30px; line-height: 30px;
border-left: 2px solid var(--main-color); border-left: 2px solid var(--main-color);
white-space: nowrap;
} }
} }
.app-header-nav { .app-header-nav {
......
...@@ -4,6 +4,7 @@ export function useCountdown(optionsSecond = 90) { ...@@ -4,6 +4,7 @@ export function useCountdown(optionsSecond = 90) {
let timer: number | null = null let timer: number | null = null
function start() { function start() {
second.value = optionsSecond
disabled.value = true disabled.value = true
timer = window.setInterval(() => { timer = window.setInterval(() => {
second.value-- second.value--
......
...@@ -28,7 +28,13 @@ export function updateContest(data: ContestUpdateParams) { ...@@ -28,7 +28,13 @@ export function updateContest(data: ContestUpdateParams) {
} }
// 获取指导老师列表 // 获取指导老师列表
export function getTeacherList(params?: { name?: string }) { export function getTeacherList(params?: {
name?: string
email?: string
sso_id?: string
page?: number
'per-page'?: number
}) {
return httpRequest.get('/api/resource/v1/backend/teacher/faculty-advisers', { params }) return httpRequest.get('/api/resource/v1/backend/teacher/faculty-advisers', { params })
} }
......
...@@ -133,11 +133,11 @@ function handleSubmit() { ...@@ -133,11 +133,11 @@ function handleSubmit() {
...form, ...form,
organizer_ids: JSON.stringify(form.organizer_ids), organizer_ids: JSON.stringify(form.organizer_ids),
// teacher_ids: form.teacher_ids.join(','), // teacher_ids: form.teacher_ids.join(','),
start_range: new Date(firstDate).getTime() / 1000, start_range: dayjs(firstDate).unix(),
end_range: new Date(secondDate).getTime() / 1000, end_range: dayjs(secondDate).endOf('date').unix(),
start_at: dayjs(firstDatetime).year(year).month(month).date(date).unix(), start_at: dayjs(firstDatetime).year(year).month(month).date(date).unix(),
end_at: dayjs(secondDatetime).year(year).month(month).date(date).unix(), end_at: dayjs(secondDatetime).year(year).month(month).date(date).unix(),
apply_expiration_date: new Date(form.apply_expiration_date).getTime() / 1000 apply_expiration_date: dayjs(form.apply_expiration_date).unix()
} }
const params: ContestUpdateParams = pick(mergedForm, [ const params: ContestUpdateParams = pick(mergedForm, [
'id', 'id',
...@@ -193,8 +193,7 @@ function handleDateRangeChange(value: any) { ...@@ -193,8 +193,7 @@ function handleDateRangeChange(value: any) {
:close-on-click-modal="false" :close-on-click-modal="false"
align-center align-center
width="600px" width="600px"
@update:modelValue="$emit('update:modelValue')" @update:modelValue="$emit('update:modelValue')">
>
<el-form ref="formRef" :model="form" :rules="rules" label-width="110px"> <el-form ref="formRef" :model="form" :rules="rules" label-width="110px">
<el-form-item label="赛项名称" prop="name"> <el-form-item label="赛项名称" prop="name">
<el-input v-model="form.name" :disabled="isUpdate" /> <el-input v-model="form.name" :disabled="isUpdate" />
...@@ -215,8 +214,7 @@ function handleDateRangeChange(value: any) { ...@@ -215,8 +214,7 @@ function handleDateRangeChange(value: any) {
v-for="item in technicalSupportUnitList" v-for="item in technicalSupportUnitList"
:key="item.id" :key="item.id"
:label="item.label" :label="item.label"
:value="item.id" :value="item.id"></el-option>
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="赛项类型" prop="type"> <el-form-item label="赛项类型" prop="type">
...@@ -235,11 +233,10 @@ function handleDateRangeChange(value: any) { ...@@ -235,11 +233,10 @@ function handleDateRangeChange(value: any) {
range-separator="至" range-separator="至"
v-model="form.dateRange" v-model="form.dateRange"
style="width: 100%" style="width: 100%"
@change="handleDateRangeChange" @change="handleDateRangeChange" />
/>
</el-form-item> </el-form-item>
<el-form-item label="正式比赛日期" prop="date"> <el-form-item label="正式比赛日期" prop="date">
<el-date-picker v-model="form.date" style="width: 100%" /> <el-date-picker type="date" v-model="form.date" style="width: 100%" />
</el-form-item> </el-form-item>
<el-form-item label="正式比赛时间" prop="datetimeRange"> <el-form-item label="正式比赛时间" prop="datetimeRange">
<el-time-picker <el-time-picker
...@@ -248,11 +245,10 @@ function handleDateRangeChange(value: any) { ...@@ -248,11 +245,10 @@ function handleDateRangeChange(value: any) {
start-placeholder="开始时间" start-placeholder="开始时间"
end-placeholder="结束时间" end-placeholder="结束时间"
v-model="form.datetimeRange" v-model="form.datetimeRange"
style="width: 100%" style="width: 100%" />
/>
</el-form-item> </el-form-item>
<el-form-item label="报名截止日期" prop="apply_expiration_date"> <el-form-item label="报名截止日期" prop="apply_expiration_date">
<el-date-picker v-model="form.apply_expiration_date" style="width: 100%" /> <el-date-picker type="date" v-model="form.apply_expiration_date" style="width: 100%" />
</el-form-item> </el-form-item>
<el-form-item label="训练平台地址" prop="train_platform_uri"> <el-form-item label="训练平台地址" prop="train_platform_uri">
<el-input v-model="form.train_platform_uri" /> <el-input v-model="form.train_platform_uri" />
......
...@@ -21,7 +21,7 @@ const formRef = $ref<FormInstance>() ...@@ -21,7 +21,7 @@ const formRef = $ref<FormInstance>()
const form = reactive<any>({ const form = reactive<any>({
name: detail.name, name: detail.name,
competition_id: detail.id, competition_id: detail.id,
is_more_status: '1', is_more_status: '0',
rule_type: '1', rule_type: '1',
lowest_number: undefined, lowest_number: undefined,
detail_list: [] detail_list: []
...@@ -57,7 +57,7 @@ function fetchInfo() { ...@@ -57,7 +57,7 @@ function fetchInfo() {
let examList = $ref<Record<string, any>[]>([]) let examList = $ref<Record<string, any>[]>([])
// 获取关联考试列表 // 获取关联考试列表
function fetchExamList() { function fetchExamList() {
getExamList({ project: 'exam_x1', 'per-page': 1000 }).then(res => { getExamList({ project: 'x1', 'per-page': 1000 }).then(res => {
examList = res.data.list || [] examList = res.data.list || []
}) })
} }
...@@ -145,8 +145,7 @@ function handleRatioChange(row: any, index: number) { ...@@ -145,8 +145,7 @@ function handleRatioChange(row: any, index: number) {
title="评分规则" title="评分规则"
:close-on-click-modal="false" :close-on-click-modal="false"
width="800px" width="800px"
@update:modelValue="$emit('update:modelValue')" @update:modelValue="$emit('update:modelValue')">
>
<el-form ref="formRef" :model="form" :rules="rules" label-width="170px"> <el-form ref="formRef" :model="form" :rules="rules" label-width="170px">
<el-form-item label="赛项名称"> <el-form-item label="赛项名称">
<el-input v-model="form.name" disabled /> <el-input v-model="form.name" disabled />
...@@ -188,8 +187,7 @@ function handleRatioChange(row: any, index: number) { ...@@ -188,8 +187,7 @@ function handleRatioChange(row: any, index: number) {
v-for="item in currentScoreMethods(row.type)" v-for="item in currentScoreMethods(row.type)"
:key="item.id" :key="item.id"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"></el-option>
></el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
...@@ -200,8 +198,7 @@ function handleRatioChange(row: any, index: number) { ...@@ -200,8 +198,7 @@ function handleRatioChange(row: any, index: number) {
v-for="item in examList" v-for="item in examList"
:key="item.exam_id" :key="item.exam_id"
:label="item.name" :label="item.name"
:value="item.exam_id" :value="item.exam_id"></el-option>
></el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
...@@ -212,8 +209,7 @@ function handleRatioChange(row: any, index: number) { ...@@ -212,8 +209,7 @@ function handleRatioChange(row: any, index: number) {
:min="0" :min="0"
:controls="false" :controls="false"
:disabled="row.type === '2'" :disabled="row.type === '2'"
style="width: 100%" style="width: 100%" />
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="占比(%)" align="center" width="100"> <el-table-column prop="date" label="占比(%)" align="center" width="100">
...@@ -223,8 +219,7 @@ function handleRatioChange(row: any, index: number) { ...@@ -223,8 +219,7 @@ function handleRatioChange(row: any, index: number) {
:min="0" :min="0"
:controls="false" :controls="false"
@change="handleRatioChange(row, $index)" @change="handleRatioChange(row, $index)"
style="width: 100%" style="width: 100%" />
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="操作" align="center" width="60"> <el-table-column prop="date" label="操作" align="center" width="60">
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import type { ContestVideoItem } from '../types' import type { ContestVideoItem } from '../types'
import { CirclePlus } from '@element-plus/icons-vue' import { CirclePlus } from '@element-plus/icons-vue'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { useToFixed } from '@vueuse/math'
import AppList from '@/components/base/AppList.vue' import AppList from '@/components/base/AppList.vue'
import ViewVideoPreviewDialog from './ViewVideoPreviewDialog.vue' import ViewVideoPreviewDialog from './ViewVideoPreviewDialog.vue'
import { getContestVideoList, deleteContestVideo } from '../api' import { getContestVideoList, deleteContestVideo } from '../api'
...@@ -24,7 +25,14 @@ const listOptions = { ...@@ -24,7 +25,14 @@ const listOptions = {
columns: [ columns: [
{ label: '序号', type: 'index', width: 60 }, { label: '序号', type: 'index', width: 60 },
{ label: '操作视频名称', prop: 'name' }, { label: '操作视频名称', prop: 'name' },
{ label: '视频时长(分钟)', prop: 'duration' }, {
label: '视频时长(分钟)',
prop: 'duration',
computed({ row }: { row: ContestVideoItem }) {
const duration = parseInt(row.duration)
return duration ? useToFixed(duration / 60, 2).value : 0
}
},
{ label: '创建人', prop: 'create_user.real_name' }, { label: '创建人', prop: 'create_user.real_name' },
{ label: '创建时间', prop: 'created_time' }, { label: '创建时间', prop: 'created_time' },
{ label: '更新时间', prop: 'updated_time' }, { label: '更新时间', prop: 'updated_time' },
......
...@@ -8,7 +8,7 @@ const teachers = ref<TeacherType[]>([]) ...@@ -8,7 +8,7 @@ const teachers = ref<TeacherType[]>([])
export function useGetTeacherList() { export function useGetTeacherList() {
!teachers.value.length && !teachers.value.length &&
getTeacherList().then((res: any) => { getTeacherList({ 'per-page': 1000 }).then((res: any) => {
teachers.value = res.data.list teachers.value = res.data.list
}) })
return { teachers } return { teachers }
......
...@@ -11,6 +11,11 @@ export function getMyContestList() { ...@@ -11,6 +11,11 @@ export function getMyContestList() {
return httpRequest.get('/api/lab/v1/student/competition/my-list') return httpRequest.get('/api/lab/v1/student/competition/my-list')
} }
// 获取赛项详情
export function getContest(params: { id: string }) {
return httpRequest.get('/api/lab/v1/student/competition/detail', { params })
}
// 获取学员详情 // 获取学员详情
export function getStudentInfo() { export function getStudentInfo() {
return httpRequest.get('/api/lab/v1/student/competition/student-detail') return httpRequest.get('/api/lab/v1/student/competition/student-detail')
......
...@@ -10,8 +10,8 @@ const isMy = $computed(() => { ...@@ -10,8 +10,8 @@ const isMy = $computed(() => {
return !!props.data.login_id return !!props.data.login_id
}) })
const typeText = $computed(() => { const modeText = $computed(() => {
return contestMode[props.data.type] return contestMode[props.data.mode]
}) })
</script> </script>
...@@ -20,12 +20,12 @@ const typeText = $computed(() => { ...@@ -20,12 +20,12 @@ const typeText = $computed(() => {
<div class="contest-item-main"> <div class="contest-item-main">
<div class="contest-item-main__bg"><img :src="data.cover" /></div> <div class="contest-item-main__bg"><img :src="data.cover" /></div>
<div class="contest-item-main__inner"> <div class="contest-item-main__inner">
<img :src="data.logo" class="logo" /> <!-- <img :src="data.logo" class="logo" /> -->
<div class="cover"> <div class="cover">
<ul class="info-list" v-if="isMy"> <ul class="info-list" v-if="isMy">
<li>姓名:{{ data.student_name }}</li> <li>姓名:{{ data.student_name }}</li>
<li>参赛ID:{{ data.login_id }}</li> <li>参赛ID:{{ data.login_id }}</li>
<li>参赛形式:{{ typeText }}</li> <li>参赛形式:{{ modeText }}</li>
<li>所属学校:{{ data.org_name }}</li> <li>所属学校:{{ data.org_name }}</li>
</ul> </ul>
<router-link :to="`/student/contest/lab/${data.id}?name=${data.name}`" v-if="isMy"> <router-link :to="`/student/contest/lab/${data.id}?name=${data.name}`" v-if="isMy">
...@@ -55,7 +55,7 @@ const typeText = $computed(() => { ...@@ -55,7 +55,7 @@ const typeText = $computed(() => {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
opacity: 0.5; // opacity: 0.5;
} }
} }
.contest-item-main__inner { .contest-item-main__inner {
......
...@@ -20,6 +20,7 @@ export interface Contest { ...@@ -20,6 +20,7 @@ export interface Contest {
technical_support_unit: SystemDictionary technical_support_unit: SystemDictionary
train_platform_uri: string train_platform_uri: string
type: string type: string
mode: string
} }
export type ContestJoinParams = { export type ContestJoinParams = {
......
<script setup lang="ts"> <script setup lang="ts">
import type { ExperimentRecord } from '../types' import type { ExperimentRecord, Contest } from '../types'
import { HomeFilled } from '@element-plus/icons-vue' import { HomeFilled } from '@element-plus/icons-vue'
import { ElMessageBox, ElMessage } from 'element-plus' import { ElMessageBox, ElMessage } from 'element-plus'
import { upload } from '@/utils/upload' import { upload } from '@/utils/upload'
import { getExperimentRecord, uploadExperimentPicture } from '../api' import { getContest, getExperimentRecord, uploadExperimentPicture } from '../api'
import dayjs from 'dayjs' import dayjs from 'dayjs'
const Book = defineAsyncComponent(() => import('../components/Book.vue')) const Book = defineAsyncComponent(() => import('../components/Book.vue'))
...@@ -16,6 +16,17 @@ interface Props { ...@@ -16,6 +16,17 @@ interface Props {
} }
const props = defineProps<Props>() const props = defineProps<Props>()
// 获取赛项信息
let competition = $ref<Contest>()
function fetchCompetition() {
getContest({ id: props.id }).then(res => {
competition = res.data.detail
})
}
onMounted(() => {
fetchCompetition()
})
// 左侧 // 左侧
const leftPanelVisible = $ref<boolean>(true) const leftPanelVisible = $ref<boolean>(true)
...@@ -39,7 +50,6 @@ watchEffect(() => { ...@@ -39,7 +50,6 @@ watchEffect(() => {
}) })
// 右侧 // 右侧
const LAB_URL = import.meta.env.VITE_LAB_URL
let iframeKey = $ref(Date.now()) let iframeKey = $ref(Date.now())
// 返回首页 // 返回首页
function handleBackHome() { function handleBackHome() {
...@@ -99,7 +109,7 @@ function uploadPicture(url: string) { ...@@ -99,7 +109,7 @@ function uploadPicture(url: string) {
<section class="lab"> <section class="lab">
<div class="lab-left" :class="{ 'is-hidden': !leftPanelVisible }"> <div class="lab-left" :class="{ 'is-hidden': !leftPanelVisible }">
<div class="lab-left__inner"> <div class="lab-left__inner">
<h1>{{ $route.query.name }}</h1> <h1>{{ competition?.name }}</h1>
<el-tabs type="border-card" stretch> <el-tabs type="border-card" stretch>
<el-tab-pane label="实训指导" lazy> <el-tab-pane label="实训指导" lazy>
<Book :competition_id="id"></Book> <Book :competition_id="id"></Book>
...@@ -141,7 +151,12 @@ function uploadPicture(url: string) { ...@@ -141,7 +151,12 @@ function uploadPicture(url: string) {
</el-row> </el-row>
</AppCard> </AppCard>
<div class="lab-box"> <div class="lab-box">
<iframe :src="LAB_URL" :key="iframeKey" frameborder="0" class="iframe" ref="iframeRef"></iframe> <iframe
:src="competition?.train_platform_uri"
:key="iframeKey"
frameborder="0"
class="iframe"
ref="iframeRef"></iframe>
</div> </div>
</div> </div>
</section> </section>
......
...@@ -12,7 +12,7 @@ export default defineConfig(({ mode }) => ({ ...@@ -12,7 +12,7 @@ export default defineConfig(({ mode }) => ({
plugins: [ plugins: [
vue({ reactivityTransform: true }), vue({ reactivityTransform: true }),
AutoImport({ AutoImport({
imports: ['vue', 'vue/macros', 'vue-router', '@vueuse/core'], imports: ['vue', 'vue/macros', 'vue-router', '@vueuse/core', '@vueuse/math'],
dts: true, dts: true,
eslintrc: { enabled: true } eslintrc: { enabled: true }
}) })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论