Browse Source

👣 重构底层

master
wangxiang 3 years ago
parent
commit
9d1aee910e
  1. 2
      kicc-ui/src/layouts/default/content/index.vue
  2. 2
      kicc-ui/src/layouts/default/footer/index.vue
  3. 2
      kicc-ui/src/layouts/default/header/MultipleHeader.vue
  4. 2
      kicc-ui/src/layouts/default/header/components/Breadcrumb.vue
  5. 8
      kicc-ui/src/layouts/default/header/components/lock/LockModal.vue
  6. 6
      kicc-ui/src/layouts/default/header/components/notify/NoticeList.vue
  7. 4
      kicc-ui/src/layouts/default/header/components/notify/index.vue
  8. 2
      kicc-ui/src/layouts/default/header/components/user-dropdown/index.vue
  9. 4
      kicc-ui/src/layouts/default/header/index.vue
  10. 2
      kicc-ui/src/layouts/default/index.vue
  11. 2
      kicc-ui/src/layouts/default/setting/components/SelectItem.vue
  12. 6
      kicc-ui/src/layouts/default/setting/components/SettingFooter.vue
  13. 2
      kicc-ui/src/layouts/default/setting/components/SwitchItem.vue
  14. 2
      kicc-ui/src/layouts/default/setting/components/ThemeColorPicker.vue
  15. 4
      kicc-ui/src/layouts/default/setting/components/TypePicker.vue
  16. 2
      kicc-ui/src/layouts/default/sider/DragBar.vue
  17. 8
      kicc-ui/src/layouts/default/sider/LayoutSider.vue
  18. 14
      kicc-ui/src/layouts/default/sider/MixSider.vue
  19. 4
      kicc-ui/src/layouts/default/tabs/components/TabContent.vue
  20. 4
      kicc-ui/src/layouts/default/tabs/index.vue
  21. 2
      kicc-ui/src/layouts/page/index.vue

2
kicc-ui/src/layouts/default/content/index.vue

@ -1,5 +1,5 @@
<template> <template>
<div :class="[prefixCls, getLayoutContentMode]" v-loading="getOpenPageLoading && getPageLoading"> <div v-loading="getOpenPageLoading && getPageLoading" :class="[prefixCls, getLayoutContentMode]">
<PageLayout/> <PageLayout/>
</div> </div>
</template> </template>

2
kicc-ui/src/layouts/default/footer/index.vue

@ -1,5 +1,5 @@
<template> <template>
<Footer :class="prefixCls" v-if="getShowLayoutFooter" ref="footerRef"> <Footer v-if="getShowLayoutFooter" ref="footerRef" :class="prefixCls">
<div>Copyright &copy;2022 康来生物有限公司</div> <div>Copyright &copy;2022 康来生物有限公司</div>
</Footer> </Footer>
</template> </template>

2
kicc-ui/src/layouts/default/header/MultipleHeader.vue

@ -1,5 +1,5 @@
<template> <template>
<div :style="getPlaceholderDomStyle" v-if="getIsShowPlaceholderDom"></div> <div v-if="getIsShowPlaceholderDom" :style="getPlaceholderDomStyle"/>
<div :style="getWrapStyle" :class="getClass"> <div :style="getWrapStyle" :class="getClass">
<LayoutHeader v-if="getShowInsetHeaderRef"/> <LayoutHeader v-if="getShowInsetHeaderRef"/>
<MultipleTabs v-if="getShowTabs"/> <MultipleTabs v-if="getShowTabs"/>

2
kicc-ui/src/layouts/default/header/components/Breadcrumb.vue

