なんかもうめっちゃ変えた
This commit is contained in:
@@ -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) {
|
@@ -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>
|
||||
|
@@ -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);
|
||||
});
|
||||
|
||||
|
@@ -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 => {
|
||||
|
@@ -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);
|
||||
});
|
||||
}
|
||||
|
@@ -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);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user