@fonixtree/magic-design 0.0.141 → 0.0.143
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/composite-comp/bol/components/Text/index.js +1 -1
- package/es/composite-comp/bol/components/Text/index.less +3 -1
- package/es/core/Designer/ConfigPanel/index.js +1 -1
- package/es/decorator/compositeDecorator.js +2 -2
- package/es/meta-comp/components/Text/index.js +3 -2
- package/lib/composite-comp/bol/components/Text/index.js +1 -1
- package/lib/composite-comp/bol/components/Text/index.less +3 -1
- package/lib/core/Designer/ConfigPanel/index.js +1 -1
- package/lib/decorator/compositeDecorator.js +2 -2
- package/lib/meta-comp/components/Text/index.js +3 -2
- package/package.json +1 -1
|
@@ -62,7 +62,7 @@ var __decorate = void 0 && (void 0).__decorate || function (decorators, target,
|
|
|
62
62
|
// import './index.less';
|
|
63
63
|
// less to css 在线地址 https://tool.oschina.net/less
|
|
64
64
|
// css 压缩地址 https://www.runoob.com/csspack
|
|
65
|
-
var style = '.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{padding:20px;}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;margin-top:20px;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}';
|
|
65
|
+
var style = '.m-text{display: flex;flex-direction: column;}.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{padding:20px;}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;margin-top:20px;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}';
|
|
66
66
|
|
|
67
67
|
var Text =
|
|
68
68
|
/** @class */
|
|
@@ -130,8 +130,8 @@ function compositeDecorator(WrappedComponent) {
|
|
|
130
130
|
wrapStyle.opacity = background.opacity ? background.opacity : 1;
|
|
131
131
|
} else {
|
|
132
132
|
wrapStyle.backgroundImage = "url(" + background.image + ")";
|
|
133
|
-
wrapStyle.backgroundPosition = '
|
|
134
|
-
wrapStyle.backgroundSize = '
|
|
133
|
+
wrapStyle.backgroundPosition = 'center center';
|
|
134
|
+
wrapStyle.backgroundSize = 'cover';
|
|
135
135
|
wrapStyle.backgroundRepeat = 'no-repeat';
|
|
136
136
|
}
|
|
137
137
|
} // 复合组件宽度
|
|
@@ -473,7 +473,8 @@ function (_super) {
|
|
|
473
473
|
data = _a.data,
|
|
474
474
|
className = _a.className,
|
|
475
475
|
readonly = _a.readonly,
|
|
476
|
-
onTextInput = _a.onTextInput
|
|
476
|
+
onTextInput = _a.onTextInput,
|
|
477
|
+
mode = _a.mode;
|
|
477
478
|
var style = contentStyle(data.content);
|
|
478
479
|
|
|
479
480
|
if (data.underline) {
|
|
@@ -501,7 +502,7 @@ function (_super) {
|
|
|
501
502
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
502
503
|
ref: this.textRef,
|
|
503
504
|
className: (0, _classnames["default"])('m-meta-text', className),
|
|
504
|
-
contentEditable:
|
|
505
|
+
contentEditable: mode == 'designer' && !readonly,
|
|
505
506
|
onClick: function onClick() {
|
|
506
507
|
(0, _coreUtil.clickUrl)(data.content.clickUrl);
|
|
507
508
|
},
|
|
@@ -62,7 +62,7 @@ var __decorate = void 0 && (void 0).__decorate || function (decorators, target,
|
|
|
62
62
|
// import './index.less';
|
|
63
63
|
// less to css 在线地址 https://tool.oschina.net/less
|
|
64
64
|
// css 压缩地址 https://www.runoob.com/csspack
|
|
65
|
-
var style = '.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{padding:20px;}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;margin-top:20px;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}';
|
|
65
|
+
var style = '.m-text{display: flex;flex-direction: column;}.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{padding:20px;}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;margin-top:20px;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}';
|
|
66
66
|
|
|
67
67
|
var Text =
|
|
68
68
|
/** @class */
|
|
@@ -130,8 +130,8 @@ function compositeDecorator(WrappedComponent) {
|
|
|
130
130
|
wrapStyle.opacity = background.opacity ? background.opacity : 1;
|
|
131
131
|
} else {
|
|
132
132
|
wrapStyle.backgroundImage = "url(" + background.image + ")";
|
|
133
|
-
wrapStyle.backgroundPosition = '
|
|
134
|
-
wrapStyle.backgroundSize = '
|
|
133
|
+
wrapStyle.backgroundPosition = 'center center';
|
|
134
|
+
wrapStyle.backgroundSize = 'cover';
|
|
135
135
|
wrapStyle.backgroundRepeat = 'no-repeat';
|
|
136
136
|
}
|
|
137
137
|
} // 复合组件宽度
|
|
@@ -473,7 +473,8 @@ function (_super) {
|
|
|
473
473
|
data = _a.data,
|
|
474
474
|
className = _a.className,
|
|
475
475
|
readonly = _a.readonly,
|
|
476
|
-
onTextInput = _a.onTextInput
|
|
476
|
+
onTextInput = _a.onTextInput,
|
|
477
|
+
mode = _a.mode;
|
|
477
478
|
var style = contentStyle(data.content);
|
|
478
479
|
|
|
479
480
|
if (data.underline) {
|
|
@@ -501,7 +502,7 @@ function (_super) {
|
|
|
501
502
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
502
503
|
ref: this.textRef,
|
|
503
504
|
className: (0, _classnames["default"])('m-meta-text', className),
|
|
504
|
-
contentEditable:
|
|
505
|
+
contentEditable: mode == 'designer' && !readonly,
|
|
505
506
|
onClick: function onClick() {
|
|
506
507
|
(0, _coreUtil.clickUrl)(data.content.clickUrl);
|
|
507
508
|
},
|