提交 78c95e11 编写于 作者: Q qiang

Merge branch 'dev' into alpha

# Conflicts:
#	packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
......@@ -79,7 +79,9 @@ function updateComponentJson (name, jsonObj, usingComponents = true, type = 'Com
if (type === 'Component') {
jsonObj.component = true
if (process.env.UNI_PLATFORM === 'mp-alipay') {
jsonObj.styleIsolation = 'apply-shared'
const manifestConfig = process.UNI_MANIFEST
const alipayConfig = manifestConfig['mp-alipay'] || {}
jsonObj.styleIsolation = alipayConfig.styleIsolation || 'apply-shared'
}
} else if (type === 'Page') {
if (process.env.UNI_PLATFORM === 'mp-baidu') {
......@@ -160,39 +162,28 @@ function updateUsingComponents (name, usingComponents, type) {
}
const oldJsonStr = getJsonFile(name)
if (oldJsonStr) { // update
const jsonObj = JSON.parse(oldJsonStr)
if (type === 'Component') {
const jsonObj = oldJsonStr ? JSON.parse(oldJsonStr) : {
usingComponents
}
if (type === 'Component') {
jsonObj.component = true
if (process.env.UNI_PLATFORM === 'mp-alipay') {
const manifestConfig = process.UNI_MANIFEST
const alipayConfig = manifestConfig['mp-alipay'] || {}
jsonObj.styleIsolation = alipayConfig.styleIsolation || 'apply-shared'
}
} else if (type === 'Page') {
if (process.env.UNI_PLATFORM === 'mp-baidu') {
jsonObj.component = true
if (process.env.UNI_PLATFORM === 'mp-alipay') {
jsonObj.styleIsolation = 'apply-shared'
}
} else if (type === 'Page') {
if (process.env.UNI_PLATFORM === 'mp-baidu') {
jsonObj.component = true
}
}
}
if (oldJsonStr) { // update
jsonObj.usingComponents = usingComponents
const newJsonStr = JSON.stringify(jsonObj, null, 2)
if (newJsonStr !== oldJsonStr) {
updateJsonFile(name, newJsonStr)
}
} else { // add
const jsonObj = {
usingComponents
}
if (type === 'Component') {
jsonObj.component = true
if (process.env.UNI_PLATFORM === 'mp-alipay') {
jsonObj.styleIsolation = 'apply-shared'
}
} else if (type === 'Page') {
if (process.env.UNI_PLATFORM === 'mp-baidu') {
jsonObj.component = true
}
}
updateJsonFile(name, jsonObj)
}
}
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -159,7 +159,8 @@ const NON_APP_JSON_KEYS = [
'scopedSlotsCompiler',
'slotMultipleInstance',
'uniStatistics',
'mergeVirtualHostAttributes'
'mergeVirtualHostAttributes',
'styleIsolation'
]
module.exports = {
hasOwn,
......@@ -167,4 +168,4 @@ module.exports = {
parseTabBar,
trimMPJson,
NON_APP_JSON_KEYS
}
}
......@@ -7,11 +7,11 @@ export function openAppAuthorizeSetting (options, callbackId) {
openAppAuthorizeSetting(ret => {
if (ret.type === 'success') {
invoke(callbackId, {
errMsg: 'getClipboardData:ok'
errMsg: 'openAppAuthorizeSetting:ok'
})
} else {
invoke(callbackId, {
errMsg: 'getClipboardData:fail'
errMsg: 'openAppAuthorizeSetting:fail'
})
}
})
......
......@@ -560,23 +560,18 @@ export default {
strokeDashStyle: 'solid'
}
if (IS_AMAP) {
circleOptions.strokeColor = option.color
circleOptions.fillColor = option.fillColor || '#000'
const { r: fr, g: fg, b: fb, a: fa } = hexToRgba(option.fillColor || '#00000000')
const { r: sr, g: sg, b: sb, a: sa } = hexToRgba(option.color || '#000000')
if ('Color' in maps) {
// 腾讯
circleOptions.fillColor = new maps.Color(fr, fg, fb, fa)
circleOptions.strokeColor = new maps.Color(sr, sg, sb, sa)
} else {
const { r: fr, g: fg, b: fb, a: fa } = hexToRgba(option.fillColor || '#00000000')
const { r: sr, g: sg, b: sb, a: sa } = hexToRgba(option.color || '#000000')
if ('Color' in maps) {
// 腾讯
circleOptions.fillColor = new maps.Color(fr, fg, fb, fa)
circleOptions.strokeColor = new maps.Color(sr, sg, sb, sa)
} else {
// Google
circleOptions.fillColor = `rgb(${fr}, ${fg}, ${fb})`
circleOptions.fillOpacity = fa
circleOptions.strokeColor = `rgb(${sr}, ${sg}, ${sb})`
circleOptions.strokeOpacity = sa
}
// Google & 高德
circleOptions.fillColor = `rgb(${fr}, ${fg}, ${fb})`
circleOptions.fillOpacity = fa
circleOptions.strokeColor = `rgb(${sr}, ${sg}, ${sb})`
circleOptions.strokeOpacity = sa
}
const circle = new maps.Circle(circleOptions)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册