@tmagic/form 1.8.0-beta.7 → 1.8.0-manmanyu.10

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.
Files changed (72) hide show
  1. package/dist/es/Form.vue_vue_type_script_setup_true_lang.js +45 -6
  2. package/dist/es/FormBox.vue_vue_type_script_setup_true_lang.js +1 -1
  3. package/dist/es/FormDialog.vue_vue_type_script_setup_true_lang.js +13 -6
  4. package/dist/es/FormDrawer.vue_vue_type_script_setup_true_lang.js +38 -13
  5. package/dist/es/containers/Col.vue_vue_type_script_setup_true_lang.js +1 -1
  6. package/dist/es/containers/Container.vue_vue_type_script_setup_true_lang.js +22 -17
  7. package/dist/es/containers/Fieldset.vue_vue_type_script_setup_true_lang.js +1 -1
  8. package/dist/es/containers/FlexLayout.vue_vue_type_script_setup_true_lang.js +1 -1
  9. package/dist/es/containers/FormLabel.vue_vue_type_script_setup_true_lang.js +1 -1
  10. package/dist/es/containers/GroupList.vue_vue_type_script_setup_true_lang.js +1 -1
  11. package/dist/es/containers/GroupListItem.vue_vue_type_script_setup_true_lang.js +23 -19
  12. package/dist/es/containers/Panel.vue_vue_type_script_setup_true_lang.js +17 -11
  13. package/dist/es/containers/Row.vue_vue_type_script_setup_true_lang.js +1 -1
  14. package/dist/es/containers/Step.vue_vue_type_script_setup_true_lang.js +1 -1
  15. package/dist/es/containers/Tabs.vue_vue_type_script_setup_true_lang.js +1 -1
  16. package/dist/es/containers/table/ActionsColumn.vue_vue_type_script_setup_true_lang.js +14 -7
  17. package/dist/es/containers/table/SortColumn.vue_vue_type_script_setup_true_lang.js +1 -1
  18. package/dist/es/containers/table/Table.vue_vue_type_script_setup_true_lang.js +1 -1
  19. package/dist/es/containers/table/useTableColumns.js +5 -2
  20. package/dist/es/containers/table-group-list/TableGroupList.vue_vue_type_script_setup_true_lang.js +3 -2
  21. package/dist/es/fields/Cascader.vue_vue_type_script_setup_true_lang.js +5 -2
  22. package/dist/es/fields/Checkbox.vue_vue_type_script_setup_true_lang.js +5 -2
  23. package/dist/es/fields/CheckboxGroup.vue_vue_type_script_setup_true_lang.js +5 -2
  24. package/dist/es/fields/ColorPicker.vue_vue_type_script_setup_true_lang.js +5 -2
  25. package/dist/es/fields/Date.vue_vue_type_script_setup_true_lang.js +5 -2
  26. package/dist/es/fields/DateTime.vue_vue_type_script_setup_true_lang.js +5 -2
  27. package/dist/es/fields/Daterange.vue_vue_type_script_setup_true_lang.js +5 -2
  28. package/dist/es/fields/Display.vue_vue_type_script_setup_true_lang.js +5 -2
  29. package/dist/es/fields/DynamicField.vue_vue_type_script_setup_true_lang.js +5 -2
  30. package/dist/es/fields/Hidden.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/dist/es/fields/Link.vue_vue_type_script_setup_true_lang.js +30 -8
  32. package/dist/es/fields/Number.vue_vue_type_script_setup_true_lang.js +5 -2
  33. package/dist/es/fields/NumberRange.vue_vue_type_script_setup_true_lang.js +5 -2
  34. package/dist/es/fields/RadioGroup.vue_vue_type_script_setup_true_lang.js +17 -9
  35. package/dist/es/fields/Select.vue_vue_type_script_setup_true_lang.js +5 -2
  36. package/dist/es/fields/Switch.vue_vue_type_script_setup_true_lang.js +5 -2
  37. package/dist/es/fields/Text.vue_vue_type_script_setup_true_lang.js +113 -78
  38. package/dist/es/fields/Textarea.vue_vue_type_script_setup_true_lang.js +5 -2
  39. package/dist/es/fields/Time.vue_vue_type_script_setup_true_lang.js +5 -2
  40. package/dist/es/fields/Timerange.vue_vue_type_script_setup_true_lang.js +5 -2
  41. package/dist/es/plugin.js +2 -0
  42. package/dist/es/style.css +120 -8
  43. package/dist/es/utils/form.js +2 -2
  44. package/dist/style.css +120 -8
  45. package/dist/themes/magic-admin.css +494 -0
  46. package/dist/tmagic-form.umd.cjs +1850 -1640
  47. package/package.json +5 -5
  48. package/src/Form.vue +53 -4
  49. package/src/FormDialog.vue +14 -3
  50. package/src/FormDrawer.vue +40 -12
  51. package/src/containers/Container.vue +14 -5
  52. package/src/containers/GroupListItem.vue +14 -12
  53. package/src/containers/Panel.vue +10 -3
  54. package/src/containers/table/ActionsColumn.vue +10 -4
  55. package/src/containers/table/useTableColumns.ts +8 -2
  56. package/src/containers/table-group-list/TableGroupList.vue +7 -1
  57. package/src/fields/Link.vue +17 -3
  58. package/src/fields/RadioGroup.vue +11 -5
  59. package/src/fields/Text.vue +43 -19
  60. package/src/plugin.ts +2 -0
  61. package/src/theme/container.scss +3 -0
  62. package/src/theme/fieldset.scss +50 -0
  63. package/src/theme/form.scss +6 -0
  64. package/src/theme/group-list.scss +8 -7
  65. package/src/theme/index.scss +1 -0
  66. package/src/theme/link.scss +17 -0
  67. package/src/theme/panel.scss +1 -1
  68. package/src/theme/radio-group.scss +23 -0
  69. package/src/theme/tabs.scss +2 -2
  70. package/src/theme/text.scss +38 -0
  71. package/src/theme/themes/magic-admin/index.scss +91 -0
  72. package/types/index.d.ts +46 -1
