@tmagic/editor 1.8.0-manmanyu.25 → 1.8.0-manmanyu.26

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/dist/es/style.css CHANGED
@@ -638,7 +638,7 @@ fieldset.m-fieldset .m-form-tip {
638
638
  font-weight: 400;
639
639
  box-sizing: border-box;
640
640
  margin: 0px;
641
- flex: 0 0 35px;
641
+ flex: 0 0 var(--editor-nav-height, 35px);
642
642
  border-bottom: 1px solid #d8dee8;
643
643
  }
644
644
  .m-editor-nav-menu > div {
@@ -1199,7 +1199,7 @@ fieldset.m-fieldset .m-form-tip {
1199
1199
  width: 100%;
1200
1200
  }
1201
1201
  .m-editor-content {
1202
- height: calc(100% - 35px);
1202
+ height: calc(100% - var(--editor-nav-height, 35px));
1203
1203
  }
1204
1204
  .m-editor-framework-center {
1205
1205
  position: relative;
package/dist/style.css CHANGED
@@ -638,7 +638,7 @@ fieldset.m-fieldset .m-form-tip {
638
638
  font-weight: 400;
639
639
  box-sizing: border-box;
640
640
  margin: 0px;
641
- flex: 0 0 35px;
641
+ flex: 0 0 var(--editor-nav-height, 35px);
642
642
  border-bottom: 1px solid #d8dee8;
643
643
  }
644
644
  .m-editor-nav-menu > div {
@@ -1199,7 +1199,7 @@ fieldset.m-fieldset .m-form-tip {
1199
1199
  width: 100%;
1200
1200
  }
1201
1201
  .m-editor-content {
1202
- height: calc(100% - 35px);
1202
+ height: calc(100% - var(--editor-nav-height, 35px));
1203
1203
  }
1204
1204
  .m-editor-framework-center {
1205
1205
  position: relative;
@@ -671,7 +671,7 @@ fieldset.m-fieldset .m-form-tip {
671
671
  font-weight: 400;
672
672
  box-sizing: border-box;
673
673
  margin: 0px;
674
- flex: 0 0 35px;
674
+ flex: 0 0 var(--editor-nav-height, 35px);
675
675
  border-bottom: 1px solid #d8dee8;
676
676
  }
677
677
  .m-editor-nav-menu > div {
@@ -1232,7 +1232,7 @@ fieldset.m-fieldset .m-form-tip {
1232
1232
  width: 100%;
1233
1233
  }
1234
1234
  .m-editor-content {
1235
- height: calc(100% - 35px);
1235
+ height: calc(100% - var(--editor-nav-height, 35px));
1236
1236
  }
1237
1237
  .m-editor-framework-center {
1238
1238
  position: relative;
@@ -2761,6 +2761,9 @@ fieldset.m-fieldset .m-form-tip {
2761
2761
  opacity: 0;
2762
2762
  }
2763
2763
 
2764
+ .m-editor.m-editor--magic-admin {
2765
+ --editor-nav-height: 40px;
2766
+ }
2764
2767
  .m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header {
2765
2768
  width: 61px;
2766
2769
  padding-top: 4px;
@@ -2891,6 +2894,16 @@ fieldset.m-fieldset .m-form-tip {
2891
2894
  display: none;
2892
2895
  }
2893
2896
 
2897
+ .m-editor.m-theme--magic-admin .m-editor-nav-menu .menu-right > .menu-item > button,
2898
+ .m-editor.m-theme--magic-admin .m-editor-nav-menu .menu-left > .menu-item > button {
2899
+ color: #111;
2900
+ }
2901
+ .m-editor.m-theme--magic-admin .m-editor-nav-menu .menu-item {
2902
+ margin-right: 8px;
2903
+ }
2904
+ .m-editor.m-theme--magic-admin .m-editor-nav-menu .menu-item .el-button--small {
2905
+ font-size: 14px;
2906
+ }
2894
2907
  .m-editor.m-theme--magic-admin .m-editor-nav-menu .menu-item > button > i {
2895
2908
  font-size: 16px;
2896
2909
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.8.0-manmanyu.25",
2
+ "version": "1.8.0-manmanyu.26",
3
3
  "name": "@tmagic/editor",
4
4
  "type": "module",
5
5
  "sideEffects": [
@@ -58,11 +58,11 @@
58
58
  "moveable": "^0.53.0",
59
59
  "serialize-javascript": "^7.0.0",
60
60
  "sortablejs": "^1.15.6",
61
- "@tmagic/design": "1.8.0-manmanyu.25",
62
- "@tmagic/stage": "1.8.0-manmanyu.25",
63
- "@tmagic/table": "1.8.0-manmanyu.25",
64
- "@tmagic/form": "1.8.0-manmanyu.25",
65
- "@tmagic/utils": "1.8.0-manmanyu.25"
61
+ "@tmagic/design": "1.8.0-manmanyu.26",
62
+ "@tmagic/form": "1.8.0-manmanyu.26",
63
+ "@tmagic/stage": "1.8.0-manmanyu.26",
64
+ "@tmagic/utils": "1.8.0-manmanyu.26",
65
+ "@tmagic/table": "1.8.0-manmanyu.26"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/events": "^3.0.3",
@@ -76,7 +76,7 @@
76
76
  "type-fest": "^5.2.0",
77
77
  "typescript": "^6.0.3",
78
78
  "vue": "^3.5.38",
79
- "@tmagic/core": "1.8.0-manmanyu.25"
79
+ "@tmagic/core": "1.8.0-manmanyu.26"
80
80
  },
81
81
  "peerDependenciesMeta": {
82
82
  "typescript": {
@@ -6,7 +6,10 @@
6
6
  width: 100%;
7
7
 
8
8
  &-content {
9
- height: calc(100% - #{$nav-height});
9
+ // nav-menu.scss 的 `--editor-nav-height` 联动:默认 fallback 到 SCSS
10
+ // `$nav-height`(35px),主题覆盖时两处会同时切成同一个高度,保证 nav 和
11
+ // 主内容区总高度 = 100%。
12
+ height: calc(100% - var(--editor-nav-height, #{$nav-height}));
10
13
  }
11
14
 
12
15
  &-framework-center {
@@ -13,7 +13,11 @@
13
13
  font-weight: 400;
14
14
  box-sizing: border-box;
15
15
  margin: 0px;
16
- flex: 0 0 $nav-height;
16
+ // CSS 变量做主题化开关:默认没设 `--editor-nav-height` 时回落到
17
+ // SCSS 变量 `$nav-height`(common/var.scss,35px);主题(如 magic-admin)
18
+ // 只需在祖先节点声明 `--editor-nav-height: 40px` 即可运行时覆盖,避免
19
+ // 走 `@use with` 那条对加载顺序极敏感的 SCSS 模块配置路径。
20
+ flex: 0 0 var(--editor-nav-height, #{$nav-height});
17
21
  border-bottom: 1px solid #d8dee8;
18
22
 
19
23
  > div {
@@ -17,6 +17,12 @@
17
17
  // 仅作用于编辑器内部 DOM 的具体样式仍保留「双类」,避免误中 portal 上只挂 `m-theme--*`
18
18
  // 的节点。
19
19
  .m-editor.m-editor--magic-admin {
20
+ // 主题级 CSS 变量入口:想覆盖 nav 高度等 token 时,改这里一行即可;
21
+ // 走 CSS 级联,运行时切主题(换 `.m-editor--magic-admin` class)即可即时生效,
22
+ // 不受 SCSS `@use` 加载顺序限制。fallback 值定义在 common/var.scss,未启用主题
23
+ // 时自动回落 35px。
24
+ --editor-nav-height: 40px;
25
+
20
26
  .m-editor-sidebar {
21
27
  .m-editor-sidebar-header {
22
28
  // padding: 8px 0;
@@ -185,7 +191,19 @@
185
191
 
186
192
  .m-editor.m-theme--magic-admin {
187
193
  .m-editor-nav-menu {
194
+ .menu-right,
195
+ .menu-left {
196
+ > .menu-item {
197
+ > button {
198
+ color: #111;
199
+ }
200
+ }
201
+ }
188
202
  .menu-item {
203
+ margin-right: 8px;
204
+ .el-button--small {
205
+ font-size: 14px;
206
+ }
189
207
  > button {
190
208
  > i {
191
209
  font-size: 16px;