gm-printer 10.14.1-alpha.3 → 10.14.1-alpha.4

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/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","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_purchase/context_menu.js":"19","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_customize_config.js":"20","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_edit_field.js":"21","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/component.js":"22"},{"size":9379,"mtime":1643448762149,"results":"23","hashOfConfig":"24"},{"size":13981,"mtime":1646970996345,"results":"25","hashOfConfig":"24"},{"size":4244,"mtime":1635494969691,"results":"26","hashOfConfig":"24"},{"size":4501,"mtime":1646970942704,"results":"27","hashOfConfig":"24"},{"size":616,"mtime":1621235314060,"results":"28","hashOfConfig":"29"},{"size":9693,"mtime":1621242097206,"results":"30","hashOfConfig":"29"},{"size":7258,"mtime":1639037857730,"results":"31","hashOfConfig":"24"},{"size":10228,"mtime":1646970986411,"results":"32","hashOfConfig":"24"},{"size":3119,"mtime":1634191808754,"results":"33","hashOfConfig":"24"},{"size":1113,"mtime":1635407660514,"results":"34","hashOfConfig":"24"},{"size":4349,"mtime":1646815933499,"results":"35","hashOfConfig":"24"},{"size":861,"mtime":1635246075403,"results":"36","hashOfConfig":"24"},{"size":3260,"mtime":1635334661529,"results":"37","hashOfConfig":"24"},{"size":26491,"mtime":1646970904418,"results":"38","hashOfConfig":"24"},{"size":1907,"mtime":1635492860490,"results":"39","hashOfConfig":"24"},{"size":3548,"mtime":1635409410379,"results":"40","hashOfConfig":"24"},{"size":2989,"mtime":1635495718901,"results":"41","hashOfConfig":"24"},{"size":3399,"mtime":1646816404368,"results":"42","hashOfConfig":"24"},{"size":2456,"mtime":1646721857196,"results":"43","hashOfConfig":"24"},{"size":1159,"mtime":1646970893747,"results":"44","hashOfConfig":"24"},{"size":13280,"mtime":1646901618757,"results":"45","hashOfConfig":"24"},{"size":14804,"mtime":1646895235712,"results":"46","hashOfConfig":"24"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1j0d8vf",{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"175njjo",{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","errorCount":3,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"69","messages":"70","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"71","messages":"72","errorCount":13,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"73","messages":"74","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"75","messages":"76","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"77","messages":"78","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"83","messages":"84","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"85","messages":"86","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"87","messages":"88","errorCount":1,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"89","messages":"90","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/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_store.js",["91","92","93"],"/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",["94","95","96","97","98","99","100","101","102","103","104","105","106"],"/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",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_purchase/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_customize_config.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_edit_field.js",["107","108","109"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/component.js",[],{"ruleId":"110","severity":2,"message":"111","line":10,"column":29,"nodeType":"112","endLine":10,"endColumn":35},{"ruleId":"110","severity":2,"message":"113","line":10,"column":43,"nodeType":"112","endLine":10,"endColumn":51},{"ruleId":"110","severity":2,"message":"113","line":147,"column":63,"nodeType":"112","endLine":147,"endColumn":71},{"ruleId":"110","severity":2,"message":"114","line":47,"column":13,"nodeType":"115","messageId":"116","endLine":47,"endColumn":22},{"ruleId":"110","severity":2,"message":"117","line":48,"column":30,"nodeType":"112","messageId":"116","endLine":48,"endColumn":36},{"ruleId":"110","severity":2,"message":"118","line":49,"column":31,"nodeType":"112","messageId":"116","endLine":49,"endColumn":47},{"ruleId":"110","severity":2,"message":"118","line":50,"column":21,"nodeType":"112","messageId":"116","endLine":50,"endColumn":37},{"ruleId":"110","severity":2,"message":"114","line":56,"column":13,"nodeType":"115","messageId":"116","endLine":56,"endColumn":22},{"ruleId":"110","severity":2,"message":"119","line":59,"column":20,"nodeType":"112","messageId":"116","endLine":59,"endColumn":32},{"ruleId":"110","severity":2,"message":"117","line":61,"column":23,"nodeType":"112","messageId":"116","endLine":61,"endColumn":29},{"ruleId":"110","severity":2,"message":"120","line":61,"column":30,"nodeType":"112","messageId":"116","endLine":61,"endColumn":34},{"ruleId":"110","severity":2,"message":"121","line":63,"column":15,"nodeType":"112","messageId":"116","endLine":63,"endColumn":19},{"ruleId":"110","severity":2,"message":"114","line":67,"column":23,"nodeType":"115","messageId":"116","endLine":67,"endColumn":32},{"ruleId":"110","severity":2,"message":"117","line":70,"column":32,"nodeType":"112","messageId":"116","endLine":70,"endColumn":38},{"ruleId":"110","severity":2,"message":"114","line":78,"column":13,"nodeType":"115","messageId":"116","endLine":78,"endColumn":22},{"ruleId":"110","severity":2,"message":"117","line":84,"column":42,"nodeType":"112","messageId":"116","endLine":84,"endColumn":48},{"ruleId":"122","severity":1,"message":"123","line":265,"column":13,"nodeType":"124","endLine":265,"endColumn":49},{"ruleId":"122","severity":1,"message":"123","line":283,"column":13,"nodeType":"124","endLine":283,"endColumn":56},{"ruleId":"125","severity":2,"message":"126","line":436,"column":22,"nodeType":"127","messageId":"128","endLine":436,"endColumn":31},"react/prop-types","'config' is missing in props validation","Identifier","'mockData' is missing in props validation","'editStore' is missing in props validation","Property","missingPropType","'editStore.config' is missing in props validation","'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","react/jsx-handler-names","Handler function for onChange prop key must begin with 'handle'","JSXAttribute","gmfe/i18n-check","t函数的key只能为字符串常量(Literal),请使用单引号或双引号包裹","MemberExpression","isVariable"]
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","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_purchase/context_menu.js":"19","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_customize_config.js":"20","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_edit_field.js":"21","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/component.js":"22"},{"size":9379,"mtime":1643448762149,"results":"23","hashOfConfig":"24"},{"size":15108,"mtime":1646982806457,"results":"25","hashOfConfig":"24"},{"size":4244,"mtime":1635494969691,"results":"26","hashOfConfig":"24"},{"size":4501,"mtime":1646970942704,"results":"27","hashOfConfig":"24"},{"size":616,"mtime":1621235314060,"results":"28","hashOfConfig":"29"},{"size":9693,"mtime":1621242097206,"results":"30","hashOfConfig":"29"},{"size":7258,"mtime":1639037857730,"results":"31","hashOfConfig":"24"},{"size":10283,"mtime":1646979851812,"results":"32","hashOfConfig":"24"},{"size":3119,"mtime":1634191808754,"results":"33","hashOfConfig":"24"},{"size":1113,"mtime":1635407660514,"results":"34","hashOfConfig":"24"},{"size":4349,"mtime":1646815933499,"results":"35","hashOfConfig":"24"},{"size":861,"mtime":1635246075403,"results":"36","hashOfConfig":"24"},{"size":3260,"mtime":1635334661529,"results":"37","hashOfConfig":"24"},{"size":26475,"mtime":1646982227981,"results":"38","hashOfConfig":"24"},{"size":1907,"mtime":1635492860490,"results":"39","hashOfConfig":"24"},{"size":3548,"mtime":1635409410379,"results":"40","hashOfConfig":"24"},{"size":2989,"mtime":1635495718901,"results":"41","hashOfConfig":"24"},{"size":3399,"mtime":1646816404368,"results":"42","hashOfConfig":"24"},{"size":2456,"mtime":1646721857196,"results":"43","hashOfConfig":"24"},{"size":1159,"mtime":1646970893747,"results":"44","hashOfConfig":"24"},{"size":13280,"mtime":1646901618757,"results":"45","hashOfConfig":"24"},{"size":14804,"mtime":1646895235712,"results":"46","hashOfConfig":"24"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1j0d8vf",{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"175njjo",{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","errorCount":3,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"69","messages":"70","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"71","messages":"72","errorCount":13,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"73","messages":"74","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"75","messages":"76","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"77","messages":"78","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"83","messages":"84","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"85","messages":"86","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"87","messages":"88","errorCount":1,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"89","messages":"90","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/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_store.js",["91","92","93"],"/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",["94","95","96","97","98","99","100","101","102","103","104","105","106"],"/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",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_purchase/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_customize_config.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_edit_field.js",["107","108","109"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/component.js",[],{"ruleId":"110","severity":2,"message":"111","line":10,"column":29,"nodeType":"112","endLine":10,"endColumn":35},{"ruleId":"110","severity":2,"message":"113","line":10,"column":43,"nodeType":"112","endLine":10,"endColumn":51},{"ruleId":"110","severity":2,"message":"113","line":147,"column":63,"nodeType":"112","endLine":147,"endColumn":71},{"ruleId":"110","severity":2,"message":"114","line":47,"column":13,"nodeType":"115","messageId":"116","endLine":47,"endColumn":22},{"ruleId":"110","severity":2,"message":"117","line":48,"column":30,"nodeType":"112","messageId":"116","endLine":48,"endColumn":36},{"ruleId":"110","severity":2,"message":"118","line":49,"column":31,"nodeType":"112","messageId":"116","endLine":49,"endColumn":47},{"ruleId":"110","severity":2,"message":"118","line":50,"column":21,"nodeType":"112","messageId":"116","endLine":50,"endColumn":37},{"ruleId":"110","severity":2,"message":"114","line":56,"column":13,"nodeType":"115","messageId":"116","endLine":56,"endColumn":22},{"ruleId":"110","severity":2,"message":"119","line":59,"column":20,"nodeType":"112","messageId":"116","endLine":59,"endColumn":32},{"ruleId":"110","severity":2,"message":"117","line":61,"column":23,"nodeType":"112","messageId":"116","endLine":61,"endColumn":29},{"ruleId":"110","severity":2,"message":"120","line":61,"column":30,"nodeType":"112","messageId":"116","endLine":61,"endColumn":34},{"ruleId":"110","severity":2,"message":"121","line":63,"column":15,"nodeType":"112","messageId":"116","endLine":63,"endColumn":19},{"ruleId":"110","severity":2,"message":"114","line":67,"column":23,"nodeType":"115","messageId":"116","endLine":67,"endColumn":32},{"ruleId":"110","severity":2,"message":"117","line":70,"column":32,"nodeType":"112","messageId":"116","endLine":70,"endColumn":38},{"ruleId":"110","severity":2,"message":"114","line":78,"column":13,"nodeType":"115","messageId":"116","endLine":78,"endColumn":22},{"ruleId":"110","severity":2,"message":"117","line":84,"column":42,"nodeType":"112","messageId":"116","endLine":84,"endColumn":48},{"ruleId":"122","severity":1,"message":"123","line":265,"column":13,"nodeType":"124","endLine":265,"endColumn":49},{"ruleId":"122","severity":1,"message":"123","line":283,"column":13,"nodeType":"124","endLine":283,"endColumn":56},{"ruleId":"125","severity":2,"message":"126","line":436,"column":22,"nodeType":"127","messageId":"128","endLine":436,"endColumn":31},"react/prop-types","'config' is missing in props validation","Identifier","'mockData' is missing in props validation","'editStore' is missing in props validation","Property","missingPropType","'editStore.config' is missing in props validation","'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","react/jsx-handler-names","Handler function for onChange prop key must begin with 'handle'","JSXAttribute","gmfe/i18n-check","t函数的key只能为字符串常量(Literal),请使用单引号或双引号包裹","MemberExpression","isVariable"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.14.1-alpha.3",
3
+ "version": "10.14.1-alpha.4",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -124,7 +124,7 @@ class EditorStore {
124
124
  }
125
125
 
126
126
  @action.bound
127
- handleChangeTableData(isAutoFilling = false, _dataKey = undefined) {
127
+ handleChangeTableData(isAutoFilling = false) {
128
128
  const { autoFillConfig } = this.config
129
129
  if (!this.selectedRegion && !autoFillConfig?.checked) return
130
130
  const dataKey =
@@ -94,10 +94,11 @@ class Printer extends React.Component {
94
94
  // 开始计算,获取各种数据
95
95
  printerStore.computedPages()
96
96
 
97
- if (this.props?.isAutoFilling) {
97
+ if (config.autoFillConfig?.checked) {
98
98
  this.props.printerStore.setAutofillConfig(
99
99
  config.autoFillConfig?.checked || false
100
100
  )
101
+ this.props.printerStore.changeTableData()
101
102
  }
102
103
 
103
104
  // 获取剩余空白高度,传到editor
@@ -1,5 +1,5 @@
1
1
  import i18next from '../../locales'
2
- import { action, observable } from 'mobx'
2
+ import { action, observable, computed } from 'mobx'
3
3
  import {
4
4
  getSumTrHeight,
5
5
  isMultiTable,
@@ -44,10 +44,6 @@ class PrinterStore {
44
44
  @observable
45
45
  isAutoFilling = false
46
46
 
47
- // 用于缓存更新前后的remainPageHeight,两个长度的数组
48
- @observable
49
- remainPageHeightCacheArr = []
50
-
51
47
  @action
52
48
  init(config, data) {
53
49
  this.ready = false
@@ -111,6 +107,21 @@ class PrinterStore {
111
107
  return filledData.length
112
108
  }
113
109
 
110
+ // 获得表格自定义行高
111
+ @computed
112
+ get computedTableCustomerRowHeight() {
113
+ const _defaultRegion = this.config?.autoFillConfig?.region
114
+ if (this.selectedRegion || _defaultRegion) {
115
+ const _selectedRegion = this.selectedRegion || _defaultRegion
116
+ const arr = _selectedRegion.split('.')
117
+ if (arr.includes('table')) {
118
+ const height = this.config.contents[arr[2]].customerRowHeight
119
+ return height === undefined ? 23 : height
120
+ }
121
+ }
122
+ return 23
123
+ }
124
+
114
125
  @action
115
126
  setSelected(selected) {
116
127
  this.selected = selected || null
@@ -368,7 +379,6 @@ class PrinterStore {
368
379
  this.pages.push(page)
369
380
 
370
381
  this.remainPageHeight = +Big(this.pageHeight - currentPageHeight).toFixed(0)
371
- this.remainPageHeightCacheArr.push(this.remainPageHeight)
372
382
  }
373
383
 
374
384
  template(text, pageIndex) {
@@ -437,6 +447,34 @@ class PrinterStore {
437
447
  return text
438
448
  }
439
449
  }
450
+
451
+ // 用于初始化的计算
452
+ getFilledTableData(tableData) {
453
+ const { autoFillConfig } = this.config
454
+ if (!this.selectedRegion && !autoFillConfig?.checked) return []
455
+ const tr_count = Math.floor(
456
+ this.remainPageHeight / this.computedTableCustomerRowHeight
457
+ )
458
+
459
+ const filledData = {
460
+ _isEmptyData: true // 表示是填充的空白数据
461
+ }
462
+ _.map(tableData[0], (val, key) => {
463
+ filledData[key] = ''
464
+ })
465
+ return Array(tr_count).fill(filledData)
466
+ }
467
+
468
+ @action.bound
469
+ changeTableData() {
470
+ const { autoFillConfig } = this.config
471
+ if (!autoFillConfig?.checked) return
472
+ const dataKey = autoFillConfig?.dataKey
473
+ const table = this.data._table[dataKey]
474
+
475
+ table.push(...this.getFilledTableData(table))
476
+ this.data._table[dataKey] = table
477
+ }
440
478
  }
441
479
 
442
480
  export default PrinterStore