20260922172938

This commit is contained in:
oneao committed 2026-09-22 17:29:39 +08:00
1 parent 583984c24f
commit c8dad8d4a6
46 files changed
+3366 -1246

No files matched your search

@@ -2,7 +2,7 @@
/**
* FmsTreePanel —— 左树面板(白卡 + 搜索框 + 动作区 + 可滚动树区)。
*
* 往来单位 / 其他数据 / 用户管理 / 模块管理 / 菜单管理五个页面的左栏结构完全一致,
* 合作伙伴 / 其他数据 / 用户管理 / 模块管理 / 菜单管理五个页面的左栏结构完全一致,
* 差异只在搜索关键字、动作按钮和树的交互事件上,故收敛为本组件:
* 1. 面板骨架(白卡 / 头部 / 搜索框 / 滚动区)的样式随组件走,不再放全局样式层;
* 2. 搜索关键字由本组件持有(v-model:keyword),「搜索过滤中禁止拖拽」这条规则随之只写一次;
@@ -24,6 +24,7 @@ function removeTag(tag) {
<Tag>默认</Tag>
<Tag variant="secondary">次要</Tag>
<Tag variant="outline">描边</Tag>
<Tag variant="success">成功</Tag>
<Tag variant="danger">危险</Tag>
<Tag variant="ghost">幽灵</Tag>
</div>
@@ -2,7 +2,7 @@
import { computed, nextTick, provide, ref, useSlots } from 'vue'
import Popover from '../popover/popover.vue'
import DropdownMenu from './menu.vue'
import DropdownItem from './DropdownItem.vue'
import DropdownItem from './dropdown-item.vue'
/* ---------- props / emits / slots ---------- */
const props = defineProps({
@@ -97,6 +97,16 @@
min-width: 0;
}
/* 无控件壳的小控件(switch 18px / checkbox 16px,均矮于控件高):
它们是行内级元素,按文字基线摆放 —— 视觉框底部贴基线,框中心落在 ~9px 处,
而 label 的行高是控件高(28px)、文字居中在 14px,于是看起来比 label 高一截。
这里给它们补足控件高:控件自身是 align-items: center,视觉框会被居中到 14px,
与 input / select 的 28px 框体同一基准(只加高,不改宽度,也不影响控件区内的其它子元素)。 */
.fms-form-item-content > :deep(.switch),
.fms-form-item-content > :deep(.checkbox) {
min-height: var(--fms-control-height);
}
/* ---------- 提示文字 ---------- */
.fms-form-item-help,
.fms-form-item-extra {
+1 -1
View File
@@ -12,7 +12,7 @@ import TimeSelect from './date/time-select.vue'
import Drawer from './drawer/drawer.vue'
import Dropdown from './dropdown/dropdown.vue'
import Form from './form/form.vue'
import FormGroup from './form/FormGroup.vue'
import FormGroup from './form/form-group.vue'
import FormItem from './form/form-item.vue'
import Input from './input/input.vue'
import Modal from './modal/modal.vue'
@@ -36,6 +36,12 @@
color: var(--fms-text);
}
/* 变体:success 成功淡底绿字(与 danger 同构,用「启用」这类正向状态) */
.tag-success {
background: color-mix(in srgb, var(--fms-success) 10%, transparent);
color: var(--fms-success);
}
/* 变体:danger 危险淡底红字(参考 shadcn destructive) */
.tag-danger {
background: color-mix(in srgb, var(--fms-danger) 10%, transparent);
@@ -5,7 +5,7 @@ import { X } from '@lucide/vue'
/* ---------- props / emits / slots ---------- */
/**
* 标签视觉变体
* @typedef {'default' | 'secondary' | 'outline' | 'danger' | 'ghost'} TagVariant
* @typedef {'default' | 'secondary' | 'outline' | 'success' | 'danger' | 'ghost'} TagVariant
*/
const props = defineProps({
@@ -14,7 +14,8 @@ const props = defineProps({
/** @type {TagVariant} */
type: String,
default: 'default',
validator: (value) => ['default', 'secondary', 'outline', 'danger', 'ghost'].includes(value),
validator: (value) =>
['default', 'secondary', 'outline', 'success', 'danger', 'ghost'].includes(value),
},
/** 是否可关闭:显示关闭按钮,点击后触发 close 并隐藏自身 */
closable: { type: Boolean, default: false },