gm-printer 10.13.8 → 10.13.11
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/common/component.js +1 -1
- package/src/common/editor_edit_field.js +1 -17
- package/src/common/editor_select.js +6 -5
- package/src/common/editor_special_field.js +1 -1
- package/src/common/editor_store.js +34 -3
- package/src/common/editor_title.js +3 -2
- package/src/common/get_editor_css.js +1 -1
- package/src/common/hoc_with_shadow_dom.js +5 -5
- package/src/common/hoc_with_store.js +64 -25
- package/src/components/tooltip/index.js +1 -1
- package/src/config.js +2 -0
- package/src/editor/context_menu.js +22 -2
- package/src/editor/editor.js +1 -1
- package/src/editor_account/context_menu.js +7 -3
- package/src/editor_account/editor.js +1 -1
- package/src/editor_account_statement/editor.js +1 -1
- package/src/editor_purchase/context_menu.js +5 -0
- package/src/editor_purchase/editor.js +1 -1
- package/src/editor_purchase/editor_special_table.js +8 -1
- package/src/editor_salemenus/context_menu.js +5 -1
- package/src/editor_salemenus/editor.js +1 -1
- package/src/editor_settle/context_menu.js +20 -9
- package/src/editor_settle/editor.js +1 -1
- package/src/editor_statement/context_menu.js +6 -2
- package/src/editor_statement/editor.js +1 -1
- package/src/editor_stockin/context_menu.js +7 -3
- package/src/editor_stockin/editor.js +1 -1
- package/src/editor_stockout/context_menu.js +5 -1
- package/src/editor_stockout/editor.js +1 -1
- package/src/index.js +2 -1
- package/src/printer/barcode.js +6 -0
- package/src/printer/get_css.js +1 -1
- package/src/printer/table.js +7 -1
- package/src/util.js +6 -5
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/table.js":"1","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/store.js":"2","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/editor.js":"3","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/context_menu.js":"4","/Users/yancheng/gm/gm-open-source/gm-printer/src/components/tooltip/index.js":"5","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/common_context_menu.js":"6","/Users/yancheng/gm/gm-open-source/gm-printer/src/util.js":"7","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/printer.js":"8","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/do_print.js":"9","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_special_field.js":"10","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_store.js":"11","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_shadow_dom.js":"12","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_title.js":"13","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_store.js":"14","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_add_field.js":"15","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_page_summary.js":"16","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/editor.js":"17","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/context_menu.js":"18"},{"size":
|
|
1
|
+
[{"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/table.js":"1","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/store.js":"2","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/editor.js":"3","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/context_menu.js":"4","/Users/yancheng/gm/gm-open-source/gm-printer/src/components/tooltip/index.js":"5","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/common_context_menu.js":"6","/Users/yancheng/gm/gm-open-source/gm-printer/src/util.js":"7","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/printer.js":"8","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/do_print.js":"9","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_special_field.js":"10","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_store.js":"11","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_shadow_dom.js":"12","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_title.js":"13","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_store.js":"14","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_add_field.js":"15","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_page_summary.js":"16","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/editor.js":"17","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/context_menu.js":"18"},{"size":9379,"mtime":1643448762149,"results":"19","hashOfConfig":"20"},{"size":12882,"mtime":1638178010006,"results":"21","hashOfConfig":"20"},{"size":4244,"mtime":1635494969691,"results":"22","hashOfConfig":"20"},{"size":3683,"mtime":1635851060224,"results":"23","hashOfConfig":"20"},{"size":616,"mtime":1621235314060,"results":"24","hashOfConfig":"25"},{"size":9693,"mtime":1621242097206,"results":"26","hashOfConfig":"25"},{"size":7258,"mtime":1639037857730,"results":"27","hashOfConfig":"20"},{"size":8733,"mtime":1635931829112,"results":"28","hashOfConfig":"20"},{"size":3119,"mtime":1634191808754,"results":"29","hashOfConfig":"20"},{"size":1113,"mtime":1635407660514,"results":"30","hashOfConfig":"20"},{"size":3905,"mtime":1635304242763},{"size":861,"mtime":1635246075403,"results":"31","hashOfConfig":"20"},{"size":3260,"mtime":1635334661529,"results":"32","hashOfConfig":"20"},{"size":24504,"mtime":1635908548975,"results":"33","hashOfConfig":"20"},{"size":1907,"mtime":1635492860490,"results":"34","hashOfConfig":"20"},{"size":3548,"mtime":1635409410379,"results":"35","hashOfConfig":"20"},{"size":2989,"mtime":1635495718901,"results":"36","hashOfConfig":"20"},{"size":3465,"mtime":1635495798948,"results":"37","hashOfConfig":"20"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1j0d8vf",{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"175njjo",{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"60","messages":"61","errorCount":13,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","errorCount":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/table.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/store.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/editor.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/components/tooltip/index.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/common_context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/util.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/printer.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/do_print.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_special_field.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_shadow_dom.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_title.js",["72","73","74","75","76","77","78","79","80","81","82","83","84"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_store.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_add_field.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_page_summary.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/editor.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/context_menu.js",["85","86"],{"ruleId":"87","severity":2,"message":"88","line":47,"column":13,"nodeType":"89","messageId":"90","endLine":47,"endColumn":22},{"ruleId":"87","severity":2,"message":"91","line":48,"column":30,"nodeType":"92","messageId":"90","endLine":48,"endColumn":36},{"ruleId":"87","severity":2,"message":"93","line":49,"column":31,"nodeType":"92","messageId":"90","endLine":49,"endColumn":47},{"ruleId":"87","severity":2,"message":"93","line":50,"column":21,"nodeType":"92","messageId":"90","endLine":50,"endColumn":37},{"ruleId":"87","severity":2,"message":"88","line":56,"column":13,"nodeType":"89","messageId":"90","endLine":56,"endColumn":22},{"ruleId":"87","severity":2,"message":"94","line":59,"column":20,"nodeType":"92","messageId":"90","endLine":59,"endColumn":32},{"ruleId":"87","severity":2,"message":"91","line":61,"column":23,"nodeType":"92","messageId":"90","endLine":61,"endColumn":29},{"ruleId":"87","severity":2,"message":"95","line":61,"column":30,"nodeType":"92","messageId":"90","endLine":61,"endColumn":34},{"ruleId":"87","severity":2,"message":"96","line":63,"column":15,"nodeType":"92","messageId":"90","endLine":63,"endColumn":19},{"ruleId":"87","severity":2,"message":"88","line":67,"column":23,"nodeType":"89","messageId":"90","endLine":67,"endColumn":32},{"ruleId":"87","severity":2,"message":"91","line":70,"column":32,"nodeType":"92","messageId":"90","endLine":70,"endColumn":38},{"ruleId":"87","severity":2,"message":"88","line":78,"column":13,"nodeType":"89","messageId":"90","endLine":78,"endColumn":22},{"ruleId":"87","severity":2,"message":"91","line":84,"column":42,"nodeType":"92","messageId":"90","endLine":84,"endColumn":48},{"ruleId":"97","severity":2,"message":"98","line":64,"column":11,"nodeType":"92","endLine":64,"endColumn":17},{"ruleId":"97","severity":2,"message":"99","line":102,"column":24,"nodeType":"92","endLine":102,"endColumn":32},"react/prop-types","'editStore' is missing in props validation","Property","missingPropType","'editStore.config' is missing in props validation","Identifier","'editStore.config.batchPrintConfig' is missing in props validation","'editStore.originConfig' is missing in props validation","'editStore.config.name' is missing in props validation","'editStore.init' is missing in props validation","no-unused-vars","'keyArr' is assigned a value but never used.","'mockData' is assigned a value but never used."]
|
package/package.json
CHANGED
package/src/common/component.js
CHANGED
|
@@ -205,12 +205,6 @@ class EditorField extends React.Component {
|
|
|
205
205
|
(editStore.computedTableSpecialConfig.subtotal &&
|
|
206
206
|
get(subtotal, 'isUpperLowerCaseSeparate')) ||
|
|
207
207
|
false
|
|
208
|
-
// 位置交换
|
|
209
|
-
const subtotalCommutationPlace =
|
|
210
|
-
(editStore.computedTableSpecialConfig.subtotal &&
|
|
211
|
-
get(subtotal, 'isCommutationPlace')) ||
|
|
212
|
-
false
|
|
213
|
-
|
|
214
208
|
return (
|
|
215
209
|
<div>
|
|
216
210
|
<Title title={i18next.t('编辑字段')} />
|
|
@@ -276,7 +270,7 @@ class EditorField extends React.Component {
|
|
|
276
270
|
</Flex>
|
|
277
271
|
|
|
278
272
|
<Flex alignCenter className='gm-padding-top-5 gm-text-desc'>
|
|
279
|
-
{i18next.t('
|
|
273
|
+
{i18next.t('商品排列仅适用于双栏、三栏商品设置')}
|
|
280
274
|
</Flex>
|
|
281
275
|
|
|
282
276
|
<Gap height='5px' />
|
|
@@ -376,16 +370,6 @@ class EditorField extends React.Component {
|
|
|
376
370
|
onChange={this.handleSubtotalStyleChange}
|
|
377
371
|
/>
|
|
378
372
|
</Flex>
|
|
379
|
-
{/* <Flex style={{ margin: '5px 0 5px 62px' }}>
|
|
380
|
-
<Flex alignCenter>
|
|
381
|
-
<input
|
|
382
|
-
type='checkbox'
|
|
383
|
-
checked={subtotalCommutationPlace}
|
|
384
|
-
onChange={editStore.setSubtotalCommutationPlace}
|
|
385
|
-
/>
|
|
386
|
-
</Flex>
|
|
387
|
-
<Flex> {i18next.t('合计、每页合计交换位置')}</Flex>
|
|
388
|
-
</Flex> */}
|
|
389
373
|
<EditorSubtotalCheck
|
|
390
374
|
subtotalCheckDisabled
|
|
391
375
|
subtotalChecked={subtotalNeedUpperCase}
|
|
@@ -126,7 +126,7 @@ class EditorSelector extends React.Component {
|
|
|
126
126
|
</Flex>
|
|
127
127
|
|
|
128
128
|
{this.props.isPurchase && (
|
|
129
|
-
|
|
129
|
+
<>
|
|
130
130
|
<Flex alignCenter className='gm-padding-top-5'>
|
|
131
131
|
<div>{i18next.t('批量打印设置')}:</div>
|
|
132
132
|
<Select
|
|
@@ -146,10 +146,10 @@ class EditorSelector extends React.Component {
|
|
|
146
146
|
连续打印(一张采购单可能出现多个供应商)
|
|
147
147
|
</p>
|
|
148
148
|
</div>
|
|
149
|
-
|
|
149
|
+
</>
|
|
150
150
|
)}
|
|
151
151
|
|
|
152
|
-
<Flex
|
|
152
|
+
<Flex className='gm-padding-top-5 gm-text-red' column>
|
|
153
153
|
{computedSelectedRegionTip}
|
|
154
154
|
</Flex>
|
|
155
155
|
</div>
|
|
@@ -158,9 +158,10 @@ class EditorSelector extends React.Component {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
EditorSelector.propTypes = {
|
|
161
|
-
isPurchase: PropTypes.bool
|
|
161
|
+
isPurchase: PropTypes.bool,
|
|
162
|
+
editStore: PropTypes.object
|
|
162
163
|
}
|
|
163
|
-
EditorSelector.
|
|
164
|
+
EditorSelector.defaultProps = {
|
|
164
165
|
isPurchase: false
|
|
165
166
|
}
|
|
166
167
|
|
|
@@ -33,7 +33,7 @@ class SpecialField extends React.Component {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
SpecialField.propTypes = {
|
|
36
|
-
fields: PropTypes.object
|
|
36
|
+
fields: PropTypes.object,
|
|
37
37
|
handleAddField: PropTypes.func,
|
|
38
38
|
addFields: PropTypes.object.isRequired,
|
|
39
39
|
editStore: PropTypes.object,
|
|
@@ -3,6 +3,7 @@ import { action, computed, observable, set, toJS } from 'mobx'
|
|
|
3
3
|
import { pageTypeMap } from '../config'
|
|
4
4
|
import _ from 'lodash'
|
|
5
5
|
import { dispatchMsg, getBlockName, exchange } from '../util'
|
|
6
|
+
import React from 'react'
|
|
6
7
|
|
|
7
8
|
class EditorStore {
|
|
8
9
|
@observable
|
|
@@ -183,6 +184,21 @@ class EditorStore {
|
|
|
183
184
|
@action
|
|
184
185
|
setSizePageType(type) {
|
|
185
186
|
const { size, gap, name } = pageTypeMap[type]
|
|
187
|
+
const { contents } = this.config
|
|
188
|
+
// 判断表格是否是三栏表格
|
|
189
|
+
const tableIsMulti3 = _.find(
|
|
190
|
+
contents,
|
|
191
|
+
item => item?.dataKey && item?.dataKey.includes('multi3')
|
|
192
|
+
)
|
|
193
|
+
// 原本是三栏表格,切换到三分纸时,修改dataKey的值
|
|
194
|
+
if (tableIsMulti3 && type === 'A4/3') {
|
|
195
|
+
this.config.contents = _.map(contents, item => {
|
|
196
|
+
if (item?.dataKey && item?.dataKey.includes('multi3')) {
|
|
197
|
+
return { ...item, dataKey: 'orders' }
|
|
198
|
+
}
|
|
199
|
+
return item
|
|
200
|
+
})
|
|
201
|
+
}
|
|
186
202
|
|
|
187
203
|
this.config.page = {
|
|
188
204
|
...this.config.page,
|
|
@@ -202,9 +218,17 @@ class EditorStore {
|
|
|
202
218
|
@computed
|
|
203
219
|
get computedSelectedRegionTip() {
|
|
204
220
|
if (!this.selectedRegion) return ''
|
|
205
|
-
return /(contents)|(sign)/g.test(this.selectedRegion)
|
|
206
|
-
|
|
207
|
-
|
|
221
|
+
return /(contents)|(sign)/g.test(this.selectedRegion) ? (
|
|
222
|
+
<>
|
|
223
|
+
<div>{i18next.t('说明:所选区域的内容仅打印一次')}</div>
|
|
224
|
+
<div>
|
|
225
|
+
|
|
226
|
+
{i18next.t('开启[三栏商品]打印选项,打印内容可能超出纸张')}
|
|
227
|
+
</div>
|
|
228
|
+
</>
|
|
229
|
+
) : (
|
|
230
|
+
i18next.t('说明:所选区域的内容每页均打印')
|
|
231
|
+
)
|
|
208
232
|
}
|
|
209
233
|
|
|
210
234
|
@computed
|
|
@@ -427,7 +451,14 @@ class EditorStore {
|
|
|
427
451
|
newDataKey = _.concat(keyArr, key)
|
|
428
452
|
}
|
|
429
453
|
|
|
454
|
+
if (newDataKey.includes('multi') && key === 'multi3') {
|
|
455
|
+
newDataKey = _.without(newDataKey, 'multi')
|
|
456
|
+
} else if (newDataKey.includes('multi3') && key === 'multi') {
|
|
457
|
+
newDataKey = _.without(newDataKey, 'multi3')
|
|
458
|
+
}
|
|
459
|
+
|
|
430
460
|
newDataKey = _.sortBy(newDataKey, [
|
|
461
|
+
o => o === 'multi3',
|
|
431
462
|
o => o === 'multi',
|
|
432
463
|
o => o === 'category',
|
|
433
464
|
o => o === 'orders'
|
|
@@ -126,9 +126,10 @@ class EditorTitle extends React.Component {
|
|
|
126
126
|
|
|
127
127
|
EditorTitle.propTypes = {
|
|
128
128
|
onSave: PropTypes.func.isRequired,
|
|
129
|
-
isPurchase: PropTypes.bool
|
|
129
|
+
isPurchase: PropTypes.bool,
|
|
130
|
+
editStore: PropTypes.object
|
|
130
131
|
}
|
|
131
|
-
EditorTitle.
|
|
132
|
+
EditorTitle.defaultProps = {
|
|
132
133
|
isPurchase: false
|
|
133
134
|
}
|
|
134
135
|
|
|
@@ -8,21 +8,21 @@ const withShadowDom = WrapCom => {
|
|
|
8
8
|
return class extends React.Component {
|
|
9
9
|
ref = React.createRef()
|
|
10
10
|
|
|
11
|
-
componentDidMount
|
|
11
|
+
componentDidMount() {
|
|
12
12
|
const shadowRoot = this.ref.current.attachShadow({ mode: 'open' })
|
|
13
13
|
// 在window下挂 shadow root
|
|
14
14
|
window.shadowRoot = shadowRoot
|
|
15
|
-
ReactDOM.render(<WrapCom {...this.props}/>, shadowRoot)
|
|
15
|
+
ReactDOM.render(<WrapCom {...this.props} />, shadowRoot)
|
|
16
16
|
insertCSS(getPrinterCSS() + getEditorCSS(), shadowRoot)
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
componentWillUnmount
|
|
19
|
+
componentWillUnmount() {
|
|
20
20
|
// 移除示例,不然很多意想不到的事情发生
|
|
21
21
|
ReactDOM.unmountComponentAtNode(window.shadowRoot)
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
render
|
|
25
|
-
return <div id='shadowroot' ref={this.ref}/>
|
|
24
|
+
render() {
|
|
25
|
+
return <div id='shadowroot' ref={this.ref} />
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -4,29 +4,65 @@ import { getStyleWithDiff } from '../util'
|
|
|
4
4
|
|
|
5
5
|
const withStore = store => WrapComponent =>
|
|
6
6
|
class extends React.Component {
|
|
7
|
-
constructor
|
|
7
|
+
constructor(props) {
|
|
8
8
|
super(props)
|
|
9
9
|
this.store = store
|
|
10
10
|
this.store.init(props.config)
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
componentDidMount
|
|
14
|
-
window.document.addEventListener(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
window.document.addEventListener(
|
|
19
|
-
|
|
13
|
+
componentDidMount() {
|
|
14
|
+
window.document.addEventListener(
|
|
15
|
+
'gm-printer-select',
|
|
16
|
+
this.handlePrinterSelect
|
|
17
|
+
)
|
|
18
|
+
window.document.addEventListener(
|
|
19
|
+
'gm-printer-select-region',
|
|
20
|
+
this.handleSelectedRegion
|
|
21
|
+
)
|
|
22
|
+
window.document.addEventListener(
|
|
23
|
+
'gm-printer-panel-style-set',
|
|
24
|
+
this.handlePrinterPanelStyleSet
|
|
25
|
+
)
|
|
26
|
+
window.document.addEventListener(
|
|
27
|
+
'gm-printer-block-style-set',
|
|
28
|
+
this.handlePrinterBlockStyleSet
|
|
29
|
+
)
|
|
30
|
+
window.document.addEventListener(
|
|
31
|
+
'gm-printer-block-text-set',
|
|
32
|
+
this.handlePrinterBlockTextSet
|
|
33
|
+
)
|
|
34
|
+
window.document.addEventListener(
|
|
35
|
+
'gm-printer-table-drag',
|
|
36
|
+
this.handlePrinterTableDrag
|
|
37
|
+
)
|
|
20
38
|
window.document.addEventListener('keydown', this.handleKeyDown)
|
|
21
39
|
}
|
|
22
40
|
|
|
23
|
-
componentWillUnmount
|
|
24
|
-
window.document.removeEventListener(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
window.document.removeEventListener(
|
|
29
|
-
|
|
41
|
+
componentWillUnmount() {
|
|
42
|
+
window.document.removeEventListener(
|
|
43
|
+
'gm-printer-select',
|
|
44
|
+
this.handlePrinterSelect
|
|
45
|
+
)
|
|
46
|
+
window.document.removeEventListener(
|
|
47
|
+
'gm-printer-select-region',
|
|
48
|
+
this.handleSelectedRegion
|
|
49
|
+
)
|
|
50
|
+
window.document.removeEventListener(
|
|
51
|
+
'gm-printer-panel-style-set',
|
|
52
|
+
this.handlePrinterPanelStyleSet
|
|
53
|
+
)
|
|
54
|
+
window.document.removeEventListener(
|
|
55
|
+
'gm-printer-block-style-set',
|
|
56
|
+
this.handlePrinterBlockStyleSet
|
|
57
|
+
)
|
|
58
|
+
window.document.removeEventListener(
|
|
59
|
+
'gm-printer-block-text-set',
|
|
60
|
+
this.handlePrinterBlockTextSet
|
|
61
|
+
)
|
|
62
|
+
window.document.removeEventListener(
|
|
63
|
+
'gm-printer-table-drag',
|
|
64
|
+
this.handlePrinterTableDrag
|
|
65
|
+
)
|
|
30
66
|
window.document.removeEventListener('keydown', this.handleKeyDown)
|
|
31
67
|
}
|
|
32
68
|
|
|
@@ -35,31 +71,31 @@ const withStore = store => WrapComponent =>
|
|
|
35
71
|
this.store.setSelectedRegion(selected)
|
|
36
72
|
}
|
|
37
73
|
|
|
38
|
-
handlePrinterSelect =
|
|
74
|
+
handlePrinterSelect = e => {
|
|
39
75
|
const { selected } = e.detail
|
|
40
76
|
this.store.setSelected(selected)
|
|
41
77
|
}
|
|
42
78
|
|
|
43
|
-
handlePrinterPanelStyleSet =
|
|
79
|
+
handlePrinterPanelStyleSet = e => {
|
|
44
80
|
const { name, style } = e.detail
|
|
45
81
|
this.store.setConfigPanelStyle(name, style)
|
|
46
82
|
}
|
|
47
83
|
|
|
48
|
-
handlePrinterBlockStyleSet =
|
|
84
|
+
handlePrinterBlockStyleSet = e => {
|
|
49
85
|
const { style } = e.detail
|
|
50
86
|
this.store.setConfigBlockBy('style', style)
|
|
51
87
|
}
|
|
52
88
|
|
|
53
|
-
handlePrinterBlockTextSet =
|
|
89
|
+
handlePrinterBlockTextSet = e => {
|
|
54
90
|
const { text } = e.detail
|
|
55
91
|
this.store.setConfigBlockBy('text', text)
|
|
56
92
|
}
|
|
57
93
|
|
|
58
|
-
handlePrinterTableDrag =
|
|
94
|
+
handlePrinterTableDrag = e => {
|
|
59
95
|
this.store.exchangeTableColumn(e.detail.target, e.detail.source)
|
|
60
96
|
}
|
|
61
97
|
|
|
62
|
-
handleKeyDown =
|
|
98
|
+
handleKeyDown = e => {
|
|
63
99
|
if (e.target !== window.document.body) {
|
|
64
100
|
return
|
|
65
101
|
}
|
|
@@ -81,7 +117,11 @@ const withStore = store => WrapComponent =>
|
|
|
81
117
|
diffY += 1
|
|
82
118
|
}
|
|
83
119
|
|
|
84
|
-
const newStyle = getStyleWithDiff(
|
|
120
|
+
const newStyle = getStyleWithDiff(
|
|
121
|
+
this.store.computedSelectedInfo.style,
|
|
122
|
+
diffX,
|
|
123
|
+
diffY
|
|
124
|
+
)
|
|
85
125
|
|
|
86
126
|
this.store.setConfigBlockBy('style', newStyle)
|
|
87
127
|
} else if (this.store.computedIsSelectTable) {
|
|
@@ -100,13 +140,12 @@ const withStore = store => WrapComponent =>
|
|
|
100
140
|
}
|
|
101
141
|
}
|
|
102
142
|
|
|
103
|
-
render
|
|
143
|
+
render() {
|
|
104
144
|
return (
|
|
105
145
|
<Provider editStore={this.store} mockData={this.props.mockData}>
|
|
106
|
-
<WrapComponent {...this.props}/>
|
|
146
|
+
<WrapComponent {...this.props} />
|
|
107
147
|
</Provider>
|
|
108
148
|
)
|
|
109
149
|
}
|
|
110
150
|
}
|
|
111
|
-
|
|
112
151
|
export default withStore
|
package/src/config.js
CHANGED
|
@@ -4,7 +4,7 @@ import CommonContextMenu from '../common/common_context_menu'
|
|
|
4
4
|
import { inject, observer } from 'mobx-react'
|
|
5
5
|
import _ from 'lodash'
|
|
6
6
|
import { Printer } from '../printer'
|
|
7
|
-
import
|
|
7
|
+
import PropTypes from 'prop-types'
|
|
8
8
|
|
|
9
9
|
const blockTypeList = [
|
|
10
10
|
{ value: '', text: i18next.t('插入文本') },
|
|
@@ -57,11 +57,19 @@ class ContextMenu extends React.Component {
|
|
|
57
57
|
return null
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
const {
|
|
61
|
+
editStore: {
|
|
62
|
+
config: {
|
|
63
|
+
page: { type }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
} = this.props
|
|
60
67
|
const arr = name.split('.')
|
|
61
68
|
const { dataKey, subtotal } = this.props.editStore.config.contents[arr[2]]
|
|
62
69
|
const keyArr = dataKey.split('_')
|
|
63
70
|
|
|
64
71
|
const isMultiActive = keyArr.includes('multi')
|
|
72
|
+
const isThreeActive = keyArr.includes('multi3')
|
|
65
73
|
const isCategoryActive = keyArr.includes('category')
|
|
66
74
|
const isSubtotalActive = subtotal.show
|
|
67
75
|
|
|
@@ -73,6 +81,15 @@ class ContextMenu extends React.Component {
|
|
|
73
81
|
>
|
|
74
82
|
{i18next.t('双栏商品')}
|
|
75
83
|
</div>
|
|
84
|
+
{/* 三分纸高度太小,做不了三栏,会死循环 */}
|
|
85
|
+
{type !== 'A4/3' && (
|
|
86
|
+
<div
|
|
87
|
+
onClick={this.handleChangeTableDataKey.bind(this, 'multi3', name)}
|
|
88
|
+
className={isThreeActive ? 'active' : ''}
|
|
89
|
+
>
|
|
90
|
+
{i18next.t('三栏商品')}
|
|
91
|
+
</div>
|
|
92
|
+
)}
|
|
76
93
|
<div
|
|
77
94
|
onClick={this.handleChangeTableDataKey.bind(this, 'category', name)}
|
|
78
95
|
className={isCategoryActive ? 'active' : ''}
|
|
@@ -107,5 +124,8 @@ class ContextMenu extends React.Component {
|
|
|
107
124
|
)
|
|
108
125
|
}
|
|
109
126
|
}
|
|
110
|
-
|
|
127
|
+
ContextMenu.propTypes = {
|
|
128
|
+
editStore: PropTypes.object,
|
|
129
|
+
mockData: PropTypes.object
|
|
130
|
+
}
|
|
111
131
|
export default ContextMenu
|
package/src/editor/editor.js
CHANGED
|
@@ -4,6 +4,7 @@ import CommonContextMenu from '../common/common_context_menu'
|
|
|
4
4
|
import { inject, observer } from 'mobx-react'
|
|
5
5
|
import _ from 'lodash'
|
|
6
6
|
import { Printer } from '../printer'
|
|
7
|
+
import PropTypes from 'prop-types'
|
|
7
8
|
|
|
8
9
|
const blockTypeList = [
|
|
9
10
|
{ value: '', text: i18next.t('插入文本') },
|
|
@@ -50,8 +51,8 @@ class ContextMenu extends React.Component {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
const arr = name.split('.')
|
|
53
|
-
const {
|
|
54
|
-
const keyArr = dataKey.split('_')
|
|
54
|
+
const { subtotal } = this.props.editStore.config.contents[arr[2]]
|
|
55
|
+
// const keyArr = dataKey.split('_')
|
|
55
56
|
|
|
56
57
|
// const isMultiActive = keyArr.includes('multi')
|
|
57
58
|
// const isCategoryActive = keyArr.includes('category')
|
|
@@ -99,5 +100,8 @@ class ContextMenu extends React.Component {
|
|
|
99
100
|
)
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
|
-
|
|
103
|
+
ContextMenu.propTypes = {
|
|
104
|
+
editStore: PropTypes.object,
|
|
105
|
+
mockData: PropTypes.object
|
|
106
|
+
}
|
|
103
107
|
export default ContextMenu
|
|
@@ -3,6 +3,7 @@ import React from 'react'
|
|
|
3
3
|
import CommonContextMenu from '../common/common_context_menu'
|
|
4
4
|
import { inject, observer } from 'mobx-react'
|
|
5
5
|
import { Printer } from '../printer'
|
|
6
|
+
import PropTypes from 'prop-types'
|
|
6
7
|
import _ from 'lodash'
|
|
7
8
|
|
|
8
9
|
const blockTypeList = [
|
|
@@ -84,4 +85,8 @@ class ContextMenu extends React.Component {
|
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
|
|
88
|
+
ContextMenu.propTypes = {
|
|
89
|
+
editStore: PropTypes.object,
|
|
90
|
+
mockData: PropTypes.object
|
|
91
|
+
}
|
|
87
92
|
export default ContextMenu
|
|
@@ -119,6 +119,12 @@ class TableDetailEditor extends React.Component {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
TableDetailEditor.propTypes = {
|
|
123
|
+
addFields: PropTypes.object.isRequired,
|
|
124
|
+
editStore: PropTypes.object,
|
|
125
|
+
config: PropTypes.object
|
|
126
|
+
}
|
|
127
|
+
|
|
122
128
|
@inject('editStore')
|
|
123
129
|
@observer
|
|
124
130
|
class EditorSpecialTable extends React.Component {
|
|
@@ -144,7 +150,8 @@ class EditorSpecialTable extends React.Component {
|
|
|
144
150
|
}
|
|
145
151
|
|
|
146
152
|
EditorSpecialTable.propTypes = {
|
|
147
|
-
addFields: PropTypes.object.isRequired
|
|
153
|
+
addFields: PropTypes.object.isRequired,
|
|
154
|
+
editStore: PropTypes.object
|
|
148
155
|
}
|
|
149
156
|
|
|
150
157
|
export default EditorSpecialTable
|
|
@@ -4,6 +4,7 @@ import _ from 'lodash'
|
|
|
4
4
|
import CommonContextMenu from '../common/common_context_menu'
|
|
5
5
|
import { inject, observer } from 'mobx-react'
|
|
6
6
|
import { Printer } from '../printer'
|
|
7
|
+
import PropTypes from 'prop-types'
|
|
7
8
|
import { hasSubtotalBtnTableDataKeySet } from './editor'
|
|
8
9
|
|
|
9
10
|
const blockTypeList = [
|
|
@@ -101,5 +102,8 @@ class ContextMenu extends React.Component {
|
|
|
101
102
|
)
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
|
-
|
|
105
|
+
ContextMenu.propTypes = {
|
|
106
|
+
editStore: PropTypes.object,
|
|
107
|
+
mockData: PropTypes.object
|
|
108
|
+
}
|
|
105
109
|
export default ContextMenu
|
|
@@ -4,6 +4,7 @@ import CommonContextMenu from '../common/common_context_menu'
|
|
|
4
4
|
import { inject, observer } from 'mobx-react'
|
|
5
5
|
import { Printer } from '../printer'
|
|
6
6
|
import _ from 'lodash'
|
|
7
|
+
import PropTypes from 'prop-types'
|
|
7
8
|
|
|
8
9
|
const blockTypeList = [
|
|
9
10
|
{ value: '', text: i18next.t('插入文本') },
|
|
@@ -17,13 +18,13 @@ const blockTypeList = [
|
|
|
17
18
|
}))
|
|
18
19
|
@observer
|
|
19
20
|
class ContextMenu extends React.Component {
|
|
20
|
-
handleSubtotal =
|
|
21
|
+
handleSubtotal = name => {
|
|
21
22
|
const { editStore } = this.props
|
|
22
23
|
|
|
23
24
|
editStore.setSubtotalShow(name)
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
hasSubtotalBtn =
|
|
27
|
+
hasSubtotalBtn = name => {
|
|
27
28
|
if (!name) return false
|
|
28
29
|
|
|
29
30
|
const arr = name.split('.')
|
|
@@ -34,7 +35,7 @@ class ContextMenu extends React.Component {
|
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
renderOrderActionBtn =
|
|
38
|
+
renderOrderActionBtn = name => {
|
|
38
39
|
if (!this.hasSubtotalBtn(name)) {
|
|
39
40
|
return null
|
|
40
41
|
}
|
|
@@ -45,18 +46,24 @@ class ContextMenu extends React.Component {
|
|
|
45
46
|
const isSubtotalActive = subtotal.show
|
|
46
47
|
|
|
47
48
|
return (
|
|
48
|
-
|
|
49
|
-
<div
|
|
50
|
-
|
|
49
|
+
<>
|
|
50
|
+
<div
|
|
51
|
+
onClick={this.handleSubtotal.bind(this, name)}
|
|
52
|
+
className={isSubtotalActive ? 'active' : ''}
|
|
53
|
+
>
|
|
54
|
+
{i18next.t('每页合计')}
|
|
51
55
|
</div>
|
|
52
|
-
|
|
56
|
+
</>
|
|
53
57
|
)
|
|
54
58
|
}
|
|
55
59
|
|
|
56
|
-
render
|
|
60
|
+
render() {
|
|
57
61
|
const { editStore, mockData } = this.props
|
|
58
62
|
return (
|
|
59
|
-
<CommonContextMenu
|
|
63
|
+
<CommonContextMenu
|
|
64
|
+
renderTableAction={this.renderOrderActionBtn}
|
|
65
|
+
insertBlockList={blockTypeList}
|
|
66
|
+
>
|
|
60
67
|
<Printer
|
|
61
68
|
key={editStore.computedPrinterKey}
|
|
62
69
|
selected={editStore.selected}
|
|
@@ -69,4 +76,8 @@ class ContextMenu extends React.Component {
|
|
|
69
76
|
}
|
|
70
77
|
}
|
|
71
78
|
|
|
79
|
+
ContextMenu.propTypes = {
|
|
80
|
+
editStore: PropTypes.object,
|
|
81
|
+
mockData: PropTypes.object
|
|
82
|
+
}
|
|
72
83
|
export default ContextMenu
|
|
@@ -3,6 +3,7 @@ import React from 'react'
|
|
|
3
3
|
import CommonContextMenu from '../common/common_context_menu'
|
|
4
4
|
import { inject, observer } from 'mobx-react'
|
|
5
5
|
import { Printer } from '../printer'
|
|
6
|
+
import PropTypes from 'prop-types'
|
|
6
7
|
|
|
7
8
|
const blockTypeList = [
|
|
8
9
|
{ value: '', text: i18next.t('插入文本') },
|
|
@@ -16,7 +17,7 @@ const blockTypeList = [
|
|
|
16
17
|
}))
|
|
17
18
|
@observer
|
|
18
19
|
class ContextMenu extends React.Component {
|
|
19
|
-
render
|
|
20
|
+
render() {
|
|
20
21
|
const { editStore, mockData } = this.props
|
|
21
22
|
return (
|
|
22
23
|
<CommonContextMenu insertBlockList={blockTypeList}>
|
|
@@ -31,5 +32,8 @@ class ContextMenu extends React.Component {
|
|
|
31
32
|
)
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
+
ContextMenu.propTypes = {
|
|
36
|
+
editStore: PropTypes.object,
|
|
37
|
+
mockData: PropTypes.object
|
|
38
|
+
}
|
|
35
39
|
export default ContextMenu
|
|
@@ -3,6 +3,7 @@ import React from 'react'
|
|
|
3
3
|
import CommonContextMenu from '../common/common_context_menu'
|
|
4
4
|
import { inject, observer } from 'mobx-react'
|
|
5
5
|
import { Printer } from '../printer'
|
|
6
|
+
import PropTypes from 'prop-types'
|
|
6
7
|
|
|
7
8
|
const blockTypeList = [
|
|
8
9
|
{ value: '', text: i18next.t('插入文本') },
|
|
@@ -32,7 +33,7 @@ class ContextMenu extends React.Component {
|
|
|
32
33
|
const isMultiActive = keyArr.includes('multi')
|
|
33
34
|
|
|
34
35
|
return (
|
|
35
|
-
|
|
36
|
+
<>
|
|
36
37
|
<div
|
|
37
38
|
onClick={this.handleChangeTableDataKey.bind(this, 'multi', name)}
|
|
38
39
|
className={isMultiActive ? 'active' : ''}
|
|
@@ -51,7 +52,7 @@ class ContextMenu extends React.Component {
|
|
|
51
52
|
>
|
|
52
53
|
{i18next.t('入库金额小计')}
|
|
53
54
|
</div>
|
|
54
|
-
|
|
55
|
+
</>
|
|
55
56
|
)
|
|
56
57
|
}
|
|
57
58
|
|
|
@@ -73,5 +74,8 @@ class ContextMenu extends React.Component {
|
|
|
73
74
|
)
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
+
ContextMenu.propTypes = {
|
|
78
|
+
editStore: PropTypes.object,
|
|
79
|
+
mockData: PropTypes.object
|
|
80
|
+
}
|
|
77
81
|
export default ContextMenu
|
|
@@ -3,6 +3,7 @@ import React from 'react'
|
|
|
3
3
|
import CommonContextMenu from '../common/common_context_menu'
|
|
4
4
|
import { inject, observer } from 'mobx-react'
|
|
5
5
|
import { Printer } from '../printer'
|
|
6
|
+
import PropTypes from 'prop-types'
|
|
6
7
|
|
|
7
8
|
const blockTypeList = [
|
|
8
9
|
{ value: '', text: i18next.t('插入文本') },
|
|
@@ -73,5 +74,8 @@ class ContextMenu extends React.Component {
|
|
|
73
74
|
)
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
+
ContextMenu.propTypes = {
|
|
78
|
+
editStore: PropTypes.object,
|
|
79
|
+
mockData: PropTypes.object
|
|
80
|
+
}
|
|
77
81
|
export default ContextMenu
|
package/src/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
getCSS,
|
|
19
19
|
getPrintContainerHTML
|
|
20
20
|
} from './printer'
|
|
21
|
-
import { MULTI_SUFFIX } from './config'
|
|
21
|
+
import { MULTI_SUFFIX, MULTI_SUFFIX3 } from './config'
|
|
22
22
|
|
|
23
23
|
export * from './util'
|
|
24
24
|
export { setLocale } from '../locales'
|
|
@@ -40,5 +40,6 @@ export {
|
|
|
40
40
|
doBatchPrint,
|
|
41
41
|
getCSS,
|
|
42
42
|
MULTI_SUFFIX,
|
|
43
|
+
MULTI_SUFFIX3,
|
|
43
44
|
getPrintContainerHTML
|
|
44
45
|
}
|
package/src/printer/barcode.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import jsBarcode from 'jsbarcode'
|
|
3
|
+
import PropTypes from 'prop-types'
|
|
3
4
|
|
|
4
5
|
class BarCode extends React.Component {
|
|
5
6
|
barcode = React.createRef()
|
|
@@ -17,4 +18,9 @@ class BarCode extends React.Component {
|
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
BarCode.propTypes = {
|
|
22
|
+
value: PropTypes.string,
|
|
23
|
+
dataName: PropTypes.string
|
|
24
|
+
}
|
|
25
|
+
|
|
20
26
|
export default BarCode
|
package/src/printer/get_css.js
CHANGED
|
@@ -3,7 +3,7 @@ import normalizeCSS from 'css-loader!./normalize.csss'
|
|
|
3
3
|
// eslint-disable-next-line
|
|
4
4
|
import printerCSS from 'css-loader!postcss-loader!less-loader!./style.lesss'
|
|
5
5
|
|
|
6
|
-
function getCSS
|
|
6
|
+
function getCSS() {
|
|
7
7
|
return normalizeCSS.toString() + printerCSS.toString()
|
|
8
8
|
}
|
|
9
9
|
|
package/src/printer/table.js
CHANGED
|
@@ -205,7 +205,13 @@ class Table extends React.Component {
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
return (
|
|
208
|
-
<table
|
|
208
|
+
<table
|
|
209
|
+
style={{
|
|
210
|
+
// td会撑开table的宽度
|
|
211
|
+
tableLayout: 'inherit',
|
|
212
|
+
wordBreak: 'break-all'
|
|
213
|
+
}}
|
|
214
|
+
>
|
|
209
215
|
<thead>
|
|
210
216
|
<tr style={{ height: `${customerRowHeight}px` }}>
|
|
211
217
|
{_.map(columns, (col, i) => (
|
package/src/util.js
CHANGED
|
@@ -15,13 +15,14 @@ function getHeight(el) {
|
|
|
15
15
|
|
|
16
16
|
function getWidth(el) {
|
|
17
17
|
const styles = window.getComputedStyle(el)
|
|
18
|
-
//
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
// 取width保留小数点用 getBoundClientRect
|
|
19
|
+
const style = el.getBoundingClientRect()
|
|
20
|
+
const width = Math.round(style.width * 100) / 100 // 保留两位小数并四舍五入
|
|
21
|
+
const borderLeftWidth = parseFloat(styles.borderLeftWidth)
|
|
21
22
|
// const borderRightWidth = parseFloat(styles.borderRightWidth)
|
|
22
23
|
const paddingLeft = parseFloat(styles.paddingLeft)
|
|
23
24
|
const paddingRight = parseFloat(styles.paddingRight)
|
|
24
|
-
return width - paddingLeft - paddingRight
|
|
25
|
+
return width - borderLeftWidth - paddingLeft - paddingRight
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
function pxAdd(origin = '0px', add) {
|
|
@@ -163,7 +164,7 @@ const coverDigit2Uppercase = n => {
|
|
|
163
164
|
)
|
|
164
165
|
}
|
|
165
166
|
|
|
166
|
-
//
|
|
167
|
+
// 是不是多栏table
|
|
167
168
|
const isMultiTable = dataKey => dataKey.includes('multi')
|
|
168
169
|
|
|
169
170
|
// 获取table有多少栏,最少是双栏
|