UNPKG

label-print-design

Version:

操作简单,组件丰富的一站式打印解决方案打印设计器

48 lines (44 loc) 1.17 kB
'use strict'; var pinia = require('pinia'); const useConfigStore = pinia.defineStore({ id: "myPrintConfig", state: () => { return { // cursor: null, init: false, printer: null, defaultPrinter: void 0, clientProtocol: "myprint", clientUrl: "ws://127.0.0.1:9898", autoConnect: 1, settingPanel: { setting: { visible: false, x: 20, y: 70, width: 800, height: 500 }, operation: { visible: false, x: 20, y: 70, width: 260, height: 600 }, history: { visible: false, x: 20, y: 560, width: 200, height: 200 }, elementList: { visible: false }, miniMap: { visible: false, x: 20, y: 660, width: 200, height: 200 } }, settingDesign: { autoAlign: 1, showElementDesignBorderIs: 1 } }; }, // 也可以这样定义 // state: () => ({ count: 0 }) actions: { initConfig() { this.init = true; }, updateConfig(key, value) { let self = this; self[key] = value; this.postConfig(); }, postConfig() { } }, persist: true }); exports.useConfigStore = useConfigStore; //# sourceMappingURL=config.js.map