From 40f90200c926f537807d6518640385edd4dfec2b Mon Sep 17 00:00:00 2001 From: dailer Date: Wed, 5 Jul 2023 21:00:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20=E5=90=B8=E5=8F=96?= =?UTF-8?q?=E7=BB=8F=E9=AA=8C,=E9=98=B2=E6=AD=A2=E5=88=AB=E4=BA=BA?= =?UTF-8?q?=E4=B9=B1=E6=94=B9=E5=A1=9Eundefined=E4=B9=8B=E7=B1=BB=E7=9A=84?= =?UTF-8?q?,=E5=8A=A0=E4=B8=AA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fineui/src/core/constant/writable.var.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/fineui/src/core/constant/writable.var.js b/packages/fineui/src/core/constant/writable.var.js index 3bca927e5..2b22ba030 100644 --- a/packages/fineui/src/core/constant/writable.var.js +++ b/packages/fineui/src/core/constant/writable.var.js @@ -14,7 +14,7 @@ export const setEventResponseTime = v => { PropertyDescriptors["EVENT_RESPONSE_TIME"] = { enumerable: true, configurable: true, - get: function () { + get: function() { return EVENT_RESPONSE_TIME; }, set: setEventResponseTime, @@ -27,7 +27,7 @@ export const setPixUnit = v => { PropertyDescriptors["pixUnit"] = { enumerable: true, configurable: true, - get: function () { + get: function() { return pixUnit; }, set: setPixUnit, @@ -40,7 +40,7 @@ export const setPixRatio = v => { PropertyDescriptors["pixRatio"] = { enumerable: true, configurable: true, - get: function () { + get: function() { return pixRatio; }, set: setPixRatio, @@ -48,12 +48,15 @@ PropertyDescriptors["pixRatio"] = { export let StartOfWeek = 1; export const setStartOfWeek = v => { + if (![0, 1].includes(v)) { + throw new Error("setStartOfWeek must be 0 or 1"); + } StartOfWeek = v; }; PropertyDescriptors["StartOfWeek"] = { enumerable: true, configurable: true, - get: function () { + get: function() { return StartOfWeek; }, set: setStartOfWeek, @@ -66,7 +69,7 @@ export const setBlankSplitChar = v => { PropertyDescriptors["BlankSplitChar"] = { enumerable: true, configurable: true, - get: function () { + get: function() { return BlankSplitChar; }, set: setBlankSplitChar, @@ -93,7 +96,7 @@ export const setPixFormat = v => { PropertyDescriptors["pixFormat"] = { enumerable: true, configurable: true, - get: function () { + get: function() { return pixFormat; }, set: setPixFormat, @@ -118,7 +121,7 @@ export let setToPix = v => { PropertyDescriptors["toPix"] = { enumerable: true, configurable: true, - get: function () { + get: function() { return toPix; }, set: setToPix, @@ -135,7 +138,7 @@ export const setEventBlur = v => { PropertyDescriptors["EVENT_BLUR"] = { enumerable: true, configurable: true, - get: function () { + get: function() { return EVENT_BLUR; }, set: setEventBlur,