init
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "CodeCircleIcon",
|
||||
};
|
||||
</script>
|
||||
<script setup lang="ts">
|
||||
import LayIcon from "../component/icon/index";
|
||||
|
||||
const props = defineProps<{
|
||||
color?: string;
|
||||
size?: string;
|
||||
}>();
|
||||
</script>
|
||||
<template>
|
||||
<lay-icon
|
||||
:color="props.color"
|
||||
:size="props.size"
|
||||
type="layui-icon-code-circle"
|
||||
/>
|
||||
</template>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,202 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "LayStepItem",
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ref,
|
||||
inject,
|
||||
onMounted,
|
||||
computed,
|
||||
getCurrentInstance,
|
||||
onBeforeUnmount,
|
||||
reactive,
|
||||
withDefaults,
|
||||
} from "vue";
|
||||
import { LayIcon } from "@layui/icons-vue";
|
||||
import type { ComputedRef } from "vue";
|
||||
|
||||
export interface StepItemProps {
|
||||
title?: string;
|
||||
content?: string;
|
||||
icon?: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<StepItemProps>(), {
|
||||
title: "",
|
||||
content: "",
|
||||
icon: "",
|
||||
status: "",
|
||||
});
|
||||
|
||||
const index = ref(-1);
|
||||
const parents: any = inject("LayStep");
|
||||
const currentInstance: any = getCurrentInstance();
|
||||
const setIndex = (val: number) => {
|
||||
index.value = val;
|
||||
};
|
||||
|
||||
const onChange = (index: any) => {
|
||||
parents.change(index);
|
||||
};
|
||||
|
||||
const stepsCount = computed(() => {
|
||||
return parents.steps.value.length;
|
||||
});
|
||||
|
||||
const currentStatus = computed(() => {
|
||||
return parents.props.currentStatus;
|
||||
});
|
||||
|
||||
const simple = computed(() => {
|
||||
return parents.props.simple;
|
||||
});
|
||||
|
||||
const composition = computed(() => {
|
||||
return parents.props.composition;
|
||||
});
|
||||
const isCurrent = computed(() => {
|
||||
return parents.props.active;
|
||||
});
|
||||
|
||||
const isCurrentBorder = computed(() => {
|
||||
return parents.props.active + 1;
|
||||
});
|
||||
const space = computed(() => {
|
||||
return parents.props.space;
|
||||
});
|
||||
|
||||
const isVertical = computed(() => {
|
||||
return parents.props.direction === "vertical";
|
||||
});
|
||||
|
||||
const isCenter = computed(() => {
|
||||
return parents.props.center;
|
||||
});
|
||||
|
||||
const isLineActive: ComputedRef<boolean> = computed(() => {
|
||||
return index.value <= parents.props.active - 1;
|
||||
});
|
||||
|
||||
const isWait: ComputedRef<boolean> = computed(() => {
|
||||
return index.value === parents.props.active + 1;
|
||||
});
|
||||
|
||||
const isSimpleActive: ComputedRef<boolean> = computed(() => {
|
||||
return index.value - 1 <= parents.props.active;
|
||||
});
|
||||
|
||||
const isActive: ComputedRef<boolean> = computed(() => {
|
||||
return index.value <= parents.props.active;
|
||||
});
|
||||
const isLast: ComputedRef<boolean> = computed(() => {
|
||||
return (
|
||||
parents.steps.value[stepsCount.value - 1]?.itemId === currentInstance.uid
|
||||
);
|
||||
});
|
||||
|
||||
const isStart: ComputedRef<boolean> = computed(() => {
|
||||
return parents.steps.value[0]?.itemId === currentInstance.uid;
|
||||
});
|
||||
|
||||
const stepItemState = reactive({
|
||||
itemId: computed(() => currentInstance?.uid),
|
||||
setIndex,
|
||||
});
|
||||
|
||||
parents.steps.value = [...parents.steps.value, stepItemState];
|
||||
|
||||
onMounted(() => {});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
parents.steps.value = parents.steps.value.filter(
|
||||
(instance: { itemId: any }) => instance.itemId !== currentInstance.uid
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
v-if="!simple"
|
||||
:class="[
|
||||
'lay-step-item',
|
||||
isLast && !isCenter && composition !== 'row' ? 'lay-step-item-last' : '',
|
||||
isCenter ? 'is-item-center' : '',
|
||||
isVertical ? 'is-vertical' : '',
|
||||
]"
|
||||
:style="{ flexBasis: space, flexGrow: space === 'auto' ? 1 : 0 }"
|
||||
>
|
||||
<div
|
||||
:class="[
|
||||
!isLast
|
||||
? isLineActive
|
||||
? `lay-step-item-line lay-step-item-line-${status || 'active'}`
|
||||
: 'lay-step-item-line'
|
||||
: '',
|
||||
isCenter ? 'is-line-center' : '',
|
||||
]"
|
||||
>
|
||||
<div
|
||||
:class="[
|
||||
'lay-step-item-pace',
|
||||
isActive ? `lay-step-item-active` : '',
|
||||
isCurrent === index ? `lay-step-item--${currentStatus}` : '',
|
||||
status ? `lay-step-item-${status}` : '',
|
||||
isWait ? 'lay-step-item-wait' : '',
|
||||
isCenter ? 'is-center' : '',
|
||||
]"
|
||||
@click="onChange(index + 1)"
|
||||
>
|
||||
<slot name="pace">
|
||||
<template v-if="icon">
|
||||
<lay-icon :type="icon"></lay-icon>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span v-if="!isActive">{{ index + 1 }}</span>
|
||||
<lay-icon
|
||||
v-else
|
||||
:type="status === 'fail' ? 'layui-icon-close' : 'layui-icon-ok'"
|
||||
></lay-icon>
|
||||
</template>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:class="[
|
||||
'lay-step-item-content',
|
||||
composition === 'row' ? 'lay-step-item-content-row' : '',
|
||||
isActive ? `lay-step-item-content-active` : '',
|
||||
isCurrent === index ? `lay-step-item-content--${currentStatus}` : '',
|
||||
status ? `lay-step-item-content-${status}` : '',
|
||||
isWait ? 'lay-step-item-content-wait' : '',
|
||||
]"
|
||||
@click="onChange(index + 1)"
|
||||
>
|
||||
<slot>
|
||||
<div class="lay-step-item-content-title">{{ title }}</div>
|
||||
<p>{{ content }}</p>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
:class="[
|
||||
'lay-step-item',
|
||||
'lay-step-simple',
|
||||
!isStart ? 'lay-step-item-simple' : '',
|
||||
'lay-step-item-simple-border',
|
||||
isActive ? 'lay-step-item-simple-active' : '',
|
||||
isCurrent === index ? `lay-step-item-simple-${currentStatus}` : '',
|
||||
isCurrentBorder === index
|
||||
? `lay-step-item-simple-${currentStatus}-border`
|
||||
: '',
|
||||
isSimpleActive ? 'lay-step-item-simple-active-border' : '',
|
||||
]"
|
||||
@click="onChange(index + 1)"
|
||||
>
|
||||
<slot>{{ index + 1 }}.{{ title }}</slot>
|
||||
</div>
|
||||
</template>
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "LayerIcon",
|
||||
};
|
||||
</script>
|
||||
<script setup lang="ts">
|
||||
import LayIcon from "../component/icon/index";
|
||||
|
||||
const props = defineProps<{
|
||||
color?: string;
|
||||
size?: string;
|
||||
}>();
|
||||
</script>
|
||||
<template>
|
||||
<lay-icon :color="props.color" :size="props.size" type="layui-icon-layer" />
|
||||
</template>
|
||||
Binary file not shown.
@@ -0,0 +1,168 @@
|
||||
export { default as HeartFillIcon } from "./HeartFillIcon.vue";
|
||||
export { default as HeartIcon } from "./HeartIcon.vue";
|
||||
export { default as LightIcon } from "./LightIcon.vue";
|
||||
export { default as TimeIcon } from "./TimeIcon.vue";
|
||||
export { default as BluetoothIcon } from "./BluetoothIcon.vue";
|
||||
export { default as AtIcon } from "./AtIcon.vue";
|
||||
export { default as MuteIcon } from "./MuteIcon.vue";
|
||||
export { default as MikeIcon } from "./MikeIcon.vue";
|
||||
export { default as KeyIcon } from "./KeyIcon.vue";
|
||||
export { default as GiftIcon } from "./GiftIcon.vue";
|
||||
export { default as EmailIcon } from "./EmailIcon.vue";
|
||||
export { default as RssIcon } from "./RssIcon.vue";
|
||||
export { default as WifiIcon } from "./WifiIcon.vue";
|
||||
export { default as LogoutIcon } from "./LogoutIcon.vue";
|
||||
export { default as AndroidIcon } from "./AndroidIcon.vue";
|
||||
export { default as IosIcon } from "./IosIcon.vue";
|
||||
export { default as WindowsIcon } from "./WindowsIcon.vue";
|
||||
export { default as TransferIcon } from "./TransferIcon.vue";
|
||||
export { default as ServiceIcon } from "./ServiceIcon.vue";
|
||||
export { default as SubtractionIcon } from "./SubtractionIcon.vue";
|
||||
export { default as AdditionIcon } from "./AdditionIcon.vue";
|
||||
export { default as SliderIcon } from "./SliderIcon.vue";
|
||||
export { default as PrintIcon } from "./PrintIcon.vue";
|
||||
export { default as ExportIcon } from "./ExportIcon.vue";
|
||||
export { default as ColsIcon } from "./ColsIcon.vue";
|
||||
export { default as ScreenRestoreIcon } from "./ScreenRestoreIcon.vue";
|
||||
export { default as ScreenFullIcon } from "./ScreenFullIcon.vue";
|
||||
export { default as RateHalfIcon } from "./RateHalfIcon.vue";
|
||||
export { default as RateIcon } from "./RateIcon.vue";
|
||||
export { default as RateSolidIcon } from "./RateSolidIcon.vue";
|
||||
export { default as CellphoneIcon } from "./CellphoneIcon.vue";
|
||||
export { default as VercodeIcon } from "./VercodeIcon.vue";
|
||||
export { default as LoginWechatIcon } from "./LoginWechatIcon.vue";
|
||||
export { default as LoginQqIcon } from "./LoginQqIcon.vue";
|
||||
export { default as LoginWeiboIcon } from "./LoginWeiboIcon.vue";
|
||||
export { default as PasswordIcon } from "./PasswordIcon.vue";
|
||||
export { default as UsernameIcon } from "./UsernameIcon.vue";
|
||||
export { default as RefreshThreeIcon } from "./RefreshThreeIcon.vue";
|
||||
export { default as AuzIcon } from "./AuzIcon.vue";
|
||||
export { default as SpreadLeftIcon } from "./SpreadLeftIcon.vue";
|
||||
export { default as ShrinkRightIcon } from "./ShrinkRightIcon.vue";
|
||||
export { default as SnowflakeIcon } from "./SnowflakeIcon.vue";
|
||||
export { default as TipsIcon } from "./TipsIcon.vue";
|
||||
export { default as NoteIcon } from "./NoteIcon.vue";
|
||||
export { default as HomeIcon } from "./HomeIcon.vue";
|
||||
export { default as SeniorIcon } from "./SeniorIcon.vue";
|
||||
export { default as RefreshIcon } from "./RefreshIcon.vue";
|
||||
export { default as RefreshOneIcon } from "./RefreshOneIcon.vue";
|
||||
export { default as FlagIcon } from "./FlagIcon.vue";
|
||||
export { default as ThemeIcon } from "./ThemeIcon.vue";
|
||||
export { default as NoticeIcon } from "./NoticeIcon.vue";
|
||||
export { default as WebsiteIcon } from "./WebsiteIcon.vue";
|
||||
export { default as ConsoleIcon } from "./ConsoleIcon.vue";
|
||||
export { default as FaceSurprisedIcon } from "./FaceSurprisedIcon.vue";
|
||||
export { default as SetIcon } from "./SetIcon.vue";
|
||||
export { default as TemplateOneIcon } from "./TemplateOneIcon.vue";
|
||||
export { default as AppIcon } from "./AppIcon.vue";
|
||||
export { default as TemplateIcon } from "./TemplateIcon.vue";
|
||||
export { default as PraiseIcon } from "./PraiseIcon.vue";
|
||||
export { default as TreadIcon } from "./TreadIcon.vue";
|
||||
export { default as MaleIcon } from "./MaleIcon.vue";
|
||||
export { default as FemaleIcon } from "./FemaleIcon.vue";
|
||||
export { default as CameraIcon } from "./CameraIcon.vue";
|
||||
export { default as CameraFillIcon } from "./CameraFillIcon.vue";
|
||||
export { default as MoreIcon } from "./MoreIcon.vue";
|
||||
export { default as MoreVerticalIcon } from "./MoreVerticalIcon.vue";
|
||||
export { default as RmbIcon } from "./RmbIcon.vue";
|
||||
export { default as DollarIcon } from "./DollarIcon.vue";
|
||||
export { default as DiamondIcon } from "./DiamondIcon.vue";
|
||||
export { default as FireIcon } from "./FireIcon.vue";
|
||||
export { default as ReturnIcon } from "./ReturnIcon.vue";
|
||||
export { default as LocationIcon } from "./LocationIcon.vue";
|
||||
export { default as ReadIcon } from "./ReadIcon.vue";
|
||||
export { default as SurveyIcon } from "./SurveyIcon.vue";
|
||||
export { default as FaceSmileIcon } from "./FaceSmileIcon.vue";
|
||||
export { default as FaceCryIcon } from "./FaceCryIcon.vue";
|
||||
export { default as CartSimpleIcon } from "./CartSimpleIcon.vue";
|
||||
export { default as CartIcon } from "./CartIcon.vue";
|
||||
export { default as NextIcon } from "./NextIcon.vue";
|
||||
export { default as PrevIcon } from "./PrevIcon.vue";
|
||||
export { default as UploadDragIcon } from "./UploadDragIcon.vue";
|
||||
export { default as UploadIcon } from "./UploadIcon.vue";
|
||||
export { default as DownloadCircleIcon } from "./DownloadCircleIcon.vue";
|
||||
export { default as ComponentIcon } from "./ComponentIcon.vue";
|
||||
export { default as FileBIcon } from "./FileBIcon.vue";
|
||||
export { default as UserIcon } from "./UserIcon.vue";
|
||||
export { default as FindFillIcon } from "./FindFillIcon.vue";
|
||||
export { default as LoadingIcon } from "./LoadingIcon.vue";
|
||||
export { default as LoadingOneIcon } from "./LoadingOneIcon.vue";
|
||||
export { default as AddOneIcon } from "./AddOneIcon.vue";
|
||||
export { default as PlayIcon } from "./PlayIcon.vue";
|
||||
export { default as PauseIcon } from "./PauseIcon.vue";
|
||||
export { default as HeadsetIcon } from "./HeadsetIcon.vue";
|
||||
export { default as VideoIcon } from "./VideoIcon.vue";
|
||||
export { default as VoiceIcon } from "./VoiceIcon.vue";
|
||||
export { default as SpeakerIcon } from "./SpeakerIcon.vue";
|
||||
export { default as FontsDelIcon } from "./FontsDelIcon.vue";
|
||||
export { default as FontsCodeIcon } from "./FontsCodeIcon.vue";
|
||||
export { default as FontsHtmlIcon } from "./FontsHtmlIcon.vue";
|
||||
export { default as FontsStrongIcon } from "./FontsStrongIcon.vue";
|
||||
export { default as UnlinkIcon } from "./UnlinkIcon.vue";
|
||||
export { default as PictureIcon } from "./PictureIcon.vue";
|
||||
export { default as LinkIcon } from "./LinkIcon.vue";
|
||||
export { default as FaceSmileBIcon } from "./FaceSmileBIcon.vue";
|
||||
export { default as AlignLeftIcon } from "./AlignLeftIcon.vue";
|
||||
export { default as AlignRightIcon } from "./AlignRightIcon.vue";
|
||||
export { default as AlignCenterIcon } from "./AlignCenterIcon.vue";
|
||||
export { default as FontsUIcon } from "./FontsUIcon.vue";
|
||||
export { default as FontsIIcon } from "./FontsIIcon.vue";
|
||||
export { default as TabsIcon } from "./TabsIcon.vue";
|
||||
export { default as RadioIcon } from "./RadioIcon.vue";
|
||||
export { default as CircleIcon } from "./CircleIcon.vue";
|
||||
export { default as EditIcon } from "./EditIcon.vue";
|
||||
export { default as ShareIcon } from "./ShareIcon.vue";
|
||||
export { default as DeleteIcon } from "./DeleteIcon.vue";
|
||||
export { default as FormIcon } from "./FormIcon.vue";
|
||||
export { default as CellphoneFineIcon } from "./CellphoneFineIcon.vue";
|
||||
export { default as DialogueIcon } from "./DialogueIcon.vue";
|
||||
export { default as FontsClearIcon } from "./FontsClearIcon.vue";
|
||||
export { default as LayerIcon } from "./LayerIcon.vue";
|
||||
export { default as DateIcon } from "./DateIcon.vue";
|
||||
export { default as WaterIcon } from "./WaterIcon.vue";
|
||||
export { default as CodeCircleIcon } from "./CodeCircleIcon.vue";
|
||||
export { default as CarouselIcon } from "./CarouselIcon.vue";
|
||||
export { default as PrevCircleIcon } from "./PrevCircleIcon.vue";
|
||||
export { default as LayoutsIcon } from "./LayoutsIcon.vue";
|
||||
export { default as UtilIcon } from "./UtilIcon.vue";
|
||||
export { default as TempleateOneIcon } from "./TempleateOneIcon.vue";
|
||||
export { default as UploadCircleIcon } from "./UploadCircleIcon.vue";
|
||||
export { default as TreeIcon } from "./TreeIcon.vue";
|
||||
export { default as TableIcon } from "./TableIcon.vue";
|
||||
export { default as ChartIcon } from "./ChartIcon.vue";
|
||||
export { default as ChartScreenIcon } from "./ChartScreenIcon.vue";
|
||||
export { default as EngineIcon } from "./EngineIcon.vue";
|
||||
export { default as TriangleDIcon } from "./TriangleDIcon.vue";
|
||||
export { default as TriangleRIcon } from "./TriangleRIcon.vue";
|
||||
export { default as FileIcon } from "./FileIcon.vue";
|
||||
export { default as SetSmIcon } from "./SetSmIcon.vue";
|
||||
export { default as ReduceCircleIcon } from "./ReduceCircleIcon.vue";
|
||||
export { default as AddCircleIcon } from "./AddCircleIcon.vue";
|
||||
export { default as NotFoundIcon } from "./NotFoundIcon.vue";
|
||||
export { default as AboutIcon } from "./AboutIcon.vue";
|
||||
export { default as UpIcon } from "./UpIcon.vue";
|
||||
export { default as DownIcon } from "./DownIcon.vue";
|
||||
export { default as LeftIcon } from "./LeftIcon.vue";
|
||||
export { default as RightIcon } from "./RightIcon.vue";
|
||||
export { default as CircleDotIcon } from "./CircleDotIcon.vue";
|
||||
export { default as SearchIcon } from "./SearchIcon.vue";
|
||||
export { default as SetFillIcon } from "./SetFillIcon.vue";
|
||||
export { default as GroupIcon } from "./GroupIcon.vue";
|
||||
export { default as FriendsIcon } from "./FriendsIcon.vue";
|
||||
export { default as ReplyFillIcon } from "./ReplyFillIcon.vue";
|
||||
export { default as MenuFillIcon } from "./MenuFillIcon.vue";
|
||||
export { default as LogIcon } from "./LogIcon.vue";
|
||||
export { default as PictureFineIcon } from "./PictureFineIcon.vue";
|
||||
export { default as FaceSmileFineIcon } from "./FaceSmileFineIcon.vue";
|
||||
export { default as ListIcon } from "./ListIcon.vue";
|
||||
export { default as ReleaseIcon } from "./ReleaseIcon.vue";
|
||||
export { default as OkIcon } from "./OkIcon.vue";
|
||||
export { default as HelpIcon } from "./HelpIcon.vue";
|
||||
export { default as ChatIcon } from "./ChatIcon.vue";
|
||||
export { default as TopIcon } from "./TopIcon.vue";
|
||||
export { default as StarIcon } from "./StarIcon.vue";
|
||||
export { default as StarFillIcon } from "./StarFillIcon.vue";
|
||||
export { default as CloseFillIcon } from "./CloseFillIcon.vue";
|
||||
export { default as CloseIcon } from "./CloseIcon.vue";
|
||||
export { default as OkCircleIcon } from "./OkCircleIcon.vue";
|
||||
export { default as AddCircleFineIcon } from "./AddCircleFineIcon.vue";
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user