提交 97d365a3 编写于 作者: Q qiang

chore: lint

上级 f8bfec19
import { import {
hasOwn hasOwn
} }
from 'uni-shared' from 'uni-shared'
export const pixelRatio = (function () { export const pixelRatio = (function () {
const canvas = document.createElement('canvas') const canvas = document.createElement('canvas')
......
import { import {
noop noop
} }
from 'uni-shared' from 'uni-shared'
const sharedPropertyDefinition = { const sharedPropertyDefinition = {
enumerable: true, enumerable: true,
......
...@@ -14,7 +14,7 @@ import { ...@@ -14,7 +14,7 @@ import {
import { import {
lifecycleMixin lifecycleMixin
} }
from 'uni-core/service/plugins/lifecycle' from 'uni-core/service/plugins/lifecycle'
import { import {
VD_SYNC_VERSION VD_SYNC_VERSION
...@@ -23,7 +23,7 @@ import { ...@@ -23,7 +23,7 @@ import {
import { import {
ON_REACH_BOTTOM_DISTANCE ON_REACH_BOTTOM_DISTANCE
} }
from '../../constants' from '../../constants'
import { import {
NAVBAR_HEIGHT NAVBAR_HEIGHT
......
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
getApp, getApp,
getCurrentPages getCurrentPages
} }
from 'uni-core/service/plugins/app' from 'uni-core/service/plugins/app'
initOn(UniServiceJSBridge.on, { initOn(UniServiceJSBridge.on, {
getApp, getApp,
......
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
a: number; a: number;
} }
*/ */
export function hexToRgba(hex) { export function hexToRgba (hex) {
// 异常情况 // 异常情况
if (!hex) { if (!hex) {
return { return {
r: 0, r: 0,
g: 0, g: 0,
b: 0, b: 0,
a: 0, a: 0
} }
} }
// 去掉 # // 去掉 #
...@@ -27,7 +27,7 @@ export function hexToRgba(hex) { ...@@ -27,7 +27,7 @@ export function hexToRgba(hex) {
r: 0, r: 0,
g: 0, g: 0,
b: 0, b: 0,
a: 0, a: 0
} }
} }
// 格式化 tmpHex,使其变成 rrggbb 或 rrggbbaa // 格式化 tmpHex,使其变成 rrggbb 或 rrggbbaa
...@@ -36,9 +36,9 @@ export function hexToRgba(hex) { ...@@ -36,9 +36,9 @@ export function hexToRgba(hex) {
tmpHex = tmpHex.replace(/(\w{1})/g, '$1$1') tmpHex = tmpHex.replace(/(\w{1})/g, '$1$1')
} }
// rgba // rgba
let [sr, sg, sb, sa] = tmpHex.match(/(\w{2})/g) const [sr, sg, sb, sa] = tmpHex.match(/(\w{2})/g)
// rgb // rgb
const r = parseInt(sr, 16), g = parseInt(sg, 16), b = parseInt(sb, 16) const r = parseInt(sr, 16); const g = parseInt(sg, 16); const b = parseInt(sb, 16)
if (!sa) { if (!sa) {
return { r, g, b, a: 1 } return { r, g, b, a: 1 }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册