@tmagic/editor 1.8.0-beta.8 → 1.8.0-manmanyu.8

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 (115) hide show
  1. package/dist/es/Editor.vue_vue_type_script_setup_true_lang.js +13 -3
  2. package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +1 -4
  3. package/dist/es/components/ContentMenu.vue_vue_type_script_setup_true_lang.js +11 -4
  4. package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +9 -4
  5. package/dist/es/fields/Code.vue_vue_type_script_setup_true_lang.js +4 -1
  6. package/dist/es/fields/CodeLink.vue_vue_type_script_setup_true_lang.js +4 -1
  7. package/dist/es/fields/CodeSelect.vue_vue_type_script_setup_true_lang.js +68 -43
  8. package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +5 -1
  9. package/dist/es/fields/CondOpSelect.vue_vue_type_script_setup_true_lang.js +4 -1
  10. package/dist/es/fields/DataSourceFieldSelect/Index.vue_vue_type_script_setup_true_lang.js +10 -7
  11. package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +4 -1
  12. package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +4 -1
  13. package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +4 -1
  14. package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +4 -1
  15. package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +4 -1
  16. package/dist/es/fields/DataSourceSelect.vue_vue_type_script_setup_true_lang.js +4 -1
  17. package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +8 -2
  18. package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +101 -64
  19. package/dist/es/fields/KeyValue.vue_vue_type_script_setup_true_lang.js +4 -1
  20. package/dist/es/fields/PageFragmentSelect.vue_vue_type_script_setup_true_lang.js +4 -1
  21. package/dist/es/fields/StyleSetter/Index.vue_vue_type_script_setup_true_lang.js +5 -4
  22. package/dist/es/fields/StyleSetter/components/BackgroundPosition.vue_vue_type_script_setup_true_lang.js +4 -1
  23. package/dist/es/fields/StyleSetter/components/Border.vue_vue_type_script_setup_true_lang.js +1 -1
  24. package/dist/es/fields/StyleSetter/icons/align-items/Center.js +31 -0
  25. package/dist/es/fields/StyleSetter/icons/align-items/FlexEnd.js +31 -0
  26. package/dist/es/fields/StyleSetter/icons/align-items/FlexStart.js +31 -0
  27. package/dist/es/fields/StyleSetter/icons/align-items/SpaceAround.js +50 -0
  28. package/dist/es/fields/StyleSetter/icons/align-items/SpaceBetween.js +50 -0
  29. package/dist/es/fields/StyleSetter/icons/background-repeat/NoRepeat.js +6 -6
  30. package/dist/es/fields/StyleSetter/icons/background-repeat/Repeat.js +5 -2
  31. package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatX.js +28 -5
  32. package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatY.js +31 -5
  33. package/dist/es/fields/StyleSetter/icons/flex-direction/Column.js +10 -2
  34. package/dist/es/fields/StyleSetter/icons/flex-direction/ColumnReverse.js +10 -2
  35. package/dist/es/fields/StyleSetter/icons/flex-direction/Row.js +10 -2
  36. package/dist/es/fields/StyleSetter/icons/flex-direction/RowReverse.js +10 -2
  37. package/dist/es/fields/StyleSetter/icons/justify-content/Center.js +16 -2
  38. package/dist/es/fields/StyleSetter/icons/justify-content/FlexEnd.js +18 -2
  39. package/dist/es/fields/StyleSetter/icons/justify-content/FlexStart.js +18 -2
  40. package/dist/es/fields/StyleSetter/icons/justify-content/SpaceAround.js +36 -2
  41. package/dist/es/fields/StyleSetter/icons/justify-content/SpaceBetween.js +32 -2
  42. package/dist/es/fields/StyleSetter/pro/Background.vue_vue_type_script_setup_true_lang.js +11 -6
  43. package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +6 -3
  44. package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +82 -46
  45. package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +4 -1
  46. package/dist/es/icons/DatasourceIcon.js +17 -0
  47. package/dist/es/index.js +2 -2
  48. package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +14 -10
  49. package/dist/es/layouts/NavMenu.vue_vue_type_script_setup_true_lang.js +2 -2
  50. package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +18 -28
  51. package/dist/es/layouts/history-list/useHistoryList.js +4 -4
  52. package/dist/es/layouts/history-list/useHistoryRevert.js +6 -6
  53. package/dist/es/services/codeBlock.js +28 -32
  54. package/dist/es/services/dataSource.js +34 -43
  55. package/dist/es/services/editor.js +26 -31
  56. package/dist/es/services/history.js +392 -259
  57. package/dist/es/style.css +294 -37
  58. package/dist/es/utils/const.js +1 -1
  59. package/dist/es/utils/history.js +47 -35
  60. package/dist/es/utils/props.js +137 -31
  61. package/dist/style.css +294 -37
  62. package/dist/themes/magic-admin.css +2316 -0
  63. package/dist/tmagic-editor.umd.cjs +1665 -880
  64. package/package.json +7 -7
  65. package/src/Editor.vue +13 -1
  66. package/src/components/ContentMenu.vue +10 -2
  67. package/src/components/FloatingBox.vue +13 -2
  68. package/src/editorProps.ts +9 -0
  69. package/src/fields/CodeSelect.vue +51 -40
  70. package/src/fields/CodeSelectCol.vue +1 -0
  71. package/src/fields/DataSourceFieldSelect/Index.vue +14 -5
  72. package/src/fields/DisplayConds.vue +4 -1
  73. package/src/fields/EventSelect.vue +58 -32
  74. package/src/fields/StyleSetter/Index.vue +1 -4
  75. package/src/fields/StyleSetter/components/Border.vue +1 -1
  76. package/src/fields/StyleSetter/icons/align-items/Center.vue +19 -0
  77. package/src/fields/StyleSetter/icons/align-items/FlexEnd.vue +19 -0
  78. package/src/fields/StyleSetter/icons/align-items/FlexStart.vue +19 -0
  79. package/src/fields/StyleSetter/icons/align-items/SpaceAround.vue +34 -0
  80. package/src/fields/StyleSetter/icons/align-items/SpaceBetween.vue +34 -0
  81. package/src/fields/StyleSetter/icons/align-items/index copy.ts +5 -0
  82. package/src/fields/StyleSetter/icons/align-items/index.ts +5 -0
  83. package/src/fields/StyleSetter/icons/background-repeat/NoRepeat.vue +20 -4
  84. package/src/fields/StyleSetter/icons/background-repeat/Repeat.vue +10 -28
  85. package/src/fields/StyleSetter/icons/background-repeat/RepeatX.vue +4 -5
  86. package/src/fields/StyleSetter/icons/background-repeat/RepeatY.vue +4 -5
  87. package/src/fields/StyleSetter/icons/flex-direction/Column.vue +4 -3
  88. package/src/fields/StyleSetter/icons/flex-direction/ColumnReverse.vue +4 -3
  89. package/src/fields/StyleSetter/icons/flex-direction/Row.vue +4 -3
  90. package/src/fields/StyleSetter/icons/flex-direction/RowReverse.vue +4 -3
  91. package/src/fields/StyleSetter/icons/justify-content/Center.vue +5 -2
  92. package/src/fields/StyleSetter/icons/justify-content/FlexEnd.vue +15 -2
  93. package/src/fields/StyleSetter/icons/justify-content/FlexStart.vue +15 -2
  94. package/src/fields/StyleSetter/icons/justify-content/SpaceAround.vue +28 -3
  95. package/src/fields/StyleSetter/icons/justify-content/SpaceBetween.vue +28 -2
  96. package/src/fields/StyleSetter/pro/Background.vue +11 -5
  97. package/src/fields/StyleSetter/pro/Font.vue +3 -3
  98. package/src/fields/StyleSetter/pro/Layout.vue +105 -28
  99. package/src/fields/UISelect.vue +1 -1
  100. package/src/icons/DatasourceIcon.vue +7 -0
  101. package/src/layouts/Framework.vue +7 -1
  102. package/src/theme/code-block.scss +37 -0
  103. package/src/theme/common/var.scss +1 -1
  104. package/src/theme/component-list-panel.scss +2 -2
  105. package/src/theme/data-source-field.scss +4 -0
  106. package/src/theme/display-conds.scss +11 -0
  107. package/src/theme/event.scss +55 -1
  108. package/src/theme/history-list-panel.scss +9 -9
  109. package/src/theme/props-panel.scss +2 -1
  110. package/src/theme/style-setter/border.scss +14 -5
  111. package/src/theme/theme.scss +1 -0
  112. package/src/theme/themes/magic-admin/index.scss +125 -0
  113. package/src/utils/const.ts +2 -1
  114. package/src/utils/props.ts +138 -9
  115. package/types/index.d.ts +310 -315
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
3
+ <path
4
+ d="M6.25 9.723C4.392 9.6095 2.804 9.137 1.875 8.4775V9.7495C1.875 10.6165 3.7665 11.3365 6.25 11.4745V12.348C4.392 12.2345 2.804 11.763 1.875 11.102V12.3745H1V4.0625C1 2.371 3.742 1 7.125 1C10.507 1 13.249 2.371 13.249 4.0625V6.8255H12.374V5.6405C11.3025 6.5295 9.352 7.1245 7.1245 7.1245C4.897 7.1245 2.947 6.5295 1.8745 5.6405V7.1245C1.8745 7.9915 3.7665 8.712 6.2495 8.85L6.25 9.723ZM7.125 14.999C3.742 14.999 1 13.8245 1 12.3745H1.875C1.875 13.3415 4.225 14.124 7.125 14.124V14.999ZM7.125 6.2495C10.024 6.2495 12.3745 5.2695 12.3745 4.0625C12.3745 2.855 10.0245 1.875 7.1245 1.875C4.225 1.875 1.8745 2.855 1.8745 4.0625C1.8745 5.2695 4.2255 6.2495 7.125 6.2495ZM14.7385 11.9895L14.1295 11.6345C14.1635 11.4485 14.1855 11.2585 14.1855 11.062C14.1843 10.8697 14.1655 10.6779 14.1295 10.489L14.7385 10.134C14.988 9.987 15.073 9.667 14.929 9.416L14.409 8.507C14.3752 8.44726 14.3299 8.39483 14.2757 8.35275C14.2215 8.31066 14.1595 8.27977 14.0933 8.26186C14.027 8.24395 13.9579 8.23938 13.8898 8.24842C13.8218 8.25745 13.7563 8.27992 13.697 8.3145L13.081 8.6735C12.7931 8.42269 12.4616 8.22694 12.103 8.096V7.6495C12.103 7.36 11.8705 7.1245 11.5825 7.1245H10.5415C10.4728 7.12476 10.4049 7.13855 10.3415 7.16507C10.2782 7.1916 10.2206 7.23034 10.1723 7.2791C10.1239 7.32785 10.0856 7.38565 10.0595 7.4492C10.0335 7.51276 10.0202 7.58082 10.0205 7.6495V8.096C9.66186 8.22694 9.33035 8.42269 9.0425 8.6735L8.4265 8.3145C8.36725 8.27999 8.30174 8.2576 8.23377 8.2486C8.1658 8.23961 8.09672 8.24419 8.03053 8.2621C7.96435 8.28001 7.90238 8.31088 7.84821 8.35292C7.79405 8.39495 7.74877 8.44733 7.715 8.507L7.195 9.417C7.12576 9.53751 7.10688 9.68047 7.14246 9.81482C7.17804 9.94917 7.2652 10.0641 7.385 10.1345L7.9945 10.489C7.9585 10.6775 7.9395 10.8695 7.9385 11.062C7.9385 11.2585 7.96 11.4485 7.9945 11.635L7.3855 11.99C7.1355 12.1365 7.0505 12.4565 7.1945 12.7075L7.715 13.6165C7.74877 13.6762 7.79405 13.7285 7.84821 13.7706C7.90238 13.8126 7.96435 13.8435 8.03053 13.8614C8.09672 13.8793 8.1658 13.8839 8.23377 13.8749C8.30174 13.8659 8.36725 13.8435 8.4265 13.809L9.0425 13.4505C9.33023 13.7015 9.66178 13.8972 10.0205 14.028V14.474C10.0205 14.764 10.2535 14.999 10.5415 14.999H11.5825C11.7211 14.9983 11.8538 14.9427 11.9514 14.8442C12.049 14.7458 12.1035 14.6126 12.103 14.474V14.028C12.4616 13.8971 12.7931 13.7013 13.081 13.4505L13.697 13.809C13.7563 13.8434 13.8218 13.8657 13.8897 13.8746C13.9577 13.8835 14.0267 13.8789 14.0929 13.861C14.159 13.8431 14.221 13.8123 14.2751 13.7703C14.3293 13.7283 14.3746 13.6761 14.4085 13.6165L14.929 12.7065C14.998 12.586 15.0168 12.4431 14.9811 12.3089C14.9454 12.1746 14.8583 12.0599 14.7385 11.9895ZM14.092 12.5065L13.852 12.915C13.8193 12.9693 13.7667 13.0086 13.7054 13.0246C13.6441 13.0406 13.579 13.0319 13.524 13.0005L12.8575 12.623C12.5109 13.0069 12.0497 13.2688 11.5425 13.37V13.889C11.5425 14.0185 11.4345 14.124 11.3015 14.124H10.822C10.7907 14.1243 10.7597 14.1184 10.7308 14.1067C10.7018 14.0949 10.6754 14.0776 10.6531 14.0557C10.6308 14.0338 10.6131 14.0077 10.6009 13.9789C10.5887 13.9502 10.5823 13.9193 10.582 13.888V13.37C10.0746 13.2689 9.61328 13.007 9.2665 12.623L8.6 13C8.54495 13.0316 8.47971 13.0403 8.4183 13.0243C8.35688 13.0083 8.30418 12.9689 8.2715 12.9145L8.0315 12.506C8.01582 12.4792 8.00564 12.4496 8.00158 12.4189C7.99752 12.3881 7.99965 12.3569 8.00785 12.327C8.01605 12.297 8.03016 12.2691 8.04933 12.2447C8.0685 12.2203 8.09236 12.2 8.1195 12.185L8.789 11.805C8.70604 11.5658 8.66313 11.3146 8.662 11.0615C8.662 10.8005 8.709 10.552 8.7895 10.3175L8.1195 9.9375C8.09247 9.92244 8.06872 9.90213 8.04964 9.87777C8.03056 9.85341 8.01654 9.82549 8.00839 9.79564C8.00024 9.76579 7.99813 9.73461 8.00218 9.70394C8.00624 9.67326 8.01637 9.64371 8.032 9.617L8.272 9.208C8.30467 9.15373 8.35729 9.1144 8.41858 9.09843C8.47988 9.08245 8.54499 9.09109 8.6 9.1225L9.2665 9.5005C9.61315 9.11663 10.0743 8.85468 10.5815 8.7535V8.235C10.5815 8.105 10.689 8 10.822 8H11.302C11.4345 8 11.542 8.105 11.542 8.236V8.754C12.0492 8.85518 12.5104 9.11713 12.857 9.501L13.524 9.123C13.579 9.09159 13.6441 9.08295 13.7054 9.09893C13.7667 9.1149 13.8193 9.15423 13.852 9.2085L14.092 9.6175C14.1077 9.64423 14.1179 9.67383 14.122 9.70455C14.1261 9.73528 14.124 9.76652 14.1159 9.79643C14.1077 9.82634 14.0937 9.85431 14.0745 9.87871C14.0554 9.90311 14.0316 9.92344 14.0045 9.9385L13.335 10.3185C13.4135 10.5525 13.462 10.801 13.462 11.062C13.462 11.3225 13.4145 11.571 13.335 11.8055L14.0045 12.1855C14.0316 12.2006 14.0554 12.2209 14.0745 12.2453C14.0937 12.2697 14.1077 12.2977 14.1159 12.3276C14.124 12.3575 14.1261 12.3887 14.122 12.4194C14.1179 12.4502 14.1077 12.4798 14.092 12.5065ZM11.062 9.7495C10.7139 9.7495 10.3801 9.88778 10.1339 10.1339C9.88778 10.3801 9.7495 10.7139 9.7495 11.062C9.7495 11.4101 9.88778 11.7439 10.1339 11.9901C10.3801 12.2362 10.7139 12.3745 11.062 12.3745C11.4101 12.3745 11.7439 12.2362 11.9901 11.9901C12.2362 11.7439 12.3745 11.4101 12.3745 11.062C12.3745 10.7139 12.2362 10.3801 11.9901 10.1339C11.7439 9.88778 11.4101 9.7495 11.062 9.7495ZM11.062 11.4995C10.946 11.4995 10.8347 11.4534 10.7526 11.3714C10.6706 11.2893 10.6245 11.178 10.6245 11.062C10.6245 10.946 10.6706 10.8347 10.7526 10.7526C10.8347 10.6706 10.946 10.6245 11.062 10.6245C11.178 10.6245 11.2893 10.6706 11.3714 10.7526C11.4534 10.8347 11.4995 10.946 11.4995 11.062C11.4995 11.178 11.4534 11.2893 11.3714 11.3714C11.2893 11.4534 11.178 11.4995 11.062 11.4995Z"
5
+ />
6
+ </svg>
7
+ </template>
@@ -1,5 +1,9 @@
1
1
  <template>
