chore: update

This commit is contained in:
xiaoxian521 2024-04-30 21:46:57 +08:00
parent 43e46c5600
commit 49670a5b20
18 changed files with 64 additions and 79 deletions

View File

@ -7,7 +7,7 @@ defineOptions({
name: "ReAnimateSelector"
});
const props = defineProps({
defineProps({
placeholder: {
type: String,
default: "请选择动画"
@ -81,7 +81,7 @@ function onMouseleave() {
<el-select
clearable
filterable
:placeholder="props.placeholder"
:placeholder="placeholder"
popper-class="pure-animate-popper"
:model-value="inputValue"
:filter-method="filterMethod"

View File

@ -7,7 +7,7 @@ defineOptions({
name: "ReCropperPreview"
});
const props = defineProps({
defineProps({
imgSrc: String
});
@ -44,7 +44,7 @@ defineExpose({ hidePopover });
<div class="w-[18vw]">
<ReCropper
ref="refCropper"
:src="props.imgSrc"
:src="imgSrc"
circled
@cropper="onCropper"
@readied="showPopover = true"

View File

@ -2,7 +2,7 @@
import VueJsonPretty from "vue-json-pretty";
import "vue-json-pretty/lib/styles.css";
const props = defineProps({
defineProps({
graphData: Object
});
</script>
@ -12,6 +12,6 @@ const props = defineProps({
:path="'res'"
:deep="3"
:showLength="true"
:data="props.graphData"
:data="graphData"
/>
</template>

View File

@ -35,7 +35,7 @@ const nodeDragNode = item => {
<!-- 左侧bpmn元素选择器 -->
<div class="node-panel">
<div
v-for="item in props.nodeList"
v-for="item in nodeList"
:key="item.text"
class="node-item dark:text-bg_color"
@mousedown="nodeDragNode(item)"

View File

@ -502,7 +502,7 @@ defineExpose({
</script>
<template>
<div :ref="'wrap' + props.classOption['key']">
<div :ref="'wrap' + classOption['key']">
<div
v-if="navigation"
:style="leftSwitch"
@ -520,7 +520,7 @@ defineExpose({
<slot name="right-switch" />
</div>
<div
:ref="'realBox' + props.classOption['key']"
:ref="'realBox' + classOption['key']"
:style="pos"
@mouseenter="enter"
@mouseleave="leave"
@ -529,7 +529,7 @@ defineExpose({
@touchend="touchEnd"
@mousewheel.passive="wheel"
>
<div :ref="'slotList' + props.classOption['key']" :style="float">
<div :ref="'slotList' + classOption['key']" :style="float">
<slot />
</div>
<div :style="float" v-html="copyHtml" />

View File

@ -99,7 +99,7 @@ const transitionMain = defineComponent({
<template>
<section
:class="[props.fixedHeader ? 'app-main' : 'app-main-nofixed-header']"
:class="[fixedHeader ? 'app-main' : 'app-main-nofixed-header']"
:style="getSectionStyle"
>
<router-view>
@ -107,7 +107,7 @@ const transitionMain = defineComponent({
<LayFrame :currComp="Component" :currRoute="route">
<template #default="{ Comp, fullPath, frameInfo }">
<el-scrollbar
v-if="props.fixedHeader"
v-if="fixedHeader"
:wrap-style="{
display: 'flex',
'flex-wrap': 'wrap',
@ -180,7 +180,7 @@ const transitionMain = defineComponent({
</router-view>
<!-- 页脚 -->
<LayFooter v-if="!hideFooter && !props.fixedHeader" />
<LayFooter v-if="!hideFooter && !fixedHeader" />
</section>
</template>

View File

@ -65,7 +65,7 @@ watch(
</script>
<template>
<template v-for="[fullPath, Comp] in compList" :key="fullPath">
<div v-show="fullPath === props.currRoute.fullPath" class="w-full h-full">
<div v-show="fullPath === currRoute.fullPath" class="w-full h-full">
<slot
:fullPath="fullPath"
:Comp="Comp"
@ -74,6 +74,6 @@ watch(
</div>
</template>
<div v-show="!keep" class="w-full h-full">
<slot :Comp="normalComp" :fullPath="props.currRoute.fullPath" frameInfo />
<slot :Comp="normalComp" :fullPath="currRoute.fullPath" frameInfo />
</div>
</template>

View File

@ -52,9 +52,9 @@ function hoverDescription(event, description) {
class="notice-container border-b-[1px] border-solid border-[#f0f0f0] dark:border-[#303030]"
>
<el-avatar
v-if="props.noticeItem.avatar"
v-if="noticeItem.avatar"
:size="30"
:src="props.noticeItem.avatar"
:src="noticeItem.avatar"
class="notice-container-avatar"
/>
<div class="notice-container-text">
@ -63,7 +63,7 @@ function hoverDescription(event, description) {
popper-class="notice-title-popper"
:effect="tooltipEffect"
:disabled="!titleTooltip"
:content="props.noticeItem.title"
:content="noticeItem.title"
placement="top-start"
:enterable="!isMobile"
>
@ -72,16 +72,16 @@ function hoverDescription(event, description) {
class="notice-title-content"
@mouseover="hoverTitle"
>
{{ props.noticeItem.title }}
{{ noticeItem.title }}
</div>
</el-tooltip>
<el-tag
v-if="props.noticeItem?.extra"
:type="props.noticeItem?.status"
v-if="noticeItem?.extra"
:type="noticeItem?.status"
size="small"
class="notice-title-extra"
>
{{ props.noticeItem?.extra }}
{{ noticeItem?.extra }}
</el-tag>
</div>
@ -89,19 +89,19 @@ function hoverDescription(event, description) {
popper-class="notice-title-popper"
:effect="tooltipEffect"
:disabled="!descriptionTooltip"
:content="props.noticeItem.description"
:content="noticeItem.description"
placement="top-start"
>
<div
ref="descriptionRef"
class="notice-text-description"
@mouseover="hoverDescription($event, props.noticeItem.description)"
@mouseover="hoverDescription($event, noticeItem.description)"
>
{{ props.noticeItem.description }}
{{ noticeItem.description }}
</div>
</el-tooltip>
<div class="notice-text-datetime text-[#00000073] dark:text-white">
{{ props.noticeItem.datetime }}
{{ noticeItem.datetime }}
</div>
</div>
</div>

View File

@ -29,11 +29,8 @@ const { device } = useNav();
<MdiKeyboardEsc class="icon" />
{{ t("buttons.pureClose") }}
</span>
<p
v-if="device !== 'mobile' && props.total > 0"
class="search-footer-total"
>
{{ `${t("search.pureTotal")} ${props.total}` }}
<p v-if="device !== 'mobile' && total > 0" class="search-footer-total">
{{ `${t("search.pureTotal")} ${total}` }}
</p>
</div>
</template>

View File

@ -36,7 +36,7 @@ const toggleClick = () => {
<template>
<div
v-tippy="{
content: props.isActive
content: isActive
? t('buttons.pureClickCollapse')
: t('buttons.pureClickExpand'),
theme: tooltipEffect,
@ -49,7 +49,7 @@ const toggleClick = () => {
<IconifyIconOffline
:icon="ArrowLeft"
:class="[iconClass, themeColor === 'light' ? '' : 'text-primary']"
:style="{ transform: props.isActive ? 'none' : 'rotateY(180deg)' }"
:style="{ transform: isActive ? 'none' : 'rotateY(180deg)' }"
/>
</div>
</template>

View File

@ -11,9 +11,9 @@ const props = defineProps({
</script>
<template>
<div v-if="props.extraIcon" class="flex justify-center items-center">
<div v-if="extraIcon" class="flex justify-center items-center">
<component
:is="useRenderIcon(toRaw(props.extraIcon))"
:is="useRenderIcon(toRaw(extraIcon))"
class="w-[30px] h-[30px]"
/>
</div>

View File

@ -108,7 +108,7 @@ function resolvePath(routePath) {
<template>
<SidebarLinkItem
v-if="
hasOneShowingChild(props.item.children, props.item) &&
hasOneShowingChild(item.children, item) &&
(!onlyOneChild.children || onlyOneChild.noShowingChildren)
"
:to="item"
@ -120,7 +120,7 @@ function resolvePath(routePath) {
v-bind="attrs"
>
<div
v-if="toRaw(props.item.meta.icon)"
v-if="toRaw(item.meta.icon)"
class="sub-menu-icon"
:style="getSubMenuIconStyle"
>
@ -128,21 +128,21 @@ function resolvePath(routePath) {
:is="
useRenderIcon(
toRaw(onlyOneChild.meta.icon) ||
(props.item.meta && toRaw(props.item.meta.icon))
(item.meta && toRaw(item.meta.icon))
)
"
/>
</div>
<el-text
v-if="
(!props.item?.meta.icon &&
(!item?.meta.icon &&
isCollapse &&
layout === 'vertical' &&
props.item?.pathList?.length === 1) ||
item?.pathList?.length === 1) ||
(!onlyOneChild.meta.icon &&
isCollapse &&
layout === 'mix' &&
props.item?.pathList?.length === 2)
item?.pathList?.length === 2)
"
truncated
class="!w-full !px-4 !text-inherit"
@ -170,28 +170,26 @@ function resolvePath(routePath) {
v-else
ref="subMenu"
teleported
:index="resolvePath(props.item.path)"
:index="resolvePath(item.path)"
v-bind="expandCloseIcon"
>
<template #title>
<div
v-if="toRaw(props.item.meta.icon)"
v-if="toRaw(item.meta.icon)"
:style="getSubMenuIconStyle"
class="sub-menu-icon"
>
<component
:is="useRenderIcon(props.item.meta && toRaw(props.item.meta.icon))"
/>
<component :is="useRenderIcon(item.meta && toRaw(item.meta.icon))" />
</div>
<ReText
v-if="
layout === 'mix' && toRaw(props.item.meta.icon)
? !isCollapse || props.item?.pathList?.length !== 2
layout === 'mix' && toRaw(item.meta.icon)
? !isCollapse || item?.pathList?.length !== 2
: !(
layout === 'vertical' &&
isCollapse &&
toRaw(props.item.meta.icon) &&
props.item.parentId === null
toRaw(item.meta.icon) &&
item.parentId === null
)
"
:tippyProps="{
@ -204,20 +202,17 @@ function resolvePath(routePath) {
'!px-4':
layout !== 'horizontal' &&
isCollapse &&
!toRaw(props.item.meta.icon) &&
props.item.parentId === null
!toRaw(item.meta.icon) &&
item.parentId === null
}"
>
{{ transformI18n(props.item.meta.title) }}
{{ transformI18n(item.meta.title) }}
</ReText>
<SidebarExtraIcon
v-if="!isCollapse"
:extraIcon="props.item.meta.extraIcon"
/>
<SidebarExtraIcon v-if="!isCollapse" :extraIcon="item.meta.extraIcon" />
</template>
<sidebar-item
v-for="child in props.item.children"
v-for="child in item.children"
:key="child.path"
:is-nest="true"
:item="child"

View File

@ -46,7 +46,7 @@ const toggleClick = () => {
<div class="left-collapse">
<IconifyIconOffline
v-tippy="{
content: props.isActive
content: isActive
? t('buttons.pureClickCollapse')
: t('buttons.pureClickExpand'),
theme: tooltipEffect,
@ -55,7 +55,7 @@ const toggleClick = () => {
}"
:icon="MenuFold"
:class="[iconClass, themeColor === 'light' ? '' : 'text-primary']"
:style="{ transform: props.isActive ? 'none' : 'rotateY(180deg)' }"
:style="{ transform: isActive ? 'none' : 'rotateY(180deg)' }"
@click="toggleClick"
/>
</div>

View File

@ -10,11 +10,11 @@ const { title, getLogo } = useNav();
</script>
<template>
<div class="sidebar-logo-container" :class="{ collapses: props.collapse }">
<div class="sidebar-logo-container" :class="{ collapses: collapse }">
<transition name="sidebarLogoFade">
<router-link
v-if="props.collapse"
key="props.collapse"
v-if="collapse"
key="collapse"
:title="title"
class="sidebar-logo-link"
:to="getTopMenu()?.path ?? '/'"

View File

@ -26,14 +26,12 @@ const toggleClick = () => {
<div
class="px-3 mr-1 navbar-bg-hover"
:title="
props.isActive
? t('buttons.pureClickCollapse')
: t('buttons.pureClickExpand')
isActive ? t('buttons.pureClickCollapse') : t('buttons.pureClickExpand')
"
@click="toggleClick"
>
<IconifyIconOffline
:icon="props.isActive ? MenuFold : MenuUnfold"
:icon="isActive ? MenuFold : MenuUnfold"
class="inline-block align-middle hover:text-primary dark:hover:!text-white"
/>
</div>

View File

@ -82,12 +82,7 @@ const dataList = ref([
<template>
<div>
<el-scrollbar>
<PureDescriptions
border
:data="props.data"
:columns="columns"
:column="5"
/>
<PureDescriptions border :data="data" :columns="columns" :column="5" />
</el-scrollbar>
<el-tabs :modelValue="'responseBody'" type="border-card" class="mt-4">
<el-tab-pane

View File

@ -17,7 +17,7 @@ interface Tree {
children?: Tree[];
}
const props = defineProps({
defineProps({
treeLoading: Boolean,
treeData: Array
});
@ -95,7 +95,7 @@ defineExpose({ onTreeReset });
<template>
<div
v-loading="props.treeLoading"
v-loading="treeLoading"
class="h-full bg-bg_color overflow-auto"
:style="{ minHeight: `calc(100vh - 141px)` }"
>
@ -153,7 +153,7 @@ defineExpose({ onTreeReset });
<el-divider />
<el-tree
ref="treeRef"
:data="props.treeData"
:data="treeData"
node-key="id"
size="small"
:props="defaultProps"

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { tableDataMore } from "./data";
const props = withDefaults(
withDefaults(
defineProps<{
height?: string;
}>(),
@ -62,12 +62,12 @@ function handleClick(row) {
<template>
<pure-table
:data="
props.height
height
? tableDataMore.concat(tableDataMore).concat(tableDataMore)
: tableDataMore
"
:columns="columns"
:height="props.height"
:height="height"
>
<template #operation="{ row }">
<el-button link type="primary" size="small" @click="handleClick(row)">