From 9a80801c148150095182e2e9a0a046da588b2380 Mon Sep 17 00:00:00 2001 From: XieYongHong <18010623010@163.com> Date: Mon, 26 Aug 2024 18:46:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=99=8D=E4=BD=8Edayjs=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update: docker vesion * fix: 优化依赖包引入 * fix: 降低dayjs版本 --- .npmrc | 3 +- build.sh | 4 +- package.json | 7 +-- src/App.vue | 9 +++ src/components/FRuleEditor/Debug/index.vue | 6 +- src/main.ts | 6 +- src/utils/utils.ts | 4 +- src/views/Log/Access/index.vue | 7 +-- src/views/Log/System/index.vue | 6 +- .../Firmware/Task/Save/SelectDevices.vue | 4 +- .../ChildDevice/BindChildDevice/index.vue | 4 +- .../Instance/Detail/ChildDevice/index.vue | 5 +- .../Detail/Diagnose/Message/Dialog/index.vue | 6 +- .../device/Instance/Detail/Info/index.vue | 8 +-- .../device/Instance/Detail/Log/index.vue | 6 +- .../Detail/Running/Property/Detail/Table.vue | 6 +- .../components/dialogs/DeviceChooseDialog.vue | 4 +- .../iot-card/CardManagement/BindDevice.vue | 4 +- .../iot-card/CardManagement/Detail/index.vue | 26 ++++---- src/views/iot-card/CardManagement/Export.vue | 4 +- src/views/iot-card/Home/index.vue | 10 ++-- src/views/iot-card/Recharge/Detail.vue | 4 +- src/views/iot-card/Recharge/index.vue | 4 +- src/views/iot-card/Record/index.vue | 4 +- src/views/media/DashBoard/components/Card.vue | 24 ++++---- src/views/media/DashBoard/index.vue | 6 +- src/views/notice/Config/Log/index.vue | 4 +- src/views/notice/Template/Log/index.vue | 4 +- src/views/system/Menu/Setting/index.vue | 3 +- vite.config.ts | 4 +- yarn.lock | 59 +++++++------------ 31 files changed, 122 insertions(+), 133 deletions(-) diff --git a/.npmrc b/.npmrc index f408e702..93c2cd39 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ always-auth=true -registry=https://registry.npmjs.org/ +# registry=https://registry.npmjs.org/ +registry=https://registry.npmmirror.com diff --git a/build.sh b/build.sh index 473d0d4d..5bbf1f2e 100644 --- a/build.sh +++ b/build.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -docker build -t registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-vue:2.3.0-SNAPSHOT . -docker push registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-vue:2.3.0-SNAPSHOT +docker build -t registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-vue:2.2.0-SNAPSHOT . +docker push registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-vue:2.2.0-SNAPSHOT diff --git a/package.json b/package.json index c655e922..8345f596 100644 --- a/package.json +++ b/package.json @@ -29,13 +29,13 @@ "axios": "^1.2.1", "colorpicker-v3": "^2.10.2", "cronstrue": "^2.50.0", - "dayjs": "^1.11.12", + "dayjs": "1.11.11", "driver.js": "^0.9.8", "echarts": "^5.4.1", "event-source-polyfill": "^1.0.31", "global": "^4.4.0", "jetlinks-store": "^0.0.3", - "jetlinks-ui-components": "^1.0.47", + "jetlinks-ui-components": "^1.0.48", "jsencrypt": "^3.3.2", "less": "^4.1.3", "less-loader": "^11.1.0", @@ -54,12 +54,12 @@ "markdown-it-task-lists": "^2.1.1", "markdown-it-toc-done-right": "^4.2.0", "marked": "^4.2.12", - "moment": "^2.29.4", "monaco-editor": "^0.50.0", "nrm": "^1.2.5", "pinia": "^2.0.28", "resize-observer-polyfill": "^1.5.1", "rollup-plugin-copy": "^3.4.0", + "rollup-plugin-visualizer": "^5.12.0", "rxjs": "^7.8.1", "unplugin-auto-import": "^0.12.1", "unplugin-vue-components": "^0.22.12", @@ -81,7 +81,6 @@ "@commitlint/cli": "^17.4.1", "@commitlint/config-conventional": "^17.4.0", "@types/lodash-es": "^4.17.6", - "@types/moment": "^2.13.0", "@types/node": "^18.14.0", "@vitejs/plugin-vue": "^4.0.0", "@vuemap/unplugin-resolver": "^1.0.4", diff --git a/src/App.vue b/src/App.vue index 642a8e56..9410add6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,6 +16,15 @@ import { storeToRefs } from 'pinia'; import { useSystem } from './store/system'; import {LocalStore} from "@/utils/comm"; import {TOKEN_KEY} from "@/utils/variable"; +import dayjs from 'dayjs'; +import 'dayjs/locale/zh-cn'; +import weekdays from 'dayjs/plugin/weekday' +import localeData from 'dayjs/plugin/localeData' + +dayjs.extend(weekdays) +dayjs.extend(localeData) +dayjs.locale('zh-cn'); + const system = useSystem(); const {configInfo} = storeToRefs(system); diff --git a/src/components/FRuleEditor/Debug/index.vue b/src/components/FRuleEditor/Debug/index.vue index 231c6fc1..fe0614f2 100644 --- a/src/components/FRuleEditor/Debug/index.vue +++ b/src/components/FRuleEditor/Debug/index.vue @@ -179,11 +179,11 @@ {{ runningState(index + 1, item._time) }} {{ - moment(item.time).format('HH:mm:ss') + dayjs(item.time).format('HH:mm:ss') }}