gm-printer 10.14.3 → 10.14.4-alpha.0
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/.eslintcache +1 -1
- package/build/demo.js +54 -0
- package/package.json +1 -1
- package/src/common/editor_store.js +15 -7
- package/src/printer/printer.js +5 -1
- package/yarn-error.log +0 -9663
package/package.json
CHANGED
|
@@ -156,14 +156,19 @@ class EditorStore {
|
|
|
156
156
|
|
|
157
157
|
set(this.config, {
|
|
158
158
|
autoFillConfig: {
|
|
159
|
-
region: this.selectedRegion,
|
|
159
|
+
region: this.selectedRegion || autoFillConfig?.region,
|
|
160
160
|
dataKey,
|
|
161
161
|
checked: isAutoFilling
|
|
162
162
|
}
|
|
163
163
|
})
|
|
164
|
-
|
|
164
|
+
|
|
165
|
+
const hasHadEmptyData = _.some(table, data => data?._isEmptyData)
|
|
166
|
+
|
|
167
|
+
// 开关打开,且之前数组不包含空数据,再进行填充
|
|
168
|
+
if (isAutoFilling && !hasHadEmptyData) {
|
|
165
169
|
table.push(...this.getFilledTableData(table))
|
|
166
|
-
}
|
|
170
|
+
}
|
|
171
|
+
if (!isAutoFilling) {
|
|
167
172
|
this.clearExtraTableData(dataKey)
|
|
168
173
|
return
|
|
169
174
|
}
|
|
@@ -861,14 +866,17 @@ class EditorStore {
|
|
|
861
866
|
// 获得表格自定义行高
|
|
862
867
|
@computed
|
|
863
868
|
get computedTableCustomerRowHeight() {
|
|
864
|
-
|
|
865
|
-
|
|
869
|
+
const _defaultRegion = this.config?.autoFillConfig?.region
|
|
870
|
+
let resHeight = 23
|
|
871
|
+
if (this.selectedRegion || _defaultRegion) {
|
|
872
|
+
const _selectedRegion = this.selectedRegion || _defaultRegion
|
|
873
|
+
const arr = _selectedRegion.split('.')
|
|
866
874
|
if (arr.includes('table')) {
|
|
867
875
|
const height = this.config.contents[arr[2]].customerRowHeight
|
|
868
|
-
|
|
876
|
+
resHeight = height === undefined ? 23 : height
|
|
869
877
|
}
|
|
870
878
|
}
|
|
871
|
-
return
|
|
879
|
+
return resHeight
|
|
872
880
|
}
|
|
873
881
|
|
|
874
882
|
@action.bound
|
package/src/printer/printer.js
CHANGED
|
@@ -183,7 +183,11 @@ class Printer extends React.Component {
|
|
|
183
183
|
content?.dataKey === autoFillConfig?.dataKey
|
|
184
184
|
|
|
185
185
|
const end = isAutofillConfig
|
|
186
|
-
? panel.end +
|
|
186
|
+
? panel.end +
|
|
187
|
+
Math.floor(
|
|
188
|
+
remainPageHeight /
|
|
189
|
+
printerStore.computedTableCustomerRowHeight
|
|
190
|
+
)
|
|
187
191
|
: panel.end
|
|
188
192
|
switch (panel.type) {
|
|
189
193
|
case 'table':
|