zartui 1.0.14 → 1.0.15

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/es/index.js CHANGED
@@ -76,7 +76,7 @@ import Tag from './tag';
76
76
  import Timeline from './timeline';
77
77
  import Toast from './toast';
78
78
  import Uploader from './uploader';
79
- var version = '1.0.14';
79
+ var version = '1.0.15';
80
80
 
81
81
  function install(Vue) {
82
82
  var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, PdfViewer, PdfViewerV2, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Row, Search, Signature, Skeleton, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, Timeline, Toast, Uploader];
@@ -67,6 +67,9 @@ export default createComponent({
67
67
  pdfUrl: this.pdfUrl,
68
68
  cMapUrl: this.cMapUrl
69
69
  };
70
+ },
71
+ dpr: function dpr() {
72
+ return window.devicePixelRatio;
70
73
  }
71
74
  },
72
75
  watch: {
@@ -106,12 +109,13 @@ export default createComponent({
106
109
  var containerWidth = _this.$refs.pdfContainer.offsetWidth;
107
110
  var ratio = containerWidth / width;
108
111
  viewport = page.getViewport({
109
- scale: ratio
112
+ scale: ratio * _this.dpr
110
113
  }); // @ts-ignore
111
114
 
112
115
  var realCanvas = context.canvas;
113
116
  realCanvas.width = viewport.width;
114
- realCanvas.height = viewport.height; // 将pdf当前页内容画到2d画板中
117
+ realCanvas.height = viewport.height;
118
+ realCanvas.style.zoom = 1 / _this.dpr; // 将pdf当前页内容画到2d画板中
115
119
  // @ts-ignore
116
120
 
117
121
  page.render({