fast-vue-multi-pages 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/other/FastVueMultiClipboard.d.ts +1 -2
- package/dist/cjs/other/FastVueMultiClipboard.js +4 -2
- package/dist/esm/other/FastVueMultiClipboard.d.ts +1 -2
- package/dist/esm/other/FastVueMultiClipboard.js +11 -4
- package/package.json +1 -1
- package/dist/cjs/store/FastVueMultiStore.d.ts +0 -13
- package/dist/cjs/store/FastVueMultiStore.js +0 -23
- package/dist/esm/store/FastVueMultiStore.d.ts +0 -13
- package/dist/esm/store/FastVueMultiStore.js +0 -27
@@ -1,4 +1,3 @@
|
|
1
|
-
import * as clipboard from "clipboard-polyfill";
|
2
1
|
export declare class FastVueMultiClipboard {
|
3
2
|
/**
|
4
3
|
* 将内容复制到剪贴板中
|
@@ -17,5 +16,5 @@ export declare class FastVueMultiClipboard {
|
|
17
16
|
/**
|
18
17
|
* 获取剪贴板的ClipboardItem内容
|
19
18
|
*/
|
20
|
-
static getItems(): Promise<
|
19
|
+
static getItems(): Promise<ClipboardItems | undefined>;
|
21
20
|
}
|
@@ -1,14 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.FastVueMultiClipboard = void 0;
|
4
|
-
const tslib_1 = require("tslib");
|
5
|
-
const clipboard = tslib_1.__importStar(require("clipboard-polyfill"));
|
6
4
|
class FastVueMultiClipboard {
|
7
5
|
/**
|
8
6
|
* 将内容复制到剪贴板中
|
9
7
|
* @param content
|
10
8
|
*/
|
11
9
|
static copy(content) {
|
10
|
+
const clipboard = require("clipboard-polyfill");
|
12
11
|
return clipboard.writeText(content);
|
13
12
|
}
|
14
13
|
/**
|
@@ -16,6 +15,7 @@ class FastVueMultiClipboard {
|
|
16
15
|
* @param blob
|
17
16
|
*/
|
18
17
|
static copyBlob(blob) {
|
18
|
+
const clipboard = require("clipboard-polyfill");
|
19
19
|
let contentType = blob.type;
|
20
20
|
let items = {};
|
21
21
|
items[contentType] = blob;
|
@@ -26,12 +26,14 @@ class FastVueMultiClipboard {
|
|
26
26
|
* 获取剪贴板的文本内容
|
27
27
|
*/
|
28
28
|
static async getText() {
|
29
|
+
const clipboard = require("clipboard-polyfill");
|
29
30
|
return await clipboard.readText();
|
30
31
|
}
|
31
32
|
/**
|
32
33
|
* 获取剪贴板的ClipboardItem内容
|
33
34
|
*/
|
34
35
|
static async getItems() {
|
36
|
+
const clipboard = require("clipboard-polyfill");
|
35
37
|
return await clipboard.read();
|
36
38
|
}
|
37
39
|
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import * as clipboard from "clipboard-polyfill";
|
2
1
|
export declare class FastVueMultiClipboard {
|
3
2
|
/**
|
4
3
|
* 将内容复制到剪贴板中
|
@@ -17,5 +16,5 @@ export declare class FastVueMultiClipboard {
|
|
17
16
|
/**
|
18
17
|
* 获取剪贴板的ClipboardItem内容
|
19
18
|
*/
|
20
|
-
static getItems(): Promise<
|
19
|
+
static getItems(): Promise<ClipboardItems | undefined>;
|
21
20
|
}
|
@@ -1,8 +1,7 @@
|
|
1
|
-
define(["require", "exports", "tslib"
|
1
|
+
define(["require", "exports", "tslib"], function (require, exports, tslib_1) {
|
2
2
|
"use strict";
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
4
|
exports.FastVueMultiClipboard = void 0;
|
5
|
-
clipboard = tslib_1.__importStar(clipboard);
|
6
5
|
var FastVueMultiClipboard = /** @class */ (function () {
|
7
6
|
function FastVueMultiClipboard() {
|
8
7
|
}
|
@@ -11,6 +10,7 @@ define(["require", "exports", "tslib", "clipboard-polyfill"], function (require,
|
|
11
10
|
* @param content
|
12
11
|
*/
|
13
12
|
FastVueMultiClipboard.copy = function (content) {
|
13
|
+
var clipboard = require("clipboard-polyfill");
|
14
14
|
return clipboard.writeText(content);
|
15
15
|
};
|
16
16
|
/**
|
@@ -18,6 +18,7 @@ define(["require", "exports", "tslib", "clipboard-polyfill"], function (require,
|
|
18
18
|
* @param blob
|
19
19
|
*/
|
20
20
|
FastVueMultiClipboard.copyBlob = function (blob) {
|
21
|
+
var clipboard = require("clipboard-polyfill");
|
21
22
|
var contentType = blob.type;
|
22
23
|
var items = {};
|
23
24
|
items[contentType] = blob;
|
@@ -29,9 +30,12 @@ define(["require", "exports", "tslib", "clipboard-polyfill"], function (require,
|
|
29
30
|
*/
|
30
31
|
FastVueMultiClipboard.getText = function () {
|
31
32
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
33
|
+
var clipboard;
|
32
34
|
return tslib_1.__generator(this, function (_a) {
|
33
35
|
switch (_a.label) {
|
34
|
-
case 0:
|
36
|
+
case 0:
|
37
|
+
clipboard = require("clipboard-polyfill");
|
38
|
+
return [4 /*yield*/, clipboard.readText()];
|
35
39
|
case 1: return [2 /*return*/, _a.sent()];
|
36
40
|
}
|
37
41
|
});
|
@@ -42,9 +46,12 @@ define(["require", "exports", "tslib", "clipboard-polyfill"], function (require,
|
|
42
46
|
*/
|
43
47
|
FastVueMultiClipboard.getItems = function () {
|
44
48
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
49
|
+
var clipboard;
|
45
50
|
return tslib_1.__generator(this, function (_a) {
|
46
51
|
switch (_a.label) {
|
47
|
-
case 0:
|
52
|
+
case 0:
|
53
|
+
clipboard = require("clipboard-polyfill");
|
54
|
+
return [4 /*yield*/, clipboard.read()];
|
48
55
|
case 1: return [2 /*return*/, _a.sent()];
|
49
56
|
}
|
50
57
|
});
|
package/package.json
CHANGED
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.FastVueMultiStore = void 0;
|
4
|
-
const tslib_1 = require("tslib");
|
5
|
-
const store2_1 = tslib_1.__importDefault(require("store2"));
|
6
|
-
class FastVueMultiStore {
|
7
|
-
/**
|
8
|
-
* 设置缓存的值
|
9
|
-
* @param key 键
|
10
|
-
* @param value 值
|
11
|
-
*/
|
12
|
-
static setValue(key, value) {
|
13
|
-
store2_1.default.set(key, value, true);
|
14
|
-
}
|
15
|
-
/**
|
16
|
-
* 获取缓存的值
|
17
|
-
* @param key 键
|
18
|
-
*/
|
19
|
-
static getValue(key) {
|
20
|
-
return store2_1.default.get(key);
|
21
|
-
}
|
22
|
-
}
|
23
|
-
exports.FastVueMultiStore = FastVueMultiStore;
|
@@ -1,27 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "store2"], function (require, exports, tslib_1, store2_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.FastVueMultiStore = void 0;
|
5
|
-
store2_1 = tslib_1.__importDefault(store2_1);
|
6
|
-
var FastVueMultiStore = /** @class */ (function () {
|
7
|
-
function FastVueMultiStore() {
|
8
|
-
}
|
9
|
-
/**
|
10
|
-
* 设置缓存的值
|
11
|
-
* @param key 键
|
12
|
-
* @param value 值
|
13
|
-
*/
|
14
|
-
FastVueMultiStore.setValue = function (key, value) {
|
15
|
-
store2_1.default.set(key, value, true);
|
16
|
-
};
|
17
|
-
/**
|
18
|
-
* 获取缓存的值
|
19
|
-
* @param key 键
|
20
|
-
*/
|
21
|
-
FastVueMultiStore.getValue = function (key) {
|
22
|
-
return store2_1.default.get(key);
|
23
|
-
};
|
24
|
-
return FastVueMultiStore;
|
25
|
-
}());
|
26
|
-
exports.FastVueMultiStore = FastVueMultiStore;
|
27
|
-
});
|