Change vue to mithril
This commit is contained in:
9
myapp/static/js/axios.min.js
vendored
9
myapp/static/js/axios.min.js
vendored
File diff suppressed because one or more lines are too long
1
myapp/static/js/mithril.min.js
vendored
Normal file
1
myapp/static/js/mithril.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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,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>
|
||||
|
||||
Reference in New Issue
Block a user