@@ -1,6 +1,31 @@
1
1
  <template>
2
- <div class="m-fields-text">
2
+ <div :class="['m-fields-text', { 'm-fields-text--static': config.static }]">
3
+ <div v-if="config.disabled"></div>
4
+ <!-- 新增静态展示文本样式 -->
5
+ <template v-if="config.static">
6
+ <span v-if="config.prepend" class="m-fields-text__prepend">{{ config.prepend }}</span>
7
+ <span class="m-fields-text__value">{{ value }}</span>
8
+ <template v-if="appendConfig">
9
+ <TMagicButton
10
+ v-if="appendConfig.type === 'button'"
11
+ style="color: #0056ea"
12
+ :size="size"
13
+ @click.prevent="buttonClickHandler"
14
+ >
15
+ {{ appendConfig.text }}
16
+ </TMagicButton>
17
+ <img
18
+ v-else-if="appendConfig.type === 'icon'"
19
+ class="m-fields-text__icon"
20
+ :src="appendConfig.text"
21
+ @click="buttonClickHandler"
22
+ />
23
+ <span v-else>{{ appendConfig.text }}</span>
24
+ </template>
25
+ </template>
26
+
3
27
  <TMagicInput
28
+ v-else
4
29
  v-model="value"
5
30
  ref="input"
6
31
  :clearable="config.clearable ?? true"
@@ -17,17 +42,18 @@
17
42
  <template #append v-if="appendConfig">
18
43
  <TMagicButton
19
44
  v-if="appendConfig.type === 'button'"
20
- style="color: #409eff"
45
+ style="color: #0056ea"
21
46
  :size="size"
22
47
  @click.prevent="buttonClickHandler"
23
48
  >
24
49
  {{ appendConfig.text }}
25
50
  </TMagicButton>
