Change vue to mithril

This commit is contained in:
2023-01-08 03:57:41 +03:00
parent 80f3da0224
commit 7f4130fe19
7 changed files with 4 additions and 52 deletions
-9
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -5,7 +5,6 @@
<link rel="shortcut icon" href="/static/favicon.ico">
<link rel="stylesheet" href="/static/css/bootstrap.min.css" />
<link rel="stylesheet" href="/static/css/font-awesome.min.css" />
<script type="text/javascript" src="/static/js/vue.global.prod.js"></script>
<script type="text/javascript" src="/static/js/axios.min.js"></script>
<script type="text/javascript" src="/static/js/mithril.min.js"></script>
<title>{{ pagedata['title'] }}</title>
</head>
-23
View File
@@ -1,23 +0,0 @@
<script type="text/javascript">
let root = {
data: {
panels: {}
},
methods: {
arrayRemove: function (arr, value) {
/* Удаление элемента из списка */
return arr.filter(function (ele) {
return ele != value;
});
},
panel_show: function (panel) {
/* Показать/скрыть панель */
panel.visible = !panel.visible;
},
},
components: {},
created: function() {},
computed: {},
mounted: function() {},
};
</script>
-13
View File
@@ -1,13 +0,0 @@
<script type="text/javascript">
const app = Vue.createApp({
data: function() {
return root.data;
},
methods: root.methods,
components: root.components,
created: root.created,
computed: root.computed,
mounted: root.mounted,
});
app.mount('#app');
</script>
+2 -4
View File
@@ -2,7 +2,7 @@
<html lang="ru">
{% include 'header.html' %}
<body>
{% include '/inc/init.html' %}
<section id="app" class="container">
{% include 'navbar.html' %}
@@ -15,10 +15,8 @@
{% include 'footer.html' %}
</section>
{% block script %}{% endblock %}
{% include '/inc/run.html' %}
<script type="text/javascript" src="/app.js"></script>
</body>