功能:同步小程序流程
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
/**
|
||||
* Purpose: ensureStore supports page-state.js by holding or executing the ensure store page or API role.
|
||||
* Usage: import, call, read, or update this function from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
function ensureStore() {
|
||||
const app = getApp()
|
||||
app.globalData.pageDirtyFlags = app.globalData.pageDirtyFlags || {}
|
||||
return app.globalData.pageDirtyFlags
|
||||
}
|
||||
|
||||
/**
|
||||
* Purpose: markDirty supports page-state.js by holding or executing the mark dirty page or API role.
|
||||
* Usage: import, call, read, or update this function from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
function markDirty(key) {
|
||||
if (!key) {
|
||||
return
|
||||
@@ -12,6 +20,10 @@ function markDirty(key) {
|
||||
store[key] = true
|
||||
}
|
||||
|
||||
/**
|
||||
* Purpose: consumeDirty supports page-state.js by holding or executing the consume dirty page or API role.
|
||||
* Usage: import, call, read, or update this function from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
function consumeDirty(key) {
|
||||
if (!key) {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user