修复已知bug

This commit is contained in:
2024-07-23 16:41:29 +08:00
parent e0b85aae8f
commit 717c89a58e
12 changed files with 92 additions and 36 deletions

View File

@@ -24,6 +24,8 @@ export interface MpMenu {
icon?: string;
// 图标颜色
color?: string;
// 上传图标
avatar?: string;
// 所在行
rows?: number;
// 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)

View File

@@ -1,11 +1,11 @@
<!-- 搜索表单 -->
<template>
<a-space :size="10" style="flex-wrap: wrap">
<a-space :size="10" style="flex-wrap: wrap" v-if="count === 0">
<a-button type="primary" class="ele-btn-icon" @click="add">
<template #icon>
<PlusOutlined />
</template>
<span>添加</span>
<span>创建</span>
</a-button>
</a-space>
</template>
@@ -19,6 +19,7 @@
defineProps<{
// 选中的角色
selection?: [];
count?: 0;
}>(),
{}
);

View File

@@ -15,6 +15,7 @@
<search
@search="reload"
:selection="selection"
:count="count"
@add="openEdit"
@remove="removeBatch"
@batchMove="openMove"
@@ -66,6 +67,7 @@
// 表格选中数据
const selection = ref<Mp[]>([]);
const count = ref<number>(0);
// 当前编辑数据
const current = ref<Mp | null>(null);
// 是否显示编辑弹窗
@@ -213,6 +215,10 @@
/* 查询 */
const query = () => {
loading.value = true;
pageMp({}).then((res) => {
console.log(res?.count);
count.value = res?.count;
});
};
/* 自定义行属性 */

View File

@@ -33,7 +33,26 @@
v-model:value="form.path"
/>
</a-form-item>
<a-form-item label="菜单图标" name="icon">
<!-- <a-form-item label="选择图标" name="icon">-->
<!-- <ele-icon-picker-->
<!-- :data="iconData"-->
<!-- :allow-search="false"-->
<!-- v-model:value="form.icon"-->
<!-- placeholder="请选择菜单图标"-->
<!-- >-->
<!-- <template #icon="{ icon }">-->
<!-- <component :is="icon" />-->
<!-- </template>-->
<!-- </ele-icon-picker>-->
<!-- </a-form-item>-->
<a-form-item label="文字颜色" name="color">
<ele-color-picker
:show-alpha="true"
v-model:value="form.color"
:predefine="predefineColors"
/>
</a-form-item>
<a-form-item label="上传图标" name="avatar" extra="优先级高于图标">
<SelectFile
:placeholder="`请选择图片`"
:limit="1"
@@ -42,13 +61,6 @@
@del="onDeleteItem"
/>
</a-form-item>
<a-form-item label="图标颜色" name="color">
<ele-color-picker
:show-alpha="true"
v-model:value="form.color"
:predefine="predefineColors"
/>
</a-form-item>
<a-form-item label="分组" name="parentId">
<SelectDict
dict-code="mpGroup"
@@ -98,7 +110,7 @@
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
import { FormInstance } from 'ant-design-vue/es/form';
import { FileRecord } from '@/api/system/file/model';
import { DictData } from "@/api/system/dict-data/model";
import { DictData } from '@/api/system/dict-data/model';
// 是否是修改
const isUpdate = ref(false);
@@ -145,10 +157,12 @@
target: 'uni.navigateTo',
icon: '',
color: undefined,
avatar: undefined,
hide: undefined,
position: undefined,
active: undefined,
userId: 0,
groupName: undefined,
home: undefined,
sortNumber: 100,
comments: '',
@@ -194,12 +208,12 @@
url: data.thumbnail,
status: 'done'
});
form.icon = data.thumbnail;
form.avatar = data.thumbnail;
};
const onDeleteItem = (index: number) => {
images.value.splice(index, 1);
form.icon = '';
form.avatar = '';
};
const chooseGroupId = (item: DictData) => {
@@ -273,10 +287,10 @@
}
if (props.data) {
assignObject(form, props.data);
if (props.data.icon) {
if (props.data.avatar) {
images.value.push({
uid: uuid(),
url: props.data.icon,
url: props.data.avatar,
status: 'done'
});
}
@@ -291,3 +305,21 @@
{ immediate: true }
);
</script>
<script lang="ts">
import * as icons from '@/layout/menu-icons';
export default {
components: icons,
data() {
return {
iconData: [
{
title: '已引入的图标',
icons: Object.keys(icons)
}
]
};
}
};
</script>

View File

@@ -5,7 +5,7 @@
<template #icon>
<PlusOutlined />
</template>
<span>添加图标</span>
<span>添加菜单</span>
</a-button>
<SelectDict
dict-code="mpGroup"

View File

@@ -79,7 +79,7 @@
class="ele-cell-content ele-text-center btn-center"
@click="openMpMenuEdit(item)"
>
<a-image :src="item.icon" :width="40" :preview="false" />
<a-image :src="item.avatar" :width="40" :preview="false" />
<span style="white-space: nowrap">{{ item.title }}</span>
</div>
</div>

View File

@@ -41,8 +41,9 @@
>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'icon'">
<a-avatar :src="record.icon" :width="50" />
<template v-if="column.key === 'avatar'">
<a-avatar v-if="record.avatar" :src="record.avatar" />
<!-- <component v-if="record.icon" :is="record.icon" />-->
</template>
<template v-if="column.key === 'path'">
<span class="ele-text-placeholder">{{ record.path }}</span>
@@ -185,8 +186,8 @@
},
{
title: '菜单图标',
dataIndex: 'icon',
key: 'icon',
dataIndex: 'avatar',
key: 'avatar',
align: 'center',
width: 90
},
@@ -341,8 +342,10 @@
</script>
<script lang="ts">
import * as MenuIcons from '@/layout/menu-icons';
export default {
name: 'MpMenuHome'
name: 'MpMenuHome',
components: MenuIcons
};
</script>

