template-designer 0.1.4 → 0.1.6

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": "template-designer",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "模板拖拽设计器组件库",
5
5
  "main": "dist/template-designer.umd.js",
6
6
  "module": "dist/template-designer.esm.js",
@@ -12,7 +12,7 @@
12
12
  "dev": "vite",
13
13
  "build": "vite build",
14
14
  "lint": "eslint src --ext .js,.vue",
15
- "prepublishOnly": "npm run build"
15
+ "publish": "npm run build && npm publish"
16
16
  },
17
17
  "keywords": [
18
18
  "vue",
@@ -1,95 +0,0 @@
1
- const e = {
2
- text: {
3
- x: 0,
4
- y: 0,
5
- width: 20,
6
- height: 5,
7
- rotation: 0,
8
- text: "测试文本",
9
- fontSize: 12,
10
- fontFamily: "黑体",
11
- fontWeight: "normal",
12
- fontStyle: "normal",
13
- textAlign: "left",
14
- color: "#000000",
15
- propertyPanel: [
16
- { prop: "text", label: "文本内容", type: "text" },
17
- { prop: "fontSize", label: "字体大小", type: "number", min: 1, max: 100 },
18
- { prop: "fontFamily", label: "字体", type: "select", optionsKey: "FONT_FAMILIES" },
19
- { prop: "fontWeight", label: "字体粗细", type: "select", optionsKey: "FONT_WEIGHTS" },
20
- { prop: "fontStyle", label: "字体样式", type: "select", optionsKey: "FONT_STYLES" },
21
- { prop: "textAlign", label: "对齐方式", type: "select", optionsKey: "TEXT_ALIGNS" },
22
- { prop: "color", label: "颜色", type: "color" }
23
- ]
24
- },
25
- barcode: {
26
- x: 0,
27
- y: 0,
28
- width: 40,
29
- height: 20,
30
- rotation: 0,
31
- barcodeType: "CODE128",
32
- barcodeValue: "123456789",
33
- fontSize: 12,
34
- propertyPanel: [
35
- { prop: "barcodeValue", label: "条码内容", type: "text" },
36
- { prop: "barcodeType", label: "条码格式", type: "select", optionsKey: "BARCODE_FORMATS" },
37
- { prop: "width", label: "条码宽度", type: "number", min: 1, max: 200 },
38
- { prop: "height", label: "条码高度", type: "number", min: 1, max: 200 },
39
- { prop: "fontSize", label: "文本大小", type: "number", min: 8, max: 72 }
40
- ]
41
- },
42
- qrcode: {
43
- x: 0,
44
- y: 0,
45
- width: 20,
46
- height: 20,
47
- rotation: 0,
48
- qrcodeValue: "FB-GOLD",
49
- margin: 4,
50
- // 二维码边距
51
- errorCorrectionLevel: "M",
52
- // 纠错等级
53
- propertyPanel: [
54
- { prop: "qrcodeValue", label: "二维码内容", type: "text" },
55
- { prop: "width", label: "二维码尺寸", type: "number", min: 1, max: 1e3 },
56
- { prop: "margin", label: "边距", type: "number", min: 0, max: 20 },
57
- { prop: "errorCorrectionLevel", label: "纠错级别", type: "select", optionsKey: "QRCODE_ERROR_LEVELS" }
58
- ]
59
- },
60
- image: {
61
- x: 0,
62
- y: 0,
63
- width: 12,
64
- height: 12,
65
- rotation: 0,
66
- lockAspectRatio: !1,
67
- propertyPanel: [
68
- { prop: "ImageSrc", label: "图片地址", type: "file", accept: "image/*", default: "" },
69
- {
70
- prop: "ScaleMode",
71
- label: "图片缩放",
72
- type: "select",
73
- options: [
74
- { label: "原始尺寸", value: 1 },
75
- { label: "居中裁剪", value: 2 },
76
- { label: "填充", value: 3 }
77
- ],
78
- default: 1
79
- },
80
- {
81
- prop: "IsPrint",
82
- label: "是否打印",
83
- type: "select",
84
- options: [
85
- { label: "是", value: !0 },
86
- { label: "否", value: !1 }
87
- ],
88
- default: !0
89
- }
90
- ]
91
- }
92
- };
93
- export {
94
- e as default
95
- };