2
- <div class="m-editor" ref="content" style="min-width: 900px">
2
+ <div
3
+ ref="content"
4
+ :class="['m-editor', theme ? `m-editor--${theme}` : '', theme ? `m-theme--${theme}` : '']"
5
+ style="min-width: 900px"
6
+ >
3
7
  <slot name="header"></slot>
4
8
 
5
9
  <slot name="nav"></slot>
@@ -100,6 +104,8 @@ const props = defineProps<{
100
104
  pageFilterFunction?: (_page: MPage | MPageFragment, _keyword: string) => boolean;
101
105
  /** 是否隐藏左侧面板 */
102
106
  hideSidebar?: boolean;
107
+ /** 主题名称,会在根节点追加 `m-editor--<theme>` 修饰类 */
108
+ theme?: string;
103
109
  }>();
104
110
 
105
111
  const codeOptions = inject('codeOptions', {});
@@ -1,3 +1,40 @@
1
1
  .m-fields-code-select {
2
2
  width: 100%;
3
+ > .el-card.tmagic-design-card--flat {
4
+ background-color: transparent;
5
+ margin-bottom: 10px;
6
+ > .el-card__body {
7
+ padding-left: 0;
8
+ .code-select-content {
9
+ > .m-fields-group-list {
10
+ > .tmagic-design-card--flat.el-card {
11
+ padding-left: 16px;
12
+ padding-right: 16px;
13
+ margin-bottom: 10px;
14
+ border: 0 !important;
15
+ }
16
+ }
17
+ }
18
+ }
19
+ }
20
+ .el-card__body {
21
+ .tmagic-design-form-item {
22
+ margin-bottom: 18px;
23
+ }
24
+ }
25
+ .code-select-content {
26
+ > .m-fields-group-list {
27
+ > .tmagic-design-card--flat {
28
+ > .el-card__header {
29
+ padding: 16px 0;
30
+ }
31
+ }
32
+ }
33
+ }
34
+ .create-button {
35
+ &.fullWidth {
36
+ width: 100%;
37
+ margin: 0 0 16px 0;
38
+ }
39
+ }
3
40
  }
