obs 插件增加时间和日期 希望圆点可以变红并且能闪烁,模拟指示灯
function app() {
return {
time: 0,
date: 0,
week: ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
startClock() {setInterval(() => {
this.updateClock();
}, 1000);},
updateClock() {
var newDate = new Date();
this.time = this.padNum(newDate.getHours(), 2) + ':' + this.padNum(newDate.getMinutes(), 2) + ':' + this.padNum(newDate.getSeconds(), 2) + ' ● 录制中';
this.date = this.padNum(newDate.getFullYear(), 4) + '/' + this.padNum(newDate.getMonth() + 1, 2) + '/' + this.padNum(newDate.getDate(), 2) + ' | ' + this.week[newDate.getDay()];
},
padNum: function (num, digit) {
var zero = '';
for (var i = 0; i < digit; i++) {
zero += '0';
}
return (zero + num).slice (-digit);
} };
圆点可以变红并且能闪烁,模拟指示灯 两行之间增加距离
最好可以配合obs录制暂停动作