xwt
112 分钟以前 8a5fc169c691543f60109b2b3a4e000762f247c2
1
2
3
4
5
6
7
8
module.exports = function (content, map) {
  this.cacheable && this.cacheable()
  // TODO 简单判断,只要包含 page-meta,就在外层包裹一层 view (vue2 不支持多 root)
  if (content.indexOf('<page-meta') !== -1) {
    return this.callback(null, `<view>${content}</view>`, map)
  }
  this.callback(null, content, map)
}