@ -2,7 +2,7 @@
<div :class="[prefixCls, `${prefixCls}--${theme}`]"> <div :class="[prefixCls, `${prefixCls}--${theme}`]">
<a-breadcrumb :routes="routes"> <a-breadcrumb :routes="routes">
<template #itemRender="{ route, routes: routesMatched, paths }"> <template #itemRender="{ route, routes: routesMatched, paths }">
<Icon :icon="getIcon(route)" v-if="getShowBreadCrumbIcon && getIcon(route)" /> <Icon v-if="getShowBreadCrumbIcon && getIcon(route)" :icon="getIcon(route)"/>
<span v-if="!hasRedirect(routesMatched, route)"> <span v-if="!hasRedirect(routesMatched, route)">
{{ t(route.name || route.meta.title) }} {{ t(route.name || route.meta.title) }}
</span> </span>

8
kicc-ui/src/layouts/default/header/components/lock/LockModal.vue

@ -8,7 +8,7 @@
> >
<div :class="`${prefixCls}__entry`"> <div :class="`${prefixCls}__entry`">
<div :class="`${prefixCls}__header`"> <div :class="`${prefixCls}__header`">
<img :src="avatar" :class="`${prefixCls}__header-img`" /> <img :src="avatar" :class="`${prefixCls}__header-img`">
<p :class="`${prefixCls}__header-name`"> <p :class="`${prefixCls}__header-name`">
{{ getNickName }} {{ getNickName }}
</p> </p>
@ -17,7 +17,11 @@
<BasicForm @register="registerForm"/> <BasicForm @register="registerForm"/>
<div :class="`${prefixCls}__footer`"> <div :class="`${prefixCls}__footer`">
<a-button type="primary" block class="mt-2" @click="handleLock"> <a-button type="primary"
block
class="mt-2"
@click="handleLock"
>
{{ t('layout.header.lockScreenBtn') }} {{ t('layout.header.lockScreenBtn') }}
</a-button> </a-button>
</div> </div>

6
kicc-ui/src/layouts/default/header/components/notify/NoticeList.vue

@ -6,7 +6,6 @@
<template #title> <template #title>
<div class="title"> <div class="title">
<a-typography-paragraph <a-typography-paragraph
@click="handleTitleClick(item)"
style="width: 100%; margin-bottom: 0 !important" style="width: 100%; margin-bottom: 0 !important"
:style="{ cursor: isTitleClickable ? 'pointer' : '' }" :style="{ cursor: isTitleClickable ? 'pointer' : '' }"
:delete="!!item.titleDelete" :delete="!!item.titleDelete"
@ -16,8 +15,9 @@
: false : false
" "
:content="item.title" :content="item.title"
@click="handleTitleClick(item)"
/> />
<div class="extra" v-if="item.extra"> <div v-if="item.extra" class="extra">
<a-tag class="tag" :color="item.color"> <a-tag class="tag" :color="item.color">
{{ item.extra }} {{ item.extra }}
</a-tag> </a-tag>
@ -32,7 +32,7 @@
<template #description> <template #description>
<div> <div>
<div class="description" v-if="item.description"> <div v-if="item.description" class="description">
<a-typography-paragraph <a-typography-paragraph
style="width: 100%; margin-bottom: 0 !important" style="width: 100%; margin-bottom: 0 !important"
:ellipsis=" :ellipsis="

4
kicc-ui/src/layouts/default/header/components/notify/index.vue

@ -13,8 +13,8 @@
<span v-if="item.list.length !== 0">({{ item.list.length }})</span> <span v-if="item.list.length !== 0">({{ item.list.length }})</span>
</template> </template>
<!-- 绑定title-click事件的通知列表中标题是可点击--> <!-- 绑定title-click事件的通知列表中标题是可点击-->
<NoticeList :list="item.list" v-if="item.key === '1'" @title-click="onNoticeClick" /> <NoticeList v-if="item.key === '1'" :list="item.list" @title-click="onNoticeClick"/>
<NoticeList :list="item.list" v-else /> <NoticeList v-else :list="item.list"/>
</TabPane> </TabPane>
</template> </template>
</Tabs> </Tabs>

2
kicc-ui/src/layouts/default/header/components/user-dropdown/index.vue

