美文网首页uin-app
xml在html中格式化输出

xml在html中格式化输出

作者: 瑟闻风倾 | 来源:发表于2020-09-02 13:49 被阅读0次
  • 使用<pre></pre>包围代码
  • 使用<xmp></xmp>包围代码

(1) 示例

<template>
    <view>
        <view class="cells">
            <view class="cell" v-for="(item,index) in logList" :key="index">
                <view class="hd">机器</view>
                <view>
                    <text class="hd">指令</text>
                    <text class="bd">{{item.instruction}}</text>
                </view>
                <view>
                    <text class="hd">时间</text>
                    <text class="bd">{{item.time}}</text>
                </view>
                <view class="hd">内容</view>
                <view class="bd">
                    <pre>
Array
(
    [type] => Server
    [cmd] => setpara
    [cmd_id] => 1598927502
    [devsn] => 19094051422
    [items] => Array
        (
            [P8] => 2
        )
)
                    </pre>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            logList:[
                {
                    machineNo:"zj100000013",
                    instruction:"getpara",
                    time:"2020-09-01 10:09:42",
                    content:"Array"
                },
                {
                    machineNo:"zj100000013",
                    instruction:"getpara",
                    time:"2020-09-01 10:09:42",
                    content:"Array"
                },
                {
                    machineNo:"zj100000013",
                    instruction:"getpara",
                    time:"2020-09-01 10:09:42",
                    content:"Array"
                }
            ]
        }
    },
    methods: {
    },
    onLoad:function(){
    }
}
</script>

<style scoped lang="scss">
.cells{
    padding: 0 15px;
    .cell{
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid rgba(0, 0, 0, 0.15);
        .hd{
            color: #000;
            margin-right: 8px;
        }
        .bd{
            color: #888;
        }
    }
}

</style>

(2) 效果


image.png

相关文章

  • dom4j

    dom4j 格式化xml输出 格式化xml输出:

  • xml在html中格式化输出

    使用 包围代码 使用

    包围代码 (1) 示例 (2) 效果

  • WEB网站地图在线生成

    网站地图是一种格式化的XML文件(sitemap.xml)、HTML文件(sitemap.html)、TXT文件(...

  • PHP基础7:在Web页面中嵌套PHP

    PHP可嵌入html或xml文件中执行 标准(XML)风格 SGML风格 ASP风格 Script风格 直接输出内容

  • HTML文本格式化

    HTML可定义很多供格式化输出的元素,比如粗体和斜体。 HTML格式化实例 文本格式化此例演示如何在一个 HTML...

  • HTML的探索5

    HTML可定义很多供格式化输出的元素,比如粗体和斜体字。 HTML文本格式化实例 文本格式化 This text ...

  • HTML文本格式化-08

    HTML 格式化标签HTML 使用标签 与 对输出的文本进行格式, 如:粗体 or 斜体这些HTML标签被称为...

  • 基础知识 - Golang 中的格式化输入输出

    【格式化输出】 // 格式化输出:将 arg 列表中的 arg 转换为字符串输出 // 使用动词 v 格式化 ar...

  • Golang 中的格式化输入输出

    【格式化输出】 // 格式化输出:将 arg 列表中的 arg 转换为字符串输出 // 使用动词 v 格式化 ar...

  • HTML 文本格式化

    HTML 可定义很多供格式化输出的元素,比如粗体和斜体字。 下面有很多例子,您可以亲自试试: HTML 文本格式化...

网友评论

    本文标题:xml在html中格式化输出

    本文链接:https://www.haomeiwen.com/subject/jotwsktx.html