zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    Kotlin入门(20)几种常见的对话框
    Kotlin入门(19)Android的基础布局
    Kotlin入门(18)利用单例对象获取时间
    Kotlin入门(17)等式判断的情况
    Kotlin入门(16)容器的遍历方式
    Kotlin入门(15)独门秘笈之特殊类
    Android Studio Gradle被墙bug总结
    unity常用的坐标系转换
    欧拉角与万向节死锁
    Unity导出Gradle工程给Android Studio使用
  • 原文地址:https://www.cnblogs.com/yaowen/p/6974268.html
Copyright © 2011-2022 走看看