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/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; 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 起始时刻