update js

This commit is contained in:
pengfei.zhou
2020-01-03 16:35:04 +08:00
committed by osborn
parent 4b3a370f5f
commit 680b95f05d
18 changed files with 124 additions and 141 deletions

View File

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