Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Jun 7, 2024
1 parent 8c6de79 commit b2a58dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 5 additions & 3 deletions packages/src/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
}

0 comments on commit b2a58dc

Please sign in to comment.