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>
  • 相关阅读:
    模糊查询的like '%$name$%'的sql注入避免
    在VS2010中使用Git(转)
    android WebView解析 调用html5
    git
    推荐!手把手教你使用Git
    羽毛拍十大品牌
    乒乓球拍板和皮子世界排名
    足球小记
    centos 网络启动 在/etc/sysconfig/network-scripts/ifcfg-eth1onboot=yes即可
    MyEclipseGen--------生成
  • 原文地址:https://www.cnblogs.com/yaowen/p/6974268.html
Copyright © 2011-2022 走看看