diff --git a/packages/vue-cli-plugin-uni/lib/app-plus/index.js b/packages/vue-cli-plugin-uni/lib/app-plus/index.js index f9681b0ad41e621d587fcd27d55852efc0dbe2de..2aff58b342348beda9005bd73db0d5ccea18470d 100644 --- a/packages/vue-cli-plugin-uni/lib/app-plus/index.js +++ b/packages/vue-cli-plugin-uni/lib/app-plus/index.js @@ -25,6 +25,7 @@ const { const runtimePath = '@dcloudio/uni-mp-weixin/dist/mp.js' const wxsPath = '@dcloudio/uni-mp-weixin/dist/wxs.js' const uniCloudPath = path.resolve(__dirname, '../../packages/uni-cloud/dist/index.js') +const cryptoPath = path.resolve(__dirname, '../crypto.js') function getProvides (isAppService) { if (isAppService) { @@ -37,7 +38,10 @@ function getProvides (isAppService) { 'Behavior': [runtimePath, 'Behavior'], 'getDate': [wxsPath, 'getDate'], 'getRegExp': [wxsPath, 'getRegExp'], - 'uniCloud': [uniCloudPath, 'default'] + 'uniCloud': [uniCloudPath, 'default'], + 'crypto': [cryptoPath, 'default'], + 'window.crypto': [cryptoPath, 'default'], + 'global.crypto': [cryptoPath, 'default'] } } return { // app-view diff --git a/packages/vue-cli-plugin-uni/lib/mp.js b/packages/vue-cli-plugin-uni/lib/mp.js index 1a714d9651d6a496724c84137545d11362f611f0..f9812ac0523e39935a1a5ab4dadcf0a897c7b574 100644 --- a/packages/vue-cli-plugin-uni/lib/mp.js +++ b/packages/vue-cli-plugin-uni/lib/mp.js @@ -44,7 +44,11 @@ function getProvides () { process.env.UNI_USING_V8 ) { provides['__f__'] = [path.resolve(__dirname, 'format-log.js'), 'default'] - provides['crypto'] = [path.resolve(__dirname, 'crypto.js'), 'default'] + + const cryptoProvide = [path.resolve(__dirname, 'crypto.js'), 'default'] + provides['crypto'] = cryptoProvide + provides['window.crypto'] = cryptoProvide + provides['global.crypto'] = cryptoProvide } // TODO 目前依赖库 megalo 通过判断 wx 对象是否存在来识别平台做不同处理 diff --git a/src/platforms/h5/components/page/index.vue b/src/platforms/h5/components/page/index.vue index e98d87dbcac0c081e230b003d57d9dd7da5cee2f..0e579d5388273a9b51b2225efe4015ad4af2e10c 100644 --- a/src/platforms/h5/components/page/index.vue +++ b/src/platforms/h5/components/page/index.vue @@ -159,8 +159,7 @@ export default { titleNView = Object.assign({}, { type: this.navigationStyle === 'custom' ? 'none' : 'default' }, this.transparentTitle in titleNViewTypeList ? { - type: titleNViewTypeList[this.transparentTitle], - backgroundColor: 'rgba(0,0,0,0)' + type: titleNViewTypeList[this.transparentTitle] } : null, typeof titleNView === 'object' ? titleNView : (typeof titleNView === 'boolean' ? { type: titleNView ? 'default' : 'none' } : null)) diff --git a/src/platforms/h5/components/page/pageHead.vue b/src/platforms/h5/components/page/pageHead.vue index dae828d86d74d3f97011151d60d63fe8dfd3c666..b06164da09d4f2ec843817056728b9d143853d36 100644 --- a/src/platforms/h5/components/page/pageHead.vue +++ b/src/platforms/h5/components/page/pageHead.vue @@ -108,7 +108,8 @@ uni-page-head { uni-page-head .uni-page-head { position: fixed; - left: 0; + left: 0; + top: 0; width: 100%; height: 44px; height: calc(44px + constant(safe-area-inset-top));