diff --git a/package.json b/package.json index 17622cf..8d37421 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vxe-ui/core", - "version": "0.12.4", + "version": "1.0.0", "description": "Vxe UI core library", "scripts": { "update": "npm install --legacy-peer-deps", diff --git a/packages/src/log.ts b/packages/src/log.ts index eb7ddcc..f16c9f8 100644 --- a/packages/src/log.ts +++ b/packages/src/log.ts @@ -4,14 +4,16 @@ import { VxeGlobalLog } from '../../types' function createLog (type: 'log' | 'warn' | 'error', name?: string) { return function (key: string, args?: any) { - const msg = `[${name || 'vxe'} v${process.env.VUE_APP_VXE_VERSION}] ${getI18n(key, args)}` + const msg = `[vxe ${name || ''}] ${getI18n(key, args)}` console[type](msg) return msg } } +const version = process.env.VUE_APP_VXE_VERSION + export const log: VxeGlobalLog = { create: createLog, - warn: createLog('warn'), - err: createLog('error') + warn: createLog('warn', `v${version}`), + err: createLog('error', `v${version}`) }