emacroh5lib 1.0.2 → 1.0.3

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/README.md CHANGED
@@ -1,4 +1,5 @@
1
-
1
+ ## 安装
2
+ npm i emacroh5lib --registry https://registry.npmjs.org/
2
3
 
3
4
  ## 读取excel表格数据
4
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emacroh5lib",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "EMacro前端组件库",
5
5
  "main": "./dist/emacroh5lib.min.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -75,6 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@tweenjs/tween.js": "^18.6.4",
78
+ "@types/file-saver": "^2.0.5",
78
79
  "@types/js-cookie": "^3.0.1",
79
80
  "@vue/cli-plugin-typescript": "^5.0.4",
80
81
  "axios": "^0.26.1",
@@ -83,8 +84,12 @@
83
84
  "echarts": "^5.3.2",
84
85
  "echarts-gl": "^2.0.9",
85
86
  "element-ui": "^2.15.8",
87
+ "file-saver": "^2.0.5",
88
+ "hammerjs": "^2.0.8",
86
89
  "jquery": "^3.6.0",
87
90
  "js-cookie": "^3.0.1",
91
+ "js-xlsx": "^0.8.22",
92
+ "lay-excel": "^1.7.6",
88
93
  "query-string": "^7.0.1",
89
94
  "register-service-worker": "^1.7.2",
90
95
  "three": "^0.139.2",
@@ -95,6 +100,7 @@
95
100
  "vue-property-decorator": "^9.1.2",
96
101
  "vue-tsx-support": "^3.2.0",
97
102
  "vuex": "^3.6.2",
98
- "xlsx": "^0.18.5"
103
+ "xlsx": "^0.18.5",
104
+ "xlsx-style": "^0.8.13"
99
105
  }
100
106
  }
package/src/index.ts CHANGED
@@ -3,9 +3,11 @@ import { EMacro } from "./utilities/File";
3
3
 
4
4
 
5
5
  import FileViewer from './views/FileViewer/index.vue'
6
- import MessageBoxTest from "@/components/MessageBoxTest";
6
+ import ImageViewer from './views/ImageViewer/index.vue'
7
+ import DragResizeView from './views/DragResizeView/index.vue'
8
+ import MessageBoxTest from "@/components/MessageBoxTest";
7
9
 
8
- const components = [FileViewer];
10
+ const components = [FileViewer, ImageViewer, DragResizeView];
9
11
 
10
12
  const install = (Vue: any) => {
11
13
  if ((install as any).installed) return;
@@ -22,6 +22,11 @@ const routes: Array<RouteConfig> = [
22
22
  path: '/FileViewer',
23
23
  name: 'FileViewer',
24
24
  component: () => import('../views/FileViewer/index.vue')
25
+ },
26
+ {
27
+ path: '/TestView',
28
+ name: 'TestView',
29
+ component: () => import('../views/TestView/index.vue')
25
30
  },
26
31
  ]
27
32
 
@@ -3,5 +3,5 @@ declare module '*.vue' {
3
3
  export default Vue
4
4
  }
5
5
 
6
- // declare module '@/utils/request.js'
6
+ // declare module 'xlsx-style'
7
7
  // declare module "@/components/HelloWorld.vue"
@@ -0,0 +1,3 @@
1
+ <template src="./vue-drag-resize.html"></template>
2
+ <script src="./vue-drag-resize.js"></script>
3
+ <style src="./vue-drag-resize.css"></style>
@@ -0,0 +1,46 @@
1
+ .vdr {
2
+ position: absolute;
3
+ box-sizing: border-box;
4
+ }
5
+ .vdr.active:before{
6
+ content: '';
7
+ width: 100%;
8
+ height: 100%;
9
+ position: absolute;
10
+ top: 0;
11
+ left: 0;
12
+ box-sizing: border-box;
13
+ outline: 1px dashed #d6d6d6;
14
+ }
15
+ .vdr-stick {
16
+ box-sizing: border-box;
17
+ position: absolute;
18
+ font-size: 1px;
19
+ background: #ffffff;
20
+ border: 1px solid #6c6c6c;
21
+ box-shadow: 0 0 2px #bbb;
22
+ }
23
+ .inactive .vdr-stick {
24
+ display: none;
25
+ }
26
+ .vdr-stick-tl, .vdr-stick-br {
27
+ cursor: nwse-resize;
28
+ }
29
+ .vdr-stick-tm, .vdr-stick-bm {
30
+ left: 50%;
31
+ cursor: ns-resize;
32
+ }
33
+ .vdr-stick-tr, .vdr-stick-bl {
34
+ cursor: nesw-resize;
35
+ }
36
+ .vdr-stick-ml, .vdr-stick-mr {
37
+ top: 50%;
38
+ cursor: ew-resize;
39
+ }
40
+ .vdr-stick.not-resizable{
41
+ display: none;
42
+ }
43
+ .content-container{
44
+ display: block;
45
+ position: relative;
46
+ }
@@ -0,0 +1,17 @@
1
+ <div class="vdr" :style="positionStyle"
2
+ :class="`${(active || isActive) ? 'active' : 'inactive'} ${contentClass ? contentClass: ''}`"
3
+ @mousedown="bodyDown($event)"
4
+ @touchstart="bodyDown($event)"
5
+ @touchend="up($event)">
6
+ <div :style="sizeStyle" class="content-container" ref="container">
7
+ <slot></slot>
8
+ </div>
9
+ <div
10
+ v-for="stick in sticks"
11
+ class="vdr-stick"
12
+ :class="['vdr-stick-' + stick, isResizable ? '' : 'not-resizable']"
13
+ @mousedown.stop.prevent="stickDown(stick, $event)"
14
+ @touchstart.stop.prevent="stickDown(stick, $event)"
15
+ :style="vdrStick(stick)">
16
+ </div>
17
+ </div>