gm-printer 10.14.4-beta.1 → 10.14.4-beta.2

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.14.4-beta.1",
3
+ "version": "10.14.4-beta.2",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -68,6 +68,11 @@ class EditorStore {
68
68
  @action
69
69
  setMultiDigitDecimal(bool) {
70
70
  this.isMultiDigitDecimal = bool
71
+ set(this.config, {
72
+ specialControlConfig: {
73
+ multiDigitDecimal: bool
74
+ }
75
+ })
71
76
  }
72
77
 
73
78
  @observable
@@ -195,6 +200,7 @@ class EditorStore {
195
200
  this.insertPanel = 'header'
196
201
  this.mockData = data
197
202
  this.isAutoFilling = false
203
+ this.isMultiDigitDecimal = false
198
204
  }
199
205
 
200
206
  @action
@@ -26,7 +26,7 @@ class ContextMenu extends React.Component {
26
26
  const {
27
27
  editStore,
28
28
  editStore: {
29
- config: { autoFillConfig }
29
+ config: { autoFillConfig, specialControlConfig }
30
30
  }
31
31
  } = this.props
32
32
 
@@ -36,6 +36,11 @@ class ContextMenu extends React.Component {
36
36
  autoFillConfig?.dataKey
37
37
  )
38
38
  }
39
+ /** 初始化特殊控制的配置 */
40
+ if (specialControlConfig?.multiDigitDecimal) {
41
+ // 多位小数
42
+ editStore.setMultiDigitDecimal(specialControlConfig?.multiDigitDecimal)
43
+ }
39
44
  }
40
45
 
41
46
  /**
@@ -48,6 +48,15 @@ class PrinterStore {
48
48
  @observable
49
49
  isAutoFilling = false
50
50
 
51
+ /** 是否开启多位小数,默认不开启,取两位 */
52
+ @observable
53
+ isMultiDigitDecimal = false
54
+
55
+ @action
56
+ setMultiDigitDecimal(bool) {
57
+ this.isMultiDigitDecimal = bool
58
+ }
59
+
51
60
  @action
52
61
  init(config, data) {
53
62
  this.ready = false