mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-12 00:48:11 +00:00
no message
This commit is contained in:
parent
c78ca1de5d
commit
f4e6fd060e
21
resources/assets/js/app.js
vendored
21
resources/assets/js/app.js
vendored
@ -269,12 +269,33 @@ const $init = async () => {
|
||||
}
|
||||
|
||||
const $preload = async () => {
|
||||
if ($A.isEEUiApp) {
|
||||
const requireTime = new Date().getTime();
|
||||
while (typeof requireModuleJs !== "function") {
|
||||
await new Promise(resolve => setTimeout(resolve, 200));
|
||||
if (new Date().getTime() - requireTime > 15 * 1000) {
|
||||
break
|
||||
}
|
||||
}
|
||||
if (typeof requireModuleJs !== "function") {
|
||||
const errorTip = $A.L("加载失败,请重启软件")
|
||||
const errorView = document.querySelector(".app-view-loading")
|
||||
if (errorView) {
|
||||
errorView.innerHTML = `<span style="color:#f00;font-size:18px;">${errorTip}</span>`
|
||||
} else {
|
||||
alert(errorTip)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
await store.dispatch("preload");
|
||||
const hash = (window.location[routeMode === 'history' ? 'pathname' : 'hash']).replace(/^[#\/\s]/, '');
|
||||
if (hash !== 'preload') {
|
||||
$init().catch(_ => {})
|
||||
return
|
||||
}
|
||||
|
||||
window.__initializeApp = (route) => {
|
||||
if (/^https?:\/\//.test(route)) {
|
||||
if ($A.getDomain(route) !== $A.getDomain($A.mainUrl())) {
|
||||
|
||||
@ -124,6 +124,10 @@ export default {
|
||||
}, 500)
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
|
||||
showModal(v) {
|
||||
$A.eeuiAppSetScrollEnabled(!v)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -323,14 +323,15 @@ export default {
|
||||
immediate: true
|
||||
},
|
||||
|
||||
showModal(value) {
|
||||
if (value) {
|
||||
showModal(v) {
|
||||
if (v) {
|
||||
this.searchBefore()
|
||||
this.upTitleWidth()
|
||||
} else {
|
||||
this.searchKey = ""
|
||||
}
|
||||
this.$emit("on-show-change", value)
|
||||
this.$emit("on-show-change", v)
|
||||
$A.eeuiAppSetScrollEnabled(!v)
|
||||
},
|
||||
|
||||
searchKey() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user