style: format code for all

This commit is contained in:
LZHD
2021-07-06 01:01:42 +08:00
committed by 踏学吾痕
parent e1200f2dbe
commit 77a1a47110
114 changed files with 7068 additions and 1068 deletions

View File

@@ -4,7 +4,7 @@ import reCountTo from "./src";
export const ReCountTo = Object.assign(reCountTo, {
install(app: App) {
app.component(reCountTo.name, reCountTo);
},
}
});
export default ReCountTo;

View File

@@ -4,7 +4,7 @@ import {
computed,
watch,
onMounted,
unref,
unref
} from "vue";
import { countToProps } from "./props";
import { isNumber } from "/@/utils/is";
@@ -37,7 +37,7 @@ export default defineComponent({
remaining: null,
rAF: null,
color: null,
fontSize: "16px",
fontSize: "16px"
});
const getCountDown = computed(() => {
@@ -61,6 +61,7 @@ export default defineComponent({
state.rAF = requestAnimationFrame(count);
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-unused-vars
function pauseResume() {
if (state.paused) {
resume();
@@ -82,6 +83,7 @@ export default defineComponent({
requestAnimationFrame(count);
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-unused-vars
function reset() {
state.startTime = null;
cancelAnimationFrame(state.rAF);
@@ -166,12 +168,11 @@ export default defineComponent({
<span
style={{
color: props.color,
fontSize: props.fontSize,
}}
>
fontSize: props.fontSize
}}>
{state.displayValue}
</span>
</>
);
},
}
});

View File

@@ -11,7 +11,7 @@ export const countToProps = {
default: 0,
validator(value: number) {
return value >= 0;
},
}
},
color: propTypes.string.def(),
fontSize: propTypes.string.def(),
@@ -26,6 +26,6 @@ export const countToProps = {
>,
default(t: number, b: number, c: number, d: number) {
return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b;
},
},
}
}
};