liulin
7 天以前 e688d4cf3ec620f80d103386a4afc4c83143c5ff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html>
 
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="icon" href="favicon.ico">
    <title>xxx系统</title>
 
    <link rel="stylesheet" href="css/main.css" />
 
    <link rel="stylesheet" href="js/lib/element-plus/index.css" />
    <script src="js/lib/vue.global.js"></script>
    <script src="js/lib/element-plus/element-plus.js"></script>
    <script src="js/lib/element-plus/icons-vue.js"></script>
 
    <script src="js/lib/axios.min.js"></script>
    <script src="js/lib/httpVueLoader.js"></script>
</head>
<body>
    <div id="app">
        <div id="loader-wrapper" v-if="loading">
            <div id="loader"></div>
            <div class="loader-section section-left"></div>
            <div class="loader-section section-right"></div>
            <div class="load_title">正在加载系统资源,请耐心等待</div>
        </div>
 
 
    </div>
<script>
    const { createApp, ref, onMounted, h } = Vue
    const loading = ref(true)
 
    const Http = axios.create({
        baseURL: location.pathname.substr(0, location.pathname.lastIndexOf('/')),
        timeout: 1000,
        headers: {'X-Custom-Header': 'foobar'}
    });
    const $message = ElementPlus.ElMessage;
    const $confirm = ElementPlus.ElMessageBox;
 
    var app = Vue.createApp({
        el: '#app',
        data() {
            return {
                ddd: true
            }
        },
        methods: {
            funcA() {
                console.log(this.ddd);
                $message('这是一条普通info消息');
                $message.success('恭喜你,这是一条成功消息');
                $message.warning('警告哦,这是一条警告消息');
                $message.error('错了哦,这是一条错误消息');
                $message({
                    message: h('p', { style: 'line-height: 1; font-size: 14px' }, [
                        h('span', null, '这是一条自定义样式的消息 '),
                        h('i', { style: 'color: teal' }, 'VNode'),
                    ])
                });
            }
        },
 
        mounted: () => {
            //$message('这是一条普通info消息');
 
            Http.post('/quartz/listTask', {
                limit: 10,
                page: 1
            })
            .then(function (response) {
                console.log(response);
            })
            .catch(function (error) {
                console.log(error);
            });
        },
 
        setup() {
            const testNum1 = ref(123456);
 
            const funB = () => {
                alert('bbb');
            }
 
            onMounted(() => {
                loading.value = false
            })
            return { testNum1, funB }
        }
    })
    app.use(ElementPlus)
    app.mount("#app")
</script>
</body>
</html>