From 482e39ca4374095afc9a7986b52abb5bf67b7a1e Mon Sep 17 00:00:00 2001 From: sukkee <382248373@qq.com> Date: Wed, 10 Apr 2019 20:23:00 +0800 Subject: [PATCH] feat(mars-build): add page api onPageScroll and onTabItemTap (#6) * feat(pageApi): add new page api and merge some feature * fix(px): fix to 15px --- .../src/compiler/script/script-h5.js | 2 +- packages/mars-build/src/gulp-mars-h5.js | 20 ++++-- packages/mars-build/src/h5/template/App.vue | 25 +++++-- .../PullDownRefresh/PullDownRefresh.vue | 20 +++--- .../template/app-components/TabBar/TabBar.vue | 11 +++- .../{browser-history.js => browserHistory.js} | 0 packages/mars-build/src/h5/template/main.js | 2 +- .../mars-build/src/h5/template/mars-base.css | 9 ++- packages/mars-build/src/h5/template/router.js | 22 ++++--- .../plugins/transformScriptPlugin.js | 66 +++++++++++++------ 10 files changed, 119 insertions(+), 58 deletions(-) rename packages/mars-build/src/h5/template/{browser-history.js => browserHistory.js} (100%) diff --git a/packages/mars-build/src/compiler/script/script-h5.js b/packages/mars-build/src/compiler/script/script-h5.js index 5c92fc8a..a2cf35da 100644 --- a/packages/mars-build/src/compiler/script/script-h5.js +++ b/packages/mars-build/src/compiler/script/script-h5.js @@ -151,7 +151,7 @@ exports.compileApp = function (options) { const { content: cssContent, attrs - } = appStyle || {}; + } = appStyle; contentStr = `