@ -1,7 +1,7 @@
<template> <template>
<Dropdown placement="bottomLeft" :trigger="['click', 'hover']" :overlayClassName="`${prefixCls}-dropdown-overlay`"> <Dropdown placement="bottomLeft" :trigger="['click', 'hover']" :overlayClassName="`${prefixCls}-dropdown-overlay`">
<span :class="[prefixCls, `${prefixCls}--${theme}`]" class="flex"> <span :class="[prefixCls, `${prefixCls}--${theme}`]" class="flex">
<img :class="`${prefixCls}__header`" :src="getUserInfo.avatar" /> <img :class="`${prefixCls}__header`" :src="getUserInfo.avatar">
<span :class="`${prefixCls}__info hidden md:block`"> <span :class="`${prefixCls}__info hidden md:block`">
<span :class="`${prefixCls}__name `" class="truncate"> <span :class="`${prefixCls}__name `" class="truncate">
{{ getUserInfo.nickName }} {{ getUserInfo.nickName }}

4
kicc-ui/src/layouts/default/header/index.vue

@ -21,7 +21,7 @@
<!-- left end --> <!-- left end -->
<!-- menu start --> <!-- menu start -->
<div :class="`${prefixCls}-menu`" v-if="getShowTopMenu && !getIsMobile"> <div v-if="getShowTopMenu && !getIsMobile" :class="`${prefixCls}-menu`">
<LayoutMenu <LayoutMenu
:isHorizontal="true" :isHorizontal="true"
:theme="getHeaderTheme" :theme="getHeaderTheme"
@ -33,7 +33,7 @@
<!-- action --> <!-- action -->
<div :class="`${prefixCls}-action`"> <div :class="`${prefixCls}-action`">
<AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" /> <AppSearch v-if="getShowSearch" :class="`${prefixCls}-action__item `"/>
<Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`"/> <Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`"/>

2
kicc-ui/src/layouts/default/index.vue

@ -1,7 +1,7 @@
<template> <template>
<Layout :class="prefixCls" v-bind="lockEvents"> <Layout :class="prefixCls" v-bind="lockEvents">
<LayoutFeatures/> <LayoutFeatures/>
<LayoutHeader fixed v-if="getShowFullHeaderRef" /> <LayoutHeader v-if="getShowFullHeaderRef" fixed/>
<Layout :class="[layoutClass]"> <Layout :class="[layoutClass]">
<LayoutSideBar v-if="getShowSidebar || getIsMobile"/> <LayoutSideBar v-if="getShowSidebar || getIsMobile"/>
<Layout :class="`${prefixCls}-main`"> <Layout :class="`${prefixCls}-main`">

2
kicc-ui/src/layouts/default/setting/components/SelectItem.vue

@ -4,10 +4,10 @@
<Select <Select
v-bind="getBindValue" v-bind="getBindValue"
:class="`${prefixCls}-select`" :class="`${prefixCls}-select`"
@change="handleChange"
:disabled="disabled" :disabled="disabled"
size="small" size="small"
:options="options" :options="options"
@change="handleChange"
/> />
</div> </div>
</template> </template>

6
kicc-ui/src/layouts/default/setting/components/SettingFooter.vue

@ -5,7 +5,11 @@
{{ t('layout.setting.copyBtn') }} {{ t('layout.setting.copyBtn') }}
</a-button> </a-button>
<a-button color="warning" block @click="handleResetSetting" class="my-3"> <a-button color="warning"
block
class="my-3"
@click="handleResetSetting"
>
<RedoOutlined class="mr-2"/> <RedoOutlined class="mr-2"/>
{{ t('common.resetText') }} {{ t('common.resetText') }}
</a-button> </a-button>

2
kicc-ui/src/layouts/default/setting/components/SwitchItem.vue

@ -3,10 +3,10 @@
<span> {{ title }}</span> <span> {{ title }}</span>
<Switch <Switch
v-bind="getBindValue" v-bind="getBindValue"
@change="handleChange"
:disabled="disabled" :disabled="disabled"
:checkedChildren="t('layout.setting.on')" :checkedChildren="t('layout.setting.on')"
:unCheckedChildren="t('layout.setting.off')" :unCheckedChildren="t('layout.setting.off')"
@change="handleChange"
/> />
</div> </div>
</template> </template>

