How does vue simulate browser console output?

it is not convenient for the mobile phone to watch console.log (), so write a component to display it directly on the screen

<template>
    <ul class="log-screen">
        <li v-for="(log, index) in dataLog">{{log.text}}<i v-if="log.repeat">{{log.repeat}}</i></li>
    </ul>
</template>
<script>
export default {
    name: "log-screen",
    data() {
        return {
            lastMsg:"",
            dataLog:[{
                text:"",
                repeat:2
            }]
        };
    },
    methods: {
        log(l){
            if (lastMsg === l) {
                let idx = this.dataLog.length-1;
                this.dataLog[idx].repeat += 1;
            }else{
                this.dataLog.push({
                    text:l,
                    repeat:0
                });
            }
        }
    },
}

is it appropriate to write in this way?

Jun.04,2021

commonly used console debugging on mobile phone
there is a vconsole

GitHub address:
https://github.com/shouzijian.

you can adjust it and use

directly.

recommend a debug artifact on mobile: eruda to facilitate viewing various log.

will often have some interesting projects in github Star and open source. Welcome follow me. Welcome. https://github.com/simbawus

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3f068-661a1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3f068-661a1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?