提交 37947308 编写于 作者: Q qiang

chore: lint

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