условно работающие статические файлы и "динамический" контент
This commit is contained in:
BIN
static/favicon.png
Normal file
BIN
static/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
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
42
static/login.html
Normal file
42
static/login.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Login</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div id="app">
|
||||
<h1>{{ message }}</h1>
|
||||
<p>{{ now }}</p>
|
||||
</div>
|
||||
|
||||
<div id="status-header"></div>
|
||||
|
||||
<!-- Версия для разработки включает в себя возможность вывода в консоль полезных уведомлений -->
|
||||
<script src="js/vue.js"></script>
|
||||
<script>
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
message: 'Hello Vue!',
|
||||
now: new Date()
|
||||
},
|
||||
methods: {
|
||||
updateDate() {
|
||||
this.now = new Date();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setInterval(() => {
|
||||
this.updateDate();
|
||||
}, 1000);
|
||||
}
|
||||
})
|
||||
|
||||
// import MyComponent from './modules/header'
|
||||
// const sh = new Vue(MyComponent)
|
||||
</script>
|
||||
</header>
|
||||
</body>
|
||||
</html>
|
0
static/style.css
Normal file
0
static/style.css
Normal file
Reference in New Issue
Block a user