diff --git a/docs/examples-docs/actionsheet.md b/docs/examples-docs/actionsheet.md index f1ccf7955..72bb79bc5 100644 --- a/docs/examples-docs/actionsheet.md +++ b/docs/examples-docs/actionsheet.md @@ -31,10 +31,6 @@ export default { name: '支付宝支付', loading: true }, - { - name: '有赞E卡', - subname: '(剩余260.50元)' - }, { name: '信用卡支付' }, @@ -90,10 +86,6 @@ export default { name: '支付宝支付', loading: true }, - { - name: '有赞E卡', - subname: '(剩余260.50元)' - }, { name: '信用卡支付' }, @@ -139,10 +131,6 @@ export default { name: '支付宝支付', loading: true }, - { - name: '有赞E卡', - subname: '(剩余260.50元)' - }, { name: '信用卡支付' }, diff --git a/docs/examples-docs/card.md b/docs/examples-docs/card.md index 99719d7d0..02b813a14 100644 --- a/docs/examples-docs/card.md +++ b/docs/examples-docs/card.md @@ -8,7 +8,7 @@ export default { } -## Card 图文组件 +## Card 卡片 ### 使用指南 ``` javascript diff --git a/docs/examples-docs/changelog.md b/docs/examples-docs/changelog.md index 4bc7b0277..b4270862c 100644 --- a/docs/examples-docs/changelog.md +++ b/docs/examples-docs/changelog.md @@ -31,12 +31,12 @@ **非兼容更新和新特性:** -- PayOrder component add tip slot [\#105](https://github.com/youzan/vant/pull/105) ([Raistlin916](https://github.com/Raistlin916)) +- SubmitBar component add tip slot [\#105](https://github.com/youzan/vant/pull/105) ([Raistlin916](https://github.com/Raistlin916)) - Checkbox: support listen to change event [\#104](https://github.com/youzan/vant/pull/104) ([chenjiahan](https://github.com/chenjiahan)) - add GoodsAction component [\#102](https://github.com/youzan/vant/pull/102) ([chenjiahan](https://github.com/chenjiahan)) - add InvalidGoods component [\#100](https://github.com/youzan/vant/pull/100) ([chenjiahan](https://github.com/chenjiahan)) - add OrderGoods component [\#99](https://github.com/youzan/vant/pull/99) ([chenjiahan](https://github.com/chenjiahan)) -- add PayOrder component [\#98](https://github.com/youzan/vant/pull/98) ([chenjiahan](https://github.com/chenjiahan)) +- add SubmitBar component [\#98](https://github.com/youzan/vant/pull/98) ([chenjiahan](https://github.com/chenjiahan)) **修复:** @@ -44,7 +44,7 @@ **合并的 Pull Request (可能有不兼容改动):** -- Add deep-select component and fix a popup bug. [\#103](https://github.com/youzan/vant/pull/103) ([Tinysymphony](https://github.com/Tinysymphony)) +- Add tree-select component and fix a popup bug. [\#103](https://github.com/youzan/vant/pull/103) ([Tinysymphony](https://github.com/Tinysymphony)) - Doc: update Step/Loading/Tag/Badge documents [\#101](https://github.com/youzan/vant/pull/101) ([chenjiahan](https://github.com/chenjiahan)) ## [v0.8.7](https://github.com/youzan/vant/tree/v0.8.7) (2017-08-29) diff --git a/docs/examples-docs/order-coupon.md b/docs/examples-docs/coupon.md similarity index 89% rename from docs/examples-docs/order-coupon.md rename to docs/examples-docs/coupon.md index 2dc799ce1..0f30ee984 100644 --- a/docs/examples-docs/order-coupon.md +++ b/docs/examples-docs/coupon.md @@ -1,4 +1,4 @@ -## OrderCoupon 下单页优惠券 +## Coupon 优惠券选择器 - -### 使用指南 -``` javascript -import { ExpressWay } from 'vant'; - -Vue.component(ExpressWay.name, ExpressWay); -``` - -### 代码演示 - -#### 基础用法 - -:::demo 基础用法 -```html - - - -``` - -```javascript -export default { - data() { - return { - currentExpressType: 1, - expressList: [{ - 'postage': 10050, - 'postage_desc': '由商家门店提供配送服务, 起送价 0.01 元', - 'postage_title': '同城配送', - 'express_type': 1 - }] - }; - }, - - methods: { - onChange(item) { - Toast(`配送方式更换为:${item.postage_title}`); - } - } -} -``` -::: - -#### 不可修改配送方式 - -:::demo 不可修改配送方式 -```html - - - -``` -::: - -### API - -| 参数 | 说明 | 类型 | 默认值 | 必须 | -|-----------|-----------|-----------|-------------|-------------| -| v-model | 当前选择的配送类型 | `Number` | | 是 | -| expressList | 配送方式列表数据 | `Array` | | 是 | -| cellTitle | Cell 标题 | `String` | `配送方式` | 否 | -| actionsheetTitle | Actionsheet 标题 | `String` | `配送方式` | 否 | -| editable | 能否修改配送方式 | `Boolean` | `true` | 否 | - - -### 数据格式 -#### expressList中的配送方式字段说明 -| key | 说明 | 类型 | -|-----------|-----------|-----------| -| postage | 运费,以分为单位 | Number | -| postage_title | 配送方式 | String | -| postage_desc | 描述信息 | String | -| express_type | 配送类型 | Number | -| postage_warn_desc | 提示信息 | String | - -### Event - -| 事件名 | 说明 | 参数 | -|-----------|-----------|-----------| -| change | 修改配送方式时触发 | item: 对应的数据, index:对应的索引 | diff --git a/docs/examples-docs/goods-action.md b/docs/examples-docs/goods-action.md index c4e65e574..5e03c1945 100644 --- a/docs/examples-docs/goods-action.md +++ b/docs/examples-docs/goods-action.md @@ -21,7 +21,7 @@ export default { } -## GoodsAction 商品操作 +## GoodsAction 商品页行动点 ### 使用指南 ``` javascript diff --git a/docs/examples-docs/invalid-goods.md b/docs/examples-docs/invalid-goods.md deleted file mode 100644 index 5a74a415f..000000000 --- a/docs/examples-docs/invalid-goods.md +++ /dev/null @@ -1,81 +0,0 @@ -## InvalidGoods 不可用商品列表 - - - -### 使用指南 -``` javascript -import { InvalidGoods } from 'vant'; - -Vue.component(InvalidGoods.name, InvalidGoods); -``` - -### 代码演示 - -#### 基础用法 - -:::demo 基础用法 -```html - -``` - -```javascript -const item = { - num: 2, - sku_id: 123, - price: 12200, - title: "商品名称", - img_url: 'https://img.yzcdn.cn/...', - unavailable_desc: '超出配送区域', - sku: [ - { v: '商品SKU1' }, - { v: '商品SKU2' } - ] -}; - -export default { - data() { - return { - goods: [item, item, item] - } - } -} -``` -::: - -### API - -| 参数 | 说明 | 类型 | 默认值 | 必须 | -|-----------|-----------|-----------|-------------|-------------| -| goods | 商品数据 | `Array` | | 是 | -| title | 标题 | `String` | `以下商品无法一起购买,点击查看原因` | 否 | -| actionsheetTitle | 弹出层标题 | `String` | `以下商品无法一起下单` | 否 | - -### 数据格式 -#### data中的商品字段说明 -| key | 说明 | 类型 | -|-----------|-----------|-----------| -| num | 商品数量 | `Number` | -| sku_id | 商品 id | `Number` | -| price | 商品价格,以分为单位 | `Number` | -| title | 商品标题 | `String` | -| img_url | 商品图片 url | `String` | -| unavailable_desc | 不可用原因 | `String` | -| sku | 商品 sku | `Array` | diff --git a/docs/examples-docs/nav-bar.md b/docs/examples-docs/nav-bar.md new file mode 100644 index 000000000..ad4577d2e --- /dev/null +++ b/docs/examples-docs/nav-bar.md @@ -0,0 +1,52 @@ +## NavBar 导航栏 + +### 使用指南 +``` javascript +import { NavBar } from 'vant'; + +Vue.component(NavBar.name, NavBar); +``` + +### 代码演示 + +#### 基础用法 + +:::demo 基础用法 +```html + +``` +::: + +#### 高级用法 +通过 slot 定制内容 + +:::demo 高级用法 +```html + + + +``` +::: + + +### API +| 参数 | 说明 | 类型 | 默认值 | 可选值 | +|-----------|-----------|-----------|-------------|-------------| +| title | 标题 | `String` | `''` | - | +| left-text | 左侧文案 | `String` | `''` | - | +| right-text | 右侧文案 | `String` | `''` | - | +| left-arrow | 是否显示左侧箭头 | `Boolean` | `false` | - | +| fixed | 是否固定在顶部 | `Boolean` | `false` | - | + +### Slot + +| name | 描述 | +|-----------|-----------| +| title | 自定义标题 | +| left | 自定义左侧区域内容 | +| right | 自定义右侧区域内容 | \ No newline at end of file diff --git a/docs/examples-docs/order-goods.md b/docs/examples-docs/order-goods.md deleted file mode 100644 index 12256d736..000000000 --- a/docs/examples-docs/order-goods.md +++ /dev/null @@ -1,229 +0,0 @@ -## OrderGoods 下单页商品列表 - - - -### 使用指南 -``` javascript -import { OrderGoods } from 'vant'; - -Vue.component(OrderGoods.name, OrderGoods); -``` - -### 代码演示 - -#### 基础用法 - -:::demo 基础用法 -```html - -``` - -```javascript -export default { - data() { - return { - message1: '', - itemList1: [{ - img_url: '//img.yzcdn.cn/...', - pay_price: 1050, - title: '商品 A', - num: '1' - }] - } - } -} -``` -::: - -#### 积分商品 - -:::demo 积分商品 -```html - -``` - -```javascript -export default { - data() { - return { - message2: '', - itemList2: [{ - points_price: 200, - pay_price: 50, - img_url: '//img.yzcdn.cn/...', - title: '商品 B', - num: '15', - sku: [ - { v: '商品SKU1' }, - { v: '商品SKU2' } - ] - }] - } - } -} -``` -::: - -#### 预售商品 - -:::demo 预售商品 -```html - -``` - -```javascript -export default { - data() { - return { - message3: '', - itemList3: [{ - pay_price: 50, - img_url: '//img.yzcdn.cn/...', - title: '商品 C', - num: '15', - delivery_time: '三天后发货', - show_delivery_time: true, - is_presale: true, - is_present: true - }] - } - } -} -``` -::: - -#### 商品为空 - -:::demo 商品为空 -```html - -``` -::: - -#### 多个商品 - -:::demo 多个商品 -```html - -``` -::: - -### API - -| 参数 | 说明 | 类型 | 默认值 | -|-----------|-----------|-----------|-------------| -| shop-name | 店铺名称 | `String` | | -| shop-link | 店铺链接 | `String` | | -| header-icon | 店铺名称左侧的图标类型 | `String` | `shop` | -| header-badge | 店铺名称右侧的徽章链接 | `String` | | -| item-list | 商品列表 | `Array` | `[]` | -| empty-icon | 商品列表为空时的图标 | `String` | | -| empty-message | 商品列表为空时的提示文案 | `String` | `当前没有可购买的商品,请重新选择` | -| empty-button-text | 商品列表为空时的按钮文案 | `String` | `返回重新选择` | -| v-model | 买家留言 | `String` | `''` | -| show-total-price | 是否显示价格栏 | `Boolean` | `true` | -| show-message | 是否显示留言栏 | `Boolean` | `true` | -| message-editable | 留言是否可以编辑 | `Boolean` | `true` | -| price | 合计金额(单位分) | `Number` | | -| points | 合计积分 | `Number` | | - -### 数据格式 -#### itemList 中的配送方式字段说明 -| key | 说明 | 类型 | -|-----------|-----------|-----------| -| title | 商品名称 | `String` | -| img_url | 图片地址 | `String` | -| delivery_time | 发货时间 | `String` | -| num | 商品数量 | `Number` | -| points_price | 积分价格 | `Number` | -| pay_price(单位分) | 金额 | `Number` | -| sku | 商品 sku | `Array` | -| message | 商品留言 | `Array` | -| is_presale | 是否为预售 | `Boolean` | -| is_present | 是否为赠品 | `Boolean` | -| is_period_buy | 是否为周期购 | `Boolean` | -| show_delivery_time | 是否显示发货时间 | `Boolean` | - -### Event - -| 事件名 | 说明 | 参数 | -|-----------|-----------|-----------| -| clickEmptyButton | 点击商品为空时的按钮时触发 | - | - -### Slot -| name | 描述 | -|-----------|-----------| -| 默认 | 在商品列表和留言之间插入内容 | -| top | 在标题和商品列表之间插入内容 | -| bottom | 在合计价格下方插入内容 | diff --git a/docs/examples-docs/popup.md b/docs/examples-docs/popup.md index f676ea2a8..6fa31ecdd 100644 --- a/docs/examples-docs/popup.md +++ b/docs/examples-docs/popup.md @@ -73,7 +73,7 @@ export default { }; -## Popup 弹出菜单 +## Popup 弹出层 ### 使用指南 ``` javascript @@ -107,11 +107,11 @@ export default { ``` ::: -#### 从不同位置弹出菜单 +#### 从不同位置弹出层 可以设置`position`属性,`popup`即能从不同位置弹出,`position`的可选值有`top`,`bottom`,`right`,`left`。 -:::demo 从不同位置弹出菜单 +:::demo 从不同位置弹出层 ```html 从下方弹出popup @@ -166,7 +166,7 @@ export default { | v-model | 当前组件是否显示 | `Boolean` | `false` | - | | overlay | 是否显示背景遮罩层 | `Boolean` | `true` | - | | lockOnScroll | 背景是否跟随滚动 | `Boolean` | `false` | - | -| position | 弹出菜单位置 | `String` | - | `top`, `bottom`, `right`, `left` | -| closeOnClickOverlay | 点击遮罩层是否关闭弹出菜单 | `Boolean` | `true` | - | -| transition | 弹出菜单的`transition` | `String` | `popup-slide` | | +| position | 弹出层位置 | `String` | - | `top`, `bottom`, `right`, `left` | +| closeOnClickOverlay | 点击遮罩层是否关闭弹出层 | `Boolean` | `true` | - | +| transition | 弹出层的`transition` | `String` | `popup-slide` | | | preventScroll | 是否防止滚动穿透 | `Boolean` | `false` | - | diff --git a/docs/examples-docs/quantity.md b/docs/examples-docs/stepper.md similarity index 61% rename from docs/examples-docs/quantity.md rename to docs/examples-docs/stepper.md index c6ad2137c..ce48e7804 100644 --- a/docs/examples-docs/quantity.md +++ b/docs/examples-docs/stepper.md @@ -1,10 +1,10 @@