@@ -30,13 +30,11 @@ import { IForm } from "../formComp/formDataConstants";
30
30
import { SimpleNameComp } from "../simpleNameComp" ;
31
31
import {
32
32
Button100 ,
33
- ButtonCompWrapper ,
34
33
ButtonStyleControl ,
35
34
} from "./videobuttonCompConstants" ;
36
35
import { RefControl } from "comps/controls/refControl" ;
37
36
import {
38
37
AutoHeightControl ,
39
- ImageStyleType ,
40
38
heightCalculator ,
41
39
widthCalculator ,
42
40
} from "@lowcoder-ee/index.sdk" ;
@@ -85,14 +83,6 @@ function getStyleIcon(style: any) {
85
83
` ;
86
84
}
87
85
88
- // const IconWrapper = styled.div<{ $styled: any }>`
89
- // display: flex;
90
- // svg {
91
- // width: ${styled.width}px !important;
92
- // height: ${styled.height}30px !important;
93
- // }
94
- // `;
95
-
96
86
function getFormOptions ( editorState : EditorState ) {
97
87
return editorState
98
88
. uiCompInfoList ( )
@@ -186,7 +176,6 @@ function submitForm(editorState: EditorState, formName: string) {
186
176
187
177
let ButtonTmpComp = ( function ( ) {
188
178
const childrenMap = {
189
- text : withDefault ( StringControl , trans ( "button.button" ) ) ,
190
179
iconSize : withDefault ( StringControl , "20px" ) ,
191
180
type : dropdownControl ( typeOptions , "" ) ,
192
181
autoHeight : withDefault ( AutoHeightControl , "fixed" ) ,
@@ -195,7 +184,6 @@ let ButtonTmpComp = (function () {
195
184
loading : BoolCodeControl ,
196
185
form : SelectFormControl ,
197
186
prefixIcon : IconControl ,
198
- suffixIcon : IconControl ,
199
187
style : ButtonStyleControl ,
200
188
viewRef : RefControl < HTMLElement > ,
201
189
} ;
@@ -209,39 +197,23 @@ let ButtonTmpComp = (function () {
209
197
useEffect ( ( ) => {
210
198
if ( height && width ) {
211
199
onResize ( ) ;
212
- console . log ( "props" , props , height , width ) ;
213
200
}
214
201
} , [ height , width ] ) ;
215
202
216
203
const setStyle = ( height : string , width : string ) => {
217
- console . log ( width , height ) ;
218
-
219
204
const img = imgRef . current ;
220
205
221
206
const imgDiv = img ?. getElementsByTagName ( "button" ) [ 0 ] ;
222
- console . log ( "img 1" , img ) ;
223
207
const imgCurrent = img ?. getElementsByTagName ( "button" ) [ 0 ] ;
224
- console . log ( "img 2" , imgCurrent ) ;
225
208
img ! . style . height = height ;
226
209
img ! . style . width = width ;
227
210
imgDiv ! . style . height = height ;
228
211
imgDiv ! . style . width = width ;
229
- // imgCurrent!.style.height = height;
230
- // imgCurrent!.style.width = width;
231
212
} ;
232
213
233
214
const onResize = ( ) => {
234
215
const img = imgRef . current ;
235
- console . log ( "img" , img ) ;
236
216
const container = conRef . current ;
237
- // console.log("img", container);
238
- console . log (
239
- "img" ,
240
- ! img ?. clientWidth ,
241
- ! img ?. clientHeight ,
242
- props . autoHeight ,
243
- ! width
244
- ) ;
245
217
if (
246
218
! img ?. clientWidth ||
247
219
! img ?. clientHeight ||
@@ -250,20 +222,12 @@ let ButtonTmpComp = (function () {
250
222
) {
251
223
return ;
252
224
}
253
- // fixme border style bug on safari
254
- // if (
255
- // (_.divide(container?.clientWidth!, container?.clientHeight!) || 0) >
256
- // (_.divide(Number(width), Number(height)) || 0)
257
- // ) {
258
- // setStyle("100%", "auto");
259
- // } else {
260
225
console . log (
261
226
container ?. clientHeight + "px" ,
262
227
container ?. clientWidth + "px"
263
228
) ;
264
229
265
230
setStyle ( container ?. clientHeight + "px" , container ?. clientWidth + "px" ) ;
266
- // }
267
231
} ;
268
232
269
233
return (
@@ -318,7 +282,6 @@ let ButtonTmpComp = (function () {
318
282
. setPropertyViewFn ( ( children ) => (
319
283
< >
320
284
< Section name = { sectionNames . basic } >
321
- { children . text . propertyView ( { label : trans ( "text" ) } ) }
322
285
{ children . autoHeight . getPropertyView ( ) }
323
286
</ Section >
324
287
< Section name = { sectionNames . interaction } >
@@ -339,9 +302,6 @@ let ButtonTmpComp = (function () {
339
302
{ children . prefixIcon . propertyView ( {
340
303
label : trans ( "button.prefixIcon" ) ,
341
304
} ) }
342
- { children . suffixIcon . propertyView ( {
343
- label : trans ( "button.suffixIcon" ) ,
344
- } ) }
345
305
{ children . iconSize . propertyView ( {
346
306
label : trans ( "meeting.iconSize" ) ,
347
307
} ) }
@@ -360,7 +320,6 @@ ButtonTmpComp = class extends ButtonTmpComp {
360
320
}
361
321
} ;
362
322
export const ControlButton = withExposingConfigs ( ButtonTmpComp , [
363
- new NameConfig ( "text" , trans ( "button.textDesc" ) ) ,
364
323
new NameConfig ( "loading" , trans ( "button.loadingDesc" ) ) ,
365
324
...CommonNameConfig ,
366
325
] ) ;
0 commit comments