Browse Source

fix: simpleEditor组件type为inner时injectBraftEditorProps无效

Roxas 4 years ago
parent
commit
26a81f66eb

+ 2
- 2
eslib/Editor/index.js View File

127
       appendToolBtn = _props$appendToolBtn === void 0 ? null : _props$appendToolBtn;
127
       appendToolBtn = _props$appendToolBtn === void 0 ? null : _props$appendToolBtn;
128
 
128
 
129
   if (toolAlign === 'inner') {
129
   if (toolAlign === 'inner') {
130
-    return React.createElement(BarftEditorPage, {
130
+    return React.createElement(BarftEditorPage, Object.assign({
131
       value: value,
131
       value: value,
132
       onChange: onChange,
132
       onChange: onChange,
133
       controls: [],
133
       controls: [],
140
           toolList: toolList
140
           toolList: toolList
141
         }, injectControlsToolBar));
141
         }, injectControlsToolBar));
142
       }
142
       }
143
-    });
143
+    }, injectBraftEditorProps));
144
   }
144
   }
145
 
145
 
146
   return React.createElement("div", null, React.createElement(BarftEditorPage, Object.assign({
146
   return React.createElement("div", null, React.createElement(BarftEditorPage, Object.assign({

+ 1
- 1
eslib/Editor/index.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
lib/Editor/index.js View File

133
       appendToolBtn = _props$appendToolBtn === void 0 ? null : _props$appendToolBtn;
133
       appendToolBtn = _props$appendToolBtn === void 0 ? null : _props$appendToolBtn;
134
 
134
 
135
   if (toolAlign === 'inner') {
135
   if (toolAlign === 'inner') {
136
-    return React__default.createElement(BraftEditor$1.BarftEditorPage, {
136
+    return React__default.createElement(BraftEditor$1.BarftEditorPage, Object.assign({
137
       value: value,
137
       value: value,
138
       onChange: onChange,
138
       onChange: onChange,
139
       controls: [],
139
       controls: [],
146
           toolList: toolList
146
           toolList: toolList
147
         }, injectControlsToolBar));
147
         }, injectControlsToolBar));
148
       }
148
       }
149
-    });
149
+    }, injectBraftEditorProps));
150
   }
150
   }
151
 
151
 
152
   return React__default.createElement("div", null, React__default.createElement(BraftEditor$1.BarftEditorPage, Object.assign({
152
   return React__default.createElement("div", null, React__default.createElement(BraftEditor$1.BarftEditorPage, Object.assign({

+ 1
- 1
lib/Editor/index.js.map
File diff suppressed because it is too large
View File


+ 1
- 0
src/components/Editor/ImgTxtEditor/SimpleEditor.tsx View File

40
             {...injectControlsToolBar}
40
             {...injectControlsToolBar}
41
           />)
41
           />)
42
         }
42
         }
43
+        {...injectBraftEditorProps}
43
       />
44
       />
44
     )
45
     )
45
   }
46
   }

+ 1
- 1
stats.html
File diff suppressed because it is too large
View File


+ 1
- 1
stories/Editor.stories.tsx View File

123
           controls={[]}
123
           controls={[]}
124
           injectBraftEditorProps={{
124
           injectBraftEditorProps={{
125
             contentStyle: {
125
             contentStyle: {
126
-              height: '150px'
126
+              height: '130px'
127
             },
127
             },
128
           }}
128
           }}
129
           toolList={[
129
           toolList={[