import { defineComponent, computed, ref, Transition } from 'vue' import useWidth from './use/useWidth' const loadingBar = defineComponent({ name: 'loadingBar', props: { color: { type: String, default: '', }, }, setup(props, { slots, expose }) { const { width, isShow, endWidth } = useWidth() const innerStyle = computed(() => { return { width: width.value, 'background-color': props.color, } }) expose({ endWidth, }) return () => ( {isShow.value && (
)}
) }, }) export default loadingBar