From 10846491f043bae8ae9c00c1ad33604528e2a237 Mon Sep 17 00:00:00 2001 From: Sylar Date: Mon, 21 Nov 2022 18:48:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-83708=20fix:=20worker=E5=AF=B9safari?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A812=E4=BB=A5=E4=B8=8B=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=81=9A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/function.js | 12 ++++++++++++ typescript/core/platform/web/function.ts | 1 + .../controller/worker.main_thread.controller.ts | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/core/platform/web/function.js b/src/core/platform/web/function.js index 230fc6ad5..1c74836e2 100644 --- a/src/core/platform/web/function.js +++ b/src/core/platform/web/function.js @@ -125,5 +125,17 @@ BI._.extend(BI, { } } return false; + }, + + getSafariVersion: function () { + if (!_global.navigator) { + return 0; + } + var agent = navigator.userAgent.toLowerCase(); + var version = agent.match(/version\/([\d.]+)/); + if (version && version[1]) { + return version[1] * 1; + } + return 0; } }); diff --git a/typescript/core/platform/web/function.ts b/typescript/core/platform/web/function.ts index 95b2d29ef..406eb95ee 100644 --- a/typescript/core/platform/web/function.ts +++ b/typescript/core/platform/web/function.ts @@ -9,4 +9,5 @@ export type _function = { isMac: () => boolean; isWindows: () => boolean; isSupportCss3: (style: any) => boolean; + getSafariVersion: () => number; } \ No newline at end of file diff --git a/typescript/core/worker/controller/worker.main_thread.controller.ts b/typescript/core/worker/controller/worker.main_thread.controller.ts index bd7dcfc96..b9ddb4fb6 100644 --- a/typescript/core/worker/controller/worker.main_thread.controller.ts +++ b/typescript/core/worker/controller/worker.main_thread.controller.ts @@ -10,9 +10,10 @@ export class WorkerMainThreadController extends WorkerBaseController { /** * 是否支持 new Worker, 默认为 Wroker Class 是否实现 + * 由于Blob url支持度问题 规避Safari 12以下版本 */ - public canNewWorker: boolean = WorkerMainThreadController.hasWorkerClass; + public canNewWorker: boolean = WorkerMainThreadController.hasWorkerClass && !(BI.isSafari() && BI.getSafariVersion() < 12); /** * 主线程 new Worker 起始时刻 From 732054bfd699817c954c7c9190a817b340c6e54d Mon Sep 17 00:00:00 2001 From: windy Date: Tue, 22 Nov 2022 15:54:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?BI-117684=20=E8=A7=86=E8=A7=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/button/button.less | 1 + src/less/lib/theme.less | 1 + 2 files changed, 2 insertions(+) diff --git a/src/less/base/single/button/button.less b/src/less/base/single/button/button.less index b9aad6d1a..d404edd24 100644 --- a/src/less/base/single/button/button.less +++ b/src/less/base/single/button/button.less @@ -502,6 +502,7 @@ body .bi-button, #body .bi-button { &.button-error.disabled, &.button-warning.disabled { &, &.base-disabled { + color: @color-bi-text-disabled-button-theme-dark !important; border-color: @color-bi-border-dark-gray-line-theme-dark !important; background-color: fade(@color-bi-background-disabled-button-theme-dark, 20%) !important; @ieColor: argb(fade(@color-bi-background-disabled-button-theme-dark, 20%)); diff --git a/src/less/lib/theme.less b/src/less/lib/theme.less index 1092dd18a..50339345c 100644 --- a/src/less/lib/theme.less +++ b/src/less/lib/theme.less @@ -125,6 +125,7 @@ @color-bi-text-error-clear-button: @color-bi-text-failure; @color-bi-text-error-ghost-button: @color-bi-text-failure; @color-bi-text-disabled-button: @color-bi-text-disabled; +@color-bi-text-disabled-button-theme-dark: @color-bi-text-disabled-theme-dark; @color-bi-background-disabled-button: @color-bi-background-light-disabled; @color-bi-border-disabled-button: @color-bi-border-disabled; @color-bi-text-disabled-ignore-button: @color-bi-text-disabled;