51
+ <img v-else-if="appendConfig.type === 'icon'" :src="appendConfig.text" @click="buttonClickHandler" />
26
52
  <span v-else>{{ appendConfig.text }}</span>
27
53
  </template>
28
54
  </TMagicInput>
29
55
 
30
- <Teleport to="body">
56
+ <Teleport to="body" v-if="!config.static">
31
57
  <div v-if="popoverVisible" class="tmagic-form-text-popper m-form-item__content" ref="popoverEl">
32
58
  <div class="m-form-validate__warning">输入内容前后有空格,是否移除空格?</div>
33
59
  <div style="display: flex; justify-content: flex-end">
@@ -80,28 +106,26 @@ watch(
80
106
  );
81
107
 
82
108
  const appendConfig = computed(() => {
83
- if (typeof props.config.append === 'string') {
109
+ const { append } = props.config;
110
+
111
+ // 字符串形态:纯文本 append。
112
+ if (typeof append === 'string') {
84
113
  return {
85
114
  type: 'text',
86
- text: props.config.append,
115
+ text: append,
87
116
  handler: undefined,
88
117
  };
89
118
  }
90
- if (typeof props.config.append === 'object') {
91
- if (typeof props.config.append?.handler === 'function') {
92
- return {
93
- type: 'button',
94
- text: props.config.append.text,
95
- handler: props.config.append.handler,
96
- };
97
- }
98
- if (props.config.append) {
99
- if (props.config.append.value === 0) {
100
- return false;
101
- }
102
119
 
103
- return props.config.append;
104
- }
120
+ // 对象形态:按 schema 定义,`type` 可为 `'button' | 'icon'`,`handler` 可选。
121
+ //
122
+ // 旧逻辑里只要带 handler 就强制覆盖为 `type: 'button'`,导致 schema 中显式传入的
123
+ // `type: 'icon'` 在到达模板前被抹掉(参见 `@editor/utils/props.ts` 中 ID 字段
124
+ // 的复制按钮配置)。这里直接返回原对象,模板按 `type` 分支渲染 button / icon / text。
125
+ if (typeof append === 'object' && append) {
126
+ // `value === 0` 沿用旧约定:作为「隐藏 append」的开关。
127
+ if (append.value === 0) return false;
128
+ return append;
105
129
  }
106
130
 
107
131
  return false;
package/src/plugin.ts CHANGED
@@ -49,6 +49,7 @@ import Timerange from './fields/Timerange.vue';
49
49
  import { setConfig } from './utils/config';
50
50
  import Form from './Form.vue';
51
51
  import FormDialog from './FormDialog.vue';
52
+ import FormDrawer from './FormDrawer.vue';
52
53
 
53
54
  import './theme/index.scss';
54
55
 
@@ -67,6 +68,7 @@ export default {
67
68
 
68
69
  app.component('m-form', Form);
69
70
  app.component('m-form-dialog', FormDialog);
71
+ app.component('m-form-drawer', FormDrawer);
70
72
  app.component('m-form-container', Container);
71
73
  app.component('m-form-fieldset', Fieldset);
72
74
  app.component('m-form-group-list', TableGroupList);
@@ -22,4 +22,7 @@
22
22
  background: #f7dadd;
23
23
  }
24
24
  }
25
+ .m-form-title-extra {
26
+ margin-left: 8px;
27
+ }
25
28
  }
@@ -1,3 +1,53 @@
1
+ .m-container-fieldset {
2
+ &.no-border-fieldset {
3
+ &.fieldset-in-row {
4
+ > fieldset.m-fieldset {
5
+ legend {
6
+ left: 0;
7
+ }
8
+ }
9
+ }
10
+ > fieldset.m-fieldset {
11
+ border: 0;
12
+ legend {
13
+ position: relative;
14
+ left: -5px;
15
+ font-size: 16px;
16
+ font-weight: 500;
17
+ line-height: 24px;
18
+ padding: 0;
19
+ }
20
+ }
21
+ }
22
+ &.fieldset-in-card-fit {
23
+ border-bottom: 1px solid #e6e6e6;
24
+ > fieldset.m-fieldset {
25
+ padding: 16px 0 16px 0 !important;
26
+ border: 0;
27
+ margin-top: 0;
28
+ margin-bottom: 0;
29
+ legend {
30
+ position: relative;
31
+ top: 10px;
32
+ }
33
+ }
34
+ &.fieldset-in-card-fit-last {
35
+ padding-bottom: 0 !important;
36
+ border-bottom: 0;
37
+ }
38
+ &.fieldset-in-card-fit-first {
39
+ padding-top: 0 !important;
40
+ }
41
+ &:last-child {
42
+ padding-bottom: 0 !important;
43
+ border-bottom: 0;
44
+ }
45
+ &:first {
46
+ padding-top: 0 !important;
47
+ }
48
+ }
49
+ }
50
+
1
51
  fieldset.m-fieldset {
2
52
  position: relative;
3
53
  border: 1px solid rgb(229, 229, 229);
@@ -53,3 +53,9 @@
53
53
  margin-bottom: var(--td-comp-margin-xxl);
54
54
  }
55
55
  }
56
+
57
+ .m-form-container {
58
+ .m-form-container-expand {
59
+ text-align: center;
60
+ }
61
+ }
@@ -1,4 +1,8 @@
1
1
  .m-fields-group-list {
2
+ .m-fields-group-list-item.tmagic-design-card--flat:last-child {
3
+ border: 0;
4
+ }
5
+
2
6
  .el-button--text {
3
7
  padding: 0;
4
8
  margin-bottom: 7px;
@@ -19,14 +23,11 @@
19
23
  &:last-of-type {
20
24
  border-bottom: 0;
21
25
  }
22
- }
23
26
 
24
- .tmagic-design-card {
25
- .el-card__header {
26
- padding: 5px 20px;
27
- }
28
- .t-card__header {
29
- padding: 5px 0;
27
+ .m-fields-group-list-item-header {
28
+ display: flex;
29
+ align-items: center;
30
+ gap: 8px;
30
31
  }
31
32
  }
32
33
 
@@ -13,3 +13,4 @@
13
13
  @use "./tabs.scss";
14
14
  @use "./number-range.scss";
15
15
  @use "./form-box.scss";
16
+ @use "./radio-group.scss";
@@ -1,3 +1,20 @@
1
1
  div.m-fields-link {
2
2
  width: fit-content;
3
3
  }
4
+ a.magic-admin-link {
5
+ width: calc(100%);
6
+ box-sizing: border-box;
7
+ border-radius: 4px;
8
+ border: 1px solid #e6e6e6;
9
+ background-color: #fafafa;
10
+ padding: 0 8px;
11
+ height: 28px;
12
+ display: inline-flex;
13
+ gap: 4px;
14
+ align-items: center;
15
+ text-decoration: none;
16
+
17
+ i {
18
+ margin-right: 4px;
19
+ }
20
+ }
@@ -4,7 +4,7 @@
4
4
  background: #f2f6fc;
5
5
  }
6
6
  a {
7
- color: #409eff;
7
+ color: var(--el-color-primary, #409eff);
8
8
  }
9
9
  }
10
10
 
@@ -0,0 +1,23 @@
1
+ // 单个 radio option 的内容容器:横向排列 icon + 文本,垂直居中对齐。
2
+ // 这样多行文本(`text: '内联布局\n inline'`)能跟左侧 icon 在视觉中线对齐,
3
+ // 不会出现 icon 顶到第一行的错位。
4
+ .m-fields-radio-group__option {
5
+ display: flex;
6
+ align-items: center;
7
+ }
8
+
9
+ .m-fields-radio-group__text {
10
+ // `inline-block` 关键:inline span 的 line-height 会被父级 inline formatting
11
+ // context(如 `.el-radio-button__inner` 的 strut)覆盖,外观高度量出来会比
12
+ // `line-height` 大;显式声明 `inline-block` 让 span 有独立的格式化上下文,
13
+ // 自身 line-height 才真正生效。
14
+ display: inline-block;
15
+ vertical-align: middle;
16
+ // `pre-line` 让 `\n` 渲染为换行,同时保留自动折行。
17
+ white-space: pre-line;
18
+ line-height: 20px;
19
+ }
20
+
21
+ .m-fields-radio-group__icon_with_text {
22
+ margin-right: 8px;
23
+ }
@@ -5,8 +5,8 @@
5
5
  margin-right: auto;
6
6
  min-width: 50px;
7
7
  outline: none;
8
- border-color: #409eff;
9
- color: #409eff;
8
+ border-color: var(--el-color-primary, #409eff);
9
+ color: var(--el-color-primary, #409eff);
10
10
  width: 10px;
11
11
  &::before {
12
12
  content: "添加";
@@ -2,6 +2,30 @@
2
2
  display: flex;
3
3
  align-items: center;
4
4
  width: 100%;
5
+
6
+ // 纯文本(非输入框)形态:保留 prepend / append 槽位的横向布局。
7
+ // 配合 `TextConfig.static = true` 使用,常见于 ID 之类「只读 + 操作 icon」场景。
8
+ &--static {
9
+ gap: 6px;
10
+ min-height: 32px;
11
+
12
+ .m-fields-text__prepend {
13
+ color: var(--el-text-color-secondary, #909399);
14
+ }
15
+
16
+ .m-fields-text__value {
17
+ color: var(--el-text-color-regular, #606266);
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ white-space: nowrap;
21
+ }
22
+
23
+ .m-fields-text__icon {
24
+ width: 16px;
25
+ height: 16px;
26
+ cursor: pointer;
27
+ }
28
+ }
5
29
  }
6
30
 
7
31
  .m-form-validate__warning {
@@ -29,6 +53,20 @@
29
53
  }
30
54
  }
31
55
 
56
+ .m-container-text {
57
+ &.m-fields-title-container {
58
+ .tmagic-design-form-item {
59
+ .el-form-item__label {
60
+ color: #0f1113;
61
+ font-weight: 500;
62
+ font-size: 16px;
63
+ }
64
+ line-height: 24px;
65
+ margin-bottom: 16px;
66
+ }
67
+ }
68
+ }
69
+
32
70
  .tmagic-form-text-popper[data-popper-placement^="top"]
33
71
  > .tmagic-form-text-popper-arrow {
34
72
  bottom: -4px;
@@ -0,0 +1,91 @@
1
+ // magic-admin 主题:所有规则均以 `.m-form.m-form--magic-admin` 为前缀,
2
+ // 仅在 `<MForm theme="magic-admin" />` 时生效,避免污染默认样式。
3
+ @use "../../index.scss";
4
+
5
+ .m-form.m-form--magic-admin {
6
+ .m-container-tab:not(.magic-right-panel-tabs-top):not(
7
+ .magic-form-dynamic-tab
8
+ ) {
9
+ > .tmagic-design-tabs:not(.el-tabs--border-card) {
10
+ > .el-tabs__content {
11
+ background-color: #fff;
12
+ padding: 16px 16px 0 16px;
13
+ border-radius: 4px;
14
+ }
15
+ }
16
+ }
17
+
18
+ .m-container-tab.magic-form-dynamic-tab {
19
+ }
20
+
21
+ .m-form-tip {
22
+ color: rgba(0, 0, 0, 0.55);
23
+ }
24
+
25
+ .tmagic-design-form-item {
26
+ &.show-after-diff {
27
+ background: #d4edbc;
28
+ }
29
+
30
+ &.show-before-diff {
31
+ background: #fad2cf;
32
+ }
33
+ }
34
+ .m-fields-radio-group__text {
35
+ // `pre-line` 让 `\n` 渲染为换行,同时保留自动折行;线高与默认按钮组高度对齐。
36
+ white-space: pre-line;
37
+ line-height: 20px;
38
+ }
39
+ .el-form-item__content {
40
+ .tmagic-design-radio-group {
41
+ .tmagic-design-radio-button {
42
+ margin-right: 8px;
43
+ height: 32px;
44
+ .el-radio-button__inner {
45
+ outline: none !important;
46
+ border: 0 !important;
47
+ height: 32px;
48
+ height: 32px;
49
+ border-radius: 16px;
50
+ padding: 0 16px;
51
+ display: inline-flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ }
55
+ }
56
+ }
57
+ }
58
+ .m-fields-data-source-field-select .tmagic-design-button {
59
+ margin-left: 8px;
60
+ span {
61
+ font-size: 16px;
62
+ }
63
+ }
64
+
65
+ .m-fields-group-list-item.tmagic-design-card--flat {
66
+ .el-card__body {
67
+ .m-fields-table-wrap {
68
+ .m-fields-table {
69
+ .el-table__header-wrapper {
70
+ thead {
71
+ height: 48px;
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ .m-fields-group-list-item-header {
78
+ position: relative;
79
+ .delete-button {
80
+ position: absolute;
81
+ right: 0;
82
+ color: #0f1113;
83
+ }
84
+ }
85
+ }
86
+ .m-form-container {
87
+ .m-form-container-expand {
88
+ text-align: left;
89
+ }
90
+ }
91
+ }
package/types/index.d.ts CHANGED
@@ -217,6 +217,15 @@ type __VLS_Props$30 = {
217
217
  * 通过 provide 下发,对整棵表单的所有层级 Container 生效,只需在 MForm 这一层传一次。
218
218
  */
219
219
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
220
+ /**
221
+ * 主题名称:对应 `packages/form/src/theme/themes/<theme>/index.scss` 的目录名。
222
+ *
223
+ * 设置后会在表单根元素上追加 `m-form--<theme>` 修饰类,配合按需引入
224
+ * `@tmagic/form/dist/themes/<theme>.css` 即可启用主题样式。
225
+ *
226
+ * 例如:`<MForm theme="magic-admin" />` + `import '@tmagic/form/dist/themes/magic-admin.css'`。
227
+ */
228
+ theme?: string;
220
229
  };
221
230
  declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$30, {
222
231
  values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
@@ -284,6 +293,12 @@ type __VLS_Props$29 = {
284
293
  showClose?: boolean;
285
294
  showCancel?: boolean; /** 透传给内部 `MForm`,用于扩展 `formState`(如注入 `$message` / `$store` 等) */
286
295
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
296
+ /**
297
+ * 主题名。优先级:传入 `theme` prop > 祖先 `provide(M_THEME_KEY)` > 空串。
298
+ * 计算结果会再次 `provide` 出去,使得 Dialog 被 Teleport 到 body 后,内部子树
299
+ * (包括 `MForm` 以及更深的 popover / dropdown)仍能拿到主题。
300
+ */
301
+ theme?: string;
287
302
  };
288
303
  declare var __VLS_19: {}, __VLS_34: {}, __VLS_42: {};
289
304
  type __VLS_Slots$4 = {} & {
@@ -320,6 +335,7 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
320
335
  config: any;
321
336
  }) => boolean) | undefined;
322
337
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
338
+ readonly theme?: string | undefined;
323
339
  readonly onError?: ((...args: any[]) => any) | undefined;
324
340
  readonly onChange?: ((...args: any[]) => any) | undefined;
325
341
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -361,6 +377,7 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
361
377
  config: any;
362
378
  }) => boolean;
363
379
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
380
+ theme?: string;
364
381
  }> & Readonly<{
365
382
  onError?: ((...args: any[]) => any) | undefined;
366
383
  onChange?: ((...args: any[]) => any) | undefined;
@@ -452,6 +469,7 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
452
469
  config: any;
453
470
  }) => boolean;
454
471
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
472
+ theme?: string;
455
473
  }> & Readonly<{
456
474
  onError?: ((...args: any[]) => any) | undefined;
457
475
  onChange?: ((...args: any[]) => any) | undefined;
@@ -496,6 +514,7 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
496
514
  config: any;
497
515
  }) => boolean) | undefined;
498
516
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
517
+ readonly theme?: string | undefined;
499
518
  readonly onError?: ((...args: any[]) => any) | undefined;
500
519
  readonly onChange?: ((...args: any[]) => any) | undefined;
501
520
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -537,6 +556,7 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
537
556
  config: any;
538
557
  }) => boolean;
539
558
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
559
+ theme?: string;
540
560
  }> & Readonly<{
541
561
  onError?: ((...args: any[]) => any) | undefined;
542
562
  onChange?: ((...args: any[]) => any) | undefined;
@@ -628,6 +648,7 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
628
648
  config: any;
629
649
  }) => boolean;
