yh-hiprint 2.2.0 → 2.2.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/CHANGE.md ADDED
@@ -0,0 +1,3 @@
1
+ - `2.2.2` 将缩放从 1.5 倍扩大到 4 倍
2
+ - `2.2.1` 调整字体大小增加 4-7pt 的大小
3
+ - `2.2.0` 增加自定义输入数据的功能
package/font-size.js CHANGED
@@ -14,14 +14,12 @@ export default (function () {
14
14
  }),
15
15
  // 创建 DOM
16
16
  (t.prototype.createTarget = function () {
17
- let list = [8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];
17
+ let list = [4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];
18
18
  let fontSizeList = '\n <option value="" >默认</option>';
19
19
  list.forEach(function (e) {
20
20
  fontSizeList += '\n <option value="' + e + '">' + e + "pt</option>";
21
21
  });
22
- this.target = $(
23
- ' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体大小\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit"> </select>\n </div>\n </div>'
24
- );
22
+ this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体大小\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit"> </select>\n </div>\n </div>');
25
23
  this.target.find(".auto-submit").append($(fontSizeList));
26
24
  return this.target;
27
25
  }),
@@ -32,9 +30,7 @@ export default (function () {
32
30
  }),
33
31
  // 设置值
34
32
  (t.prototype.setValue = function (t) {
35
- t &&
36
- (this.target.find('option[value="' + t + '"]').length ||
37
- this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
33
+ t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
38
34
  this.target.find("select").val(t);
39
35
  }),
40
36
  // 销毁 DOM
@@ -109,7 +109,7 @@ export function useScale(callback) {
109
109
  return scaleValue.value > 0.5;
110
110
  });
111
111
  const canZoomOut = computed(() => {
112
- return scaleValue.value < 1.5;
112
+ return scaleValue.value < 4;
113
113
  });
114
114
  function zoomIn() {
115
115
  scaleValue.value = scaleValue.value - 0.1;
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
- {
2
- "name": "yh-hiprint",
3
- "version": "2.2.0",
4
- "description": "Hiprint for Vue3 by NoahLiu in ForceCon in Hunan Changesha",
5
- "main": "index.js",
6
- "types": "index.d.ts",
7
- "scripts": {
8
- "pub:aliyun": "npm publish --registry https://packages.aliyun.com/60765e0161a945067837bb5f/npm/npm-registry/ --no-git-checks",
9
- "pub:npm": "npm publish --registry https://registry.npmjs.org/ --no-git-checks"
10
- },
11
- "dependencies": {
12
- "jquery": "3.7.0",
13
- "@claviska/jquery-minicolors": "2.3.6",
14
- "jsbarcode": "3.11.5",
15
- "jspdf": "2.5.1",
16
- "html2canvas": "1.4.1",
17
- "nzh": "1.0.9",
18
- "canvg": "4.0.1"
19
- },
20
- "peerDependencies": {
21
- "vue": "3.2.47"
22
- },
23
- "author": "Liubin"
24
- }
1
+ {
2
+ "name": "yh-hiprint",
3
+ "version": "2.2.2",
4
+ "description": "Hiprint for Vue3 by NoahLiu in ForceCon in Hunan Changesha",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
+ "scripts": {
8
+ "pub:aliyun": "npm publish --registry https://packages.aliyun.com/60765e0161a945067837bb5f/npm/npm-registry/ --no-git-checks",
9
+ "pub:npm": "npm publish --registry https://registry.npmjs.org/ --no-git-checks"
10
+ },
11
+ "dependencies": {
12
+ "jquery": "3.7.0",
13
+ "@claviska/jquery-minicolors": "2.3.6",
14
+ "jsbarcode": "3.11.5",
15
+ "jspdf": "2.5.1",
16
+ "html2canvas": "1.4.1",
17
+ "nzh": "1.0.9",
18
+ "canvg": "4.0.1"
19
+ },
20
+ "peerDependencies": {
21
+ "vue": "3.2.47"
22
+ },
23
+ "author": "Liubin"
24
+ }