emacroh5lib 1.0.9 → 1.0.12

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.
@@ -9,12 +9,6 @@
9
9
  * Date: 2021-02-16
10
10
  */
11
11
 
12
- /*!
13
- * Vue.js v2.6.14
14
- * (c) 2014-2021 Evan You
15
- * Released under the MIT License.
16
- */
17
-
18
12
  /*!
19
13
  * jQuery JavaScript Library v3.6.0
20
14
  * https://jquery.com/
package/dist/main.css CHANGED
@@ -199,3 +199,49 @@
199
199
  border-radius: 0.15em;
200
200
  }
201
201
 
202
+ .vdr {
203
+ position: absolute;
204
+ box-sizing: border-box;
205
+ }
206
+ .vdr.active:before{
207
+ content: '';
208
+ width: 100%;
209
+ height: 100%;
210
+ position: absolute;
211
+ top: 0;
212
+ left: 0;
213
+ box-sizing: border-box;
214
+ outline: 1px dashed #d6d6d6;
215
+ }
216
+ .vdr-stick {
217
+ box-sizing: border-box;
218
+ position: absolute;
219
+ font-size: 1px;
220
+ background: #ffffff;
221
+ border: 1px solid #6c6c6c;
222
+ box-shadow: 0 0 2px #bbb;
223
+ }
224
+ .inactive .vdr-stick {
225
+ display: none;
226
+ }
227
+ .vdr-stick-tl, .vdr-stick-br {
228
+ cursor: nwse-resize;
229
+ }
230
+ .vdr-stick-tm, .vdr-stick-bm {
231
+ left: 50%;
232
+ cursor: ns-resize;
233
+ }
234
+ .vdr-stick-tr, .vdr-stick-bl {
235
+ cursor: nesw-resize;
236
+ }
237
+ .vdr-stick-ml, .vdr-stick-mr {
238
+ top: 50%;
239
+ cursor: ew-resize;
240
+ }
241
+ .vdr-stick.not-resizable{
242
+ display: none;
243
+ }
244
+ .content-container{
245
+ display: block;
246
+ position: relative;
247
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emacroh5lib",
3
- "version": "1.0.9",
3
+ "version": "1.0.12",
4
4
  "description": "EMacro前端组件库",
5
5
  "main": "dist/emacroh5lib.min.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -30,4 +30,4 @@ if (typeof window !== 'undefined' && (window as any).Vue) {
30
30
 
31
31
 
32
32
  export default {}
33
- export { EMacro, ImageViewer }
33
+ export { EMacro,FileViewer, ImageViewer, DragResizeView }
@@ -210,10 +210,12 @@ export default {
210
210
 
211
211
  if (this.name.trim() !== '' && this.isStorage) {
212
212
  let info = JSON.parse(localStorage.getItem("DragResizeView_Info_" + this.name))
213
- this.x = info.left
214
- this.y = info.top
215
- this.w = info.width
216
- this.h = info.height
213
+ if (info !== null) {
214
+ this.x = info.left
215
+ this.y = info.top
216
+ this.w = info.width
217
+ this.h = info.height
218
+ }
217
219
  }
218
220
 
219
221
  this.left = this.x;
@@ -709,7 +711,7 @@ export default {
709
711
  throw "unspecified name"
710
712
  }
711
713
 
712
- localStorage.setItem("DragResizeView_Info_" + this.name, JSON.stringify(this.rect))
714
+ localStorage.setItem("DragResizeView_Info_" + this.name, JSON.stringify(this.rect))
713
715
  }
714
716
 
715
717
  },
package/tsconfig.json CHANGED
@@ -10,8 +10,8 @@
10
10
  "declarationDir": "./dist/types/", // 声明文件打包的位置
11
11
  "declarationMap": false, // 是否生成声明文件map文件(便于调试)
12
12
  "moduleResolution": "node",
13
- "module": "commonjs",
14
- "target": "es5", // 转化成的目标语言
13
+ "module": "esnext",
14
+ "target": "esnext", // 转化成的目标语言
15
15
  "baseUrl": "./",
16
16
  "strict": true,
17
17
  "jsx": "preserve",