gm-printer-label 3.1.6-beta.2 → 3.1.7-beta.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/package.json +1 -1
- package/src/printer/block.js +9 -3
- package/src/printer/printer.js +2 -0
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/
|
|
1
|
+
[{"/Volumes/gm-project/gm-printer-label/src/index.js":"1","/Volumes/gm-project/gm-printer-label/src/common/editor_compoents/edit_modify_filed.js":"2","/Volumes/gm-project/gm-printer-label/src/common/config.js":"3","/Volumes/gm-project/gm-printer-label/src/common/editor_compoents/store.js":"4","/Volumes/gm-project/gm-printer-label/src/util.js":"5","/Volumes/gm-project/gm-printer-label/src/printer/printer.js":"6","/Volumes/gm-project/gm-printer-label/src/printer/page.js":"7","/Volumes/gm-project/gm-printer-label/src/printer/block.js":"8","/Volumes/gm-project/gm-printer-label/src/common/editor_compoents/edit.js":"9","/Volumes/gm-project/gm-printer-label/src/common/editor_compoents/edit_select.js":"10","/Volumes/gm-project/gm-printer-label/src/printer/batch_printer.js":"11"},{"size":180,"mtime":1658462117054,"results":"12","hashOfConfig":"13"},{"size":4758,"mtime":1666264454043},{"size":1699,"mtime":1658461960259},{"size":7294,"mtime":1661759246118,"results":"14","hashOfConfig":"13"},{"size":1937,"mtime":1661225223156,"results":"15","hashOfConfig":"13"},{"size":1832,"mtime":1670827635163,"results":"16","hashOfConfig":"13"},{"size":411,"mtime":1660567552793},{"size":12566,"mtime":1670827660171},{"size":2928,"mtime":1661759246116},{"size":6103,"mtime":1661767254469},{"size":825,"mtime":1670827635162},{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"17s6x9q",{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Volumes/gm-project/gm-printer-label/src/index.js",[],"/Volumes/gm-project/gm-printer-label/src/common/editor_compoents/store.js",[],"/Volumes/gm-project/gm-printer-label/src/util.js",[],"/Volumes/gm-project/gm-printer-label/src/printer/printer.js",[]]
|
package/package.json
CHANGED
package/src/printer/block.js
CHANGED
|
@@ -138,6 +138,7 @@ class Block extends React.Component {
|
|
|
138
138
|
config,
|
|
139
139
|
className,
|
|
140
140
|
isStation,
|
|
141
|
+
doublePage,
|
|
141
142
|
...rest
|
|
142
143
|
} = this.props
|
|
143
144
|
const { isEdit } = this.state
|
|
@@ -278,7 +279,7 @@ class Block extends React.Component {
|
|
|
278
279
|
value={template(production_barcode, data)}
|
|
279
280
|
textMargin={0}
|
|
280
281
|
margin={0}
|
|
281
|
-
height={
|
|
282
|
+
height={style.height}
|
|
282
283
|
width={2}
|
|
283
284
|
displayValue={false}
|
|
284
285
|
dataName={production_barcode}
|
|
@@ -294,6 +295,7 @@ class Block extends React.Component {
|
|
|
294
295
|
style={{ height: '100%', width: '100%' }}
|
|
295
296
|
data-productionbarcode={template(production_barcode, data)}
|
|
296
297
|
// 需要减去14才能打印出正确高度
|
|
298
|
+
data-doublepage={doublePage}
|
|
297
299
|
data-height={parseInt(style.height) - 14}
|
|
298
300
|
data-name={index}
|
|
299
301
|
id={`production${template(production_barcode, data)}`}
|
|
@@ -362,7 +364,10 @@ class Block extends React.Component {
|
|
|
362
364
|
)
|
|
363
365
|
} else if (type === 'delivery_qrcode') {
|
|
364
366
|
content = isStation ? (
|
|
365
|
-
<QrCode
|
|
367
|
+
<QrCode
|
|
368
|
+
value={template(delivery_qrcode, data)}
|
|
369
|
+
size={parseInt(style.height)}
|
|
370
|
+
/>
|
|
366
371
|
) : (
|
|
367
372
|
<div
|
|
368
373
|
data-deliveryqrcode={template(delivery_qrcode, data)}
|
|
@@ -445,7 +450,8 @@ Block.propTypes = {
|
|
|
445
450
|
config: PropTypes.object.isRequired,
|
|
446
451
|
data: PropTypes.object.isRequired,
|
|
447
452
|
selected: PropTypes.number,
|
|
448
|
-
isStation: PropTypes.bool
|
|
453
|
+
isStation: PropTypes.bool,
|
|
454
|
+
doublePage: PropTypes.bool
|
|
449
455
|
}
|
|
450
456
|
|
|
451
457
|
export default Block
|
package/src/printer/printer.js
CHANGED
|
@@ -32,6 +32,7 @@ class Printer extends React.Component {
|
|
|
32
32
|
: +pageTypeMap[type].height.split('mm')[0]) *
|
|
33
33
|
ratio +
|
|
34
34
|
'mm'
|
|
35
|
+
|
|
35
36
|
return (
|
|
36
37
|
<div
|
|
37
38
|
className='gm-printer-label'
|
|
@@ -50,6 +51,7 @@ class Printer extends React.Component {
|
|
|
50
51
|
config={block}
|
|
51
52
|
data={data}
|
|
52
53
|
isStation={isStation}
|
|
54
|
+
doublePage={doublePage}
|
|
53
55
|
/>
|
|
54
56
|
))}
|
|
55
57
|
</Page>
|