630
650
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
651
+ theme?: string;
631
652
  }> & Readonly<{
632
653
  onError?: ((...args: any[]) => any) | undefined;
633
654
  onChange?: ((...args: any[]) => any) | undefined;
@@ -699,6 +720,12 @@ type __VLS_Props$28 = {
699
720
  preventSubmitDefault?: boolean; /** 关闭前的回调,会暂停 Drawer 的关闭; done 是个 function type 接受一个 boolean 参数, 执行 done 使用 true 参数或不提供参数将会终止关闭 */
700
721
  beforeClose?: (_done: (_cancel?: boolean) => void) => void; /** 透传给内部 `MForm`,用于扩展 `formState`(如注入 `$message` / `$store` 等) */
701
722
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
723
+ /**
724
+ * 主题名。优先级:传入 `theme` prop > 祖先 `provide(M_THEME_KEY)` > 空串。
725
+ * 计算结果会再次 `provide` 出去,使得 Drawer 被 Teleport 到 body 后,内部子树
726
+ * (包括 `MForm` 以及更深的 popover / dropdown)仍能拿到主题。
727
+ */
728
+ theme?: string;
702
729
  };
703
730
  declare var __VLS_23: {}, __VLS_38: {}, __VLS_46: {};
704
731
  type __VLS_Slots$3 = {} & {
@@ -735,6 +762,7 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
735
762
  config: any;
736
763
  }) => boolean) | undefined;
