Getting Started – Pug https://pugjs.org/api/getting-started.html

GitHub - Tencent/wepy: 小程序组件化开发框架 https://github.com/Tencent/wepy

<template lang="pug">
view(class='container')
view(class='userinfo' @tap='tap')
mycom(:prop.sync='myprop' @fn.user='myevent')
text {{now}}
</template> 多会企业版 - 专属线下活动平台 https://www.duohui.cn/enterprise#features Attributes – Pug https://pugjs.org/language/attributes.html

Here are some alternatives you can use to include variables in your attribute:

  1. Simply write the attribute in JavaScript:

     
    - var url = 'pug-test.html';
    a(href='/' + url) Link
    |
    |
    - url = 'https://example.com/'
    a(href=url) Another link
     
     
    <a href="/pug-test.html">Link</a>
    <a href="https://example.com/">Another link</a>
     
  2. If your JavaScript runtime supports ES2015 template strings (including Node.js/io.js 1.0.0 and later), you can also use its syntax to simplify your attributes:

     
    - var btnType = 'info'
    - var btnSize = 'lg'
    button(type='button' class='btn btn-' + btnType + ' btn-' + btnSize)
    |
    |
    button(type='button' class=`btn btn-${btnType} bt
    

    Style Attributes

    The style attribute can be a string, like any normal attribute; but it can also be an object, which is handy when styles are generated by JavaScript.

     
    a(style={color: 'red', background: 'green'})
     
    <a style="color:red;background:green;"></a>
     

最新文章

  1. B/S网站中IE6兼容问题
  2. SampleDateFormat进行日期格式化
  3. soj4271 Love Me, Love My Permutation (DFS)
  4. nginx和apache的一些比较
  5. 7.arm汇编 bic和orr指令
  6. Com编程入门——什么是COM,如何使用COM
  7. SQL Server 查看一个表上的索引
  8. 使用Scala操作Mongodb
  9. ecshop foreach循环判断循环次数
  10. 吾八哥学Python(五):Python基本数学运算
  11. git只添加指定类型的文件的.gitignore规则
  12. UI设计--大象无形
  13. Linux下单机实现Zookeeper集群
  14. 安卓获取签名SHA1
  15. 【非专业前端】Vue UI 之 建立Vuetify工程
  16. axis 数据流
  17. QSetting 说明和简单使用
  18. gj10 python socket编程
  19. 学习VCL之路(1)
  20. MySQL 5.7基于GTID的主从复制

热门文章

  1. Angularjs promise-$q服务详解
  2. 点滴积累【JS】---JS小功能(JS实现匀速运动)
  3. Atitit.增强系统稳定性----虚拟内存的设置
  4. iOS 图片的属性
  5. Tomcat 学习进阶历程之Tomcat架构与核心类分析
  6. 转载:JMeter压力测试入门教程[图文]
  7. Linux进程状态转换图
  8. spring cloud 启动报错问题 Input length = 1
  9. spring 的redis操作类RedisTemplate
  10. google web design html5制作工具