@robot-admin/naive-ui-components 0.24.0 → 0.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +4 -2
- package/README_EN.md +5 -1
- package/dist/C_Form.base.css +1 -103
- package/dist/C_Form.css +1 -103
- package/dist/C_FormModal.css +25 -12
- package/dist/C_FormModal2.cjs +1 -1
- package/dist/C_FormModal2.js +1 -1
- package/dist/C_Table.base.css +115 -211
- package/dist/C_Table.css +114 -108
- package/dist/C_Table2.cjs +2 -2
- package/dist/C_Table2.js +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants2.d.cts +4 -4
- package/dist/constants2.d.ts +4 -4
- package/dist/constants3.d.cts +4 -4
- package/dist/constants3.d.ts +4 -4
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/data2.d.cts +4 -4
- package/dist/data2.d.ts +4 -4
- package/dist/density.cjs +1 -1
- package/dist/density.js +1 -1
- package/dist/index.vue.d.cts +4 -4
- package/dist/index.vue.d.ts +4 -4
- package/dist/index10.vue.d.cts +2 -2
- package/dist/index10.vue.d.ts +2 -2
- package/dist/index11.vue.d.cts +2 -2
- package/dist/index13.vue.d.ts +1 -1
- package/dist/index14.vue.d.cts +1 -1
- package/dist/index15.vue.d.ts +6 -6
- package/dist/index16.vue.d.cts +6 -6
- package/dist/index18.vue.d.ts +1 -1
- package/dist/index19.vue.d.cts +1 -1
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index22.vue.d.ts +1 -1
- package/dist/index23.vue.d.cts +1 -1
- package/dist/index25.vue.d.cts +1 -1
- package/dist/index25.vue.d.ts +1 -1
- package/dist/index26.vue.d.cts +1 -1
- package/dist/index26.vue.d.ts +1 -1
- package/dist/index28.vue.d.cts +1 -1
- package/dist/index28.vue.d.ts +1 -1
- package/dist/index29.vue.d.cts +1 -1
- package/dist/index29.vue.d.ts +1 -1
- package/dist/index3.vue.d.cts +2 -2
- package/dist/index3.vue.d.ts +2 -2
- package/dist/index7.vue.d.ts +3 -3
- package/dist/index8.vue.d.cts +3 -3
- package/dist/index9.vue.d.ts +2 -2
- package/dist/mapUtils.d.cts +4 -4
- package/dist/mapUtils.d.ts +4 -4
- package/dist/presets.d.cts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/style.css +140 -223
- package/dist/useCalendarEvents.d.cts +2 -2
- package/dist/useCalendarEvents.d.ts +2 -2
- package/dist/useCropperCore.d.cts +8 -8
- package/dist/useCropperCore.d.ts +8 -8
- package/dist/useDynamicFormState.d.cts +6 -6
- package/dist/useDynamicFormState.d.ts +6 -6
- package/dist/useFullscreen.d.cts +2 -2
- package/dist/useFullscreen.d.ts +2 -2
- package/dist/useInfiniteScroll.d.cts +1 -1
- package/dist/useInfiniteScroll.d.ts +1 -1
- package/dist/useQRCode.d.cts +1 -1
- package/dist/useQRCode.d.ts +1 -1
- package/dist/useSignatureHistory.d.cts +4 -4
- package/dist/useSignatureHistory.d.ts +4 -4
- package/dist/useSplitResize.d.cts +1 -1
- package/dist/useSplitResize.d.ts +1 -1
- package/dist/verification.d.cts +2 -2
- package/dist/verification.d.ts +2 -2
- package/docs/guides/form-density.md +11 -5
- package/docs/guides/table-density.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @robot-admin/naive-ui-components
|
|
2
2
|
|
|
3
|
+
## 0.24.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- C_FormModal 移除与受控模型重复的 initialValues 订阅,避免单字段输入重建整份配置;400 字段普通表单与弹窗均验证局部控件更新。
|
|
8
|
+
|
|
9
|
+
- 紧凑表单与搜索改为 4px 纵向间距、2px 空反馈预留,错误仍自然撑高。收紧紧凑表单弹窗壳并建立内部滚动高度链;移除 Grid/Dynamic 逐字段入场及 Inline/Card 布局尺寸动画,保留原生控件反馈。增加 400 字段局部更新回归,不引入额外观察器或逐字段动画节点。
|
|
10
|
+
|
|
11
|
+
## 0.24.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- C_Table 默认完整展示所有列头,解除单元格 ellipsis 对表头的连带省略。完整标题及排序筛选控件作为初始宽度、列设置及拖拽缩列的统一下限,内容测宽上限只约束数据单元格,保留原生滚动和主题。
|
|
16
|
+
|
|
3
17
|
## 0.24.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
| 按需消费 | 60 个独立组件入口、自动导入 Resolver、组件样式入口,以及表单/表格的基础样式层级 |
|
|
34
34
|
| 独立接入 | 支持全量注册与局部导入;反馈、文案和全局配置可由宿主提供,表单弹窗可接入结构兼容的 Headless CRUD |
|
|
35
35
|
|
|
36
|
-
组件库负责界面与交互;业务接口、身份权限、上传服务和第三方平台配置由应用接入。当前仓库版本 **0.24.
|
|
36
|
+
组件库负责界面与交互;业务接口、身份权限、上传服务和第三方平台配置由应用接入。当前仓库版本 **0.24.2**,版本变化见 [CHANGELOG](./CHANGELOG.md)。
|
|
37
37
|
|
|
38
38
|
表单与搜索共用 `config.density: 'compact'`:收紧字段、布局和空校验区,实际错误仍自然展开。表单弹窗默认紧凑,页脚按钮 22px;搜索可继承应用密度。紧凑数字输入默认隐藏步进按钮,保留键盘、精度和上下限,也可逐字段开启。按需设置默认值与显式覆盖见[表单密度](./docs/guides/form-density.md)。
|
|
39
39
|
|
|
@@ -241,4 +241,6 @@ const columns = [
|
|
|
241
241
|
|
|
242
242
|
测宽不额外挂载或执行 render;图标、进度条和复杂自定义内容请显式指定 width。数据与字典更新会触发新的有界测量,配置和缓存只属于当前组件实例。此版本将未声明宽度的业务列由自然布局改为有界内容宽度;既有显式布局及原生 table-layout 覆盖仍保留。
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
表头默认完整展示,不随单元格 ellipsis 配置省略。所有业务列的最小宽度计入完整标题及排序/筛选控件;初始布局、显式窄列宽、恢复列设置与拖拽缩列均受此下限保护。360px 仅限制数据内容测宽;标题更长时允许超过该值,并使用表格内部横向滚动。复杂自定义标题请配置 minWidth。
|
|
245
|
+
|
|
246
|
+
紧凑表单与搜索的纵向间距收紧至 4px,空反馈区 2px,校验按内容自然撑高。表单弹窗同步收紧并支持内部滚动;移除逐字段排队入场和布局尺寸动画。详情的左右同排展示见 Robot_Admin 产销模块。
|
package/README_EN.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
| Selective loading | 60 component entries, an auto-import resolver, component CSS and base styles for forms and tables |
|
|
34
34
|
| Application integration | Global registration or local imports; injectable feedback, locale and defaults; form dialogs compatible with structurally matching headless CRUD controllers |
|
|
35
35
|
|
|
36
|
-
The library handles UI and interaction. Applications supply business APIs, authentication, authorization, upload services and platform configuration. The current repository version is **0.24.
|
|
36
|
+
The library handles UI and interaction. Applications supply business APIs, authentication, authorization, upload services and platform configuration. The current repository version is **0.24.2**; see the [changelog](./CHANGELOG.md) for release details.
|
|
37
37
|
|
|
38
38
|
Forms and search share `config.density: 'compact'`, reducing field spacing and empty validation space while allowing errors to expand naturally. Form modals default to compact density with 22px footer buttons, and search can inherit application density. Compact numeric fields hide step buttons by default while retaining keyboard interaction, precision and limits; individual fields can enable buttons. See [form density](./docs/guides/form-density.en.md) for on-demand defaults and explicit overrides.
|
|
39
39
|
|
|
@@ -221,3 +221,7 @@ See [development and build](./docs/engineering.en.md) for individual checks and
|
|
|
221
221
|
Columns without `width` now measure their header and up to 100 evenly sampled loaded rows, using formatted, dictionary and status labels. Automatic widths default to 80–360px; use `minWidth/maxWidth` to adjust. Explicit widths (including native strings), saved column widths and `display.columnWidth` take precedence. `autoWidth: false` restores the 180px default. Long automatic cells use ellipsis and a tooltip; horizontal virtualization uses the same numeric widths.
|
|
222
222
|
|
|
223
223
|
Use `{ key: 'status', status: true }` for themed status tags, or `status: { S1B: { label: 'Review', color: 'danger' }, S1C: 'success' }`. Semantic colors and CSS colors are supported. Unknown codes stay neutral, zero/false stay valid, and explicit render functions win. Display changes never rewrite data or export policy. Measurement does not invoke render functions; give graphical/custom columns explicit widths. Data and dictionary updates remeasure a bounded sample; all caches remain component-local.
|
|
224
|
+
|
|
225
|
+
Headers display their full text by default, independently of cell ellipsis. Initial layout, explicit or restored narrow widths, and interactive resizing share a minimum that includes the entire title and its sort/filter controls. The 360px measurement cap applies only to cell content; longer headers use internal horizontal scrolling. Custom header content should declare an appropriate minWidth.
|
|
226
|
+
|
|
227
|
+
Compact forms and searches use a 4px row gap and a 2px empty feedback reserve; validation messages grow naturally. Compact form dialogs use tighter padding and internal scrolling. Per-field entrance and layout-size animations have been removed.
|
package/dist/C_Form.base.css
CHANGED
|
@@ -90,7 +90,6 @@
|
|
|
90
90
|
/* ================= 卡片样式 ================= */
|
|
91
91
|
.single-card[data-v-a53d698e],
|
|
92
92
|
.group-card[data-v-a53d698e] {
|
|
93
|
-
transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
94
93
|
border-left-width: 4px;
|
|
95
94
|
}
|
|
96
95
|
.single-card[data-v-a53d698e],
|
|
@@ -587,8 +586,6 @@
|
|
|
587
586
|
}
|
|
588
587
|
.dynamic-item-wrapper[data-v-fec8ee7f] {
|
|
589
588
|
position: relative;
|
|
590
|
-
transition: all 0.3s ease;
|
|
591
|
-
animation: fadeInUp-fec8ee7f 0.3s ease-out;
|
|
592
589
|
}
|
|
593
590
|
.dynamic-item-wrapper.is-dynamic-field[data-v-fec8ee7f] {
|
|
594
591
|
border: 1px dashed var(--n-color-primary);
|
|
@@ -607,16 +604,7 @@
|
|
|
607
604
|
white-space: nowrap;
|
|
608
605
|
color: var(--n-text-color-2);
|
|
609
606
|
}
|
|
610
|
-
|
|
611
|
-
from {
|
|
612
|
-
opacity: 0;
|
|
613
|
-
transform: translateY(10px);
|
|
614
|
-
}
|
|
615
|
-
to {
|
|
616
|
-
opacity: 1;
|
|
617
|
-
transform: translateY(0);
|
|
618
|
-
}
|
|
619
|
-
}
|
|
607
|
+
|
|
620
608
|
/* 响应式设计 */
|
|
621
609
|
@media (max-width: 768px) {
|
|
622
610
|
.dynamic-controls[data-v-fec8ee7f],
|
|
@@ -633,13 +621,6 @@ to {
|
|
|
633
621
|
margin-top: 8px;
|
|
634
622
|
}
|
|
635
623
|
}
|
|
636
|
-
/* 辅助功能 */
|
|
637
|
-
@media (prefers-reduced-motion: reduce) {
|
|
638
|
-
.dynamic-item-wrapper[data-v-fec8ee7f] {
|
|
639
|
-
animation: none !important;
|
|
640
|
-
transition: none !important;
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
624
|
@media (prefers-contrast: high) {
|
|
644
625
|
.dynamic-item-wrapper.is-dynamic-field[data-v-fec8ee7f] {
|
|
645
626
|
border-width: 2px;
|
|
@@ -690,70 +671,6 @@ to {
|
|
|
690
671
|
.c-grid-layout .grid-container[data-v-185a44af] {
|
|
691
672
|
width: 100%;
|
|
692
673
|
}
|
|
693
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af] {
|
|
694
|
-
/* 进场动画 */
|
|
695
|
-
animation: fadeInUp-185a44af 0.3s ease-out both;
|
|
696
|
-
}
|
|
697
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(1) {
|
|
698
|
-
animation-delay: 0.05s;
|
|
699
|
-
}
|
|
700
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(2) {
|
|
701
|
-
animation-delay: 0.1s;
|
|
702
|
-
}
|
|
703
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(3) {
|
|
704
|
-
animation-delay: 0.15s;
|
|
705
|
-
}
|
|
706
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(4) {
|
|
707
|
-
animation-delay: 0.2s;
|
|
708
|
-
}
|
|
709
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(5) {
|
|
710
|
-
animation-delay: 0.25s;
|
|
711
|
-
}
|
|
712
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(6) {
|
|
713
|
-
animation-delay: 0.3s;
|
|
714
|
-
}
|
|
715
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(7) {
|
|
716
|
-
animation-delay: 0.35s;
|
|
717
|
-
}
|
|
718
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(8) {
|
|
719
|
-
animation-delay: 0.4s;
|
|
720
|
-
}
|
|
721
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(9) {
|
|
722
|
-
animation-delay: 0.45s;
|
|
723
|
-
}
|
|
724
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(10) {
|
|
725
|
-
animation-delay: 0.5s;
|
|
726
|
-
}
|
|
727
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(11) {
|
|
728
|
-
animation-delay: 0.55s;
|
|
729
|
-
}
|
|
730
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(12) {
|
|
731
|
-
animation-delay: 0.6s;
|
|
732
|
-
}
|
|
733
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(13) {
|
|
734
|
-
animation-delay: 0.65s;
|
|
735
|
-
}
|
|
736
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(14) {
|
|
737
|
-
animation-delay: 0.7s;
|
|
738
|
-
}
|
|
739
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(15) {
|
|
740
|
-
animation-delay: 0.75s;
|
|
741
|
-
}
|
|
742
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(16) {
|
|
743
|
-
animation-delay: 0.8s;
|
|
744
|
-
}
|
|
745
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(17) {
|
|
746
|
-
animation-delay: 0.85s;
|
|
747
|
-
}
|
|
748
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(18) {
|
|
749
|
-
animation-delay: 0.9s;
|
|
750
|
-
}
|
|
751
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(19) {
|
|
752
|
-
animation-delay: 0.95s;
|
|
753
|
-
}
|
|
754
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(20) {
|
|
755
|
-
animation-delay: 1s;
|
|
756
|
-
}
|
|
757
674
|
.c-grid-layout[data-v-185a44af] {
|
|
758
675
|
/* 统计信息 */
|
|
759
676
|
}
|
|
@@ -763,17 +680,6 @@ to {
|
|
|
763
680
|
opacity: 0.8;
|
|
764
681
|
}
|
|
765
682
|
|
|
766
|
-
/* 动画定义 */
|
|
767
|
-
@keyframes fadeInUp-185a44af {
|
|
768
|
-
from {
|
|
769
|
-
opacity: 0;
|
|
770
|
-
transform: translateY(10px) scale(0.95);
|
|
771
|
-
}
|
|
772
|
-
to {
|
|
773
|
-
opacity: 1;
|
|
774
|
-
transform: translateY(0) scale(1);
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
683
|
/* 表单控件统一宽度 */
|
|
778
684
|
[data-v-185a44af] .n-form-item .n-form-item-blank {
|
|
779
685
|
/* 统一所有表单控件的宽度 */
|
|
@@ -791,12 +697,6 @@ to {
|
|
|
791
697
|
.c-grid-layout .config-panel .config-controls .config-item[data-v-185a44af] {
|
|
792
698
|
justify-content: space-between;
|
|
793
699
|
}
|
|
794
|
-
.c-grid-layout .grid-container[data-v-185a44af] .n-grid {
|
|
795
|
-
gap: 0.5rem !important;
|
|
796
|
-
}
|
|
797
|
-
.c-grid-layout .grid-container .grid-item .item-wrapper[data-v-185a44af] {
|
|
798
|
-
padding: 0.125rem;
|
|
799
|
-
}
|
|
800
700
|
.c-grid-layout .grid-stats[data-v-185a44af] {
|
|
801
701
|
margin-top: 0.75rem;
|
|
802
702
|
font-size: 0.875rem;
|
|
@@ -833,11 +733,9 @@ to {
|
|
|
833
733
|
.c-form-inline[data-v-711f6c00] {
|
|
834
734
|
width: 100%;
|
|
835
735
|
min-height: 0;
|
|
836
|
-
transition: all 0.3s ease;
|
|
837
736
|
}
|
|
838
737
|
.c-form-inline-item[data-v-711f6c00] {
|
|
839
738
|
min-width: 0;
|
|
840
|
-
transition: all 0.3s ease;
|
|
841
739
|
}
|
|
842
740
|
|
|
843
741
|
/* 确保内部所有表单组件都占满容器宽度 */
|
package/dist/C_Form.css
CHANGED
|
@@ -89,7 +89,6 @@
|
|
|
89
89
|
/* ================= 卡片样式 ================= */
|
|
90
90
|
.single-card[data-v-a53d698e],
|
|
91
91
|
.group-card[data-v-a53d698e] {
|
|
92
|
-
transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
93
92
|
border-left-width: 4px;
|
|
94
93
|
}
|
|
95
94
|
.single-card[data-v-a53d698e],
|
|
@@ -586,8 +585,6 @@
|
|
|
586
585
|
}
|
|
587
586
|
.dynamic-item-wrapper[data-v-fec8ee7f] {
|
|
588
587
|
position: relative;
|
|
589
|
-
transition: all 0.3s ease;
|
|
590
|
-
animation: fadeInUp-fec8ee7f 0.3s ease-out;
|
|
591
588
|
}
|
|
592
589
|
.dynamic-item-wrapper.is-dynamic-field[data-v-fec8ee7f] {
|
|
593
590
|
border: 1px dashed var(--n-color-primary);
|
|
@@ -606,16 +603,7 @@
|
|
|
606
603
|
white-space: nowrap;
|
|
607
604
|
color: var(--n-text-color-2);
|
|
608
605
|
}
|
|
609
|
-
|
|
610
|
-
from {
|
|
611
|
-
opacity: 0;
|
|
612
|
-
transform: translateY(10px);
|
|
613
|
-
}
|
|
614
|
-
to {
|
|
615
|
-
opacity: 1;
|
|
616
|
-
transform: translateY(0);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
606
|
+
|
|
619
607
|
/* 响应式设计 */
|
|
620
608
|
@media (max-width: 768px) {
|
|
621
609
|
.dynamic-controls[data-v-fec8ee7f],
|
|
@@ -632,13 +620,6 @@ to {
|
|
|
632
620
|
margin-top: 8px;
|
|
633
621
|
}
|
|
634
622
|
}
|
|
635
|
-
/* 辅助功能 */
|
|
636
|
-
@media (prefers-reduced-motion: reduce) {
|
|
637
|
-
.dynamic-item-wrapper[data-v-fec8ee7f] {
|
|
638
|
-
animation: none !important;
|
|
639
|
-
transition: none !important;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
623
|
@media (prefers-contrast: high) {
|
|
643
624
|
.dynamic-item-wrapper.is-dynamic-field[data-v-fec8ee7f] {
|
|
644
625
|
border-width: 2px;
|
|
@@ -689,70 +670,6 @@ to {
|
|
|
689
670
|
.c-grid-layout .grid-container[data-v-185a44af] {
|
|
690
671
|
width: 100%;
|
|
691
672
|
}
|
|
692
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af] {
|
|
693
|
-
/* 进场动画 */
|
|
694
|
-
animation: fadeInUp-185a44af 0.3s ease-out both;
|
|
695
|
-
}
|
|
696
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(1) {
|
|
697
|
-
animation-delay: 0.05s;
|
|
698
|
-
}
|
|
699
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(2) {
|
|
700
|
-
animation-delay: 0.1s;
|
|
701
|
-
}
|
|
702
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(3) {
|
|
703
|
-
animation-delay: 0.15s;
|
|
704
|
-
}
|
|
705
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(4) {
|
|
706
|
-
animation-delay: 0.2s;
|
|
707
|
-
}
|
|
708
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(5) {
|
|
709
|
-
animation-delay: 0.25s;
|
|
710
|
-
}
|
|
711
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(6) {
|
|
712
|
-
animation-delay: 0.3s;
|
|
713
|
-
}
|
|
714
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(7) {
|
|
715
|
-
animation-delay: 0.35s;
|
|
716
|
-
}
|
|
717
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(8) {
|
|
718
|
-
animation-delay: 0.4s;
|
|
719
|
-
}
|
|
720
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(9) {
|
|
721
|
-
animation-delay: 0.45s;
|
|
722
|
-
}
|
|
723
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(10) {
|
|
724
|
-
animation-delay: 0.5s;
|
|
725
|
-
}
|
|
726
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(11) {
|
|
727
|
-
animation-delay: 0.55s;
|
|
728
|
-
}
|
|
729
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(12) {
|
|
730
|
-
animation-delay: 0.6s;
|
|
731
|
-
}
|
|
732
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(13) {
|
|
733
|
-
animation-delay: 0.65s;
|
|
734
|
-
}
|
|
735
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(14) {
|
|
736
|
-
animation-delay: 0.7s;
|
|
737
|
-
}
|
|
738
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(15) {
|
|
739
|
-
animation-delay: 0.75s;
|
|
740
|
-
}
|
|
741
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(16) {
|
|
742
|
-
animation-delay: 0.8s;
|
|
743
|
-
}
|
|
744
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(17) {
|
|
745
|
-
animation-delay: 0.85s;
|
|
746
|
-
}
|
|
747
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(18) {
|
|
748
|
-
animation-delay: 0.9s;
|
|
749
|
-
}
|
|
750
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(19) {
|
|
751
|
-
animation-delay: 0.95s;
|
|
752
|
-
}
|
|
753
|
-
.c-grid-layout .grid-container .grid-item[data-v-185a44af]:nth-child(20) {
|
|
754
|
-
animation-delay: 1s;
|
|
755
|
-
}
|
|
756
673
|
.c-grid-layout[data-v-185a44af] {
|
|
757
674
|
/* 统计信息 */
|
|
758
675
|
}
|
|
@@ -762,17 +679,6 @@ to {
|
|
|
762
679
|
opacity: 0.8;
|
|
763
680
|
}
|
|
764
681
|
|
|
765
|
-
/* 动画定义 */
|
|
766
|
-
@keyframes fadeInUp-185a44af {
|
|
767
|
-
from {
|
|
768
|
-
opacity: 0;
|
|
769
|
-
transform: translateY(10px) scale(0.95);
|
|
770
|
-
}
|
|
771
|
-
to {
|
|
772
|
-
opacity: 1;
|
|
773
|
-
transform: translateY(0) scale(1);
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
682
|
/* 表单控件统一宽度 */
|
|
777
683
|
[data-v-185a44af] .n-form-item .n-form-item-blank {
|
|
778
684
|
/* 统一所有表单控件的宽度 */
|
|
@@ -790,12 +696,6 @@ to {
|
|
|
790
696
|
.c-grid-layout .config-panel .config-controls .config-item[data-v-185a44af] {
|
|
791
697
|
justify-content: space-between;
|
|
792
698
|
}
|
|
793
|
-
.c-grid-layout .grid-container[data-v-185a44af] .n-grid {
|
|
794
|
-
gap: 0.5rem !important;
|
|
795
|
-
}
|
|
796
|
-
.c-grid-layout .grid-container .grid-item .item-wrapper[data-v-185a44af] {
|
|
797
|
-
padding: 0.125rem;
|
|
798
|
-
}
|
|
799
699
|
.c-grid-layout .grid-stats[data-v-185a44af] {
|
|
800
700
|
margin-top: 0.75rem;
|
|
801
701
|
font-size: 0.875rem;
|
|
@@ -832,11 +732,9 @@ to {
|
|
|
832
732
|
.c-form-inline[data-v-711f6c00] {
|
|
833
733
|
width: 100%;
|
|
834
734
|
min-height: 0;
|
|
835
|
-
transition: all 0.3s ease;
|
|
836
735
|
}
|
|
837
736
|
.c-form-inline-item[data-v-711f6c00] {
|
|
838
737
|
min-width: 0;
|
|
839
|
-
transition: all 0.3s ease;
|
|
840
738
|
}
|
|
841
739
|
|
|
842
740
|
/* 确保内部所有表单组件都占满容器宽度 */
|
package/dist/C_FormModal.css
CHANGED
|
@@ -6,41 +6,54 @@
|
|
|
6
6
|
* @Description: 紧凑型数据驱动表单弹窗样式
|
|
7
7
|
* Copyright (c) 2026 by CHENY, All Rights Reserved 😎.
|
|
8
8
|
*/
|
|
9
|
-
.c-form-modal[data-v-
|
|
9
|
+
.c-form-modal[data-v-66511257] {
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
border-radius: 10px;
|
|
12
12
|
}
|
|
13
|
-
.c-form-modal[data-v-
|
|
13
|
+
.c-form-modal[data-v-66511257] .n-card-header {
|
|
14
14
|
min-height: 46px;
|
|
15
15
|
padding: 12px 16px;
|
|
16
16
|
border-bottom: 1px solid var(--n-border-color);
|
|
17
17
|
}
|
|
18
|
-
.c-form-modal[data-v-
|
|
18
|
+
.c-form-modal[data-v-66511257] .n-card-header__main {
|
|
19
19
|
font-size: 15px;
|
|
20
20
|
font-weight: 650;
|
|
21
21
|
}
|
|
22
|
-
.c-form-modal[data-v-
|
|
22
|
+
.c-form-modal[data-v-66511257] :is(.n-card-content, .n-card__content) {
|
|
23
23
|
padding: 14px 16px 8px;
|
|
24
24
|
}
|
|
25
|
-
.c-form-modal[data-v-
|
|
25
|
+
.c-form-modal[data-v-66511257] .n-form-item {
|
|
26
|
+
margin-bottom: 2px;
|
|
27
|
+
}
|
|
28
|
+
.c-form-modal[data-v-66511257] .n-card__action {
|
|
26
29
|
display: flex;
|
|
27
30
|
justify-content: flex-end;
|
|
28
31
|
padding: 10px 16px;
|
|
29
32
|
background: color-mix(in srgb, var(--n-color-modal) 94%, var(--n-border-color));
|
|
30
33
|
border-top: 1px solid var(--n-border-color);
|
|
31
34
|
}
|
|
32
|
-
.c-form-modal[data-v-67de2c49] .n-form-item {
|
|
33
|
-
margin-bottom: 2px;
|
|
34
|
-
}
|
|
35
35
|
@media (max-width: 640px) {
|
|
36
|
-
.c-form-modal[data-v-
|
|
36
|
+
.c-form-modal[data-v-66511257] :is(.n-card-content, .n-card__content) {
|
|
37
37
|
padding-inline: 12px;
|
|
38
38
|
}
|
|
39
|
-
.c-form-modal[data-v-
|
|
39
|
+
.c-form-modal[data-v-66511257] .n-card__action {
|
|
40
40
|
padding-inline: 12px;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
.c-form-modal--compact[data-v-66511257] .n-form-item {
|
|
44
|
+
margin-bottom: 0;
|
|
45
|
+
}
|
|
46
|
+
.c-form-modal--compact[data-v-66511257] .n-card-header {
|
|
47
|
+
min-height: 40px;
|
|
48
|
+
padding: 8px 12px;
|
|
49
|
+
}
|
|
50
|
+
.c-form-modal--compact[data-v-66511257] :is(.n-card-content, .n-card__content) {
|
|
51
|
+
padding: 10px 12px 8px;
|
|
52
|
+
}
|
|
53
|
+
.c-form-modal--compact[data-v-66511257] .n-card__action {
|
|
54
|
+
padding: 8px 12px;
|
|
55
|
+
}
|
|
43
56
|
|
|
44
57
|
/* layer: default */
|
|
45
|
-
.visible[data-v-
|
|
46
|
-
.px[data-v-
|
|
58
|
+
.visible[data-v-66511257]{visibility:visible;}
|
|
59
|
+
.px[data-v-66511257]{padding-left:1rem;padding-right:1rem;}
|
package/dist/C_FormModal2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./density.cjs`),t=require(`./export-helper.cjs`),n=require(`./C_ActionBar2.cjs`),r=require(`./useFormConfig.cjs`),i=require(`./helpers.cjs`);let a=require(`vue`),o=require(`naive-ui`);const s=(0,a.defineComponent)({name:`C_FormModal`,__name:`index`,props:{editor:{},options:{},config:{default:()=>({})},width:{default:`min(620px, calc(100vw - 24px))`},createText:{default:`创建`},saveText:{default:`保存`},cancelText:{default:`取消`},closable:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0}},emits:[`submit`,`close`],setup(t,{emit:s}){let c=t,l=s,u=(0,a.ref)(null),d=r.o(),f=(0,a.computed)(()=>c.config?.density??d.density??`compact`),p=(0,a.computed)({get:()=>c.editor.visible.value,set:e=>{e||y()}}),m=(0,a.computed)(()=>c.editor.title.value),h=(0,a.computed)(()=>c.editor.loading.value),g=(0,a.computed)(()=>typeof c.width==`number`?`${c.width}px`:c.width),_=(0,a.computed)({get:()=>c.editor.model.value??{},set:e=>{c.editor.setModel(e)}}),v=(0,a.computed)(()=>({...c.config,density:f.value,mode:c.editor.mode.value,
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./density.cjs`),t=require(`./export-helper.cjs`),n=require(`./C_ActionBar2.cjs`),r=require(`./useFormConfig.cjs`),i=require(`./helpers.cjs`);let a=require(`vue`),o=require(`naive-ui`);const s=(0,a.defineComponent)({name:`C_FormModal`,__name:`index`,props:{editor:{},options:{},config:{default:()=>({})},width:{default:`min(620px, calc(100vw - 24px))`},createText:{default:`创建`},saveText:{default:`保存`},cancelText:{default:`取消`},closable:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0}},emits:[`submit`,`close`],setup(t,{emit:s}){let c=t,l=s,u=(0,a.ref)(null),d=r.o(),f=(0,a.computed)(()=>c.config?.density??d.density??`compact`),p=(0,a.computed)({get:()=>c.editor.visible.value,set:e=>{e||y()}}),m=(0,a.computed)(()=>c.editor.title.value),h=(0,a.computed)(()=>c.editor.loading.value),g=(0,a.computed)(()=>typeof c.width==`number`?`${c.width}px`:c.width),_=(0,a.computed)({get:()=>c.editor.model.value??{},set:e=>{c.editor.setModel(e)}}),v=(0,a.computed)(()=>({...c.config,density:f.value,mode:c.editor.mode.value,showActions:!1,onSubmit:async(e,t)=>{if(await c.config?.onSubmit?.(e,t),t?.signal.aborted)return;let n=await c.editor.submit(e.model);t?.signal.aborted||l(`submit`,e,n)}})),y=()=>{c.editor.close(),l(`close`)},b=(0,a.computed)(()=>{let t=r.r(v.value,d),n=e.t(f.value);return{align:`right`,size:t.size??(f.value===`compact`?`tiny`:n.size),gap:n.gap,compact:f.value===`compact`}}),x=(0,a.computed)(()=>n.a([{key:`cancel`,label:c.cancelText,disabled:h,onClick:y},{key:c.editor.mode.value===`create`?`create`:`save`,label:c.editor.mode.value===`create`?c.createText:c.saveText,loading:h,onClick:async()=>{await u.value?.submit()}}]));return(e,r)=>((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.NModal),{show:p.value,"onUpdate:show":r[1]||=e=>p.value=e,preset:`card`,title:m.value,style:(0,a.normalizeStyle)({width:g.value,maxHeight:`calc(100dvh - 32px)`}),"content-style":`min-height: 0; overflow: auto`,"mask-closable":t.maskClosable,"close-on-esc":t.closeOnEsc,closable:t.closable,class:(0,a.normalizeClass)([`c-form-modal`,`c-form-modal--${f.value}`])},{action:(0,a.withCtx)(()=>[(0,a.createVNode)(n.t,{actions:x.value,config:b.value},null,8,[`actions`,`config`])]),default:(0,a.withCtx)(()=>[p.value&&t.editor.model.value?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(i.i),{key:0,ref_key:`formRef`,ref:u,modelValue:_.value,"onUpdate:modelValue":r[0]||=e=>_.value=e,options:t.options,config:v.value},(0,a.createSlots)({_:2},[(0,a.renderList)(e.$slots,(t,n)=>({name:n,fn:(0,a.withCtx)(t=>[(0,a.renderSlot)(e.$slots,n,(0,a.normalizeProps)((0,a.guardReactiveProps)(t)),void 0,!0)])}))]),1032,[`modelValue`,`options`,`config`])):(0,a.createCommentVNode)(`v-if`,!0)]),_:3},8,[`show`,`title`,`style`,`mask-closable`,`close-on-esc`,`closable`,`class`]))}});var c=t.t(s,[[`__scopeId`,`data-v-66511257`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
package/dist/C_FormModal2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./density.js";import{t}from"./export-helper.js";import{a as n,t as r}from"./C_ActionBar2.js";import{o as i,r as a}from"./useFormConfig.js";import{i as o}from"./helpers.js";import{computed as s,createBlock as c,createCommentVNode as l,createSlots as u,createVNode as d,defineComponent as f,guardReactiveProps as p,
|
|
1
|
+
import{t as e}from"./density.js";import{t}from"./export-helper.js";import{a as n,t as r}from"./C_ActionBar2.js";import{o as i,r as a}from"./useFormConfig.js";import{i as o}from"./helpers.js";import{computed as s,createBlock as c,createCommentVNode as l,createSlots as u,createVNode as d,defineComponent as f,guardReactiveProps as p,normalizeClass as m,normalizeProps as h,normalizeStyle as g,openBlock as _,ref as v,renderList as y,renderSlot as b,unref as x,withCtx as S}from"vue";import{NModal as C}from"naive-ui";var w=t(f({name:`C_FormModal`,__name:`index`,props:{editor:{},options:{},config:{default:()=>({})},width:{default:`min(620px, calc(100vw - 24px))`},createText:{default:`创建`},saveText:{default:`保存`},cancelText:{default:`取消`},closable:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0}},emits:[`submit`,`close`],setup(t,{emit:f}){let w=t,T=f,E=v(null),D=i(),O=s(()=>w.config?.density??D.density??`compact`),k=s({get:()=>w.editor.visible.value,set:e=>{e||F()}}),A=s(()=>w.editor.title.value),j=s(()=>w.editor.loading.value),M=s(()=>typeof w.width==`number`?`${w.width}px`:w.width),N=s({get:()=>w.editor.model.value??{},set:e=>{w.editor.setModel(e)}}),P=s(()=>({...w.config,density:O.value,mode:w.editor.mode.value,showActions:!1,onSubmit:async(e,t)=>{if(await w.config?.onSubmit?.(e,t),t?.signal.aborted)return;let n=await w.editor.submit(e.model);t?.signal.aborted||T(`submit`,e,n)}})),F=()=>{w.editor.close(),T(`close`)},I=s(()=>{let t=a(P.value,D),n=e(O.value);return{align:`right`,size:t.size??(O.value===`compact`?`tiny`:n.size),gap:n.gap,compact:O.value===`compact`}}),L=s(()=>n([{key:`cancel`,label:w.cancelText,disabled:j,onClick:F},{key:w.editor.mode.value===`create`?`create`:`save`,label:w.editor.mode.value===`create`?w.createText:w.saveText,loading:j,onClick:async()=>{await E.value?.submit()}}]));return(e,n)=>(_(),c(x(C),{show:k.value,"onUpdate:show":n[1]||=e=>k.value=e,preset:`card`,title:A.value,style:g({width:M.value,maxHeight:`calc(100dvh - 32px)`}),"content-style":`min-height: 0; overflow: auto`,"mask-closable":t.maskClosable,"close-on-esc":t.closeOnEsc,closable:t.closable,class:m([`c-form-modal`,`c-form-modal--${O.value}`])},{action:S(()=>[d(r,{actions:L.value,config:I.value},null,8,[`actions`,`config`])]),default:S(()=>[k.value&&t.editor.model.value?(_(),c(x(o),{key:0,ref_key:`formRef`,ref:E,modelValue:N.value,"onUpdate:modelValue":n[0]||=e=>N.value=e,options:t.options,config:P.value},u({_:2},[y(e.$slots,(t,n)=>({name:n,fn:S(t=>[b(e.$slots,n,h(p(t)),void 0,!0)])}))]),1032,[`modelValue`,`options`,`config`])):l(`v-if`,!0)]),_:3},8,[`show`,`title`,`style`,`mask-closable`,`close-on-esc`,`closable`,`class`]))}}),[[`__scopeId`,`data-v-66511257`]]);export{w as t};
|