arisu.js 3.0.0 → 3.1.0
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 +3 -0
- package/dist/arisu.commonjs.js +2 -1
- package/dist/arisu.commonjs.js.LICENSE.txt +5 -0
- package/dist/arisu.esm.js +2 -1
- package/dist/arisu.esm.js.LICENSE.txt +5 -0
- package/dist/arisu.umd.js +2 -1
- package/dist/arisu.umd.js.LICENSE.txt +5 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/js/helpers.d.ts +49 -8
- package/dist/types/js/helpers.d.ts.map +1 -1
- package/package.json +8 -4
|
@@ -30,12 +30,10 @@ export declare function handlebars(h: HandlebarsHelper): void;
|
|
|
30
30
|
<button class="me-1 btn btn-primary be-delete"><i class="bi bi-trash3" style="color: #fff;"></i></button>
|
|
31
31
|
|
|
32
32
|
import { Tooltip } from 'glib/bootstrap';
|
|
33
|
-
tip(
|
|
33
|
+
tip(['.be-detail','.be-edit','.be-delete'], ['详细页','编辑页','删除']); //依赖bootstrap Tooltip
|
|
34
34
|
* </pre>
|
|
35
35
|
* ======================================================================== */
|
|
36
|
-
export declare function tip(
|
|
37
|
-
new (element: Element): any;
|
|
38
|
-
}, targets: string[], infos: string[]): void;
|
|
36
|
+
export declare function tip(targets: string[], infos: string[]): void;
|
|
39
37
|
/**
|
|
40
38
|
* 消息框参数设置:messageInit('info', 1, 2)
|
|
41
39
|
* @param type info / error / success
|
|
@@ -62,10 +60,10 @@ export declare function messageInit(type?: "info" | "error" | "success", classes
|
|
|
62
60
|
import 'messenger-hubspot/build/js/messenger.min.js';
|
|
63
61
|
import 'messenger-hubspot/build/js/messenger-theme-flat.js';
|
|
64
62
|
|
|
65
|
-
|
|
63
|
+
mal("你好,世界", 'success', 2, 5);
|
|
66
64
|
* </pre>
|
|
67
65
|
* ======================================================================== */
|
|
68
|
-
export declare function
|
|
66
|
+
export declare function mal(message: string, type?: "info" | "error" | "success", classes?: number, theme?: number | string): void;
|
|
69
67
|
/**========================================================================
|
|
70
68
|
* 5. message插件方法封装 - 确定框
|
|
71
69
|
* @param message 消息
|
|
@@ -76,11 +74,11 @@ export declare function al(message: string, type?: "info" | "error" | "success",
|
|
|
76
74
|
* ========================================================================
|
|
77
75
|
* <pre>
|
|
78
76
|
confirmMessage("是否确定删除该记录!", "删除", () => {
|
|
79
|
-
|
|
77
|
+
mcf("删除成功!", "success", 2, 5);
|
|
80
78
|
}, 2, 5);
|
|
81
79
|
* </pre>
|
|
82
80
|
* ======================================================================== */
|
|
83
|
-
export declare function
|
|
81
|
+
export declare function mcf(message: string, label: string, fun: () => void, classes?: number, theme?: number | string): void;
|
|
84
82
|
/**========================================================================
|
|
85
83
|
* 6. air-datepicker时间控件,不依赖其他框架
|
|
86
84
|
* npm i air-datepicker@3.5.3
|
|
@@ -239,5 +237,48 @@ export interface KellyParams {
|
|
|
239
237
|
fraction?: number;
|
|
240
238
|
}
|
|
241
239
|
export declare function calculateKellyFraction(params: KellyParams): number;
|
|
240
|
+
type ToastPosition = 1 | 2 | 3 | 4 | 5 | 6;
|
|
241
|
+
type ToastType = 1 | 2 | 3 | 4;
|
|
242
|
+
/**========================================================================
|
|
243
|
+
* 10. Bootstrap Toasts 快速调用封装
|
|
244
|
+
* @param message 消息文本
|
|
245
|
+
* @param typeNum 类型:1-info / 2-error / 3-success / 4-warning
|
|
246
|
+
* @param classes 位置标识(沿用原有数字约定)
|
|
247
|
+
* @param delay 自动关闭延时,单位ms,默认5000;0=不自动关闭
|
|
248
|
+
* ========================================================================
|
|
249
|
+
<div id="bs-toast-top-left" class="toast-container position-fixed top-0 start-0 p-3"></div>
|
|
250
|
+
<div id="bs-toast-top-right" class="toast-container position-fixed top-0 end-0 p-3"></div>
|
|
251
|
+
<div id="bs-toast-top-center" class="toast-container position-fixed top-0 start-50 translate-middle-x p-3"></div>
|
|
252
|
+
<div id="bs-toast-bottom-right" class="toast-container position-fixed bottom-0 end-0 p-3"></div>
|
|
253
|
+
<div id="bs-toast-bottom-center" class="toast-container position-fixed bottom-0 start-50 translate-middle-x p-3"></div>
|
|
254
|
+
<div id="bs-toast-bottom-left" class="toast-container position-fixed bottom-0 start-0 p-3"></div>
|
|
255
|
+
b("#al").click(() => {
|
|
256
|
+
al("太好了,数据添加成功了!", 3, 2);
|
|
257
|
+
});
|
|
258
|
+
* ======================================================================== */
|
|
259
|
+
export declare function al(message: string, typeNum?: ToastType, position?: ToastPosition, delay?: number): void;
|
|
260
|
+
/**========================================================================
|
|
261
|
+
* 11. Bootstrap Toasts 确认弹窗封装(带确认/取消按钮)
|
|
262
|
+
* @param message 消息文本
|
|
263
|
+
* @param label 确认按钮文字
|
|
264
|
+
* @param fun 确认回调
|
|
265
|
+
* @param classes 位置标识
|
|
266
|
+
* @param delay 延时,这里默认0不自动消失
|
|
267
|
+
* ========================================================================
|
|
268
|
+
<div id="bs-toast-top-left" class="toast-container position-fixed top-0 start-0 p-3"></div>
|
|
269
|
+
<div id="bs-toast-top-right" class="toast-container position-fixed top-0 end-0 p-3"></div>
|
|
270
|
+
<div id="bs-toast-top-center" class="toast-container position-fixed top-0 start-50 translate-middle-x p-3"></div>
|
|
271
|
+
<div id="bs-toast-bottom-right" class="toast-container position-fixed bottom-0 end-0 p-3"></div>
|
|
272
|
+
<div id="bs-toast-bottom-center" class="toast-container position-fixed bottom-0 start-50 translate-middle-x p-3"></div>
|
|
273
|
+
<div id="bs-toast-bottom-left" class="toast-container position-fixed bottom-0 start-0 p-3"></div>
|
|
274
|
+
b("#cf").click(() => {
|
|
275
|
+
cf("确定删除这条记录?", "删除", ()=>{
|
|
276
|
+
al("很遗憾,数据删除失败!", 2, 2);
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
* ======================================================================== */
|
|
280
|
+
export declare function cf(message: string, label: string, onConfirm: () => void, position?: ToastPosition, typeNum?: ToastType, delay?: number): void;
|
|
281
|
+
/** 关闭全部Toast **/
|
|
282
|
+
export declare function hideAllToast(): void;
|
|
242
283
|
export {};
|
|
243
284
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/js/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/js/helpers.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;8EAkB8E;AAC9E,UAAU,gBAAgB;IACtB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;CACxD;AAKD,wBAAgB,UAAU,CAAC,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAuBpD;AAED;;;;;;;;;;;8EAW8E;AAC9E,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAc5D;AAED;;;;;IAKI;AACJ,wBAAgB,WAAW,CAAC,IAAI,GAAE,MAAM,GAAG,OAAO,GAAG,SAAkB,EAAE,OAAO,GAAE,MAAU,EAAE,KAAK,GAAE,MAAM,GAAG,MAAc,GAAG,IAAI,CAmElI;AAED;;;;;;;;;;;;;;;;;;;;;8EAqB8E;AAC9E,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,GAAG,OAAO,GAAG,SAAkB,EAAE,OAAO,GAAE,MAAU,EAAE,KAAK,GAAE,MAAM,GAAG,MAAc,GAAG,IAAI,CAQ3I;AAED;;;;;;;;;;;;;8EAa8E;AAC9E,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,IAAI,EAAE,OAAO,GAAE,MAAU,EAAE,KAAK,GAAE,MAAM,GAAG,MAAc,GAAG,IAAI,CA0B9H;AAED;;;;;;;;;;;;;;;;;;;;;;8EAsB8E;AAC9E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AE,QAAQ,GAAE,aAAiB,EAAE,OAAO,GAAE,SAAa,EAAE,KAAK,GAAE,MAAU,GAAG,IAAI,CAEtJ;AACD,iBAAiB;AACjB,wBAAgB,YAAY,IAAI,IAAI,CAUnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arisu.js",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "轻量DOM链式工具库,后台管理常用组件,支持ESM摇树优化,包含分页、列表、手风琴、防重复提交等组件,npm publish --tag=beta",
|
|
5
5
|
"main": "dist/arisu.commonjs.js",
|
|
6
6
|
"module": "dist/arisu.esm.js",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"license": "ISC",
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@microsoft/api-extractor": "^7.58.7",
|
|
43
|
+
"@types/bootstrap": "^5.2.11",
|
|
43
44
|
"bootstrap": "^5.3.8",
|
|
44
45
|
"css-loader": "^7.1.2",
|
|
45
46
|
"handlebars": "^4.7.8",
|
|
@@ -47,6 +48,8 @@
|
|
|
47
48
|
"http-server": "^14.1.1",
|
|
48
49
|
"imports-loader": "^5.0.0",
|
|
49
50
|
"jquery": "^3.7.1",
|
|
51
|
+
"jsonwebtoken": "^9.0.2",
|
|
52
|
+
"messenger-hubspot": "^1.5.0-b2",
|
|
50
53
|
"mini-css-extract-plugin": "^2.10.2",
|
|
51
54
|
"rimraf": "^6.1.3",
|
|
52
55
|
"sass": "^1.100.0",
|
|
@@ -60,8 +63,9 @@
|
|
|
60
63
|
"url-loader": "^4.1.1",
|
|
61
64
|
"webpack": "^5.107.0",
|
|
62
65
|
"webpack-cli": "^5.1.4",
|
|
63
|
-
"webpack-dev-server": "^5.2.4"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
"webpack-dev-server": "^5.2.4"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@popperjs/core": "^2.11.8"
|
|
66
70
|
}
|
|
67
71
|
}
|