@@ -23,6 +23,7 @@ import {
2323 headerActionIcons ,
2424 pivotSheetDataCfg ,
2525 pivotSheetDataCfgForCompactMode ,
26+ pivotSheetMultiLineTextDataCfg ,
2627 s2ConditionsOptions ,
2728 s2ThemeConfig ,
2829 tableSheetDataCfg ,
@@ -129,6 +130,12 @@ const onThemeChange = (e: any) => {
129130 };
130131};
131132
133+ const onMaxLinesChange = (maxLines : number ) => {
134+ updateDataCfg (
135+ maxLines > 1 ? pivotSheetMultiLineTextDataCfg : pivotSheetDataCfg ,
136+ );
137+ };
138+
132139const logHandler =
133140 (name : string , callback ? : (... args : any []) => void ) =>
134141 (... args : any []) => {
@@ -321,6 +328,29 @@ const setThemeCfg = (cb: any) => {
321328 </a-radio-group >
322329 </a-tooltip >
323330
331+ <a-input-number
332+ style =" width : 120px "
333+ :min =" 0"
334+ placeholder =" 紧凑布局(附加宽)"
335+ :disabled =" options?.style?.layoutWidthType !== 'compact'"
336+ :value =" mergedOptions.style?.compactExtraWidth ?? 0"
337+ @change ="
338+ (value) =>
339+ updateOptions({ style: { compactExtraWidth: value } })
340+ "
341+ />
342+ <a-input-number
343+ style =" width : 120px "
344+ :min =" 0"
345+ placeholder =" 紧凑布局(最小宽)"
346+ :disabled =" options?.style?.layoutWidthType !== 'compact'"
347+ :value =" mergedOptions.style?.compactMinWidth ?? 0"
348+ @change ="
349+ (value) =>
350+ updateOptions({ style: { compactMinWidth: value } })
351+ "
352+ />
353+
324354 <a-button
325355 danger
326356 @click ="
@@ -334,7 +364,10 @@ const setThemeCfg = (cb: any) => {
334364 </a-button >
335365 </a-space >
336366
337- <a-space class =" filter-container" >
367+ <a-space
368+ class =" filter-container"
369+ style =" margin-bottom : 20px ; align-items : flex-start "
370+ >
338371 <a-switch
339372 checked-children =" 渲染组件"
340373 un-checked-children =" 卸载组件"
@@ -347,16 +380,19 @@ const setThemeCfg = (cb: any) => {
347380 :checked =" mergedOptions.debug"
348381 @change =" (checked) => updateOptions({ debug: checked })"
349382 />
350- <a-switch
351- checked-children =" 树形"
352- un-checked-children =" 平铺"
353- :checked =" mergedOptions.hierarchyType === 'tree'"
354- @change ="
355- (checked) =>
356- updateOptions({ hierarchyType: checked ? 'tree' : 'grid' })
357- "
358- :disabled =" sheetType === 'table'"
359- />
383+ <a-tooltip title =" 透视表层级结构" >
384+ <a-radio-group
385+ :value =" mergedOptions.hierarchyType"
386+ :disabled =" sheetType === 'table'"
387+ @change ="
388+ (e) => updateOptions({ hierarchyType: e.target.value })
389+ "
390+ >
391+ <a-radio-button value =" grid" >平铺</a-radio-button >
392+ <a-radio-button value =" tree" >树形</a-radio-button >
393+ <a-radio-button value =" grid-tree" >grid-tree</a-radio-button >
394+ </a-radio-group >
395+ </a-tooltip >
360396 <a-switch
361397 checked-children =" 数值挂列头"
362398 un-checked-children =" 数值挂行头"
@@ -592,6 +628,7 @@ const setThemeCfg = (cb: any) => {
592628 :options =" mergedOptions "
593629 :setOptions =" setOptions "
594630 :setThemeCfg =" setThemeCfg "
631+ :onMaxLinesChange =" onMaxLinesChange "
595632 />
596633 </a-collapse-panel >
597634 </a-collapse >
0 commit comments