View File

@@ -31,7 +31,6 @@
allow-clear
placeholder="/package/goods/detail"
v-model:value="form.path"
:disabled="form.subpackage === 'MainPackage'"
/>
</a-form-item>
<a-form-item label="分包" name="subpackage">

View File

@@ -57,11 +57,11 @@
</a-space>
</template>
</template>
<!-- <template #footer>-->
<!-- <div class="ele-text-secondary"-->
<!-- >页面设计可以替换图标和文字仓库地址http://git.gxwebsoft.com/websoft/nbg-uniapp.git</div-->
<!-- >-->
<!-- </template>-->
<!-- <template #footer>-->
<!-- <div class="ele-text-secondary"-->
<!-- >页面设计可以替换图标和文字仓库地址http://git.gxwebsoft.com/websoft/nbg-uniapp.git</div-->
<!-- >-->
<!-- </template>-->
</ele-pro-table>
</a-card>

View File

@@ -56,9 +56,15 @@
<div class="gutter-box">
<div class="plug-item">
<a-image
:height="80"
:width="80"
:height="72"
:width="72"
:preview="false"
class="app-icon"
style="
border: 1px solid #e3e3e3;
box-shadow: 0 0 1px -1px;
border-radius: 12px;
"
:src="item.companyLogo"
@click="openUrl('/system/plug/detail?id=' + item.companyId)"
fallback="https://file.wsdns.cn/20230218/550e610d43334dd2a7f66d5b20bd58eb.svg"
@@ -216,10 +222,12 @@
.plug-item {
display: flex;
.app-icon {
}
.info {
font-size: 14px;
margin-left: 6px;
margin-left: 12px;
max-width: 234px;
.name {
font-size: 20px;

View File

@@ -15,9 +15,14 @@
<div class="goods-info">
<div class="logo">
<a-image
:width="70"
:height="70"
:width="72"
:height="72"
:preview="false"
style="
border: 1px solid #e3e3e3;
box-shadow: 0 0 1px -1px;
border-radius: 12px;
"
:src="form.companyLogo"
/>
</div>

View File

@@ -52,8 +52,8 @@
</a-space>
</div>
<a-typography-text>
<!-- <div class="update-info ele-text-secondary" v-html="item.updateInfo"></div>-->
<byte-md-viewer :value="item.updateInfo" :plugins="plugins" />
<div class="update-info ele-text-secondary" v-html="item.updateInfo"></div>
<!-- <byte-md-viewer v-if="item" :value="item.updateInfo" :plugins="plugins" />-->
</a-typography-text>
</a-timeline-item>
</a-timeline>