diff --git a/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/template.js b/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/template.js
index 80b6ce559fed6e4c516277cf26e844375acb5945..27a344cf8cc0674d62972e1cd25e01f76b252471 100644
--- a/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/template.js
+++ b/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/template.js
@@ -1,7 +1,67 @@
+const path = require('path')
+
+const {
+ removeExt,
+ normalizePath,
+ getPagesJson
+} = require('@dcloudio/uni-cli-shared')
+
+const {
+ normalizeNodeModules
+} = require('@dcloudio/webpack-uni-mp-loader/lib/shared')
+
+const SCROLLER_COMPONENTS = [
+ 'list',
+ 'scroller',
+ 'scroll-view',
+ 'waterfall'
+]
+
module.exports = function(content) {
this.cacheable && this.cacheable()
- if (content.indexOf('recycle-list') === -1) {
- return `${content}`
+ const source = content.trim()
+
+ if (SCROLLER_COMPONENTS.find(name => source.indexOf('<' + name) === 0)) {
+ return content
}
- return content
+ if (source.indexOf('
+ resourcePath = normalizeNodeModules(
+ removeExt(normalizePath(path.relative(process.env.UNI_INPUT_DIR, this._module.issuer.issuer.resource)))
+ )
+ }
+
+ if (!process.UNI_NVUE_ENTRY[resourcePath]) {
+ return content
+ }
+ // 暂时实时读取配置信息,查找是否 disableScroll
+ const appJson = getPagesJson()
+ if (!appJson.nvue || !appJson.nvue.pages) {
+ return content
+ }
+ const pagePath = resourcePath + '.html'
+ const pageJson = appJson.nvue.pages.find(page => page.path === pagePath)
+ if (!pageJson) {
+ return content
+ }
+ Object.assign(appJson.globalStyle, appJson.globalStyle['app-plus'] || {})
+ Object.assign(pageJson.style, pageJson.style['app-plus'] || {})
+ const pageJsonStyle = Object.assign(appJson.globalStyle, pageJson.style)
+ if (pageJsonStyle.disableScroll === true) {
+ return content
+ }
+
+ return `${content}`
}