@@ -1,4 +1,4 @@
1
- $theme-color: #2882e0;
1
+ $theme-color: var(--el-color-primary, #2882e0);
2
2
 
3
3
  $font-color: #313a40;
4
4
  $border-color: #d9dbdd;
@@ -77,9 +77,9 @@
77
77
  margin-bottom: 5px;
78
78
 
79
79
  &:hover {
80
- background: #2882e0;
80
+ background: var(--el-color-primary, #2882e0);
81
81
  color: #fff;
82
- border-color: #4e8be1;
82
+ border-color: var(--el-color-primary, #4e8be1);
83
83
  }
84
84
  }
85
85
 
@@ -5,6 +5,10 @@
5
5
  width: 100%;
6
6
  display: flex;
7
7
  align-items: center;
8
+ &.data-source-field-img-upload,
9
+ &.data-source-field-big-img-upload {
10
+ align-items: flex-start;
11
+ }
8
12
 
9
13
  .m-fields-select-action-button {
10
14
  margin-left: 5px;
@@ -0,0 +1,11 @@
1
+ .m-container-text.display-conds-title {
2
+ .tmagic-design-form-item {
3
+ .el-form-item__label {
4
+ color: #111;
5
+ font-weight: 500;
6
+ font-size: 16px;
7
+ }
8
+ line-height: 24px;
9
+ margin-bottom: 10px;
10
+ }
11
+ }
@@ -2,8 +2,29 @@
2
2
  width: 100%;
3
3
  .fullWidth {
4
4
  width: 100%;
5
+ box-sizing: border-box;
6
+ }
7
+ .event-select-container {
8
+ padding: 0 16px;
9
+ > .el-card.tmagic-design-card--flat {
10
+ > .el-card__header {
11
+ border-bottom: 1px solid #ebeef5;
12
+ }
13
+ > .el-card__body {
14
+ padding-bottom: 16px;
15
+ .m-fields-group-list-footer {
16
+ div {
17
+ justify-content: flex-start !important;
18
+ }
19
+ }
20
+ .el-card.tmagic-design-card--flat {
21
+ > .el-card__header {
22
+ padding: 16px 0;
23
+ }
24
+ }
25
+ }
26
+ }
5
27
  }
6
-
7
28
  .event-select-code {
8
29
  margin-left: 20px;
9
30
  width: auto;
@@ -35,3 +56,36 @@
35
56
  margin-right: 5px;
36
57
  }
37
58
  }
59
+
60
+ .event-select-container {
61
+ padding: 0 16px;
62
+ }
63
+
64
+ .event-select-header {
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: space-between;
68
+ margin-bottom: 8px;
69
+ .event-select-title {
70
+ color: #0f1113;
71
+ font-size: 16px;
72
+ font-weight: 500;
73
+ line-height: 24px;
74
+ }
75
+ }
76
+ .event-item-header {
77
+ position: relative;
78
+ width: 100%;
79
+ .event-item-title {
80
+ color: #0f1113;
81
+ font-size: 16px;
82
+ font-weight: 500;
83
+ line-height: 24px;
84
+ margin-bottom: 16px;
85
+ }
86
+ .event-item-delete-button {
87
+ position: absolute;
88
+ right: 0;
89
+ top: 0;
90
+ }
91
+ }
@@ -21,7 +21,7 @@
21
21
  color: #909399;
22
22
 
23
23
  &:hover {
24
- color: #409eff;
24
+ color: var(--el-color-primary, #409eff);
25
25
  }
26
26
  }
27
27
 
@@ -96,7 +96,7 @@
96
96
  // 故这里仅作用于「非合并组」的单步条目,避免与卡片样式互相干扰。
97
97
  &.is-current:not(.m-editor-history-list-group.is-merged) {
98
98
  background-color: rgba(64, 158, 255, 0.1);
99
- box-shadow: inset 2px 0 0 #409eff;
99
+ box-shadow: inset 2px 0 0 var(--el-color-primary, #409eff);
100
100
 
101
101
  &:hover {
102
102
  background-color: rgba(64, 158, 255, 0.16);
@@ -104,7 +104,7 @@
104
104
 
105
105
  .m-editor-history-list-item-desc {
106
106
  font-weight: 600;
107
- color: #409eff;
107
+ color: var(--el-color-primary, #409eff);
108
108
  }
109
109
  }
110
110
  }
@@ -177,11 +177,11 @@
177
177
  &.is-current {
178
178
  background-color: rgba(64, 158, 255, 0.08);
179
179
  border-color: rgba(64, 158, 255, 0.3);
180
- border-left-color: #409eff;
180
+ border-left-color: var(--el-color-primary, #409eff);
181
181
  box-shadow: none; // 覆盖 .is-current 公共的 inset 阴影
182
182
 
183
183
  .m-editor-history-list-group-head {
184
- color: #409eff;
184
+ color: var(--el-color-primary, #409eff);
185
185
  }
186
186
  }
187
187
  }
@@ -216,7 +216,7 @@
216
216
  }
217
217
 
218
218
  &.is-current {
219
- color: #409eff;
219
+ color: var(--el-color-primary, #409eff);
220
220
  font-weight: 600;
221
221
  background-color: rgba(64, 158, 255, 0.08);
222
222
  border-radius: 3px;
@@ -231,7 +231,7 @@
231
231
  font-size: 10px;
232
232
  line-height: 16px;
233
233
  color: #fff;
234
- background-color: #409eff;
234
+ background-color: var(--el-color-primary, #409eff);
235
235
  font-weight: 500;
236
236
  }
237
237
 
@@ -395,7 +395,7 @@
395
395
  border-radius: 2px;
396
396
  font-size: 10px;
397
397
  line-height: 16px;
398
- color: #409eff;
398
+ color: var(--el-color-primary, #409eff);
399
399
  background-color: rgba(64, 158, 255, 0.1);
400
400
  cursor: pointer;
401
401
  user-select: none;
@@ -471,7 +471,7 @@
471
471
  flex: 1 1 auto;
472
472
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
473
473
  font-size: 11px;
474
- color: #409eff;
474
+ color: var(--el-color-primary, #409eff);
475
475
  overflow: hidden;
476
476
  text-overflow: ellipsis;
477
477
  white-space: nowrap;
@@ -129,7 +129,8 @@
129
129
  > .m-container-tab {
130
130
  > .tmagic-design-tabs {
131
131
  > .el-tabs__content {
132
- padding-top: 55px;
132
+ margin-top: var(--el-tabs-header-height);
133
+ padding-top: 15px;
133
134
  }
134
135
  > .el-tabs__header.is-top {
135
136
  position: absolute;
@@ -1,5 +1,6 @@
1
1
  .border-box-container {
2
2
  display: flex;
3
+ --unuse-border-style: dashed;
3
4
  .border-icon-container {
4
5
  display: flex;
5
6
  flex-direction: column;
@@ -28,24 +29,32 @@
28
29
  border-color: var(--el-color-success, var(--td-success-color, #2ba471));
29
30
  }
30
31
  &.active {
32
+ border-color: var(--el-color-primary);
33
+ border-width: 1px;
34
+ // border-color: var(--el-color-primary, var(--td-brand-color, #0052d9));
35
+ }
36
+ &.center {
31
37
  border-width: 1px;
32
- border-color: var(--el-color-primary, var(--td-brand-color, #0052d9));
33
38
  }
34
39
  &.border-icon-top {
35
40
  border-top-width: 2px;
36
- border-style: solid dashed dashed dashed;
41
+ border-style: solid var(--unuse-border-style) var(--unuse-border-style)
42
+ var(--unuse-border-style);
37
43
  }
38
44
  &.border-icon-right {
39
45
  border-right-width: 2px;
40
- border-style: dashed solid dashed dashed;
46
+ border-style: var(--unuse-border-style) solid var(--unuse-border-style)
47
+ var(--unuse-border-style);
41
48
  }
42
49
  &.border-icon-bottom {
43
50
  border-bottom-width: 2px;
44
- border-style: dashed dashed solid dashed;
51
+ border-style: var(--unuse-border-style) var(--unuse-border-style) solid
52
+ var(--unuse-border-style);
45
53
  }
46
54
  &.border-icon-left {
47
55
  border-left-width: 2px;
48
- border-style: dashed dashed dashed solid;
56
+ border-style: var(--unuse-border-style) var(--unuse-border-style)
57
+ var(--unuse-border-style) solid;
49
58
  }
50
59
  }
51
60
  }
@@ -27,4 +27,5 @@
27
27
  @use "./page-fragment-select.scss";
28
28
  @use "./data-source-field.scss";
29
29
  @use "./data-source-field-select.scss";
30
+ @use "./display-conds.scss";
30
31
  @use "./style-setter/index.scss";
@@ -0,0 +1,125 @@
1
+ // magic-admin 主题:所有规则均以 `.m-editor.m-editor--magic-admin` 为前缀,
2
+ // 仅在 `<MEditor theme="magic-admin" />` 时生效,避免污染默认样式。
3
+
4
+ @use "@tmagic/table/src/theme/index.scss" as tMagicTable;
5
+ @use "../../theme.scss";
6
+
7
+ @use "@tmagic/design/src/theme/themes/magic-admin/index.scss" as tMagicDesign;
8
+ @use "@tmagic/form/src/theme/themes/magic-admin/index.scss" as tMagicForm;
9
+
10
+ .fade-enter-active,
11
+ .fade-leave-active {
12
+ transition: opacity 0.5s;
13
+ }
14
+ .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
15
+ opacity: 0;
16
+ }
17
+
18
+ // 仅作用于编辑器内部 DOM 的具体样式仍保留「双类」,避免误中 portal 上只挂 `m-theme--*`
19
+ // 的节点。
20
+ .m-editor.m-editor--magic-admin {
21
+ // 属性面板内的 input 圆角覆写:
22
+ // - 原默认主题里 `.m-editor-props-panel .el-input__wrapper { border-radius: 0; }`
23
+ // specificity 为 (0, 2, 0),已迁出(见 ../../props-panel.scss);
24
+ // - 这里在前面再套一层 `.m-editor.m-editor--magic-admin`,specificity 升到 (0, 3, 0),
25
+ // 保证主题启用时优先级一定能压过原规则及其它默认样式。
26
+ .m-editor-props-panel .el-input__wrapper {
27
+ border-radius: 4px;
28
+ }
29
+
30
+ .border-box-container .border-icon-container .border-icon {
31
+ border-color: #ccc;
32
+ --unuse-border-style: solid;
33
+ &.configured {
34
+ border-color: var(--el-color-success, var(--td-success-color, #2ba471));
35
+ }
36
+
37
+ &.active {
38
+ border-color: var(--el-color-primary);
39
+ background-color: rgba(0, 84, 225, 0.1);
40
+ &.center {
41
+ border-width: 2px;
42
+ }
43
+ // 命中 `.border-icon-<side>` 时只保留该侧 2px,其余三边清零。
44
+ // 用 `@each` 循环避免四面手抄;后续要加禁用、hover 等状态也可以照搬这套结构。
45
+ @each $side in (top, right, bottom, left) {
46
+ &.border-icon-#{$side} {
47
+ border-width: 0;
48
+ border-#{$side}-width: 2px;
49
+ }
50
+ }
51
+ }
52
+
53
+ &.center {
54
+ border-width: 2px;
55
+ }
56
+ border-radius: 2px;
57
+ }
58
+
59
+ .m-container-code-select {
60
+ > .el-form-item:first-child {
61
+ > .el-form-item__label:first-child > :not(.m-form-tip) {
62
+ color: #111;
63
+ font-weight: 500;
64
+ font-size: 16px;
65
+ line-height: 24px;
66
+ }
67
+ }
68
+ }
69
+ }
70
+
71
+ .m-editor.m-theme--magic-admin {
72
+ .m-editor-props-form-panel-form {
73
+ > .m-container-tab {
74
+ > .tmagic-design-tabs {
75
+ > .el-tabs__content {
76
+ background-color: #fafafa;
77
+ border-radius: 8px;
78
+ padding-left: 16px;
79
+ padding-right: 16px;
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+
86
+ .m-editor.m-theme--magic-admin {
87
+ .m-fields-style-setter {
88
+ border: 0;
89
+ .tmagic-design-collapse-item {
90
+ .el-collapse-item__wrap {
91
+ padding: 16px;
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+ .m-editor.m-theme--magic-admin {
98
+ .magic-right-panel-tabs-top {
99
+ > .el-tabs {
100
+ > .el-tabs__header {
101
+ .el-tabs__nav-wrap.is-top {
102
+ .el-tabs__nav.is-top {
103
+ .el-tabs__active-bar {
104
+ display: none;
105
+ }
106
+ .el-tabs__item {
107
+ &:not(:last-child)::after {
108
+ content: "";
109
+ position: absolute;
110
+ right: 0;
111
+ top: 50%;
112
+ transform: translateY(-50%);
113
+ height: 12px;
114
+ border-right: 1px solid #e6e6e6;
115
+ }
116
+ }
117
+ }
118
+ &::after {
119
+ display: none;
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
@@ -8,7 +8,8 @@ export const PROPS_PANEL_WIDTH_STORAGE_KEY = '$MagicEditorPropsPanelWidthData';
8
8
  export const DEFAULT_LEFT_COLUMN_WIDTH = 310;
9
9
  export const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
10
10
 
11
- export const MIN_LEFT_COLUMN_WIDTH = 200;
11
+ // 2026-06-11 设计稿修改,固定左侧栏存在时最小宽度为238px
12
+ export const MIN_LEFT_COLUMN_WIDTH = 238;
12
13
  export const MIN_CENTER_COLUMN_WIDTH = 400;
13
14
  export const MIN_RIGHT_COLUMN_WIDTH = 300;
14
15
 
@@ -131,44 +131,161 @@ export const eventTabConfig: TabPaneConfig = {
131
131
  ],
132
132
  };
133
133
 
134
+ const getReportTypeConfig = ({ reportType }: { reportType: 'click' | 'expose' }) => {
135
+ const reportLabel = {
136
+ click: '点击',
137
+ expose: '曝光',
138
+ };
139
+ const label = reportLabel[reportType];
140
+ return {
141
+ name: reportType,
142
+ style: {
143
+ backgroundColor: '#fff',
144
+ borderRadius: '4px',
145
+ padding: '16px',
146
+ marginBottom: '10px',
147
+ },
148
+ items: [
149
+ {
150
+ text: label,
151
+ static: true,
152
+ labelPosition: 'left',
153
+ labelWidth: '200px',
154
+ className: 'm-fields-title-container',
155
+ },
156
+ {
157
+ name: 'f_module',
158
+ type: 'data-source-field-select',
159
+ fieldConfig: {
160
+ type: 'text',
161
+ },
162
+ checkStrictly: false,
163
+ dataSourceFieldType: ['string'],
164
+ disabled: (_vm: any, { formValue }: any) => !formValue?.report?.custom,
165
+ text: 'f_module',
166
+ labelPosition: 'left',
167
+ },
168
+ {
169
+ name: 'f_resource',
170
+ type: 'data-source-field-select',
171
+ fieldConfig: {
172
+ type: 'text',
173
+ },
174
+ checkStrictly: false,
175
+ dataSourceFieldType: ['string'],
176
+ disabled: (_vm: any, { formValue }: any) => !formValue?.report?.custom,
177
+ text: 'f_resource',
178
+ labelPosition: 'left',
179
+ },
180
+ {
181
+ name: 'f_type',
182
+ type: 'data-source-field-select',
183
+ fieldConfig: {
184
+ type: 'text',
185
+ },
186
+ checkStrictly: false,
187
+ dataSourceFieldType: ['string', 'number'],
188
+ disabled: (_vm: any, { formValue }: any) => !formValue?.report?.custom,
189
+ text: 'f_type',
190
+ labelPosition: 'left',
191
+ },
192
+ ],
193
+ };
194
+ };
195
+
134
196
  export const advancedTabConfig: TabPaneConfig = {
135
197
  title: '高级',
136
198
  lazy: true,
137
199
  items: [
200
+ {
201
+ type: 'link',
202
+ displayText: '点击查看配置指南',
203
+ href: 'https://iwiki.woa.com/pages/viewpage.action?pageId=827749220',
204
+ css: 'color: #F56C6C;font-weight: bold',
205
+ } as any,
138
206
  {
139
207
  name: NODE_DISABLE_CODE_BLOCK_KEY,
140
208
  text: '禁用代码块',
141
209
  type: 'switch',
210
+ labelPosition: 'left',
142
211
  defaultValue: false,
143
212
  extra: '开启后,配置的代码块将不会被执行',
213
+ style: {
214
+ padding: '0 22px',
215
+ },
144
216
  },
145
217
  {
146
218
  name: NODE_DISABLE_DATA_SOURCE_KEY,
147
219
  text: '禁用数据源',
148
220
  type: 'switch',
221
+ labelPosition: 'left',
149
222
  defaultValue: false,
150
223
  extra: '开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效',
224
+ style: {
225
+ padding: '0 22px',
226
+ },
151
227
  },
152
228
  {
153
229
  name: 'created',
154
- text: 'created',
230
+ text: 'Created',
231
+ flat: true,
155
232
  labelPosition: 'top',
156
233
  type: 'code-select',
157
- extra: '组件初始化时执行',
234
+ titleExtra: '组件初始化时执行',
235
+ style: {
236
+ padding: '0 22px',
237
+ },
158
238
  },
159
239
  {
160
240
  name: 'mounted',
161
- text: 'mounted',
241
+ text: 'Mounted',
162
242
  labelPosition: 'top',
243
+ flat: true,
244
+
163
245
  type: 'code-select',
164
- extra: '组件挂载到dom时执行',
246
+ titleExtra: '组件挂载到dom时执行',
247
+ style: {
248
+ padding: '0 22px',
249
+ },
165
250
  },
166
251
  {
167
252
  name: 'display',
168
- text: 'display',
169
- extra: '控制组件是否渲染,关系的代码块返回值为false时不渲染',
253
+ text: 'Display',
254
+ flat: true,
255
+ titleExtra: '控制组件是否渲染,关系的代码块返回值为false时不渲染',
170
256
  labelPosition: 'top',
171
257
  type: 'code-select',
258
+ style: {
259
+ padding: '0 22px',
260
+ },
261
+ },
262
+ {
263
+ type: 'fieldset',
264
+ legend: '上报',
265
+ labelWidth: '80px',
266
+ name: 'report',
267
+ className: 'no-border-fieldset',
268
+ style: {
269
+ paddingTop: '10px',
270
+ },
271
+ items: [
272
+ {
273
+ type: 'row',
274
+ items: [
275
+ {
276
+ type: 'switch',
277
+ name: 'custom',
278
+ labelPosition: 'left',
279
+ defaultValue: false,
280
+ labelWidth: '120px',
281
+ text: '开启自定义',
282
+ extra: '开启自定义后可以手动修改上报内容,关闭后会自动生成上报内容',
283
+ },
284
+ ],
285
+ },
286
+ getReportTypeConfig({ reportType: 'click' }),
287
+ getReportTypeConfig({ reportType: 'expose' }) as any,
288
+ ],
172
289
  },
173
290
  ],
174
291
  };
@@ -189,10 +306,18 @@ export const displayTabConfig: TabPaneConfig<DisplayCondsConfig> = {
189
306
  extra: (_state, { model }) =>
190
307
  `条件成立时${model[NODE_CONDS_RESULT_KEY] ? '隐藏' : '显示'},不成立时${model[NODE_CONDS_RESULT_KEY] ? '显示' : '隐藏'};<br />同一条件组内的所有条件配置同时成立时表示该条件组成立,任意一个条件组成立时表示条件成立(条件组内为且的关系,条件组间为或的关系);<br />条件为空时表示成立;`,
191
308
  },
309
+ {
310
+ text: '条件组配置',
311
+ static: true,
312
+ className: 'display-conds-title',
313
+ },
192
314
  {
193
315
  type: 'display-conds',
194
316
  name: NODE_CONDS_KEY,
195
317
  titlePrefix: '条件组',
318
+ flat: true,
319
+ fixed: 'right',
320
+ operateColWidth: 112,
196
321
  defaultValue: [],
197
322
  },
198
323
  ],
@@ -228,10 +353,13 @@ export const fillConfig = (
228
353
  name: 'id',
229
354
  text: 'ID',
230
355
  type: 'text',
231
- disabled: true,
356
+ // 走纯文本渲染,避免出现 disabled 的灰底输入框;append 仍正常显示。
357
+ static: true,
358
+
232
359
  append: {
233
- type: 'button',
234
- text: '复制',
360
+ type: 'icon',
361
+ text: 'https://vip.image.video.qpic.cn/vupload/20260615/36cf7e1781493669935.svg',
362
+ extra: '复制',
235
363
  handler: (vm, { model }) => {
236
364
  navigator.clipboard
237
365
  .writeText(`${model.id}`)
@@ -264,6 +392,7 @@ export const fillConfig = (
264
392
  const tabConfig: TabConfig = {
265
393
  type: 'tab',
266
394
  labelWidth,
395
+ className: 'magic-right-panel-tabs-top',
267
396
  items: [
268
397
  {
269
398
  title: '属性',