提交 8d389eea 编写于 作者: Q qiang

Merge branch 'dev' into alpha

......@@ -51,7 +51,7 @@ export default {
this._startLoading()
setTimeout(() => {
this.loading = false
this._onmpload()
}, 3000)
},
......
......@@ -211,9 +211,11 @@ if (process.env.UNI_USING_V3_NATIVE) {
if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
plugins.push(new WebpackUniMPPlugin())
const assetsDir = 'static'
const hybridDir = 'hybrid/html'
const array = [{
from: path.resolve(process.env.UNI_INPUT_DIR, 'static'),
to: 'static'
from: path.resolve(process.env.UNI_INPUT_DIR, assetsDir),
to: assetsDir
}]
// 自动化测试时,不启用androidPrivacy.json
if (!process.env.UNI_AUTOMATOR_WS_ENDPOINT) {
......@@ -225,14 +227,27 @@ if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) {
})
}
}
const hybridHtmlPath = path.resolve(process.env.UNI_INPUT_DIR, 'hybrid/html')
const hybridHtmlPath = path.resolve(process.env.UNI_INPUT_DIR, hybridDir)
if (fs.existsSync(hybridHtmlPath)) {
array.push({
from: hybridHtmlPath,
to: 'hybrid/html'
to: hybridDir
})
}
global.uniModules.forEach(module => {
const modules = 'uni_modules/'
const assets = modules + module + '/' + assetsDir
const hybrid = modules + module + hybridDir
array.push({
from: path.resolve(process.env.UNI_INPUT_DIR, assets),
to: assets
}, {
from: path.resolve(process.env.UNI_INPUT_DIR, hybrid),
to: hybrid
})
})
if (process.env.UNI_USING_NVUE_COMPILER) {
array.push({
from: path.resolve(getTemplatePath(), 'common'),
......
......@@ -3,11 +3,15 @@ import {
} from 'uni-shared'
import platformSchema from 'uni-platform/helpers/can-i-use'
import api from 'uni-service-api'
// TODO 待处理其他 API 的检测
export function canIUse (schema) {
if (hasOwn(platformSchema, schema)) {
return platformSchema[schema]
}
return true
}
if (hasOwn(api, schema)) {
return true
}
return false
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册