2
kicc-ui/src/layouts/default/setting/components/ThemeColorPicker.vue

@ -2,7 +2,6 @@
<div :class="prefixCls"> <div :class="prefixCls">
<template v-for="color in colorList || []" :key="color"> <template v-for="color in colorList || []" :key="color">
<span <span
@click="handleClick(color)"
:class="[ :class="[
`${prefixCls}__item`, `${prefixCls}__item`,
{ {
@ -10,6 +9,7 @@
}, },
]" ]"
:style="{ background: color }" :style="{ background: color }"
@click="handleClick(color)"
> >
<CheckOutlined/> <CheckOutlined/>
</span> </span>

4
kicc-ui/src/layouts/default/setting/components/TypePicker.vue

@ -3,7 +3,6 @@
<template v-for="item in menuTypeList || []" :key="item.title"> <template v-for="item in menuTypeList || []" :key="item.title">
<Tooltip :title="item.title" placement="bottom"> <Tooltip :title="item.title" placement="bottom">
<div <div
@click="handler(item)"
:class="[ :class="[
`${prefixCls}__item`, `${prefixCls}__item`,
`${prefixCls}__item--${item.type}`, `${prefixCls}__item--${item.type}`,
@ -11,8 +10,9 @@
[`${prefixCls}__item--active`]: def === item.type, [`${prefixCls}__item--active`]: def === item.type,
}, },
]" ]"
@click="handler(item)"
> >
<div class="mix-sidebar"></div> <div class="mix-sidebar"/>
</div> </div>
</Tooltip> </Tooltip>
</template> </template>

2
kicc-ui/src/layouts/default/sider/DragBar.vue

@ -1,5 +1,5 @@
<template> <template>
<div :class="getClass" :style="getDragBarStyle"></div> <div :class="getClass" :style="getDragBarStyle"/>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, computed, unref } from 'vue'; import { defineComponent, computed, unref } from 'vue';

8
kicc-ui/src/layouts/default/sider/LayoutSider.vue

@ -1,9 +1,9 @@
<template> <template>
<div <div
v-if="getMenuFixed && !getIsMobile" v-if="getMenuFixed && !getIsMobile"
:style="getHiddenDomStyle"
v-show="showClassSideBarRef" v-show="showClassSideBarRef"
></div> :style="getHiddenDomStyle"
/>
<Sider <Sider
v-show="showClassSideBarRef" v-show="showClassSideBarRef"
ref="sideRef" ref="sideRef"
@ -14,11 +14,11 @@
:collapsed="getCollapsed" :collapsed="getCollapsed"
:collapsedWidth="getCollapsedWidth" :collapsedWidth="getCollapsedWidth"
:theme="getMenuTheme" :theme="getMenuTheme"
@breakpoint="onBreakpointChange"
:trigger="getTrigger" :trigger="getTrigger"
v-bind="getTriggerAttr" v-bind="getTriggerAttr"
@breakpoint="onBreakpointChange"
> >
<template #trigger v-if="getShowTrigger"> <template v-if="getShowTrigger" #trigger>
<LayoutTrigger/> <LayoutTrigger/>
</template> </template>
<LayoutMenu :theme="getMenuTheme" :menuMode="getMode" :splitType="getSplitType"/> <LayoutMenu :theme="getMenuTheme" :menuMode="getMode" :splitType="getSplitType"/>

14
kicc-ui/src/layouts/default/sider/MixSider.vue

