mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
style: format code for all
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
</>
|
||||
);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user