小改主题
@ -7,6 +7,3 @@ if (config.app.iconfont) {
|
||||
createLink(e);
|
||||
});
|
||||
}
|
||||
|
||||
// 默认
|
||||
createLink('//at.alicdn.com/t/c/font_3254019_h02ghb7ckt5.css');
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
<div class="app-process">
|
||||
<ul class="app-process__op">
|
||||
<li class="item" @click="toBack">
|
||||
<i class="cl-iconfont cl-icon-back"></i>
|
||||
<cl-svg name="back" />
|
||||
</li>
|
||||
<li class="item" @click="toRefresh">
|
||||
<i class="cl-iconfont cl-icon-refresh"></i>
|
||||
<cl-svg name="refresh" />
|
||||
</li>
|
||||
<li class="item" @click="toHome">
|
||||
<i class="cl-iconfont cl-icon-home"></i>
|
||||
<cl-svg name="home" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -24,7 +24,8 @@
|
||||
@click="onTap(item, Number(index))"
|
||||
@contextmenu.stop.prevent="openCM($event, item)"
|
||||
>
|
||||
<span>{{ item.meta?.label || item.name || item.path }}</span>
|
||||
<el-text size="small">{{ item.meta?.label || item.name || item.path }}</el-text>
|
||||
|
||||
<el-icon @mousedown.stop="onDel(Number(index))">
|
||||
<close-bold />
|
||||
</el-icon>
|
||||
@ -163,43 +164,34 @@ onMounted(() => {
|
||||
.app-process {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
margin: 0 0 10px 0;
|
||||
padding: 0 10px;
|
||||
padding: 5px 10px;
|
||||
user-select: none;
|
||||
background-color: var(--el-bg-color);
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&__op {
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
height: 30px;
|
||||
border-radius: 4px;
|
||||
margin-right: 10px;
|
||||
list-style: none;
|
||||
margin-right: 5px;
|
||||
|
||||
.item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
padding: 0 10px;
|
||||
color: #333;
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
border-radius: 4px;
|
||||
margin-right: 5px;
|
||||
|
||||
&:not(:last-child)::after {
|
||||
display: block;
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: calc(50% - 5px);
|
||||
height: 10px;
|
||||
width: 1px;
|
||||
background-color: #eee;
|
||||
.cl-svg {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--el-color-primary);
|
||||
background-color: var(--el-fill-color-light);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -226,13 +218,11 @@ onMounted(() => {
|
||||
border-radius: 4px;
|
||||
height: 30px;
|
||||
padding: 0 10px;
|
||||
background-color: #fff;
|
||||
font-size: 12px;
|
||||
margin-right: 10px;
|
||||
color: #909399;
|
||||
cursor: pointer;
|
||||
color: var(--el-color-info);
|
||||
|
||||
span {
|
||||
.el-text {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
@ -240,12 +230,14 @@ onMounted(() => {
|
||||
font-size: 13px;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
transition: all 0.3s;
|
||||
color: #909399;
|
||||
transition: width 0.3s;
|
||||
opacity: 0;
|
||||
border-radius: 20px;
|
||||
padding: 2px;
|
||||
|
||||
&:hover {
|
||||
color: #f56c6c !important;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,14 +247,14 @@ onMounted(() => {
|
||||
|
||||
&:hover {
|
||||
&:not(.active) {
|
||||
background-color: #eee;
|
||||
background-color: var(--el-fill-color-light);
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--color-primary);
|
||||
|
||||
span {
|
||||
.el-text {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="route-nav">
|
||||
<p v-if="browser.isMini" class="route-nav__title">
|
||||
<el-text tag="p" v-if="browser.isMini" class="route-nav__title">
|
||||
{{ lastName }}
|
||||
</p>
|
||||
</el-text>
|
||||
|
||||
<template v-else>
|
||||
<el-breadcrumb :separator-icon="ArrowRight">
|
||||
@ -52,16 +52,19 @@ const list = computed(() => {
|
||||
});
|
||||
|
||||
// 最后一个节点名称
|
||||
const lastName = computed(() => last(list.value)?.name);
|
||||
const lastName = computed(() => last(list.value)?.meta?.label);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.route-nav {
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
|
||||
:deep(.el-breadcrumb) {
|
||||
margin: 0 10px;
|
||||
|
||||
.el-breadcrumb__inner {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
|
||||
@ -2,14 +2,9 @@
|
||||
<a-menu v-if="app.info.menu.isGroup" />
|
||||
|
||||
<div class="app-topbar">
|
||||
<div
|
||||
class="app-topbar__collapse"
|
||||
:class="{
|
||||
unfold: !app.isFold
|
||||
}"
|
||||
@click="app.fold()"
|
||||
>
|
||||
<i class="cl-iconfont cl-icon-fold"></i>
|
||||
<div class="app-topbar__collapse" @click="app.fold()">
|
||||
<cl-svg name="fold" v-if="app.isFold" />
|
||||
<cl-svg name="expand" v-else />
|
||||
</div>
|
||||
|
||||
<!-- 路由导航 -->
|
||||
@ -25,27 +20,41 @@
|
||||
</ul>
|
||||
|
||||
<!-- 用户信息 -->
|
||||
<div v-if="user.info" class="app-topbar__user">
|
||||
<el-dropdown trigger="click" hide-on-click @command="onCommand">
|
||||
<span class="el-dropdown-link">
|
||||
<span class="name">{{ user.info.nickName }}</span>
|
||||
<cl-avatar :size="32" :src="user.info.headImg" />
|
||||
</span>
|
||||
<template v-if="user.info">
|
||||
<el-dropdown
|
||||
hide-on-click
|
||||
popper-class="app-topbar__user-popper"
|
||||
:popper-options="{}"
|
||||
@command="onCommand"
|
||||
>
|
||||
<div class="app-topbar__user">
|
||||
<el-text class="name">{{ user.info.nickName }}</el-text>
|
||||
<cl-avatar :size="28" :src="user.info.headImg" />
|
||||
</div>
|
||||
|
||||
<template #dropdown>
|
||||
<div class="user">
|
||||
<cl-avatar :size="32" :src="user.info.headImg" />
|
||||
|
||||
<div class="det">
|
||||
<el-text tag="p" size="small">{{ user.info.nickName }}</el-text>
|
||||
<el-text size="small" type="info">{{ user.info.email }}</el-text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="my">
|
||||
<i class="cl-iconfont cl-icon-user"></i>
|
||||
<cl-svg name="my" />
|
||||
<span>个人中心</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="exit">
|
||||
<i class="cl-iconfont cl-icon-exit"></i>
|
||||
<span>退出</span>
|
||||
<cl-svg name="exit" />
|
||||
<span>退出登录</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -124,24 +133,24 @@ onMounted(() => {
|
||||
align-items: center;
|
||||
height: 50px;
|
||||
padding: 0 10px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 10px;
|
||||
background-color: var(--el-bg-color);
|
||||
border-bottom: 1px solid var(--el-border-color-extra-light);
|
||||
|
||||
&__collapse {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
cursor: pointer;
|
||||
transform: rotateY(180deg);
|
||||
border-radius: 4px;
|
||||
|
||||
&.unfold {
|
||||
transform: rotateY(0);
|
||||
.cl-svg {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
i {
|
||||
font-size: 20px;
|
||||
&:hover {
|
||||
background-color: var(--el-color-info-light-9);
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,28 +168,54 @@ onMounted(() => {
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
height: 45px;
|
||||
padding: 0 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
&__user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
outline: none;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
.el-dropdown-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.name {
|
||||
white-space: nowrap;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.el-icon-arrow-down {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.app-topbar__user-popper {
|
||||
border-radius: 6px;
|
||||
|
||||
.el-popper__arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-dropdown-menu__item {
|
||||
padding: 6px 12px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px 10px;
|
||||
width: 200px;
|
||||
border-bottom: 1px solid var(--el-color-info-light-9);
|
||||
|
||||
.det {
|
||||
margin-left: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.cl-svg {
|
||||
margin-right: 6px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
17
src/modules/base/static/svg/back.svg
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
t="1735123259958"
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="8100"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="256"
|
||||
height="256"
|
||||
>
|
||||
<path
|
||||
d="M653.8 840.4c12.1 0 24.2-4.6 33.4-13.8 18.5-18.5 18.5-48.3 0-66.8L437.5 510.1l249.7-249.7c18.5-18.5 18.5-48.3 0-66.8s-48.3-18.5-66.8 0L337.3 476.7c-18.5 18.5-18.5 48.3 0 66.8l283.1 283.1c9.2 9.2 21.3 13.8 33.4 13.8z"
|
||||
p-id="8101"
|
||||
></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 596 B |
25
src/modules/base/static/svg/exit.svg
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
t="1735123199043"
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="7763"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="256"
|
||||
height="256"
|
||||
>
|
||||
<path
|
||||
d="M574.8 923.6H222c-67.2 0-121.8-54.7-121.8-121.8V223c0-67.2 54.7-121.8 121.8-121.8h352.8c67.2 0 121.8 54.7 121.8 121.8v50.6c0 22.9-18.5 41.4-41.4 41.4s-41.4-18.5-41.4-41.4V223c0-21.5-17.5-39-39-39H222c-21.5 0-39 17.5-39 39v578.8c0 21.5 17.5 39 39 39h352.8c21.5 0 39-17.5 39-39v-44.5c0-22.9 18.5-41.4 41.4-41.4s41.4 18.5 41.4 41.4v44.5c0 67.1-54.7 121.8-121.8 121.8z"
|
||||
p-id="7764"
|
||||
></path>
|
||||
<path
|
||||
d="M860.6 553.8H470.3c-22.9 0-41.4-18.5-41.4-41.4s18.5-41.4 41.4-41.4h390.4c22.9 0 41.4 18.5 41.4 41.4s-18.6 41.4-41.5 41.4z"
|
||||
p-id="7765"
|
||||
></path>
|
||||
<path
|
||||
d="M747.6 693.1c-10.6 0-21.2-4-29.3-12.1-16.2-16.2-16.2-42.4 0-58.6l110-110-110-110c-16.2-16.2-16.2-42.4 0-58.6 16.2-16.2 42.4-16.2 58.6 0l139.2 139.3c16.2 16.2 16.2 42.4 0 58.6L776.9 680.9c-8.1 8.1-18.7 12.2-29.3 12.2z"
|
||||
p-id="7766"
|
||||
></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
1
src/modules/base/static/svg/expand.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1735127795772" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2135" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256"><path d="M42.666667 85.333333m42.666666 0l853.333334 0q42.666667 0 42.666666 42.666667l0 0q0 42.666667-42.666666 42.666667l-853.333334 0q-42.666667 0-42.666666-42.666667l0 0q0-42.666667 42.666666-42.666667Z" fill="#000000" p-id="2136"></path><path d="M426.666667 341.333333m42.666666 0l469.333334 0q42.666667 0 42.666666 42.666667l0 0q0 42.666667-42.666666 42.666667l-469.333334 0q-42.666667 0-42.666666-42.666667l0 0q0-42.666667 42.666666-42.666667Z" fill="#000000" p-id="2137"></path><path d="M426.666667 597.333333m42.666666 0l469.333334 0q42.666667 0 42.666666 42.666667l0 0q0 42.666667-42.666666 42.666667l-469.333334 0q-42.666667 0-42.666666-42.666667l0 0q0-42.666667 42.666666-42.666667Z" fill="#000000" p-id="2138"></path><path d="M42.666667 853.333333m42.666666 0l853.333334 0q42.666667 0 42.666666 42.666667l0 0q0 42.666667-42.666666 42.666667l-853.333334 0q-42.666667 0-42.666666-42.666667l0 0q0-42.666667 42.666666-42.666667Z" fill="#000000" p-id="2139"></path><path d="M234.026667 349.568a42.666667 42.666667 0 0 1 54.485333 65.450667l-4.096 3.413333L156.458667 512l127.957333 93.568a42.666667 42.666667 0 0 1 12.117333 55.082667l-2.858666 4.522666a42.666667 42.666667 0 0 1-55.125334 12.16l-4.522666-2.901333-175.018667-128a42.666667 42.666667 0 0 1-4.096-65.493333l4.096-3.413334 175.018667-128z" fill="#000000" p-id="2140"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
1
src/modules/base/static/svg/fold.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1735127798306" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2305" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256"><path d="M935.466667 85.333333H85.333333a42.666667 42.666667 0 1 0 0 85.333334h850.133334a42.666667 42.666667 0 0 0 0-85.333334z m-382.72 256H85.333333a42.666667 42.666667 0 1 0 0 85.333334h467.413334a42.666667 42.666667 0 1 0 0-85.333334z m0 256H85.333333a42.666667 42.666667 0 0 0 0 85.333334h467.413334a42.666667 42.666667 0 1 0 0-85.333334z m382.72 256H85.333333a42.666667 42.666667 0 0 0 0 85.333334h850.133334a42.666667 42.666667 0 0 0 0-85.333334zM789.461333 349.568a42.410667 42.410667 0 0 0-59.392 9.258667c-12.8 17.536-10.24 41.642667 5.12 56.192l4.096 3.413333L866.773333 512l-127.488 93.568c-17.493333 12.8-22.357333 36.565333-12.117333 55.082667l2.901333 4.522666c12.8 17.578667 36.437333 22.442667 54.912 12.16l4.48-2.901333 174.464-128c21.76-15.957333 23.125333-47.530667 4.053334-65.493333l-4.053334-3.413334-174.464-128z" fill="#000000" p-id="2306"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
21
src/modules/base/static/svg/home.svg
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
t="1735124128661"
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="8431"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="256"
|
||||
height="256"
|
||||
>
|
||||
<path
|
||||
d="M725 924H296.5c-69.2 0-125.4-56.3-125.4-125.4V538.4l-61.9 1c-19.5 0.9-35.9-11.2-42.6-28.9-6.7-17.6-1.6-37.6 12.7-49.9l403.5-347.3c16.8-14.5 41.7-14.5 58.5 0l403.5 347.3c14.3 12.3 19.4 32.3 12.7 49.9-6.7 17.6-24.5 29-42.6 28.9l-64.4-1v260.2C850.4 867.8 794.1 924 725 924zM229 450c6.9 2.1 13.2 5.8 18.4 10.9 8.6 8.4 13.4 19.9 13.4 32v305.7c0 19.7 16 35.7 35.7 35.7H725c19.7 0 35.7-16 35.7-35.7V492.9c0-12 4.8-23.5 13.4-31.9 5.7-5.6 12.7-9.5 20.3-11.5L512 206.4 229 450z"
|
||||
p-id="8432"
|
||||
></path>
|
||||
<path
|
||||
d="M675 632.3c-24.8 0-44.8-20.1-44.8-44.8V439c0-24.8 20.1-44.8 44.8-44.8s44.8 20.1 44.8 44.8v148.5c0 24.7-20.1 44.8-44.8 44.8z"
|
||||
p-id="8433"
|
||||
></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1009 B |
21
src/modules/base/static/svg/my.svg
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
t="1735123335274"
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="8266"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="256"
|
||||
height="256"
|
||||
>
|
||||
<path
|
||||
d="M511.3 615.2c-152 0-275.7-123.7-275.7-275.7S359.3 63.9 511.3 63.9 787 187.5 787 339.5 663.3 615.2 511.3 615.2z m0-454.8c-98.8 0-179.2 80.4-179.2 179.2s80.4 179.2 179.2 179.2 179.2-80.4 179.2-179.2-80.4-179.2-179.2-179.2z"
|
||||
p-id="8267"
|
||||
></path>
|
||||
<path
|
||||
d="M852.5 956.3c-26.6 0-48.2-21.6-48.2-48.2 0-161.5-131.4-292.9-292.9-292.9-161.5 0-292.9 131.4-292.9 292.9 0 26.6-21.6 48.2-48.2 48.2s-48.2-21.6-48.2-48.2c0-214.7 174.7-389.4 389.4-389.4s389.4 174.7 389.4 389.4c-0.2 26.6-21.8 48.2-48.4 48.2z"
|
||||
p-id="8268"
|
||||
></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 878 B |
21
src/modules/base/static/svg/refresh.svg
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
t="1735123192395"
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="7598"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="256"
|
||||
height="256"
|
||||
>
|
||||
<path
|
||||
d="M512.3 878.8c-201.6 0-365.5-164-365.5-365.5 0-24.7 20-44.6 44.6-44.6s44.6 20 44.6 44.6c0 152.3 123.9 276.3 276.3 276.3 86.7 0 166.7-39.5 219.4-108.4 15-19.6 43-23.3 62.6-8.3s23.3 43 8.3 62.6c-69.8 91-175.7 143.3-290.3 143.3zM833.2 557.9c-24.7 0-44.6-20-44.6-44.6 0-152.4-123.9-276.3-276.3-276.3-86.3 0-166 39.2-218.8 107.6-15.1 19.5-43.1 23.1-62.6 8-19.5-15.1-23.1-43.1-8.1-62.6 69.8-90.5 175.4-142.3 289.5-142.3 201.6 0 365.6 164 365.6 365.6-0.1 24.6-20 44.6-44.7 44.6z"
|
||||
p-id="7599"
|
||||
></path>
|
||||
<path
|
||||
d="M833.2 599.6c-11.4 0-22.8-4.4-31.6-13.1l-80.8-80.8c-12.8-12.8-16.6-32-9.7-48.6 6.9-16.7 23.2-27.6 41.2-27.6H914c18.1 0 34.3 10.9 41.2 27.6 6.9 16.7 3.1 35.9-9.7 48.6l-80.8 80.8c-8.7 8.7-20.1 13.1-31.5 13.1zM272.2 598.3H110.5c-18.1 0-34.3-10.9-41.2-27.6-6.9-16.7-3.1-35.9 9.7-48.6l80.8-80.8c8.4-8.4 19.7-13.1 31.6-13.1 11.8 0 23.2 4.7 31.6 13.1l80.8 80.8c12.8 12.8 16.6 32 9.7 48.6s-23.2 27.6-41.3 27.6z"
|
||||
p-id="7600"
|
||||
></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="cl-chat__icon" @click="open">
|
||||
<el-badge :value="unCount" :hidden="!unCount">
|
||||
<el-badge is-dot>
|
||||
<cl-svg name="icon-notice" :size="16" />
|
||||
</el-badge>
|
||||
</div>
|
||||
|
||||
@ -47,17 +47,25 @@
|
||||
import { useCrud, useTable, useUpsert } from '@cool-vue/crud';
|
||||
import { ref } from 'vue';
|
||||
import { useCool } from '/@/cool';
|
||||
import { useDict } from '/$/dict';
|
||||
|
||||
//【很重要】service 是所有请求的集合,是一个对象(刷新页面和保存代码会自动读取后端的所有接口)
|
||||
const { service, route } = useCool();
|
||||
console.log('service', service);
|
||||
|
||||
const { dict } = useDict();
|
||||
|
||||
// cl-crud 配置
|
||||
const Crud = useCrud(
|
||||
{
|
||||
//【很重要】配置 service,如:service.base.sys.user
|
||||
// 不需要到具体的方法,如:service.base.sys.user.page,这是错误的!
|
||||
service: service.base.sys.user
|
||||
|
||||
// 实际用法
|
||||
// service: service.base.sys.user,
|
||||
|
||||
// 测试示例
|
||||
service: 'test'
|
||||
|
||||
// 自定义配置1,添加本地 service 文件。
|
||||
// 【很重要】参考 /src/modules/demo/service/test.ts
|
||||
@ -103,31 +111,20 @@ const Table = useTable({
|
||||
type: 'selection'
|
||||
},
|
||||
{
|
||||
label: '商品名称',
|
||||
prop: 'title',
|
||||
label: '姓名',
|
||||
prop: 'name',
|
||||
minWidth: 140
|
||||
},
|
||||
{
|
||||
label: '价格',
|
||||
prop: 'price',
|
||||
label: '手机号',
|
||||
prop: 'phone',
|
||||
minWidth: 140
|
||||
},
|
||||
{
|
||||
label: '主图',
|
||||
prop: 'mainImage',
|
||||
minWidth: 140,
|
||||
component: {
|
||||
name: 'cl-image',
|
||||
props: {
|
||||
size: 60
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '描述',
|
||||
prop: 'description',
|
||||
minWidth: 200,
|
||||
showOverflowTooltip: true
|
||||
label: '工作',
|
||||
prop: 'occupation',
|
||||
dict: dict.get('occupation'),
|
||||
minWidth: 140
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
@ -146,37 +143,28 @@ const Table = useTable({
|
||||
const Upsert = useUpsert({
|
||||
items: [
|
||||
{
|
||||
label: '商品名称',
|
||||
prop: 'title',
|
||||
required: true,
|
||||
label: '姓名',
|
||||
prop: 'name',
|
||||
component: {
|
||||
name: 'el-input'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '价格',
|
||||
prop: 'price',
|
||||
required: true,
|
||||
label: '手机号',
|
||||
prop: 'phone',
|
||||
component: {
|
||||
name: 'el-input-number'
|
||||
name: 'el-input'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '主图',
|
||||
prop: 'mainImage',
|
||||
required: true,
|
||||
label: '工作',
|
||||
prop: 'occupation',
|
||||
component: {
|
||||
name: 'cl-upload'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '描述',
|
||||
prop: 'description',
|
||||
component: {
|
||||
name: 'el-input',
|
||||
name: 'cl-select',
|
||||
props: {
|
||||
type: 'textarea',
|
||||
rows: 4
|
||||
tree: true,
|
||||
checkStrictly: true,
|
||||
options: dict.get('occupation')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="scope">
|
||||
<div class="h">
|
||||
<el-tag size="small" effect="dark">event</el-tag>
|
||||
<span>事件</span>
|
||||
<span>打开、关闭、提交等事件</span>
|
||||
</div>
|
||||
|
||||
<div class="c">
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="scope">
|
||||
<div class="h">
|
||||
<el-tag size="small" effect="dark">mode</el-tag>
|
||||
<span>不同模式</span>
|
||||
<span>新增、编辑、详情模式</span>
|
||||
</div>
|
||||
|
||||
<div class="c">
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<el-badge v-if="!browser.isMini" is-dot>
|
||||
<div class="btn" @click="toCode">
|
||||
<span>AI 极速编码</span>
|
||||
</div>
|
||||
</el-badge>
|
||||
<div class="btn" @click="toCode">
|
||||
<span>AI 极速编码</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="auto-menu" setup>
|
||||
@ -26,9 +24,13 @@ function toCode() {
|
||||
color: #fff;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
padding: 5px 10px;
|
||||
padding: 0 10px;
|
||||
white-space: nowrap;
|
||||
letter-spacing: 1px;
|
||||
line-height: 1;
|
||||
height: 28px;
|
||||
margin-right: 10px;
|
||||
transition: background-color 0.2s;
|
||||
|
||||
span {
|
||||
&:nth-child(1) {
|
||||
|
||||
28
src/plugins/crud/components/text/index.tsx
Normal file
@ -0,0 +1,28 @@
|
||||
import { defineComponent, type PropType } from "vue"
|
||||
import { computed, useModel } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'cl-text',
|
||||
|
||||
props: {
|
||||
modelValue: null,
|
||||
formatter: Function as PropType<(value: any, scope: any) => string>,
|
||||
// 继承 el-text https://element-plus.org/zh-CN/component/text.html#attributes
|
||||
},
|
||||
|
||||
setup(props) {
|
||||
const value = useModel(props, 'modelValue');
|
||||
|
||||
const text = computed(() => {
|
||||
if (props.formatter) {
|
||||
return props.formatter(value.value, props);
|
||||
}
|
||||
|
||||
return value.value;
|
||||
});
|
||||
|
||||
return () => {
|
||||
return <el-text>{text.value}</el-text>
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -4,7 +4,7 @@
|
||||
<cl-form ref="Form">
|
||||
<template #slot-upload>
|
||||
<div v-if="!upload.filename" class="upload">
|
||||
<div class="tips">
|
||||
<div class="tips" v-if="template">
|
||||
<span>{{ tips }}</span>
|
||||
<el-button type="primary" text bg @click="download">下载模版</el-button>
|
||||
</div>
|
||||
|
||||
@ -147,10 +147,10 @@ export function export_table_to_excel(id) {
|
||||
}
|
||||
|
||||
export function export_json_to_excel({
|
||||
multiHeader = [],
|
||||
header,
|
||||
data,
|
||||
filename,
|
||||
multiHeader = [] as string[],
|
||||
header = [] as string[],
|
||||
data = [] as any[],
|
||||
filename = '' as string,
|
||||
merges = [],
|
||||
autoWidth = true,
|
||||
bookType = 'xlsx'
|
||||
|
||||
@ -13,7 +13,8 @@ export default (): ModuleConfig => {
|
||||
updateTime: '2024-07-22',
|
||||
|
||||
toolbar: {
|
||||
component: import('./components/theme.vue')
|
||||
component: import('./components/theme.vue'),
|
||||
h5: false
|
||||
},
|
||||
|
||||
options: {
|
||||
|
||||