mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Doc] add goods demo (#242)
* [bugfix] Checkbox border render error in weixin browser * [bugfix] TreeSelect dependency path error * [bugfix] Swipe should clear autoplay timer when destroyed * [bugfix] Optimize component dependency analyze when build style entry * merge * update yarn.lock * update README.md * update README.md * update README.md * update README.md * update README.md * [Doc] add more badges in README.md * update README.md * [bugfix] Address & Contact list style * fix: contact test cases * [bugfix] popup style missing when build style entry * [bugfix] Search: onSearch event arguments missing * [Doc] add demo pages * update zan-doc@0.3.7 * fix: build entry error * [Doc] add goods demo * [bugfix] button primary background color
This commit is contained in:
parent
1bf316ab99
commit
276042b84c
@ -67,7 +67,7 @@ Vue.component(CellGroup.name, CellGroup);
|
||||
:::demo Advanced Usage
|
||||
```html
|
||||
<van-cell-group>
|
||||
<van-cell value="Text" icon="home" is-link>
|
||||
<van-cell value="Text" icon="shop" is-link>
|
||||
<template slot="title">
|
||||
<span class="van-cell-text">Title</span>
|
||||
<van-tag type="danger">Tag</van-tag>
|
||||
|
@ -139,7 +139,6 @@ export default {
|
||||
| itemclick | triggered when item is selected | data: selected item |
|
||||
|
||||
### Data Structure
|
||||
|
||||
`items` should be an array contains specified tree objects.
|
||||
|
||||
In every tree object, `text` property defines the name, `id` stands for the unique key while the `children` contains sub-tree objects.
|
||||
|
@ -87,7 +87,7 @@ Vue.component(CellGroup.name, CellGroup);
|
||||
:::demo 高级用法
|
||||
```html
|
||||
<van-cell-group>
|
||||
<van-cell value="进入店铺" icon="home" is-link>
|
||||
<van-cell value="进入店铺" icon="shop" is-link>
|
||||
<template slot="title">
|
||||
<span class="van-cell-text">起码运动馆</span>
|
||||
<van-tag type="danger">官方</van-tag>
|
||||
|
@ -21,15 +21,20 @@ export default {
|
||||
return {
|
||||
currentDemo: 0,
|
||||
demos: [{
|
||||
title: '商品详情',
|
||||
preview: 'https://img.yzcdn.cn/public_files/2017/10/24/7070a8d1d6504b864c605114d32f2aae.png',
|
||||
url: 'https://chenjiahan.github.io/vant-demo/#/goods',
|
||||
source: 'https://github.com/chenjiahan/vant-demo/tree/master/src/view/goods/index.vue'
|
||||
}, {
|
||||
title: '会员中心',
|
||||
preview: 'https://img.yzcdn.cn/public_files/2017/10/23/e1d70757e3ab88d39a360b704be8f43f.png',
|
||||
url: 'https://chenjiahan.github.io/vant-demo/#/user',
|
||||
source: 'https://github.com/chenjiahan/vant-demo/tree/master/src/view/user'
|
||||
source: 'https://github.com/chenjiahan/vant-demo/tree/master/src/view/user/index.vue'
|
||||
}, {
|
||||
title: '购物车',
|
||||
preview: 'https://img.yzcdn.cn/public_files/2017/10/24/06b8b5ed3692314d434db7f6854dcdbe.png',
|
||||
url: 'https://chenjiahan.github.io/vant-demo/#/cart',
|
||||
source: 'https://github.com/chenjiahan/vant-demo/tree/master/src/view/cart'
|
||||
source: 'https://github.com/chenjiahan/vant-demo/tree/master/src/view/cart/index.vue'
|
||||
}]
|
||||
};
|
||||
},
|
||||
@ -79,9 +84,9 @@ export default {
|
||||
}
|
||||
|
||||
a {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
margin: 4px 0 7px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
&--active {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<a :class="['van-cell', 'van-hairline', { 'van-cell--required': required }]" :href="url" @click="$emit('click')">
|
||||
<div class="van-cell__title" v-if="$slots.title || title">
|
||||
<slot name="icon">
|
||||
<i v-if="icon" class="van-icon" :class="'van-icon-' + icon" />
|
||||
<van-icon v-if="icon" :name="icon" />
|
||||
</slot>
|
||||
<slot name="title">
|
||||
<span class="van-cell__text" v-text="title" />
|
||||
|
@ -2,15 +2,13 @@
|
||||
$black: #000;
|
||||
$white: #fff;
|
||||
$red: #f44;
|
||||
$blue: #38f;
|
||||
$orange: #f60;
|
||||
$green: #06bf04;
|
||||
$green-wx: #4b0;
|
||||
$gray: #c9c9c9;
|
||||
$gray-light: #e5e5e5;
|
||||
$gray-darker: #666;
|
||||
$gray-dark: #999;
|
||||
$yellow: #f09000;
|
||||
$orange: #f60;
|
||||
$blue: #38f;
|
||||
|
||||
/* default colors */
|
||||
$text-color: #333;
|
||||
@ -20,7 +18,7 @@ $background-color: #f8f8f8;
|
||||
|
||||
/* button */
|
||||
$button-primary-color: $white;
|
||||
$button-primary-background-color: $green-wx;
|
||||
$button-primary-background-color: #4b0;
|
||||
$button-primary-border-color: #0a0;
|
||||
$button-default-color: $text-color;
|
||||
$button-default-background-color: $white;
|
||||
|
Loading…
x
Reference in New Issue
Block a user