提交
This commit is contained in:
1 parent
246ad2228e
commit
8e2dd8b9f0
186 files changed
+38821
-2571
No files matched your search
@@ -107,7 +107,6 @@
|
||||
ElDatePicker,
|
||||
ElInput,
|
||||
ElInputTag,
|
||||
ElInputNumber,
|
||||
ElRadioGroup,
|
||||
ElRate,
|
||||
ElSelect,
|
||||
@@ -125,7 +124,7 @@
|
||||
const componentMap = {
|
||||
input: ElInput, // 输入框
|
||||
inputtag: ElInputTag, // 标签输入框
|
||||
number: ElInputNumber, // 数字输入框
|
||||
number: ElInput, // 数字输入框
|
||||
select: ElSelect, // 选择器
|
||||
switch: ElSwitch, // 开关
|
||||
checkbox: ElCheckbox, // 复选框
|
||||
@@ -414,9 +413,22 @@
|
||||
}
|
||||
|
||||
const getProps = (item: FormItem) => {
|
||||
if (item.props) return item.props
|
||||
if (item.props) {
|
||||
// number 类型使用 ElInput 渲染时需要注入 type="number"
|
||||
if (item.type === 'number') {
|
||||
return { type: 'number', step: 'any', ...item.props }
|
||||
}
|
||||
return item.props
|
||||
}
|
||||
const props = { ...item }
|
||||
rootProps.forEach((key) => delete (props as Record<string, any>)[key])
|
||||
// number 类型使用 ElInput 渲染时需要注入 type="number"
|
||||
if (item.type === 'number') {
|
||||
;(props as Record<string, any>).type = 'number'
|
||||
if (!(props as Record<string, any>).step) {
|
||||
;(props as Record<string, any>).step = 'any'
|
||||
}
|
||||
}
|
||||
return props
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,6 @@
|
||||
ElDatePicker,
|
||||
ElInput,
|
||||
ElInputTag,
|
||||
ElInputNumber,
|
||||
ElRadioGroup,
|
||||
ElRate,
|
||||
ElSelect,
|
||||
@@ -132,7 +131,7 @@
|
||||
const componentMap = {
|
||||
input: ElInput, // 输入框
|
||||
inputTag: ElInputTag, // 标签输入框
|
||||
number: ElInputNumber, // 数字输入框
|
||||
number: ElInput, // 数字输入框
|
||||
select: ElSelect, // 选择器
|
||||
switch: ElSwitch, // 开关
|
||||
checkbox: ElCheckbox, // 复选框
|
||||
@@ -297,9 +296,22 @@
|
||||
}))
|
||||
|
||||
const getProps = (item: SearchFormItem) => {
|
||||
if (item.props) return item.props
|
||||
if (item.props) {
|
||||
// number 类型使用 ElInput 渲染时需要注入 type="number"
|
||||
if (item.type === 'number') {
|
||||
return { type: 'number', step: 'any', ...item.props }
|
||||
}
|
||||
return item.props
|
||||
}
|
||||
const props = { ...item }
|
||||
rootProps.forEach((key) => delete (props as Record<string, any>)[key])
|
||||
// number 类型使用 ElInput 渲染时需要注入 type="number"
|
||||
if (item.type === 'number') {
|
||||
;(props as Record<string, any>).type = 'number'
|
||||
if (!(props as Record<string, any>).step) {
|
||||
;(props as Record<string, any>).step = 'any'
|
||||
}
|
||||
}
|
||||
return props
|
||||
}
|
||||
|
||||
|
||||
@@ -36,12 +36,20 @@
|
||||
}"
|
||||
>
|
||||
<ArtSvgIcon
|
||||
v-if="menu.meta.icon"
|
||||
class="menu-icon text-g-700 dark:text-g-800"
|
||||
:icon="menu.meta.icon"
|
||||
:style="{
|
||||
marginBottom: dualMenuShowText ? '5px' : '0'
|
||||
}"
|
||||
/>
|
||||
<div
|
||||
v-else
|
||||
class="dual-menu-icon-placeholder"
|
||||
:style="{
|
||||
marginBottom: dualMenuShowText ? '5px' : '0'
|
||||
}"
|
||||
/>
|
||||
<span v-if="dualMenuShowText" class="text-md text-g-700">
|
||||
{{ $t(menu.meta.title) }}
|
||||
</span>
|
||||
|
||||
@@ -55,6 +55,14 @@
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.dual-menu-icon-placeholder {
|
||||
display: block;
|
||||
flex-shrink: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
span {
|
||||
display: -webkit-box;
|
||||
width: 100%;
|
||||
|
||||
@@ -112,12 +112,25 @@ $popup-menu-radius: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
// 菜单图标
|
||||
// 菜单图标(固定槽宽,无 icon 的一级项用空槽与文字对齐)
|
||||
.menu-icon {
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
width: $menu-icon-size;
|
||||
min-width: $menu-icon-size;
|
||||
height: $menu-icon-size;
|
||||
margin-right: 8px;
|
||||
font-size: $menu-icon-size;
|
||||
}
|
||||
|
||||
.menu-icon__virtual {
|
||||
display: block;
|
||||
flex: 0 0 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// 菜单高度
|
||||
.el-sub-menu__title,
|
||||
.el-menu-item {
|
||||
|
||||
+12
-2
@@ -2,12 +2,17 @@
|
||||
<template v-for="(item, index) in filteredMenuItems" :key="getUniqueKey(item, index)">
|
||||
<ElSubMenu v-if="hasChildren(item)" :index="item.path || item.meta.title" :level="level">
|
||||
<template #title>
|
||||
<div v-if="level === 0" class="menu-icon flex-cc">
|
||||
<div
|
||||
v-if="level === 0 && (item.meta.icon || item.meta.virtualMenuIcon)"
|
||||
class="menu-icon flex-cc"
|
||||
>
|
||||
<ArtSvgIcon
|
||||
v-if="item.meta.icon"
|
||||
:icon="item.meta.icon"
|
||||
:color="theme?.iconColor"
|
||||
:style="{ color: theme.iconColor }"
|
||||
/>
|
||||
<span v-else class="menu-icon__virtual" aria-hidden="true" />
|
||||
</div>
|
||||
<span class="menu-name">
|
||||
{{ formatMenuTitle(item.meta.title) }}
|
||||
@@ -30,12 +35,17 @@
|
||||
:level-item="level + 1"
|
||||
@click="goPage(item)"
|
||||
>
|
||||
<div v-if="level === 0" class="menu-icon flex-cc">
|
||||
<div
|
||||
v-if="level === 0 && (item.meta.icon || item.meta.virtualMenuIcon)"
|
||||
class="menu-icon flex-cc"
|
||||
>
|
||||
<ArtSvgIcon
|
||||
v-if="item.meta.icon"
|
||||
:icon="item.meta.icon"
|
||||
:color="theme?.iconColor"
|
||||
:style="{ color: theme.iconColor }"
|
||||
/>
|
||||
<span v-else class="menu-icon__virtual" aria-hidden="true" />
|
||||
</div>
|
||||
<div
|
||||
v-show="item.meta.showBadge && level === 0 && !menuOpen"
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
<ElSwitch v-if="config.type === 'switch'" :model-value="modelValue" @change="handleChange" />
|
||||
|
||||
<!-- 数字输入类型 -->
|
||||
<ElInputNumber
|
||||
<ElInput
|
||||
type="number"
|
||||
step="any"
|
||||
v-else-if="config.type === 'input-number'"
|
||||
:model-value="modelValue"
|
||||
:min="config.min"
|
||||
:max="config.max"
|
||||
:step="config.step"
|
||||
:style="config.style"
|
||||
:controls-position="config.controlsPosition"
|
||||
@change="handleChange"
|
||||
@input="handleChange"
|
||||
/>
|
||||
|
||||
<!-- 选择器类型 -->
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="showWorkTab"
|
||||
class="worktab-strip box-border flex-b w-full px-5 mb-3 select-none max-sm:px-[15px]"
|
||||
class="worktab-strip box-border flex w-full items-center px-5 mb-3 select-none max-sm:px-[15px]"
|
||||
>
|
||||
<div class="worktab-scroll-wrap w-full" ref="scrollRef">
|
||||
<div class="worktab-scroll-wrap min-w-0 flex-1" ref="scrollRef">
|
||||
<ul
|
||||
class="float-left whitespace-nowrap !bg-transparent flex"
|
||||
:class="[tabStyle === 'tab-google' ? 'pl-1' : '']"
|
||||
@@ -24,12 +24,6 @@
|
||||
@click="clickTab(item)"
|
||||
@contextmenu.prevent="(e) => showMenu(e, item.path)"
|
||||
>
|
||||
<ArtSvgIcon
|
||||
v-show="item.icon"
|
||||
:icon="item.icon"
|
||||
class="text-base mr-1 group-hover:text-theme"
|
||||
:class="item.path === activeTab ? 'text-theme' : 'text-inherit'"
|
||||
/>
|
||||
{{ item.customTitle || formatMenuTitle(item.title) }}
|
||||
<span
|
||||
v-if="list.length > 1 && !item.fixedTab"
|
||||
@@ -42,7 +36,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="flex">
|
||||
<div class="flex shrink-0">
|
||||
<div
|
||||
class="worktab-menu-btn flex-cc relative top-0 size-8 leading-8 text-center c-p tad-200"
|
||||
@click="(e) => showMenu(e, activeTab)"
|
||||
|
||||
Reference in new issue
Block a user