gm-printer 10.38.0 → 10.38.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.38.0",
3
+ "version": "10.38.4",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -20,13 +20,7 @@ class BatchPrinter extends React.Component {
20
20
  const { list } = this.props
21
21
 
22
22
  return _.map(list, ({ config, data }, i) => (
23
- <Printer
24
- key={i}
25
- data={data}
26
- config={config}
27
- onReady={this.handleReady}
28
- isLast={i === list.length - 1}
29
- />
23
+ <Printer key={i} data={data} config={config} onReady={this.handleReady} />
30
24
  ))
31
25
  }
32
26
  }
@@ -374,7 +374,6 @@ class Printer extends React.Component {
374
374
  onReady,
375
375
  selectedRegion,
376
376
  printerStore,
377
- isLast,
378
377
  ...rest
379
378
  } = this.props
380
379
  const {
@@ -391,8 +390,10 @@ class Printer extends React.Component {
391
390
  className={classNames('gm-printer', className)}
392
391
  style={Object.assign({}, style, {
393
392
  width,
394
- breakAfter: batchPrintConfig === 2 || isLast ? 'auto' : 'always',
395
- pageBreakAfter: batchPrintConfig === 2 || isLast ? 'auto' : 'always'
393
+ breakAfter:
394
+ batchPrintConfig === 2 || config?.page?.type === LONG_PRINT
395
+ ? 'auto'
396
+ : 'always'
396
397
  })}
397
398
  >
398
399
  {this.doRender()}