chore: fix prettier version (#7739)

* chore: fix prettier version

* docs: fix
This commit is contained in:
neverland 2020-12-14 17:04:43 +08:00 committed by GitHub
parent b6ab011f7d
commit dc3fee12c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 45 additions and 94 deletions

View File

@ -64,7 +64,7 @@
}, },
"devDependencies": { "devDependencies": {
"@vant/cli": "^2.7.0", "@vant/cli": "^2.7.0",
"prettier": "^2.0.4", "prettier": "2.1.0",
"vue": "^2.6.12", "vue": "^2.6.12",
"vue-template-compiler": "^2.6.12" "vue-template-compiler": "^2.6.12"
}, },

View File

@ -50,9 +50,7 @@ Use the image prop to display different placeholder images.
```html ```html
<van-empty description="Description"> <van-empty description="Description">
<van-button round type="danger" class="bottom-button"> <van-button round type="danger" class="bottom-button">Button</van-button>
Button
</van-button>
</van-empty> </van-empty>
<style> <style>

View File

@ -59,9 +59,7 @@ Empty 组件内置了多种占位图片类型,可以在不同业务场景下
```html ```html
<van-empty description="描述文字"> <van-empty description="描述文字">
<van-button round type="danger" class="bottom-button"> <van-button round type="danger" class="bottom-button">按钮</van-button>
按钮
</van-button>
</van-empty> </van-empty>
<style> <style>

View File

