move logic to native

This commit is contained in:
王劲鹏
2020-01-04 14:43:28 +08:00
committed by osborn
parent 131ba87104
commit 8f0457101c
9 changed files with 157 additions and 30 deletions

View File

@@ -23,13 +23,9 @@ export class DoricElement extends HTMLElement {
connectedCallback() {
if (this.src && this.context === undefined) {
if (this.src.startsWith("http")) {
axios.get<string>(this.src).then(result => {
this.load(result.data)
})
} else {
this.load(this.src)
}
axios.get<string>(this.src).then(result => {
this.load(result.data)
})
}
}