737
764
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
765
+ readonly theme?: string | undefined;
738
766
  readonly onError?: ((...args: any[]) => any) | undefined;
739
767
  readonly onChange?: ((...args: any[]) => any) | undefined;
740
768
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -776,6 +804,7 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
776
804
  config: any;
777
805
  }) => boolean;
778
806
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
807
+ theme?: string;
779
808
  }> & Readonly<{
780
809
  onError?: ((...args: any[]) => any) | undefined;
781
810
  onChange?: ((...args: any[]) => any) | undefined;
@@ -867,6 +896,7 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
867
896
  config: any;
868
897
  }) => boolean;
869
898
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
899
+ theme?: string;
870
900
  }> & Readonly<{
871
901
  onError?: ((...args: any[]) => any) | undefined;
872
902
  onChange?: ((...args: any[]) => any) | undefined;
@@ -911,6 +941,7 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
911
941
  config: any;
912
942
  }) => boolean) | undefined;
913
943
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
944
+ readonly theme?: string | undefined;
914
945
  readonly onError?: ((...args: any[]) => any) | undefined;
915
946
  readonly onChange?: ((...args: any[]) => any) | undefined;
916
947
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -952,6 +983,7 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
952
983
  config: any;
953
984
  }) => boolean;
954
985
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
986
+ theme?: string;
955
987
  }> & Readonly<{
956
988
  onError?: ((...args: any[]) => any) | undefined;
957
989
  onChange?: ((...args: any[]) => any) | undefined;
@@ -1043,6 +1075,7 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
1043
1075
  config: any;
1044
1076
  }) => boolean;
