three-trees-ui 1.0.89 → 1.0.91

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": "three-trees-ui",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
4
4
  "publicPath": "/ui",
5
5
  "author": "hotent",
6
6
  "private": false,
@@ -33,7 +33,9 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "element-resize-detector": "^1.2.3",
36
- "vee-validate": "2.1.7"
36
+ "v-viewer": "^1.7.4",
37
+ "vee-validate": "2.1.7",
38
+ "viewerjs": "^1.11.7"
37
39
  },
38
40
  "peerDependencies": {
39
41
  "axios": "^0.21.1",
@@ -4,6 +4,7 @@
4
4
  <loading v-if="loading" />
5
5
  <div
6
6
  v-else-if="contentType.indexOf('image') > -1"
7
+ v-viewer="{ movable: false }"
7
8
  class="frame-viewer__img"
8
9
  >
9
10
  <img
@@ -30,10 +31,17 @@
30
31
  import watermark from './watermark'
31
32
  import { createObjectURL } from '../../../src/util/brower.js'
32
33
  import utils from '../../../src/utils.js'
34
+ import 'viewerjs/dist/viewer.css'
35
+ import { directive as viewer } from 'v-viewer'
33
36
 
34
37
  export default {
35
38
  name: 'FrameViewer',
36
39
  components: { Loading },
40
+ directives: {
41
+ viewer: viewer({
42
+ debug: true,
43
+ }),
44
+ },
37
45
  props: {
38
46
  src: {
39
47
  type: String,
@@ -124,12 +132,12 @@
124
132
  return
125
133
  }
126
134
  if (iframe.attachEvent) {
127
- iframe.attachEvent('onload', function() {
135
+ iframe.attachEvent('onload', function () {
128
136
  that.setFrameBody(this.contentWindow.document)
129
137
  that.watermarkRender()
130
138
  })
131
139
  } else {
132
- iframe.onload = function() {
140
+ iframe.onload = function () {
133
141
  that.setFrameBody(this.contentWindow.document)
134
142
  that.watermarkRender()
135
143
  }