diff --git a/packages/uni-quickapp/package.json b/packages/uni-quickapp/package.json index f0fc7fb227c6718bfc6cd79a9457dcb4719f3a45..d8588a6b1ec0ac929f76b84d6fae99d72cd6f5aa 100644 --- a/packages/uni-quickapp/package.json +++ b/packages/uni-quickapp/package.json @@ -1,13 +1,19 @@ { "name": "@dcloudio/uni-quickapp", "version": "2.0.0-alpha-24720191216006", - "description": "uni-app quickapp", + "description": "uni-app quickapp", "main": "dist/vue.prod.js", "repository": { "type": "git", "url": "git+https://github.com/dcloudio/uni-app.git", "directory": "packages/uni-quickapp" }, + "files": [ + "bin", + "components", + "dist", + "lib" + ], "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, @@ -17,7 +23,7 @@ "dependencies": { "@hap-toolkit/dsl-vue": "0.6.13", "@hap-toolkit/packager": "0.6.13", - "@hap-toolkit/server": "0.6.13", + "@hap-toolkit/server": "0.6.13", "module-alias": "^2.1.0" } } diff --git a/src/platforms/app-plus/service/framework/plugins/index.js b/src/platforms/app-plus/service/framework/plugins/index.js index aa90011a42219c0682752523fe802391ac3a00d7..be12a01a99915e9f830af28fc90dc0f77e8910f6 100644 --- a/src/platforms/app-plus/service/framework/plugins/index.js +++ b/src/platforms/app-plus/service/framework/plugins/index.js @@ -55,18 +55,19 @@ export default { Vue.prototype.$nextTick = function nextTick (cb) { const renderWatcher = this._watcher const callback = typeof cb === 'function' - if ( - renderWatcher && - this._$queue.find(watcher => renderWatcher === watcher) - ) { - const result = new Promise((resolve) => { + const result = new Promise((resolve) => { + if ( + renderWatcher && + this._$queue.find(watcher => renderWatcher === watcher) + ) { vdSyncCallbacks.push(callback ? cb.bind(this) : resolve) - }) - return callback ? result : undefined - } else { - // $nextTick bind vm context - return Vue.nextTick(callback ? () => cb.call(this) : undefined) - } + } else { + // $nextTick bind vm context + Vue.nextTick(callback ? () => cb.call(this) : resolve) + } + callback && resolve() + }) + return callback ? undefined : result } } }