условно работающие статические файлы и "динамический" контент
This commit is contained in:
23
static/js/modules/header.js
Normal file
23
static/js/modules/header.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ref } from 'vue'
|
||||
export default {
|
||||
el: '#status-header',
|
||||
data: {
|
||||
message: 'Hello Vue!',
|
||||
now: new Date()
|
||||
},
|
||||
methods: {
|
||||
updateDate() {
|
||||
this.now = new Date();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setInterval(() => {
|
||||
this.updateDate();
|
||||
}, 1000);
|
||||
},
|
||||
setup() {
|
||||
const count = ref(0)
|
||||
return { count }
|
||||
},
|
||||
template: `<div>Счётчик: {{ count }}</div>`
|
||||
}
|
11932
static/js/vue.js
Normal file
11932
static/js/vue.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user