- Full-Stack Vue.js 2 and Laravel 5
- Anthony Gore
- 74字
- 2021-07-02 19:57:19
Expressions
If a directive requires a value, it will be anexpression.
In the JavaScript language, expressions are small, evaluable statements that produce a single value. Expressions can be used wherever a value is expected, for example in the parenthesis of anifstatement:
if (expression) { ... }
The expression here could be any of the following:
- A mathematical expression, for examplex + 7
- A comparison, for examplev <= 7
- A Vuedataproperty, for examplethis.myval
Directives and text interpolations both accept expression values:
<p v-dir="someExpression">{{ firstName + " " + lastName }}</p>
推薦閱讀
- Go Web編程
- 劍指Offer(專項突破版):數(shù)據(jù)結構與算法名企面試題精講
- Learning SAP Analytics Cloud
- 基于Java技術的Web應用開發(fā)
- Vue.js 3.0源碼解析(微課視頻版)
- Java程序員面試算法寶典
- INSTANT Mercurial SCM Essentials How-to
- Julia Cookbook
- 軟件測試技術指南
- HTML5從入門到精通 (第2版)
- Instant Nancy Web Development
- PySide 6/PyQt 6快速開發(fā)與實戰(zhàn)
- Frank Kane's Taming Big Data with Apache Spark and Python
- JavaScript程序設計:基礎·PHP·XML
- scikit-learn Cookbook(Second Edition)