SOURCE

console 命令行工具 X clear

                    
>
console
var app = new Vue({
  el: '#app',
  data() {
    return {
      week:'', // 星期几
	  date_show:'', // 日期
	  time_show:'',//当前时间
    }
  }, 
  created(){
	this.getTime = setInterval(()=>{
	 	this.getnewTime()
	},1000)
	this.getdataTime() // 获取系统日期
  },
  methods: {
      //获取当前系统的的日期
	  getdataTime(){
	  	let wk = new Date().getDay()  
	  	let yy = new Date().getFullYear();
	  	let mm = new Date().getMonth() + 1;
	  	let dd = new Date().getDate();
	  	let weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
	  	this.week = weeks[wk]
	  	this.date_show = yy + "年" + mm + "月" + dd + "日"
	  },
	  // 获取当前系统的时间
	  getnewTime(){
	  	let hh = new Date().getHours();
	  	let mf = new Date().getMinutes() < 10 
	  	? "0" + new Date().getMinutes() 
	  	: new Date().getMinutes();
	  	let ss = new Date().getSeconds() < 10
	  	? "0" + new Date().getSeconds()
	  	: new Date().getSeconds();
	  	this.time_show = hh + ":" + mf + ":" + ss;
	  },
  }
});
<div id="app">
    <h1>{{ week }}</h1>
	<h1>{{ date_show }}</h1>
	<h1>{{ time_show }}</h1>
</div>

本项目引用的自定义外部资源