methods
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[Vue]]
&color(red){※前提条件:本文基于 Vue 2.0 创作};
#contents
* 概要 [#oce1d5c8]
methods:{ } 里是写各种不同的方法函数,这些方法可以理解为...
#codeprettify{{
methods: {
greet(time) {
return `Good ${time}`;
}
}
}}
* 方法的调用 [#n76ae0bd]
可以在Mastache 表达式中使用
#codeprettify{{
<div id="app">
\{\{ greet(time) \}\}
</div>
}}
* 注意 [#q815f9bd]
data 里面调用 methods 方法需要在方法前面加上 &color(red){...
#codeprettify{{
data: {
return {
this.greet('11');
}
}
}}
#hr();
コメント:
#comment_kcaptcha
終了行:
[[Vue]]
&color(red){※前提条件:本文基于 Vue 2.0 创作};
#contents
* 概要 [#oce1d5c8]
methods:{ } 里是写各种不同的方法函数,这些方法可以理解为...
#codeprettify{{
methods: {
greet(time) {
return `Good ${time}`;
}
}
}}
* 方法的调用 [#n76ae0bd]
可以在Mastache 表达式中使用
#codeprettify{{
<div id="app">
\{\{ greet(time) \}\}
</div>
}}
* 注意 [#q815f9bd]
data 里面调用 methods 方法需要在方法前面加上 &color(red){...
#codeprettify{{
data: {
return {
this.greet('11');
}
}
}}
#hr();
コメント:
#comment_kcaptcha
ページ名: