@fonixtree/magic-design 0.0.56 → 0.0.58
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/es/assets/fonts/magic-box-iconfont.css +7 -7
- package/es/assets/fonts/magic-box-iconfont.css.bak +7 -7
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/images/layout-icon/layout-navigation-normal.png +0 -0
- package/es/common/GroupList/index.js +2 -3
- package/es/common/LinkModal/index.less +1 -1
- package/es/composite-comp/bol/components/Button/defaultJSON.js +38 -68
- package/es/composite-comp/bol/components/Button/index.js +7 -9
- package/es/composite-comp/bol/components/Button/index.less +1 -0
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
- package/es/composite-comp/bol/components/Carousel/pc/index.js +2 -2
- package/es/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
- package/es/composite-comp/bol/components/Tag/index.js +7 -9
- package/es/composite-comp/bol/components/Tag/index.less +1 -0
- package/es/composite-comp/bol/components/Text/defaultJSON.js +1 -1
- package/es/composite-comp/bol/components/Text/index.js +3 -3
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
- package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
- package/es/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
- package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
- package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
- package/es/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
- package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
- package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
- package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +131 -0
- package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
- package/es/composite-comp/dito/components/PcNavigation/index.js +85 -0
- package/es/composite-comp/dito/components/PcNavigation/pc/index.js +452 -0
- package/es/composite-comp/dito/components/PcNavigation/pc/index.less +95 -0
- package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +117 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
- package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
- package/es/constants/component-types.js +13 -3
- package/es/constants/index.js +20 -2
- package/es/constants/layout.js +10 -2
- package/es/core/Designer/ConfigPanel/index.js +48 -22
- package/es/core/Designer/History/index.js +36 -28
- package/es/core/Designer/index.js +17 -8
- package/es/decorator/compositeDecorator.js +1 -0
- package/es/decorator/index.js +8 -0
- package/es/decorator/updateConfigDecorator.js +76 -0
- package/es/locale/en/en.json +8 -1
- package/es/locale/es/es.json +8 -1
- package/es/locale/id/id.json +8 -1
- package/es/meta-comp/components/Button/index.js +7 -7
- package/es/meta-comp/components/Image/index.js +1 -1
- package/es/meta-comp/components/Text/index.js +18 -7
- package/es/meta-comp/config-panels/BaseConfig.js +8 -10
- package/es/meta-comp/config-panels/TextConfig/index.js +10 -3
- package/es/mobx/Store.js +1 -9
- package/es/utils/coreUtil.js +6 -1
- package/lib/assets/fonts/magic-box-iconfont.css +7 -7
- package/lib/assets/fonts/magic-box-iconfont.css.bak +7 -7
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
- package/lib/common/GroupList/index.js +2 -3
- package/lib/common/LinkModal/index.less +1 -1
- package/lib/composite-comp/bol/components/Button/defaultJSON.js +38 -68
- package/lib/composite-comp/bol/components/Button/index.js +7 -9
- package/lib/composite-comp/bol/components/Button/index.less +1 -0
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +3 -7
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +2 -2
- package/lib/composite-comp/bol/components/Tag/defaultJSON.js +36 -46
- package/lib/composite-comp/bol/components/Tag/index.js +7 -9
- package/lib/composite-comp/bol/components/Tag/index.less +1 -0
- package/lib/composite-comp/bol/components/Text/defaultJSON.js +1 -1
- package/lib/composite-comp/bol/components/Text/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +141 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
- package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +6 -16
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +141 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +1 -0
- package/lib/composite-comp/bol/second-config-panels/BannerSecondConfig/index.js +2 -6
- package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
- package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
- package/lib/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
- package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
- package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +16 -0
- package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +131 -0
- package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
- package/lib/composite-comp/dito/components/PcNavigation/index.js +85 -0
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +452 -0
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +95 -0
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -1
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +117 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +126 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +195 -0
- package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
- package/lib/constants/component-types.js +13 -3
- package/lib/constants/index.js +20 -2
- package/lib/constants/layout.js +10 -2
- package/lib/core/Designer/ConfigPanel/index.js +48 -22
- package/lib/core/Designer/History/index.js +36 -28
- package/lib/core/Designer/index.js +17 -8
- package/lib/decorator/compositeDecorator.js +1 -0
- package/lib/decorator/index.js +8 -0
- package/lib/decorator/updateConfigDecorator.js +76 -0
- package/lib/locale/en/en.json +8 -1
- package/lib/locale/es/es.json +8 -1
- package/lib/locale/id/id.json +8 -1
- package/lib/meta-comp/components/Button/index.js +7 -7
- package/lib/meta-comp/components/Image/index.js +1 -1
- package/lib/meta-comp/components/Text/index.js +18 -7
- package/lib/meta-comp/config-panels/BaseConfig.js +8 -10
- package/lib/meta-comp/config-panels/TextConfig/index.js +10 -3
- package/lib/mobx/Store.js +1 -9
- package/lib/utils/coreUtil.js +6 -1
- package/package.json +1 -1
|
@@ -31,6 +31,8 @@ var _Recommend = _interopRequireDefault(require("../composite-comp/dito/componen
|
|
|
31
31
|
|
|
32
32
|
var _MobileNavigation = _interopRequireDefault(require("../composite-comp/dito/components/MobileNavigation"));
|
|
33
33
|
|
|
34
|
+
var _PcNavigation = _interopRequireDefault(require("../composite-comp/dito/components/PcNavigation"));
|
|
35
|
+
|
|
34
36
|
var _BannerConfig = _interopRequireDefault(require("../composite-comp/bol/config-panels/BannerConfig"));
|
|
35
37
|
|
|
36
38
|
var _DividerConfig = _interopRequireDefault(require("../composite-comp/bol/config-panels/DividerConfig"));
|
|
@@ -57,6 +59,8 @@ var _RecommendConfig = _interopRequireDefault(require("../composite-comp/dito/co
|
|
|
57
59
|
|
|
58
60
|
var _MobileNavigationConfig = _interopRequireDefault(require("../composite-comp/dito/config-panels/MobileNavigationConfig"));
|
|
59
61
|
|
|
62
|
+
var _PcNavigationConfig = _interopRequireDefault(require("../composite-comp/dito/config-panels/PcNavigationConfig"));
|
|
63
|
+
|
|
60
64
|
var _BannerSecondConfig = _interopRequireDefault(require("../composite-comp/bol/second-config-panels/BannerSecondConfig"));
|
|
61
65
|
|
|
62
66
|
var _TextSecondConfig = _interopRequireDefault(require("../composite-comp/bol/second-config-panels/TextSecondConfig"));
|
|
@@ -69,6 +73,12 @@ var _RecommendSecondConfig = _interopRequireDefault(require("../composite-comp/d
|
|
|
69
73
|
|
|
70
74
|
var _MobileNavigationSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/MobileNavigationSecondConfig"));
|
|
71
75
|
|
|
76
|
+
var _TagSecondConfig = _interopRequireDefault(require("../composite-comp/bol/second-config-panels/TagSecondConfig"));
|
|
77
|
+
|
|
78
|
+
var _ButtonSecondConfig = _interopRequireDefault(require("../composite-comp/bol/second-config-panels/ButtonSecondConfig"));
|
|
79
|
+
|
|
80
|
+
var _PcNavigationSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/PcNavigationSecondConfig"));
|
|
81
|
+
|
|
72
82
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
73
83
|
|
|
74
84
|
var _a, _b, _c; // 组件
|
|
@@ -77,17 +87,17 @@ var _a, _b, _c; // 组件
|
|
|
77
87
|
/**
|
|
78
88
|
* 渲染组件索引
|
|
79
89
|
*/
|
|
80
|
-
var componentMap = (_a = {}, _a[_Banner["default"].type] = _Banner["default"], _a[_Text["default"].type] = _Text["default"], _a[_FlashDeal["default"].type] = _FlashDeal["default"], _a[_SearchBar["default"].type] = _SearchBar["default"], _a[_ImageText["default"].type] = _ImageText["default"], _a[_Recommend["default"].type] = _Recommend["default"], _a[_MobileNavigation["default"].type] = _MobileNavigation["default"], _a[_Divider["default"].type] = _Divider["default"], _a[_ImageGallery["default"].type] = _ImageGallery["default"], _a[_Newsletter["default"].type] = _Newsletter["default"], _a[_Carousel["default"].type] = _Carousel["default"], _a[_Button["default"].type] = _Button["default"], _a[_Tag["default"].type] = _Tag["default"], _a);
|
|
90
|
+
var componentMap = (_a = {}, _a[_Banner["default"].type] = _Banner["default"], _a[_Text["default"].type] = _Text["default"], _a[_FlashDeal["default"].type] = _FlashDeal["default"], _a[_SearchBar["default"].type] = _SearchBar["default"], _a[_ImageText["default"].type] = _ImageText["default"], _a[_Recommend["default"].type] = _Recommend["default"], _a[_MobileNavigation["default"].type] = _MobileNavigation["default"], _a[_PcNavigation["default"].type] = _PcNavigation["default"], _a[_Divider["default"].type] = _Divider["default"], _a[_ImageGallery["default"].type] = _ImageGallery["default"], _a[_Newsletter["default"].type] = _Newsletter["default"], _a[_Carousel["default"].type] = _Carousel["default"], _a[_Button["default"].type] = _Button["default"], _a[_Tag["default"].type] = _Tag["default"], _a);
|
|
81
91
|
/**
|
|
82
92
|
* 一级配置面板索引
|
|
83
93
|
*/
|
|
84
94
|
|
|
85
95
|
exports.componentMap = componentMap;
|
|
86
|
-
var configPanelMap = (_b = {}, _b[_Banner["default"].type] = _BannerConfig["default"], _b[_Text["default"].type] = _TextCompConfig["default"], _b[_FlashDeal["default"].type] = _FlashDealConfig["default"], _b[_SearchBar["default"].type] = _SearchBarConfig["default"], _b[_ImageText["default"].type] = _ImageTextConfig["default"], _b[_Recommend["default"].type] = _RecommendConfig["default"], _b[_MobileNavigation["default"].type] = _MobileNavigationConfig["default"], _b[_Divider["default"].type] = _DividerConfig["default"], _b[_ImageGallery["default"].type] = _ImageGalleryConfig["default"], _b[_Newsletter["default"].type] = _NewsletterConfig["default"], _b[_Carousel["default"].type] = _CarouselConfig["default"], _b[_Button["default"].type] = _ButtonCompConfig["default"], _b[_Tag["default"].type] = _TagCompConfig["default"], _b);
|
|
96
|
+
var configPanelMap = (_b = {}, _b[_Banner["default"].type] = _BannerConfig["default"], _b[_Text["default"].type] = _TextCompConfig["default"], _b[_FlashDeal["default"].type] = _FlashDealConfig["default"], _b[_SearchBar["default"].type] = _SearchBarConfig["default"], _b[_ImageText["default"].type] = _ImageTextConfig["default"], _b[_Recommend["default"].type] = _RecommendConfig["default"], _b[_MobileNavigation["default"].type] = _MobileNavigationConfig["default"], _b[_PcNavigation["default"].type] = _PcNavigationConfig["default"], _b[_Divider["default"].type] = _DividerConfig["default"], _b[_ImageGallery["default"].type] = _ImageGalleryConfig["default"], _b[_Newsletter["default"].type] = _NewsletterConfig["default"], _b[_Carousel["default"].type] = _CarouselConfig["default"], _b[_Button["default"].type] = _ButtonCompConfig["default"], _b[_Tag["default"].type] = _TagCompConfig["default"], _b);
|
|
87
97
|
/**
|
|
88
98
|
* 二级配置面板索引
|
|
89
99
|
*/
|
|
90
100
|
|
|
91
101
|
exports.configPanelMap = configPanelMap;
|
|
92
|
-
var secondConfigPanelMap = (_c = {}, _c[_Banner["default"].type] = _BannerSecondConfig["default"], _c[_Text["default"].type] = _TextSecondConfig["default"], _c[_ImageText["default"].type] = _ImageTextSecondConfig["default"], _c[_Recommend["default"].type] = _RecommendSecondConfig["default"], _c[_MobileNavigation["default"].type] = _MobileNavigationSecondConfig["default"], _c[_Carousel["default"].type] = _CarouselSecondConfig["default"], _c);
|
|
102
|
+
var secondConfigPanelMap = (_c = {}, _c[_Banner["default"].type] = _BannerSecondConfig["default"], _c[_Text["default"].type] = _TextSecondConfig["default"], _c[_ImageText["default"].type] = _ImageTextSecondConfig["default"], _c[_Recommend["default"].type] = _RecommendSecondConfig["default"], _c[_MobileNavigation["default"].type] = _MobileNavigationSecondConfig["default"], _c[_PcNavigation["default"].type] = _PcNavigationSecondConfig["default"], _c[_Carousel["default"].type] = _CarouselSecondConfig["default"], _c[_Tag["default"].type] = _TagSecondConfig["default"], _c[_Button["default"].type] = _ButtonSecondConfig["default"], _c);
|
|
93
103
|
exports.secondConfigPanelMap = secondConfigPanelMap;
|
package/es/constants/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.urlType = exports.respCodeMap = exports.quickMenuCode = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.deviceTypeMap = exports.compInfoMap = exports.STORAGE_KEY = void 0;
|
|
6
|
+
exports.urlType = exports.respCodeMap = exports.quickMenuCode = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.STORAGE_KEY = void 0;
|
|
7
7
|
var STORAGE_KEY = {
|
|
8
8
|
LOCALE: 'magicLocale'
|
|
9
9
|
};
|
|
@@ -27,6 +27,11 @@ var deviceTypeMap = {
|
|
|
27
27
|
PHONE: 'mobile'
|
|
28
28
|
};
|
|
29
29
|
exports.deviceTypeMap = deviceTypeMap;
|
|
30
|
+
var deviceTypeWidthMap = {
|
|
31
|
+
pc: 1240,
|
|
32
|
+
mobile: 375
|
|
33
|
+
};
|
|
34
|
+
exports.deviceTypeWidthMap = deviceTypeWidthMap;
|
|
30
35
|
var magicMode = {
|
|
31
36
|
DESIGNER: 'designer',
|
|
32
37
|
RENDERER: 'renderer'
|
|
@@ -94,6 +99,10 @@ var compInfoMap = {
|
|
|
94
99
|
MOBILE_NAVIGATION: {
|
|
95
100
|
name: 'Mobile Navigation',
|
|
96
101
|
icon: 'icon-navigation'
|
|
102
|
+
},
|
|
103
|
+
PC_NAVIGATION: {
|
|
104
|
+
name: 'PC Navigation',
|
|
105
|
+
icon: 'icon-navigation'
|
|
97
106
|
}
|
|
98
107
|
};
|
|
99
108
|
/**
|
|
@@ -149,4 +158,13 @@ var metaInst = {
|
|
|
149
158
|
type: metaType.BUTTON
|
|
150
159
|
}
|
|
151
160
|
};
|
|
152
|
-
|
|
161
|
+
/**
|
|
162
|
+
* 全局事件类型
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
exports.metaInst = metaInst;
|
|
166
|
+
var eventType = {
|
|
167
|
+
// 二级配置面板返回时,更新一级面板事件
|
|
168
|
+
UPDATE_FIRST_CONFIG: 'update-first-config'
|
|
169
|
+
};
|
|
170
|
+
exports.eventType = eventType;
|
package/es/constants/layout.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.searchLayout = exports.recommendLayoutPc = exports.recommendLayoutMobile = exports.newsletterLayout = exports.mobileNavigationLayout = exports.imageTextLayoutPc = exports.imageTextLayoutMobile = exports.imageGalleryLayout = exports.dividerLayout = exports.carouselLayout = void 0;
|
|
6
|
+
exports.searchLayout = exports.recommendLayoutPc = exports.recommendLayoutMobile = exports.pcNavigationLayout = exports.newsletterLayout = exports.mobileNavigationLayout = exports.imageTextLayoutPc = exports.imageTextLayoutMobile = exports.imageGalleryLayout = exports.dividerLayout = exports.carouselLayout = void 0;
|
|
7
7
|
|
|
8
8
|
var _dividerLayout = _interopRequireDefault(require("../assets/images/layout-icon/dividerLayout.svg"));
|
|
9
9
|
|
|
@@ -51,6 +51,8 @@ var _layoutNavigationNewline = _interopRequireDefault(require("../assets/images/
|
|
|
51
51
|
|
|
52
52
|
var _layoutNavigationTile = _interopRequireDefault(require("../assets/images/layout-icon/layout-navigation-tile.png"));
|
|
53
53
|
|
|
54
|
+
var _layoutNavigationNormal = _interopRequireDefault(require("../assets/images/layout-icon/layout-navigation-normal.png"));
|
|
55
|
+
|
|
54
56
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
55
57
|
|
|
56
58
|
// import p3 from '../assets/images/layout-icon/layout-imagetext-p3.png';
|
|
@@ -177,4 +179,10 @@ var mobileNavigationLayout = [{
|
|
|
177
179
|
name: 'tile',
|
|
178
180
|
image: _layoutNavigationTile["default"]
|
|
179
181
|
}];
|
|
180
|
-
exports.mobileNavigationLayout = mobileNavigationLayout;
|
|
182
|
+
exports.mobileNavigationLayout = mobileNavigationLayout;
|
|
183
|
+
var pcNavigationLayout = [{
|
|
184
|
+
id: 'normal',
|
|
185
|
+
name: 'normal',
|
|
186
|
+
image: _layoutNavigationNormal["default"]
|
|
187
|
+
}];
|
|
188
|
+
exports.pcNavigationLayout = pcNavigationLayout;
|
|
@@ -72,6 +72,34 @@ function (_super) {
|
|
|
72
72
|
selectedNode: {}
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
+
_this.resetState = function (propsData) {
|
|
76
|
+
var pageData = propsData.pageData;
|
|
77
|
+
var selectedNode = pageData.find(function (floor) {
|
|
78
|
+
return floor.id === _mobx.store.clickedFloor;
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
_this.setState({
|
|
82
|
+
clickedGroup: _mobx.store.clickedGroup,
|
|
83
|
+
selectedNode: selectedNode
|
|
84
|
+
}); // 展开以及面板
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
if (selectedNode) {
|
|
88
|
+
_this.openConfig();
|
|
89
|
+
} else {
|
|
90
|
+
_this.closeConfig();
|
|
91
|
+
} // 展开首期二级面板
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
if (!_mobx.store.clickedGroup) {
|
|
95
|
+
_this.closeSecConfig();
|
|
96
|
+
} else if (_mobx.store.clickedGroup !== _this.preClickedGroup) {
|
|
97
|
+
_this.openSecConfig();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
_this.preClickedGroup = _mobx.store.clickedGroup;
|
|
101
|
+
};
|
|
102
|
+
|
|
75
103
|
_this.animation = function (type) {
|
|
76
104
|
document.getElementsByClassName('config_wrap')[0].setAttribute('style', "animation-name:" + type + ";animation-duration: 0.3s;animation-fill-mode:both");
|
|
77
105
|
};
|
|
@@ -157,6 +185,13 @@ function (_super) {
|
|
|
157
185
|
device: device
|
|
158
186
|
};
|
|
159
187
|
var instance = Clazz ? /*#__PURE__*/_react["default"].createElement(Clazz, panelProps) : null;
|
|
188
|
+
|
|
189
|
+
if (!instance) {
|
|
190
|
+
_mobx.store.setState({
|
|
191
|
+
clickedFloor: null
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
160
195
|
return instance;
|
|
161
196
|
};
|
|
162
197
|
|
|
@@ -209,11 +244,15 @@ function (_super) {
|
|
|
209
244
|
break;
|
|
210
245
|
|
|
211
246
|
case 'MOBILE_NAVIGATION':
|
|
247
|
+
case 'PC_NAVIGATION':
|
|
212
248
|
groupName = ((_f = panelProps.groupName) === null || _f === void 0 ? void 0 : _f.title.text) || (0, _locale.i18n)('NAVIGATION_NAME');
|
|
213
249
|
break;
|
|
214
250
|
|
|
215
251
|
case 'RECOMMEND':
|
|
216
252
|
groupName = panelProps.groupName.text;
|
|
253
|
+
|
|
254
|
+
case 'TAG':
|
|
255
|
+
groupName = panelProps.button.text;
|
|
217
256
|
}
|
|
218
257
|
|
|
219
258
|
return groupName || 'Group Name';
|
|
@@ -223,6 +262,10 @@ function (_super) {
|
|
|
223
262
|
_mobx.store.setState({
|
|
224
263
|
clickedGroup: null
|
|
225
264
|
});
|
|
265
|
+
|
|
266
|
+
window.document.dispatchEvent(new Event(_constants.eventType.UPDATE_FIRST_CONFIG, {
|
|
267
|
+
bubbles: false
|
|
268
|
+
}));
|
|
226
269
|
};
|
|
227
270
|
|
|
228
271
|
return _this;
|
|
@@ -232,31 +275,14 @@ function (_super) {
|
|
|
232
275
|
var _this = this;
|
|
233
276
|
|
|
234
277
|
this.distroy = (0, _mobx.autorun)(function () {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
_this.setState({
|
|
238
|
-
clickedGroup: _mobx.store.clickedGroup,
|
|
239
|
-
selectedNode: selectedNode
|
|
240
|
-
}); // 展开以及面板
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
if (selectedNode) {
|
|
244
|
-
_this.openConfig();
|
|
245
|
-
} else {
|
|
246
|
-
_this.closeConfig();
|
|
247
|
-
} // 展开首期二级面板
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
if (!_mobx.store.clickedGroup) {
|
|
251
|
-
_this.closeSecConfig();
|
|
252
|
-
} else if (_mobx.store.clickedGroup !== _this.preClickedGroup) {
|
|
253
|
-
_this.openSecConfig();
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
_this.preClickedGroup = _mobx.store.clickedGroup;
|
|
278
|
+
_this.resetState(_this.props);
|
|
257
279
|
});
|
|
258
280
|
};
|
|
259
281
|
|
|
282
|
+
ConfigPanel.prototype.componentWillReceiveProps = function (nextProps) {
|
|
283
|
+
this.resetState(nextProps);
|
|
284
|
+
};
|
|
285
|
+
|
|
260
286
|
ConfigPanel.prototype.componentWillUnmount = function () {
|
|
261
287
|
this.distroy();
|
|
262
288
|
};
|
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
9
9
|
|
|
10
|
+
var _lodash = require("lodash");
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
13
|
|
|
12
14
|
/**
|
|
@@ -14,24 +16,25 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
14
16
|
* 有新的操作时存入数组的0位置,游标设置为0
|
|
15
17
|
*
|
|
16
18
|
*/
|
|
17
|
-
var debug = require('debug')('worker:History');
|
|
18
|
-
|
|
19
19
|
var History =
|
|
20
20
|
/** @class */
|
|
21
21
|
function () {
|
|
22
22
|
function History(hist) {
|
|
23
23
|
var _this = this;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* 游标位置
|
|
26
|
+
*/
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
this.cursor = 0;
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
* 历史数据
|
|
32
|
+
*/
|
|
33
33
|
|
|
34
34
|
this.list = [];
|
|
35
|
+
/** 前进或者后退步数 */
|
|
36
|
+
|
|
37
|
+
this.step = 0;
|
|
35
38
|
|
|
36
39
|
this.redoAble = function () {
|
|
37
40
|
return _this.cursor !== 0;
|
|
@@ -41,47 +44,52 @@ function () {
|
|
|
41
44
|
return _this.cursor !== _this.list.length - 1;
|
|
42
45
|
};
|
|
43
46
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
* 清空0~cursor之间的数据,将data插入 位置0
|
|
48
|
+
*/
|
|
46
49
|
|
|
47
50
|
|
|
48
51
|
this.push = function (data) {
|
|
49
|
-
debug('push data', data);
|
|
50
52
|
var cloneData = (0, _cloneDeep["default"])(data);
|
|
51
53
|
|
|
52
54
|
_this.list.splice(0, _this.cursor, cloneData);
|
|
53
55
|
|
|
56
|
+
_this.cursor = 0;
|
|
57
|
+
console.log('list', _this.list);
|
|
54
58
|
return data;
|
|
55
59
|
};
|
|
56
60
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
* redu操作只修改当前游标-1
|
|
62
|
+
* 并且返回后一步的json对象
|
|
63
|
+
*/
|
|
60
64
|
|
|
61
65
|
|
|
62
|
-
this.redo = function () {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
_this.
|
|
66
|
-
var newData = _this.list[newCursor];
|
|
67
|
-
return newData;
|
|
66
|
+
this.redo = function (callback) {
|
|
67
|
+
_this.step -= 1;
|
|
68
|
+
|
|
69
|
+
_this.doAction(callback);
|
|
68
70
|
};
|
|
69
71
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
* undo操作只修改当前的游标+1
|
|
73
|
+
* 并且返回前一步的json对象
|
|
74
|
+
*/
|
|
73
75
|
|
|
74
76
|
|
|
75
|
-
this.undo = function () {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
_this.
|
|
79
|
-
var newData = _this.list[newCursor];
|
|
80
|
-
return newData;
|
|
77
|
+
this.undo = function (callback) {
|
|
78
|
+
_this.step += 1;
|
|
79
|
+
|
|
80
|
+
_this.doAction(callback);
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
this.doAction = (0, _lodash.debounce)(function (callback) {
|
|
84
|
+
console.log(_this.step);
|
|
85
|
+
var newCursor = _this.cursor + _this.step;
|
|
86
|
+
_this.cursor = newCursor;
|
|
87
|
+
var newData = (0, _cloneDeep["default"])(_this.list[newCursor]);
|
|
88
|
+
_this.step = 0;
|
|
89
|
+
callback(newData);
|
|
90
|
+
}, 300);
|
|
83
91
|
this.cursor = 0;
|
|
84
|
-
this.list = [hist];
|
|
92
|
+
this.list = [(0, _cloneDeep["default"])(hist)];
|
|
85
93
|
}
|
|
86
94
|
|
|
87
95
|
return History;
|
|
@@ -169,12 +169,14 @@ function (_super) {
|
|
|
169
169
|
_this.configRef.current.closeMobileConfig();
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
_this.reRenderViewArea = function () {
|
|
172
|
+
_this.reRenderViewArea = function (e) {
|
|
173
173
|
if (!_this.viewAreaRef || !_this.viewAreaRef.current) {
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
if (e.changeHistory) {
|
|
178
|
+
_this.history.push(_this.state.MPageData);
|
|
179
|
+
}
|
|
178
180
|
|
|
179
181
|
_this.viewAreaRef.current.renderView();
|
|
180
182
|
};
|
|
@@ -298,18 +300,24 @@ function (_super) {
|
|
|
298
300
|
device: device
|
|
299
301
|
};
|
|
300
302
|
|
|
303
|
+
var callback = function callback(newPageData) {
|
|
304
|
+
_mobx.store.setState({
|
|
305
|
+
MPageData: newPageData
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
_this.setState({
|
|
309
|
+
MPageData: newPageData
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
|
|
301
313
|
switch (code) {
|
|
302
314
|
case _constants.quickMenuCode.UNDO:
|
|
303
|
-
_this.
|
|
304
|
-
MPageData: _this.history.undo()
|
|
305
|
-
});
|
|
315
|
+
_this.history.undo(callback);
|
|
306
316
|
|
|
307
317
|
break;
|
|
308
318
|
|
|
309
319
|
case _constants.quickMenuCode.REDO:
|
|
310
|
-
_this.
|
|
311
|
-
MPageData: _this.history.redo()
|
|
312
|
-
});
|
|
320
|
+
_this.history.redo(callback);
|
|
313
321
|
|
|
314
322
|
break;
|
|
315
323
|
|
|
@@ -437,6 +445,7 @@ function (_super) {
|
|
|
437
445
|
pagesManager = _b.pagesManager,
|
|
438
446
|
compSource = _b.compSource,
|
|
439
447
|
pageName = _b.pageName;
|
|
448
|
+
console.log('MPageData', MPageData);
|
|
440
449
|
return /*#__PURE__*/_react["default"].createElement(_mobxReact.Provider, {
|
|
441
450
|
store: _mobx.store
|
|
442
451
|
}, /*#__PURE__*/_react["default"].createElement(_antd.ConfigProvider, {
|
package/es/decorator/index.js
CHANGED
|
@@ -15,9 +15,17 @@ Object.defineProperty(exports, "metaDecorator", {
|
|
|
15
15
|
return _metaDecorator["default"];
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "updateConfigDecorator", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _updateConfigDecorator["default"];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
|
|
19
25
|
var _compositeDecorator = _interopRequireDefault(require("./compositeDecorator"));
|
|
20
26
|
|
|
21
27
|
var _metaDecorator = _interopRequireDefault(require("./metaDecorator"));
|
|
22
28
|
|
|
29
|
+
var _updateConfigDecorator = _interopRequireDefault(require("./updateConfigDecorator"));
|
|
30
|
+
|
|
23
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = metaDecorator;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
15
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
16
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
17
|
+
__proto__: []
|
|
18
|
+
} instanceof Array && function (d, b) {
|
|
19
|
+
d.__proto__ = b;
|
|
20
|
+
} || function (d, b) {
|
|
21
|
+
for (var p in b) {
|
|
22
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return _extendStatics(d, b);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return function (d, b) {
|
|
30
|
+
_extendStatics(d, b);
|
|
31
|
+
|
|
32
|
+
function __() {
|
|
33
|
+
this.constructor = d;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
37
|
+
};
|
|
38
|
+
}();
|
|
39
|
+
/**
|
|
40
|
+
* 更新组件一级配置面板的装修器
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
function metaDecorator(WrappedComponent) {
|
|
45
|
+
var Wrapper =
|
|
46
|
+
/** @class */
|
|
47
|
+
function (_super) {
|
|
48
|
+
__extends(Wrapper, _super);
|
|
49
|
+
|
|
50
|
+
function Wrapper() {
|
|
51
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
52
|
+
|
|
53
|
+
_this.update = function () {
|
|
54
|
+
_this.setState({});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return _this;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
Wrapper.prototype.componentDidMount = function () {
|
|
61
|
+
window.document.addEventListener(_constants.eventType.UPDATE_FIRST_CONFIG, this.update);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
Wrapper.prototype.componentWillUnmount = function () {
|
|
65
|
+
window.document.removeEventListener(_constants.eventType.UPDATE_FIRST_CONFIG, this.update);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
Wrapper.prototype.render = function () {
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(WrappedComponent, this.props);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return Wrapper;
|
|
73
|
+
}(_react["default"].Component);
|
|
74
|
+
|
|
75
|
+
return Wrapper;
|
|
76
|
+
}
|
package/es/locale/en/en.json
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
+
"ADD_BUTTON": "Add Button",
|
|
3
|
+
"BUTTON_TAG": "Button Tag",
|
|
4
|
+
"ADD_TAG": "Add Tag",
|
|
5
|
+
"LAST_CATEGORY": "Last Category",
|
|
6
|
+
"SECONDARY_CATEGORY": "Secondary Category",
|
|
7
|
+
"FIRST_CATEGORY": "First Category",
|
|
8
|
+
"ALL_CATEGORY": "All Category",
|
|
9
|
+
"HOME": "Home",
|
|
2
10
|
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
3
11
|
"ADD_AREA": "Add Area",
|
|
4
12
|
"CLICKABLE_AREA": "Clickable Area",
|
|
@@ -87,7 +95,6 @@
|
|
|
87
95
|
"INPUT_FIELD": "Input Field",
|
|
88
96
|
"CONFIRMATION": "Confirmation",
|
|
89
97
|
"IMAGE_TAG": "Image Tag",
|
|
90
|
-
"BUTTON_TAG": "Button Tag",
|
|
91
98
|
"SECONDARY_BUTTON_TAG": "Secondary Button Tag",
|
|
92
99
|
"TITLE": "Title",
|
|
93
100
|
"HOVER": "Hover",
|
package/es/locale/es/es.json
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
+
"ADD_BUTTON": "Add Button",
|
|
3
|
+
"BUTTON_TAG": "Etiqueta de botón",
|
|
4
|
+
"ADD_TAG": "Add Tag",
|
|
5
|
+
"LAST_CATEGORY": "Last Category",
|
|
6
|
+
"SECONDARY_CATEGORY": "Secondary Category",
|
|
7
|
+
"FIRST_CATEGORY": "First Category",
|
|
8
|
+
"ALL_CATEGORY": "All Category",
|
|
9
|
+
"HOME": "Home",
|
|
2
10
|
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
3
11
|
"ADD_AREA": "Add Area",
|
|
4
12
|
"CLICKABLE_AREA": "Clickable Area",
|
|
@@ -87,7 +95,6 @@
|
|
|
87
95
|
"INPUT_FIELD": "Campo de entrada",
|
|
88
96
|
"CONFIRMATION": "Confirmación",
|
|
89
97
|
"IMAGE_TAG": "Etiqueta de imagen",
|
|
90
|
-
"BUTTON_TAG": "Etiqueta de botón",
|
|
91
98
|
"SECONDARY_BUTTON_TAG": "Etiqueta de botón secundario",
|
|
92
99
|
"TITLE": "Título",
|
|
93
100
|
"HOVER": "Hover",
|
package/es/locale/id/id.json
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
+
"ADD_BUTTON": "Add Button",
|
|
3
|
+
"BUTTON_TAG": "Button Tag",
|
|
4
|
+
"ADD_TAG": "Add Tag",
|
|
5
|
+
"LAST_CATEGORY": "Last Category",
|
|
6
|
+
"SECONDARY_CATEGORY": "Secondary Category",
|
|
7
|
+
"FIRST_CATEGORY": "First Category",
|
|
8
|
+
"ALL_CATEGORY": "All Category",
|
|
9
|
+
"HOME": "Home",
|
|
2
10
|
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
3
11
|
"ADD_AREA": "Add Area",
|
|
4
12
|
"CLICKABLE_AREA": "Clickable Area",
|
|
@@ -87,7 +95,6 @@
|
|
|
87
95
|
"INPUT_FIELD": "Input Field",
|
|
88
96
|
"CONFIRMATION": "Confirmation",
|
|
89
97
|
"IMAGE_TAG": "Image Tag",
|
|
90
|
-
"BUTTON_TAG": "Button Tag",
|
|
91
98
|
"SECONDARY_BUTTON_TAG": "Secondary Button Tag",
|
|
92
99
|
"TITLE": "Title",
|
|
93
100
|
"HOVER": "Hover",
|
|
@@ -90,14 +90,14 @@ function (_super) {
|
|
|
90
90
|
|
|
91
91
|
_this.preData = '';
|
|
92
92
|
return _this;
|
|
93
|
-
}
|
|
93
|
+
} // 会影响到 button 的 hover style 失效
|
|
94
|
+
// shouldComponentUpdate(nextProps) {
|
|
95
|
+
// const should1 = JSON.stringify(nextProps.data) != this.preData;
|
|
96
|
+
// const should2 = window.magicDesign.device != this.preDevice;
|
|
97
|
+
// const result = should1 || should2;
|
|
98
|
+
// return result;
|
|
99
|
+
// }
|
|
94
100
|
|
|
95
|
-
Button.prototype.shouldComponentUpdate = function (nextProps) {
|
|
96
|
-
var should1 = JSON.stringify(nextProps.data) != this.preData;
|
|
97
|
-
var should2 = window.magicDesign.device != this.preDevice;
|
|
98
|
-
var result = should1 || should2;
|
|
99
|
-
return result;
|
|
100
|
-
};
|
|
101
101
|
|
|
102
102
|
Button.prototype.render = function () {
|
|
103
103
|
var _this = this;
|
|
@@ -86,7 +86,7 @@ function (_super) {
|
|
|
86
86
|
|
|
87
87
|
if (data.hover.open && data.hover.backgroundType === 'enlarge' && (hoverState || hoverImgSrc)) {
|
|
88
88
|
// return { transform: `scale(${data.hover.magnification})` };
|
|
89
|
-
obj.transform = "scale(" + data.hover.magnification
|
|
89
|
+
obj.transform = "scale(" + data.hover.magnification + ")";
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
if (maxHeight) {
|
|
@@ -102,7 +102,8 @@ var contentStyle = function contentStyle(content) {
|
|
|
102
102
|
color: content.color,
|
|
103
103
|
backgroundColor: content.backgroundColor,
|
|
104
104
|
textAlign: content.textAlign,
|
|
105
|
-
width: window.magicDesign.device == '
|
|
105
|
+
// width: (window.magicDesign.device == 'pc' ? content.pcWidth : content.width) || 'fit-content',
|
|
106
|
+
width: (window.magicDesign.device == 'pc' ? content.pcWidth : content.width) || '100%'
|
|
106
107
|
};
|
|
107
108
|
};
|
|
108
109
|
/** 从父级数组中 分离出 片段数组 */
|
|
@@ -256,7 +257,8 @@ var initSelectionEvent = function initSelectionEvent() {
|
|
|
256
257
|
}
|
|
257
258
|
|
|
258
259
|
findSelectionTarget.refresh();
|
|
259
|
-
}
|
|
260
|
+
} // todo 不知道干什么用的
|
|
261
|
+
|
|
260
262
|
|
|
261
263
|
triggerTextConfigRender();
|
|
262
264
|
}, 500);
|
|
@@ -429,12 +431,21 @@ function (_super) {
|
|
|
429
431
|
className = _a.className,
|
|
430
432
|
readonly = _a.readonly,
|
|
431
433
|
onTextInput = _a.onTextInput;
|
|
434
|
+
var style = contentStyle(data.content);
|
|
435
|
+
|
|
436
|
+
if (data.underline) {
|
|
437
|
+
style = __assign(__assign({}, style), {
|
|
438
|
+
textDecorationLine: data.underline.open ? 'underline' : 'none',
|
|
439
|
+
textDecorationColor: data.underline.textDecorationColor,
|
|
440
|
+
textDecorationStyle: data.underline.textDecorationStyle
|
|
441
|
+
});
|
|
442
|
+
} // const style: React.CSSProperties = {
|
|
443
|
+
// ...contentStyle(data.content),
|
|
444
|
+
// textDecorationLine: data?.underline.open ? 'underline' : 'none',
|
|
445
|
+
// textDecorationColor: data?.underline.textDecorationColor,
|
|
446
|
+
// textDecorationStyle: data?.underline.textDecorationStyle,
|
|
447
|
+
// };
|
|
432
448
|
|
|
433
|
-
var style = __assign(__assign({}, contentStyle(data.content)), {
|
|
434
|
-
textDecorationLine: data.underline.open ? 'underline' : 'none',
|
|
435
|
-
textDecorationColor: data.underline.textDecorationColor,
|
|
436
|
-
textDecorationStyle: data.underline.textDecorationStyle
|
|
437
|
-
});
|
|
438
449
|
|
|
439
450
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
440
451
|
ref: this.textRef,
|