From b064c4bcb9f0e45e3debbfd9af4719b31755e256 Mon Sep 17 00:00:00 2001 From: "zude.hzd" Date: Thu, 17 Mar 2022 12:04:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=A1=A8=E8=BE=BE?= =?UTF-8?q?=E5=BC=8F=E6=8A=A5=E9=94=99=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/renderer-core/src/utils/common.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/renderer-core/src/utils/common.ts b/packages/renderer-core/src/utils/common.ts index 78bead5ac..5ce015bc1 100644 --- a/packages/renderer-core/src/utils/common.ts +++ b/packages/renderer-core/src/utils/common.ts @@ -1,5 +1,6 @@ /* eslint-disable no-new-func */ -import Debug from 'debug'; +// import Debug from 'debug'; +import logger from './logger'; import { forEach as _forEach, shallowEqual as _shallowEqual } from '@ali/b3-one/lib/obj'; import { serialize as serializeParams } from '@ali/b3-one/lib/url'; // moment对象配置 @@ -52,7 +53,7 @@ const EXPRESSION_TYPE = { const EXPRESSION_REG = /^\{\{(\{.*\}|.*?)\}\}$/; const hasSymbol = typeof Symbol === 'function' && Symbol.for; const REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; -const debug = Debug('utils:index'); +// const debug = Debug('utils:index'); const ENV = { TBE: 'TBE', @@ -434,7 +435,8 @@ export function parseExpression(str: any, self: any) { const code = `with($scope || {}) { ${tarStr} }`; return new Function('$scope', code)(self); } catch (err) { - debug('parseExpression.error', err, str, self); + // debug('parseExpression.error', err, str, self); + logger.error('parseExpression.error', err, str, self); return undefined; } }