vxe-table-demonic
Version:
一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式...
17 lines (13 loc) • 495 B
text/typescript
import GlobalConfig from '../v-x-e-table/src/conf'
export function getLog (message: string, params?: any) {
return `[vxe-table v${process.env.VUE_APP_VXE_TABLE_VERSION}] ${GlobalConfig.i18n(message, params)}`
}
function outLog (type: 'log' | 'warn' | 'error') {
return function (message: string, params?: any) {
const msg = getLog(message, params)
console[type](msg)
return msg
}
}
export const warnLog = outLog('warn')
export const errLog = outLog('error')