yh-hiprint 2.6.20 → 2.6.22

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.
@@ -455,6 +455,13 @@
455
455
 
456
456
  const {paperType, paperTypeName, paperTypesObj, paperWidth, paperHeight, setPaper} = usePaper();
457
457
 
458
+ function setPaperHandler(type) {
459
+ setPaper(type, () => {
460
+ if (!hiprintTemplate.value) return;
461
+ hiprintTemplate.value.setPaper(paperWidth.value, paperHeight.value);
462
+ });
463
+ }
464
+
458
465
  const canvasRef = ref();
459
466
  const {scaleValue, scalePercentage, canZoomIn, canZoomOut, zoomIn, zoomOut} = useScale(() => {
460
467
  hiprintTemplate.value?.zoom(scaleValue.value);
@@ -963,6 +970,9 @@
963
970
 
964
971
  onMounted(async () => {
965
972
  await getDataSourceList();
973
+ if (route.query.code) {
974
+ updateTemplate(route.query.code);
975
+ }
966
976
  });
967
977
  </script>
968
978
  <style lang="scss">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yh-hiprint",
3
- "version": "2.6.20",
3
+ "version": "2.6.22",
4
4
  "description": "Hiprint for Vue3 by NoahLiu in ForceCon in Hunan Changesha",
5
5
  "type": "module",
6
6
  "exports": {