なんかもうめっちゃ変えた

This commit is contained in:
syuilo
2017-11-13 18:05:35 +09:00
parent f8dddc81e2
commit bc9a8283c6
77 changed files with 170 additions and 165 deletions

View File

@@ -3,7 +3,7 @@
*/
import * as riot from 'riot';
const route = require('page');
import * as route from 'page';
let page = null;
export default me => {
@@ -131,12 +131,12 @@ export default me => {
mount(document.createElement('mk-not-found'));
}
riot.mixin('page', {
(riot as any).mixin('page', {
page: route
});
// EXEC
route();
(route as any)();
};
function mount(content) {

View File

@@ -561,7 +561,7 @@
};
this.changeLocalFile = () => {
this.refs.file.files.forEach(f => this.refs.uploader.upload(f, this.folder));
Array.from(this.refs.file.files).forEach(f => this.refs.uploader.upload(f, this.folder));
};
</script>
</mk-drive>

View File

@@ -285,7 +285,7 @@
this.refs.text.innerHTML = compile(tokens);
this.refs.text.children.forEach(e => {
Array.from(this.refs.text.children).forEach(e => {
if (e.tagName == 'MK-URL') riot.mount(e);
});

View File

@@ -207,7 +207,7 @@
};
this.onpaste = e => {
e.clipboardData.items.forEach(item => {
Array.from(e.clipboardData.items).forEach(item => {
if (item.kind == 'file') {
this.upload(item.getAsFile());
}
@@ -228,7 +228,7 @@
};
this.changeFile = () => {
this.refs.file.files.forEach(this.upload);
Array.from(this.refs.file.files).forEach(this.upload);
};
this.upload = file => {

View File

@@ -37,7 +37,7 @@
const tokens = this.post.ast;
this.refs.text.innerHTML = compile(tokens, false);
this.refs.text.children.forEach(e => {
Array.from(this.refs.text.children).forEach(e => {
if (e.tagName == 'MK-URL') riot.mount(e);
});
}

View File

@@ -538,7 +538,7 @@
this.refs.text.innerHTML = this.refs.text.innerHTML.replace('<p class="dummy"></p>', compile(tokens));
this.refs.text.children.forEach(e => {
Array.from(this.refs.text.children).forEach(e => {
if (e.tagName == 'MK-URL') riot.mount(e);
});