gm-printer-label 3.0.9 → 3.0.10
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/Users/
|
|
1
|
+
[{"/Users/xurora/Desktop/gm-printer-label/src/util.js":"1","/Users/xurora/Desktop/gm-printer-label/src/printer/block.js":"2","/Users/xurora/Desktop/gm-printer-label/src/common/editor_compoents/store.js":"3"},{"size":1937,"mtime":1656502524283,"results":"4","hashOfConfig":"5"},{"size":10183,"mtime":1656502805870,"results":"6","hashOfConfig":"5"},{"size":7160,"mtime":1655951736143,"results":"7","hashOfConfig":"5"},{"filePath":"8","messages":"9","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"10llghp",{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/xurora/Desktop/gm-printer-label/src/util.js",[],"/Users/xurora/Desktop/gm-printer-label/src/printer/block.js",[],"/Users/xurora/Desktop/gm-printer-label/src/common/editor_compoents/store.js",[]]
|
package/package.json
CHANGED
|
@@ -106,6 +106,19 @@ class EditStore {
|
|
|
106
106
|
}
|
|
107
107
|
})
|
|
108
108
|
break
|
|
109
|
+
case 'merchandise_trace_qrcode':
|
|
110
|
+
this.config.blocks.push({
|
|
111
|
+
type,
|
|
112
|
+
merchandise_trace_qrcode: i18next.t('{{商品溯源二维码}}'),
|
|
113
|
+
style: {
|
|
114
|
+
position: 'absolute',
|
|
115
|
+
left: '0px',
|
|
116
|
+
top: '0px',
|
|
117
|
+
width: '100px',
|
|
118
|
+
height: '100px'
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
break
|
|
109
122
|
case 'order_qrcode':
|
|
110
123
|
this.config.blocks.push({
|
|
111
124
|
type,
|
|
@@ -202,6 +202,8 @@
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
|
|
206
|
+
|
|
205
207
|
&.gm-printer-label-block-type-diyqrcode {
|
|
206
208
|
div[data-diyqrcode] {
|
|
207
209
|
outline: 1px solid red;
|
|
@@ -265,6 +267,18 @@
|
|
|
265
267
|
top: calc(50% - 0.5em);
|
|
266
268
|
}
|
|
267
269
|
}
|
|
270
|
+
|
|
271
|
+
div[data-traceqrcode] {
|
|
272
|
+
outline: 1px solid red;
|
|
273
|
+
|
|
274
|
+
&::before {
|
|
275
|
+
content: '商品溯源二维码';
|
|
276
|
+
position: absolute;
|
|
277
|
+
font-style: italic;
|
|
278
|
+
left: calc(50% - 1.5em);
|
|
279
|
+
top: calc(50% - 0.5em);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
268
282
|
|
|
269
283
|
div[data-diycode] {
|
|
270
284
|
outline: 1px solid red;
|
package/src/printer/block.js
CHANGED
|
@@ -100,7 +100,8 @@ class Block extends React.Component {
|
|
|
100
100
|
url,
|
|
101
101
|
fieldType,
|
|
102
102
|
fieldKey,
|
|
103
|
-
production_barcode
|
|
103
|
+
production_barcode,
|
|
104
|
+
merchandise_trace_qrcode
|
|
104
105
|
},
|
|
105
106
|
data,
|
|
106
107
|
className,
|
|
@@ -156,6 +157,22 @@ class Block extends React.Component {
|
|
|
156
157
|
data-placeholder='订单溯源'
|
|
157
158
|
/>
|
|
158
159
|
)
|
|
160
|
+
} else if (type === 'merchandise_trace_qrcode') {
|
|
161
|
+
content = isStation ? (
|
|
162
|
+
<QrCode
|
|
163
|
+
value={miniAppLink + template(merchandise_trace_qrcode, data)}
|
|
164
|
+
size={parseInt(style.height)}
|
|
165
|
+
/>
|
|
166
|
+
) : (
|
|
167
|
+
<div
|
|
168
|
+
data-traceqrcode={template(merchandise_trace_qrcode, data)}
|
|
169
|
+
data-width={style.width}
|
|
170
|
+
data-height={style.height}
|
|
171
|
+
data-name={index}
|
|
172
|
+
style={{ width: '100%', height: '100%' }}
|
|
173
|
+
data-placeholder='商品溯源二维码'
|
|
174
|
+
/>
|
|
175
|
+
)
|
|
159
176
|
} else if (type === 'barcode') {
|
|
160
177
|
content = isStation ? (
|
|
161
178
|
<>
|