File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
components/common/Message Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
- import { createVNode , render , getCurrentInstance } from "vue" ;
1
+ import { createVNode , render } from "vue" ;
2
2
import Ins from "./index.vue" ;
3
3
import type {
4
4
InstanceQueqe ,
@@ -11,7 +11,7 @@ import type {
11
11
const isServer = typeof window === "undefined" ;
12
12
13
13
const Queqe : InstanceQueqe = [ ] ;
14
- let seed = 5201414 ;
14
+ let seed = 5201314 ;
15
15
const Message : MessageInstance = ( opts : InstanceOptions ) => {
16
16
if ( isServer ) return ;
17
17
let options : Options = {
@@ -24,18 +24,17 @@ const Message: MessageInstance = (opts: InstanceOptions) => {
24
24
if ( opts . length == 0 ) throw new Error ( "不能弹出空消息框" ) ;
25
25
options . content == opts ;
26
26
}
27
+
27
28
const id = "message_" + seed ++ ;
28
29
29
30
const ContainerClassName = "happy__message_container_" + id ;
30
31
let container = document . createElement ( "div" ) ;
31
32
container . className = ContainerClassName ;
32
33
let offset = options . offset || 20 ;
33
- console . log ( "配置高度" , offset ) ;
34
+
34
35
Queqe . forEach ( v => {
35
- console . log ( "实例高度" , v . el ?. offsetHeight ) ;
36
36
offset += ( v . el ?. offsetHeight || 0 ) + 16 ;
37
37
} ) ;
38
- console . log ( Queqe , offset ) ;
39
38
offset += 16 ;
40
39
const userOnClose = options . onClose ;
41
40
options = {
Original file line number Diff line number Diff line change @@ -40,8 +40,9 @@ const getList = (req: API.ARTICLE.GetArticleListRequest) => {
40
40
41
41
onMounted (async () => {
42
42
const m = useMessage ();
43
- m .info (" ddd" );
44
- m .info (" ccc" );
43
+ setInterval (() => {
44
+ m .success (" qaq" );
45
+ }, 1500 );
45
46
await getList (props .query ?? {});
46
47
});
47
48
</script >
You can’t perform that action at this time.
0 commit comments