0
点赞
收藏
分享

微信扫一扫

Spring Boot中线程池使用

桑二小姐 2024-10-05 阅读 1

一个小技巧,分享下在webapp中友好展示当前app信息的方法

实现效果

在这里插入图片描述

代码实现

  • 导入
	import {
		version,
		name
	} from './package.json'
  • 应用声明周期中处理
onLaunch: function() {
// #ifdef H5
	console.log(
		`%c hello uniapp %c v${version} `,
		'background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px;  color: #fff',
		'background:#007aff ;padding: 1px; border-radius: 0 3px 3px 0;  color: #fff; font-weight: bold;'
	)
	console.log(`%c hello uniapp %c v${name} `,
		'background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px;  color: #fff',
		'background:#5500ff ;padding: 1px; border-radius: 0 3px 3px 0;  color: #fff; font-weight: bold;')
// #endif
}

可以根据自己的实际需要,完善需要展示的信息,配色,内容。

举报

相关推荐

0 条评论