gm-printer 10.13.7 → 10.13.8-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.
@@ -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.isRequired,
79
+ mockData: PropTypes.object.isRequired
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
  }
@@ -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
@@ -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/util.js CHANGED
@@ -162,7 +162,7 @@ const coverDigit2Uppercase = n => {
162
162
  )
163
163
  }
164
164
 
165
- // 是不是双栏table
165
+ // 是不是多栏table
166
166
  const isMultiTable = dataKey => dataKey.includes('multi')
167
167
 
168
168
  // 获取table有多少栏,最少是双栏