zsysview 0.0.1 → 0.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 +0 -0
- package/components/message/index.ts +3 -0
- package/components/message/message.ts +35 -0
- package/package.json +6 -4
package/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ElMessage } from "element-plus";
|
|
2
|
+
import type { MessageOptions} from "element-plus";
|
|
3
|
+
import type { App } from 'vue'
|
|
4
|
+
export class ZSYSMessage{
|
|
5
|
+
static show(msgType: 'success' | 'warning' | 'info' | 'error' = 'info', msg:string): void {
|
|
6
|
+
const options: MessageOptions = {
|
|
7
|
+
message: msg,
|
|
8
|
+
type: msgType,
|
|
9
|
+
plain: true,
|
|
10
|
+
duration: 3000, // 3秒后消失
|
|
11
|
+
showClose: false
|
|
12
|
+
};
|
|
13
|
+
ElMessage(options);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static ShowInfo(msg:string)
|
|
17
|
+
{
|
|
18
|
+
ZSYSMessage.show('info', msg)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static ShowSuccess(msg:string)
|
|
22
|
+
{
|
|
23
|
+
ZSYSMessage.show('success', msg)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static ShowError(msg:string)
|
|
27
|
+
{
|
|
28
|
+
ZSYSMessage.show('error', msg)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
install=(app:App)=>{
|
|
32
|
+
app.component(ZSYSMessage.name as string,ZSYSMessage)
|
|
33
|
+
return app
|
|
34
|
+
}
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zsysview",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "zsystem view",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "liuhaomiao"
|
|
7
7
|
},
|
|
8
|
-
"private":false,
|
|
9
|
-
"dependencies": {
|
|
10
|
-
|
|
8
|
+
"private": false,
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"element-plus": "^2.11.2"
|
|
11
|
+
}
|
|
12
|
+
}
|