1045
1077
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
1078
+ theme?: string;
1046
1079
  }> & Readonly<{
1047
1080
  onError?: ((...args: any[]) => any) | undefined;
1048
1081
  onChange?: ((...args: any[]) => any) | undefined;
@@ -1064,8 +1097,11 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
1064
1097
  }) | undefined>;
1065
1098
  saveFetch: import("@vue/reactivity").Ref<boolean, boolean>;
1066
1099
  bodyHeight: import("@vue/reactivity").Ref<number, number>;
1100
+ close: () => void;
1067
1101
  show: () => void;
1068
1102
  hide: () => void;
1103
+ save: () => Promise<void>;
1104
+ cancel: () => void;
1069
1105
  handleClose: () => void;
1070
1106
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
1071
1107
  error: (...args: any[]) => void;
@@ -1148,6 +1184,7 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
1148
1184
  config: any;
1149
1185
  }) => boolean) | undefined;
1150
1186
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
1187
+ readonly theme?: string | undefined;
1151
1188
  readonly onError?: ((...args: any[]) => any) | undefined;
1152
1189
  readonly onChange?: ((...args: any[]) => any) | undefined;
1153
1190
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -1189,6 +1226,7 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
1189
1226
  config: any;
1190
1227
  }) => boolean;
1191
1228
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
1229
+ theme?: string;
1192
1230
  }> & Readonly<{
1193
1231
  onError?: ((...args: any[]) => any) | undefined;
1194
1232
  onChange?: ((...args: any[]) => any) | undefined;
@@ -1280,6 +1318,7 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
1280
1318
  config: any;
1281
1319
  }) => boolean;
