提交 37947308 编写于 作者: Q qiang

chore: lint

上级 d203c321
......@@ -31,7 +31,7 @@ module.exports = {
'functional-pages'
]
if(process.env.UNI_MP_PLUGIN) copyOptions.push('plugin.json');
if (process.env.UNI_MP_PLUGIN) copyOptions.push('plugin.json')
const workers = platformOptions.workers
workers && copyOptions.push(workers)
......
......@@ -20,11 +20,11 @@ function getRect (rect) {
}
// 在相交比很小的情况下,Chrome会返回相交为0
function rectifyIntersectionRatio(entrie) {
function rectifyIntersectionRatio (entrie) {
const {
intersectionRatio,
boundingClientRect: { height: overAllHeight, width: overAllWidth },
intersectionRect: { height: intersectionHeight, width: intersectionWidth },
intersectionRect: { height: intersectionHeight, width: intersectionWidth }
} = entrie
if (intersectionRatio !== 0) return intersectionRatio
......@@ -34,7 +34,6 @@ function rectifyIntersectionRatio(entrie) {
: intersectionHeight / overAllHeight
}
const intersectionObservers = {}
export function requestComponentObserver ({
......
......@@ -24,12 +24,12 @@ export function login (params, callbackId) {
const errorCallback = warpPlusErrorCallback(callbackId, 'login')
const authOptions = provider === 'apple'
? { scope: 'email' }
: params.univerifyStyle
? { univerifyStyle: univerifyButtonsClickHandling(params.univerifyStyle, errorCallback) }
: params.univerifyStyle
? { univerifyStyle: univerifyButtonsClickHandling(params.univerifyStyle, errorCallback) }
: {}
getService(provider).then(service => {
function login() {
function login () {
if (params.onlyAuthorize && provider === 'weixin') {
service.authorize(({ code }) => {
invoke(callbackId, {
......@@ -147,7 +147,7 @@ export function closeAuthView () {
return getService('univerify').then(service => service.closeAuthView())
}
export function getCheckBoxState(params, callbackId) {
export function getCheckBoxState (params, callbackId) {
const successCallback = warpPlusSuccessCallback(callbackId, 'getCheckBoxState')
const errorCallback = warpPlusErrorCallback(callbackId, 'getCheckBoxState')
try {
......
......@@ -253,14 +253,14 @@ const protocols = { // 需要做转换的 API 列表
},
chooseImage: {
returnValue (result) {
const hasTempFilePaths = hasOwn(result,'tempFilePaths') && result.tempFilePaths
if (hasOwn(result,'apFilePaths') && !hasTempFilePaths) {
const hasTempFilePaths = hasOwn(result, 'tempFilePaths') && result.tempFilePaths
if (hasOwn(result, 'apFilePaths') && !hasTempFilePaths) {
result.tempFilePaths = result.apFilePaths
delete result.apFilePaths
}
if (!hasOwn(result,'tempFiles') && hasTempFilePaths) {
if (!hasOwn(result, 'tempFiles') && hasTempFilePaths) {
result.tempFiles = []
result.tempFilePaths.forEach(tempFilePath => result.tempFiles.push({path: tempFilePath}))
result.tempFilePaths.forEach(tempFilePath => result.tempFiles.push({ path: tempFilePath }))
}
return {}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册