mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-17 04:31:22 +08:00
chore: format markdown code. (#42)
* format: fix markdown * update: fix markdown * update: fix cron problems * update: delete .markdownlintignore * update * chore: add tab -> 4 space * chore: fix tab -> 2 in the .editorconfig
This commit is contained in:
17
docs/vue2.md
17
docs/vue2.md
@ -17,7 +17,7 @@ Vue 是一套用于构建用户界面的渐进式框架
|
||||
|
||||
注意:Vue 2.x 版本对应 Vue Router 3.x 路由版本
|
||||
|
||||
#### 快速创建 **Vue** 项目 ([Vue CLI](https://cli.vuejs.org/zh/guide/creating-a-project.html))
|
||||
#### 快速创建 **Vue** 项目 ([Vue CLI](https://cli.vuejs.org/zh/guide/creating-a-project.html))
|
||||
|
||||
```bash
|
||||
npx @vue/cli create hello-world
|
||||
@ -277,7 +277,7 @@ var app6 = new Vue({
|
||||
<a v-on:[eventName]="doSomething">...</a>
|
||||
```
|
||||
|
||||
当 `eventName` 的值为 `focus` 时,`v-on:[eventName]` 将等价于 `v-on:focus`
|
||||
当 `eventName` 的值为 `focus` 时,`v-on:[eventName]` 将等价于 `v-on:focus`
|
||||
|
||||
### 指令修饰符
|
||||
|
||||
@ -550,7 +550,6 @@ data: {
|
||||
</ul>
|
||||
```
|
||||
|
||||
|
||||
```js
|
||||
var example1 = new Vue({
|
||||
el: '#example-1',
|
||||
@ -995,7 +994,7 @@ computed: {
|
||||
<span>Checked names: {{ checkedNames }}</span>
|
||||
```
|
||||
|
||||
如下 data
|
||||
如下 data
|
||||
|
||||
```js
|
||||
new Vue({
|
||||
@ -1006,7 +1005,7 @@ new Vue({
|
||||
})
|
||||
```
|
||||
|
||||
### 单选按钮
|
||||
### 单选按钮
|
||||
|
||||
```html
|
||||
<div id="example-4">
|
||||
@ -1195,6 +1194,7 @@ vm.selected.number // => 123
|
||||
<!--rehype:wrap-class=row-span-3-->
|
||||
|
||||
- 将 `HTML`/`CSS`/`JS` 三部分存放到一个 `Hello.vue` 文件中
|
||||
|
||||
```html
|
||||
<template>
|
||||
<p>{{ title }} World!</p>
|
||||
@ -1222,7 +1222,9 @@ vm.selected.number // => 123
|
||||
}
|
||||
</style>
|
||||
```
|
||||
|
||||
- 使用 `Hello.vue` 组件
|
||||
|
||||
```html
|
||||
<script>
|
||||
import Vue from "vue";
|
||||
@ -1681,7 +1683,7 @@ Vue.component('alert-box', {
|
||||
`leave-active-class` | [#](https://v2.cn.vuejs.org/v2/guide/transitions.html#自定义过渡的类名)
|
||||
`leave-to-class` _(2.1.8+)_ | [#](https://v2.cn.vuejs.org/v2/guide/transitions.html#自定义过渡的类名)
|
||||
|
||||
----
|
||||
---
|
||||
|
||||
```html
|
||||
<transition
|
||||
@ -2026,7 +2028,6 @@ Vue 2 API 参考
|
||||
`v-on:click.passive` _(2.3.0)_ [#](https://v2.cn.vuejs.org/v2/api/#v-on) | 以 { passive: true } 模式添加侦听器
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
|
||||
### v-on (鼠标)修饰符
|
||||
|
||||
:- | :-
|
||||
@ -2052,7 +2053,7 @@ Vue 2 API 参考
|
||||
:- | :-
|
||||
`v-on:keyup.enter` | [#](https://v2.cn.vuejs.org/v2/guide/events.html#按键修饰符)
|
||||
`v-on:keyup.tab` | [#](https://v2.cn.vuejs.org/v2/guide/events.html#按键修饰符)
|
||||
`v-on:keyup.delete ` | 捕获“删除”和“退格”键 [#](https://v2.cn.vuejs.org/v2/guide/events.html#按键修饰符)
|
||||
`v-on:keyup.delete` | 捕获“删除”和“退格”键 [#](https://v2.cn.vuejs.org/v2/guide/events.html#按键修饰符)
|
||||
`v-on:keyup.esc` | [#](https://v2.cn.vuejs.org/v2/guide/events.html#按键修饰符)
|
||||
`v-on:keyup.space` | [#](https://v2.cn.vuejs.org/v2/guide/events.html#按键修饰符)
|
||||
`v-on:keyup.up` | [#](https://v2.cn.vuejs.org/v2/guide/events.html#按键修饰符)
|
||||
|
Reference in New Issue
Block a user