@ -1,5 +1,5 @@
<template> <template>
<div :class="`${prefixCls}-dom`" :style="getDomStyle"></div> <div :class="`${prefixCls}-dom`" :style="getDomStyle"/>
<div <div
v-click-outside="handleClickOutside" v-click-outside="handleClickOutside"
:style="getWrapStyle" :style="getWrapStyle"
@ -20,15 +20,15 @@
<ScrollContainer> <ScrollContainer>
<ul :class="`${prefixCls}-module`"> <ul :class="`${prefixCls}-module`">
<li <li
v-for="item in menuModules"
v-bind="getItemEvents(item)"
:key="item.path"
:class="[ :class="[
`${prefixCls}-module__item `, `${prefixCls}-module__item `,
{ {
[`${prefixCls}-module__item--active`]: item.path === activePath, [`${prefixCls}-module__item--active`]: item.path === activePath,
}, },
]" ]"
v-bind="getItemEvents(item)"
v-for="item in menuModules"
:key="item.path"
> >
<SimpleMenuTag :item="item" collapseParent dot/> <SimpleMenuTag :item="item" collapseParent dot/>
<Icon <Icon
@ -43,7 +43,7 @@
</ul> </ul>
</ScrollContainer> </ScrollContainer>
<div :class="`${prefixCls}-menu-list`" ref="sideRef" :style="getMenuStyle"> <div ref="sideRef" :class="`${prefixCls}-menu-list`" :style="getMenuStyle">
<div <div
v-show="openMenu" v-show="openMenu"
:class="[ :class="[
@ -71,9 +71,9 @@
</ScrollContainer> </ScrollContainer>
<div <div
v-show="getShowDragBar && openMenu" v-show="getShowDragBar && openMenu"
:class="`${prefixCls}-drag-bar`"
ref="dragBarRef" ref="dragBarRef"
></div> :class="`${prefixCls}-drag-bar`"
/>
</div> </div>
</div> </div>
</template> </template>

4
kicc-ui/src/layouts/default/tabs/components/TabContent.vue

@ -1,9 +1,9 @@
<template> <template>
<Dropdown :dropMenuList="getDropMenuList" :trigger="getTrigger" @menuEvent="handleMenuEvent"> <Dropdown :dropMenuList="getDropMenuList" :trigger="getTrigger" @menuEvent="handleMenuEvent">
<div :class="`${prefixCls}__info`" @contextmenu="handleContext" v-if="getIsTabs"> <div v-if="getIsTabs" :class="`${prefixCls}__info`" @contextmenu="handleContext">
<span class="ml-1">{{ getTitle }}</span> <span class="ml-1">{{ getTitle }}</span>
</div> </div>
<span :class="`${prefixCls}__extra-quick`" v-else @click="handleContext"> <span v-else :class="`${prefixCls}__extra-quick`" @click="handleContext">
<Icon icon="ion:chevron-down"/> <Icon icon="ion:chevron-down"/>
</span> </span>
</Dropdown> </Dropdown>

4
kicc-ui/src/layouts/default/tabs/index.vue

@ -18,9 +18,9 @@
</TabPane> </TabPane>
</template> </template>
<template #tabBarExtraContent v-if="getShowRedo || getShowQuick"> <template v-if="getShowRedo || getShowQuick" #tabBarExtraContent>
<TabRedo v-if="getShowRedo"/> <TabRedo v-if="getShowRedo"/>
<TabContent isExtra :tabItem="$route" v-if="getShowQuick" /> <TabContent v-if="getShowQuick" isExtra :tabItem="$route"/>
<FoldButton v-if="getShowFold"/> <FoldButton v-if="getShowFold"/>
</template> </template>
</Tabs> </Tabs>

2
kicc-ui/src/layouts/page/index.vue

@ -17,7 +17,7 @@
<keep-alive v-if="openCache" :include="getCaches"> <keep-alive v-if="openCache" :include="getCaches">
<component :is="Component" :key="route.fullPath"/> <component :is="Component" :key="route.fullPath"/>
</keep-alive> </keep-alive>
<component v-else :is="Component" :key="route.fullPath"/> <component :is="Component" v-else :key="route.fullPath"/>
</transition> </transition>
</template> </template>
</RouterView> </RouterView>

Loading…
Cancel
Save