@ -37,9 +37,7 @@ Vue.use(Form);
:rules="[{ required: true, message: '请填写密码' }]" :rules="[{ required: true, message: '请填写密码' }]"
/> />
<div style="margin: 16px;"> <div style="margin: 16px;">
<van-button round block type="info" native-type="submit"> <van-button round block type="info" native-type="submit">提交</van-button>
提交
</van-button>
</div> </div>
</van-form> </van-form>
``` ```
@ -88,9 +86,7 @@ export default {
:rules="[{ validator: asyncValidator, message: '请输入正确内容' }]" :rules="[{ validator: asyncValidator, message: '请输入正确内容' }]"
/> />
<div style="margin: 16px;"> <div style="margin: 16px;">
<van-button round block type="info" native-type="submit"> <van-button round block type="info" native-type="submit">提交</van-button>
提交
</van-button>
</div> </div>
</van-form> </van-form>
``` ```
@ -530,9 +526,7 @@ export default {
在表单中,除了提交按钮外,可能还有一些其他的功能性按钮,如发送验证码按钮。在使用这些按钮时,要注意将`native-type`设置为`button`,否则会触发表单提交。 在表单中,除了提交按钮外,可能还有一些其他的功能性按钮,如发送验证码按钮。在使用这些按钮时,要注意将`native-type`设置为`button`,否则会触发表单提交。
```html ```html
<van-button native-type="button"> <van-button native-type="button">发送验证码</van-button>
发送验证码
</van-button>
``` ```
这个问题的原因是浏览器中 button 标签 type 属性的默认值为`submit`,导致触发表单提交。我们会在下个大版本中将 type 的默认值调整为`button`来避免这个问题。 这个问题的原因是浏览器中 button 标签 type 属性的默认值为`submit`,导致触发表单提交。我们会在下个大版本中将 type 的默认值调整为`button`来避免这个问题。

View File

@ -33,21 +33,15 @@ Vue.use(NoticeBar);
### Wrapable ### Wrapable
```html ```html
<van-notice-bar wrapable :scrollable="false"> <van-notice-bar wrapable :scrollable="false">Notice Content</van-notice-bar>
Notice Content
</van-notice-bar>
``` ```
### Mode ### Mode
```html ```html
<van-notice-bar mode="closeable"> <van-notice-bar mode="closeable">Notice Content</van-notice-bar>
Notice Content
</van-notice-bar>
<van-notice-bar mode="link"> <van-notice-bar mode="link">Notice Content</van-notice-bar>
Notice Content
</van-notice-bar>
``` ```
### Custom Style ### Custom Style

View File

@ -59,14 +59,10 @@ Vue.use(NoticeBar);
```html ```html
<!-- closeable 模式,在右侧显示关闭按钮 --> <!-- closeable 模式,在右侧显示关闭按钮 -->
<van-notice-bar mode="closeable"> <van-notice-bar mode="closeable">技术是开发它的人的共同灵魂。</van-notice-bar>
技术是开发它的人的共同灵魂。
</van-notice-bar>
<!-- link 模式,在右侧显示链接箭头 --> <!-- link 模式,在右侧显示链接箭头 -->
<van-notice-bar mode="link"> <van-notice-bar mode="link">技术是开发它的人的共同灵魂。</van-notice-bar>
技术是开发它的人的共同灵魂。
</van-notice-bar>
``` ```
### 自定义样式 ### 自定义样式

View File

@ -14,9 +14,7 @@ Vue.use(NumberKeyboard);
### Default Keyboard ### Default Keyboard
```html ```html
<van-cell @touchstart.native.stop="show = true"> <van-cell @touchstart.native.stop="show = true">Show Keyboard</van-cell>
Show Keyboard
</van-cell>
<van-number-keyboard <van-number-keyboard
:show="show" :show="show"
@blur="show = false" @blur="show = false"

View File

@ -20,9 +20,7 @@ Vue.use(NumberKeyboard);
数字键盘提供了 `input``delete``blur` 事件,分别对应输入内容、删除内容和失去焦点的动作。 数字键盘提供了 `input``delete``blur` 事件,分别对应输入内容、删除内容和失去焦点的动作。
```html ```html
<van-cell @touchstart.native.stop="show = true"> <van-cell @touchstart.native.stop="show = true">弹出默认键盘</van-cell>
弹出默认键盘
</van-cell>
<van-number-keyboard <van-number-keyboard
:show="show" :show="show"
@blur="show = false" @blur="show = false"

View File

@ -21,9 +21,7 @@ Vue.use(Popover);
@select="onSelect" @select="onSelect"
> >
<template #reference> <template #reference>
<van-button type="primary"> <van-button type="primary">Light Theme</van-button>
Light Theme
</van-button>
</template> </template>
</van-popover> </van-popover>
``` ```
@ -62,9 +60,7 @@ Using the `theme` prop to change the style of Popover.
:actions="actions" :actions="actions"
> >
<template #reference> <template #reference>
<van-button type="primary"> <van-button type="primary">Dark Theme</van-button>
Dark Theme
</van-button>
</template> </template>
</van-popover> </van-popover>
``` ```
@ -112,9 +108,7 @@ bottom-end # Bottom right
```html ```html
<van-popover v-model="showPopover" trigger="click" :actions="actions"> <van-popover v-model="showPopover" trigger="click" :actions="actions">
<template #reference> <template #reference>
<van-button type="primary"> <van-button type="primary">Show Icon</van-button>
Show Icon
</van-button>
</template> </template>
</van-popover> </van-popover>
``` ```
@ -141,9 +135,7 @@ Using the `disabled` option to disable an action.
```html ```html
<van-popover v-model="showPopover" trigger="click" :actions="actions"> <van-popover v-model="showPopover" trigger="click" :actions="actions">
<template #reference> <template #reference>
<van-button type="primary"> <van-button type="primary">Disable Action</van-button>
Disable Action
</van-button>
</template> </template>
</van-popover> </van-popover>
``` ```

View File

@ -27,9 +27,7 @@ Vue.use(Popover);
@select="onSelect" @select="onSelect"
> >
<template #reference> <template #reference>
<van-button type="primary"> <van-button type="primary">浅色风格</van-button>
浅色风格
</van-button>
</template> </template>
</van-popover> </van-popover>
``` ```
@ -65,9 +63,7 @@ Popover 支持浅色和深色两种风格,默认为浅色风格,将 `theme`
:actions="actions" :actions="actions"
> >
<template #reference> <template #reference>
<van-button type="primary"> <van-button type="primary">深色风格</van-button>
深色风格
</van-button>
</template> </template>
</van-popover> </van-popover>
``` ```
@ -115,9 +111,7 @@ bottom-end # 底部右侧位置
```html ```html
<van-popover v-model="showPopover" trigger="click" :actions="actions"> <van-popover v-model="showPopover" trigger="click" :actions="actions">
<template #reference> <template #reference>
<van-button type="primary"> <van-button type="primary">展示图标</van-button>
展示图标
</van-button>
</template> </template>
</van-popover> </van-popover>
``` ```
@ -144,9 +138,7 @@ export default {
```html ```html
<van-popover v-model="showPopover" trigger="click" :actions="actions"> <van-popover v-model="showPopover" trigger="click" :actions="actions">
<template #reference> <template #reference>
<van-button type="primary"> <van-button type="primary">禁用选项</van-button>
禁用选项
</van-button>
</template> </template>
</van-popover> </van-popover>
``` ```
@ -188,9 +180,7 @@ export default {
/> />
</van-grid> </van-grid>
<template #reference> <template #reference>
<van-button type="primary"> <van-button type="primary">自定义内容</van-button>
自定义内容
</van-button>
</template> </template>
</van-popover> </van-popover>
``` ```

View File

@ -133,10 +133,10 @@ export default {
Use [ref](https://vuejs.org/v2/api/#ref) to get SwipeCell instance and call instance methods. Use [ref](https://vuejs.org/v2/api/#ref) to get SwipeCell instance and call instance methods.
| Name | Description | Attribute | Return value | | Name | Description | Attribute | Return value |
| ----- | --------------- | ------------------------ | ------------ | | ----- | --------------- | ------------------------- | ------------ |
| open | open SwipeCell | position: `left | right` | - | | open | open SwipeCell | position: `left \| right` | - |
| close | close SwipeCell | - | - | | close | close SwipeCell | - | - |
### Less Variables ### Less Variables

View File

@ -147,10 +147,10 @@ beforeClose 的第一个参数为对象,对象中包含以下属性:
通过 ref 可以获取到 SwipeCell 实例并调用实例方法,详见[组件实例方法](#/zh-CN/advanced-usage#zu-jian-shi-li-fang-fa)。 通过 ref 可以获取到 SwipeCell 实例并调用实例方法,详见[组件实例方法](#/zh-CN/advanced-usage#zu-jian-shi-li-fang-fa)。
| 方法名 | 说明 | 参数 | 返回值 | | 方法名 | 说明 | 参数 | 返回值 |
| ------ | ---------------- | ------------------------ | ------ | | ------ | ---------------- | ------------------------- | ------ |
| open | 打开单元格侧边栏 | position: `left | right` | - | | open | 打开单元格侧边栏 | position: `left \| right` | - |
| close | 收起单元格侧边栏 | - | - | | close | 收起单元格侧边栏 | - | - |
### 样式变量 ### 样式变量

View File

@ -121,9 +121,7 @@ export default {
<van-swipe-item>3</van-swipe-item> <van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item> <van-swipe-item>4</van-swipe-item>
<template #indicator> <template #indicator>
<div class="custom-indicator"> <div class="custom-indicator">{{ current + 1 }}/4</div>
{{ current + 1 }}/4
</div>
</template> </template>
</van-swipe> </van-swipe>

View File

@ -131,9 +131,7 @@ export default {
<van-swipe-item>3</van-swipe-item> <van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item> <van-swipe-item>4</van-swipe-item>
<template #indicator> <template #indicator>
<div class="custom-indicator"> <div class="custom-indicator">{{ current + 1 }}/4</div>
{{ current + 1 }}/4
</div>
</template> </template>
</van-swipe> </van-swipe>

View File

@ -136,12 +136,8 @@ export default {
<router-view /> <router-view />
<van-tabbar route> <van-tabbar route>
<van-tabbar-item replace to="/home" icon="home-o"> <van-tabbar-item replace to="/home" icon="home-o">Tab</van-tabbar-item>
Tab <van-tabbar-item replace to="/search" icon="search">Tab</van-tabbar-item>
</van-tabbar-item>
<van-tabbar-item replace to="/search" icon="search">
Tab
</van-tabbar-item>
</van-tabbar> </van-tabbar>
``` ```

View File

@ -144,12 +144,8 @@ export default {
<router-view /> <router-view />
<van-tabbar route> <van-tabbar route>
<van-tabbar-item replace to="/home" icon="home-o"> <van-tabbar-item replace to="/home" icon="home-o">标签</van-tabbar-item>
标签 <van-tabbar-item replace to="/search" icon="search">标签</van-tabbar-item>
</van-tabbar-item>
<van-tabbar-item replace to="/search" icon="search">
标签
</van-tabbar-item>
</van-tabbar> </van-tabbar>
``` ```

View File

@ -9489,15 +9489,20 @@ prepend-http@^2.0.0:
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
prettier@2.1.0:
version "2.1.0"
resolved "https://registry.npm.taobao.org/prettier/download/prettier-2.1.0.tgz?cache=0&sync_timestamp=1606521234483&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fprettier%2Fdownload%2Fprettier-2.1.0.tgz#5a9789f767a243118c60f3e56d95cb6544914fbb"
integrity sha1-WpeJ92eiQxGMYPPlbZXLZUSRT7s=
prettier@^1.18.2: prettier@^1.18.2:
version "1.19.1" version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
prettier@^2.0.4, prettier@^2.0.5: prettier@^2.0.5:
version "2.0.5" version "2.2.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" resolved "https://registry.npm.taobao.org/prettier/download/prettier-2.2.1.tgz?cache=0&sync_timestamp=1606521150228&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fprettier%2Fdownload%2Fprettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== integrity sha1-eVoaeN1S8HPaDNQrIfnJE4GSP/U=
pretty-error@^2.1.1: pretty-error@^2.1.1:
version "2.1.1" version "2.1.1"