1282
1320
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
1321
+ theme?: string;
1283
1322
  }> & Readonly<{
1284
1323
  onError?: ((...args: any[]) => any) | undefined;
1285
1324
  onChange?: ((...args: any[]) => any) | undefined;
@@ -1324,6 +1363,7 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
1324
1363
  config: any;
1325
1364
  }) => boolean) | undefined;
1326
1365
  readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
1366
+ readonly theme?: string | undefined;
1327
1367
  readonly onError?: ((...args: any[]) => any) | undefined;
1328
1368
  readonly onChange?: ((...args: any[]) => any) | undefined;
1329
1369
  readonly "onField-input"?: ((...args: any[]) => any) | undefined;
@@ -1365,6 +1405,7 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
1365
1405
  config: any;
1366
1406
  }) => boolean;
1367
1407
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
1408
+ theme?: string;
1368
1409
  }> & Readonly<{
1369
1410
  onError?: ((...args: any[]) => any) | undefined;
1370
1411
  onChange?: ((...args: any[]) => any) | undefined;
@@ -1456,6 +1497,7 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
1456
1497
  config: any;
1457
1498
  }) => boolean;
1458
1499
  selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
1500
+ theme?: string;
1459
1501
  }> & Readonly<{
1460
1502
  onError?: ((...args: any[]) => any) | undefined;
1461
1503
  onChange?: ((...args: any[]) => any) | undefined;
@@ -1592,6 +1634,7 @@ type __VLS_Props$23 = {
1592
1634
  prop?: string;
1593
1635
  size?: string;
1594
1636
  disabled?: boolean;
1637
+ hideExpand?: boolean;
1595
1638
  };
1596
1639
  declare var __VLS_16: {}, __VLS_18: {};
1597
1640
  type __VLS_Slots = {} & {
@@ -1841,7 +1884,9 @@ declare const __VLS_export$4: import("@vue/runtime-core").DefineComponent<__VLS_
1841
1884
  declare const _default$8: typeof __VLS_export$4;
1842
1885
  //#endregion
1843
1886
  //#region temp/packages/form/src/fields/Link.vue.d.ts
1844
- type __VLS_Props$3 = schema_d_exports.FieldProps<schema_d_exports.LinkConfig>;
1887
+ type __VLS_Props$3 = schema_d_exports.FieldProps<schema_d_exports.LinkConfig> & {
1888
+ theme?: string;
1889
+ };
1845
1890
  declare const __VLS_export$3: import("@vue/runtime-core").DefineComponent<__VLS_Props$3, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
1846
1891
  change: (...args: any[]) => void;
1847
1892
  }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$3> & Readonly<{