mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-09-15 08:25:10 +08:00
fix 修复 类型问题导致的警告与字典样式问题
This commit is contained in:
parent
6fd38aef43
commit
eb05c5197f
@ -11,18 +11,20 @@ import { useTagsViewStore } from '@/store/modules/tagsView';
|
|||||||
const tagAndTagSpacing = ref(4);
|
const tagAndTagSpacing = ref(4);
|
||||||
|
|
||||||
const scrollContainerRef = ref<ElScrollbarInstance>();
|
const scrollContainerRef = ref<ElScrollbarInstance>();
|
||||||
const scrollWrapper = computed(() => scrollContainerRef.value?.$refs.wrapRef);
|
const scrollWrapper = computed<HTMLDivElement | undefined>(() => scrollContainerRef.value?.wrapRef);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
scrollWrapper.value?.addEventListener('scroll', emitScroll, true);
|
scrollWrapper.value?.addEventListener('scroll', emitScroll, true);
|
||||||
});
|
});
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
scrollWrapper.value?.removeEventListener('scroll', emitScroll);
|
scrollWrapper.value?.removeEventListener('scroll', emitScroll, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleScroll = (e: WheelEvent) => {
|
const handleScroll = (e: WheelEvent) => {
|
||||||
const eventDelta = (e as any).wheelDelta || -e.deltaY * 40;
|
const eventDelta = (e as any).wheelDelta || -e.deltaY * 40;
|
||||||
const $scrollWrapper = scrollWrapper.value;
|
const $scrollWrapper = scrollWrapper.value;
|
||||||
|
if (!$scrollWrapper) return;
|
||||||
|
|
||||||
$scrollWrapper.scrollLeft = $scrollWrapper.scrollLeft + eventDelta / 4;
|
$scrollWrapper.scrollLeft = $scrollWrapper.scrollLeft + eventDelta / 4;
|
||||||
};
|
};
|
||||||
const emits = defineEmits(['scroll']);
|
const emits = defineEmits(['scroll']);
|
||||||
@ -37,6 +39,7 @@ const moveToTarget = (currentTag: RouteLocationNormalized) => {
|
|||||||
const $container = scrollContainerRef.value?.$el;
|
const $container = scrollContainerRef.value?.$el;
|
||||||
const $containerWidth = $container.offsetWidth;
|
const $containerWidth = $container.offsetWidth;
|
||||||
const $scrollWrapper = scrollWrapper.value;
|
const $scrollWrapper = scrollWrapper.value;
|
||||||
|
if (!$scrollWrapper) return;
|
||||||
|
|
||||||
let firstTag = null;
|
let firstTag = null;
|
||||||
let lastTag = null;
|
let lastTag = null;
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
<span class="link-type" @click.stop="handleTypeRowClick(scope.row)">{{ scope.row.dictType }}</span>
|
<span class="link-type" @click.stop="handleTypeRowClick(scope.row)">{{ scope.row.dictType }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" width="160"/>
|
<el-table-column label="备注" align="center" prop="remark" width="160" />
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ proxy.parseTime(scope.row.createTime) }}</span>
|
<span>{{ proxy.parseTime(scope.row.createTime) }}</span>
|
||||||
@ -213,13 +213,15 @@
|
|||||||
<el-input v-model="typeForm.dictName" placeholder="请输入字典名称" />
|
<el-input v-model="typeForm.dictName" placeholder="请输入字典名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="dictType">
|
<el-form-item prop="dictType">
|
||||||
|
<template #label>
|
||||||
|
<span>
|
||||||
|
<el-tooltip content="数据存储中的Key值,如:sys_user_sex" placement="top">
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
字典类型
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<el-input v-model="typeForm.dictType" placeholder="请输入字典类型" maxlength="100" />
|
<el-input v-model="typeForm.dictType" placeholder="请输入字典类型" maxlength="100" />
|
||||||
<span slot="label">
|
|
||||||
<el-tooltip content="数据存储中的Key值,如:sys_user_sex" placement="top">
|
|
||||||
<i class="el-icon-question"></i>
|
|
||||||
</el-tooltip>
|
|
||||||
字典类型
|
|
||||||
</span>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="typeForm.remark" type="textarea" placeholder="请输入内容"></el-input>
|
<el-input v-model="typeForm.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||||
@ -671,5 +673,4 @@ onMounted(() => {
|
|||||||
.dict-table-wrap {
|
.dict-table-wrap {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user