• vue5 过滤器 模版


    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>智能社——http://www.zhinengshe.com</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <style>
            .red{
                color: red;
            }
            .blue{
                background: blue;
            }
        </style>
        <script src="vue.js"></script>
        <script>
            window.onload=function(){
                new Vue({
                    el:'#box',
                    data:{
                        msg:'abc'
                    }
                });
            };
        </script>
    </head>
    <body>
        <div id="box">
            <input type="text" v-model="msg">
            <br>
            {{msg}}
            <br>
            {{*msg}}   //后面更新不更新
            <br>
            {{{msg}}}   //解析html<h1></h1>
        </div>
    </body>
    </html>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>智能社——http://www.zhinengshe.com</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <style>
            .red{
                color: red;
            }
            .blue{
                background: blue;
            }
        </style>
        <script src="vue.js"></script>
        <script>
            window.onload=function(){
                new Vue({
                    el:'#box',
                    data:{
                    }
                });
            };
        </script>
    </head>
    <body>
        <div id="box">
            {{'welcome'|uppercase}}  //转大写过滤器
                    <br>
            {{'WELCOME'|lowercase}}
            {{'WELCOME'|lowercase|capitalize}}   //首字母大写过滤器
            {{12|currency '¥'}}  //¥12.00
            {{12|currency}}  // $12.00
        </div>
    </body>
    </html>
  • 相关阅读:
    tuple 元组及字典dict
    day 49 css属性补充浮动 属性定位 抽屉作业
    day48 选择器(基本、层级 、属性) css属性
    day47 列表 表单 css初识
    day 46 http和html
    day 45索引
    day 44 练习题讲解 多表查询
    day 40 多表查询 子查询
    day39 表之间的关联关系、 补充 表操作总结 where 、group by、
    day38 数据类型 约束条件
  • 原文地址:https://www.cnblogs.com/yaowen/p/6974268.html
Copyright © 2020-2023  润新知