This commit is contained in:
zhuxiang 2017-03-01 15:10:03 +08:00
parent 5b34ea74ec
commit abc876b254
8 changed files with 22 additions and 32 deletions

View File

@ -4,12 +4,12 @@
:::demo 样例代码 :::demo 样例代码
```html ```html
<z-badge-group active-key="2"> <zan-badge-group active-key="2">
<z-badge mark="0" title="热销榜" info="8" url="http://baidu.com"></z-badge> <zan-badge mark="0" title="热销榜" info="8" url="http://baidu.com"></zan-badge>
<z-badge mark="1" title="花式寿司" info="99"></z-badge> <zan-badge mark="1" title="花式寿司" info="99"></zan-badge>
<z-badge mark="2" title="火炽寿司"></z-badge> <zan-badge mark="2" title="火炽寿司"></zan-badge>
<z-badge mark="3" title="手握寿司" info="199"></z-badge> <zan-badge mark="3" title="手握寿司" info="199"></zan-badge>
</z-badge-group> </zan-badge-group>
``` ```
::: :::

View File

@ -13,11 +13,11 @@ export default {
:::demo 样例代码 :::demo 样例代码
```html ```html
<z-search <zan-search
placeholder="商品名称" placeholder="商品名称"
:on-search="goSearch" :on-search="goSearch"
> >
</z-search> </zan-search>
``` ```
```javascript ```javascript

View File

@ -1,12 +1,12 @@
<template> <template>
<div class="z-badge-group"> <div class="zan-badge-group">
<slot></slot> <slot></slot>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'z-badge-group', name: 'zan-badge-group',
props: { props: {
// tab key // tab key
activeKey: { activeKey: {

View File

@ -1,13 +1,13 @@
<template> <template>
<a class="z-badge" :class="classNames" :href="url" @click="handleClick"> <a class="zan-badge" :class="classNames" :href="url" @click="handleClick">
<div class="z-badge__active"></div> <div class="zan-badge__active"></div>
<div v-if="info" class="z-badge__info">{{info}}</div> <div v-if="info" class="zan-badge__info">{{info}}</div>
{{title}} {{title}}
</a> </a>
</template> </template>
<script> <script>
export default { export default {
name: 'z-badge', name: 'zan-badge',
props: { props: {
mark: { mark: {
type: [Number, String], type: [Number, String],

View File

@ -1,16 +1,16 @@
<template> <template>
<div class="z-search" :class="{ 'is-focus' : isFocus }"> <div class="zan-search" :class="{ 'is-focus' : isFocus }">
<div class="z-search__input-wrap"> <div class="zan-search__input-wrap">
<input type="text" :placeholder="placeholder" v-model="value" v-refocus="focusStatus" @focus="handleFocus" @keyup.enter="handleSearch"> <input type="text" :placeholder="placeholder" v-model="value" v-refocus="focusStatus" @focus="handleFocus" @keyup.enter="handleSearch">
<span class="zui-icon zui-icon-close" @click="handleClean"></span> <span class="zui-icon zui-icon-close" @click="handleClean"></span>
</div> </div>
<div class="z-search__cancel" :class="{ 'is-focus' : isFocus }" @click="handleBack">取消</div> <div class="zan-search__cancel" :class="{ 'is-focus' : isFocus }" @click="handleBack">取消</div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'z-search', name: 'zan-search',
props: { props: {
placeholder: { placeholder: {
type: String, type: String,

View File

@ -1,7 +1,7 @@
@import "./common/var.pcss"; @import "./common/var.pcss";
@import "./mixins/border_retina.pcss"; @import "./mixins/border_retina.pcss";
@component-namespace z { @component-namespace zan {
@b badge-group { @b badge-group {
position: relative; position: relative;
width: 85px; width: 85px;
@ -50,7 +50,7 @@
font-weight: bold; font-weight: bold;
color: $c-black; color: $c-black;
background-color: $c-white; background-color: $c-white;
.z-badge__active { .zan-badge__active {
display: block; display: block;
} }
&::after { &::after {

View File

@ -1,5 +1,5 @@
@import "./common/var.pcss"; @import "./common/var.pcss";
@component-namespace z { @component-namespace zan {
@b search { @b search {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -10,7 +10,7 @@
padding: 4px 15px; padding: 4px 15px;
background-color: #F2F2F2; background-color: #F2F2F2;
@when focus { @when focus {
.z-search__input-wrap { .zan-search__input-wrap {
width: 82%; width: 82%;
} }
span { span {

View File

@ -11,9 +11,6 @@ import Picker from '../packages/picker/index.js';
import RadioGroup from '../packages/radio-group/index.js'; import RadioGroup from '../packages/radio-group/index.js';
import Waterfall from '../packages/waterfall/index.js'; import Waterfall from '../packages/waterfall/index.js';
import Loading from '../packages/loading/index.js'; import Loading from '../packages/loading/index.js';
import Badge from '../packages/badge/index.js';
import BadgeGroup from '../packages/badge-group/index.js';
import Search from '../packages/search/index.js';
import Panel from '../packages/panel/index.js'; import Panel from '../packages/panel/index.js';
import Card from '../packages/card/index.js'; import Card from '../packages/card/index.js';
import Steps from '../packages/steps/index.js'; import Steps from '../packages/steps/index.js';
@ -35,9 +32,6 @@ const install = function(Vue) {
Vue.component(Picker.name, Picker); Vue.component(Picker.name, Picker);
Vue.component(RadioGroup.name, RadioGroup); Vue.component(RadioGroup.name, RadioGroup);
Vue.component(Loading.name, Loading); Vue.component(Loading.name, Loading);
Vue.component(Badge.name, Badge);
Vue.component(BadgeGroup.name, BadgeGroup);
Vue.component(Search.name, Search);
Vue.component(Panel.name, Panel); Vue.component(Panel.name, Panel);
Vue.component(Card.name, Card); Vue.component(Card.name, Card);
Vue.component(Steps.name, Steps); Vue.component(Steps.name, Steps);
@ -65,10 +59,6 @@ module.exports = {
Dialog, Dialog,
Picker, Picker,
RadioGroup, RadioGroup,
Loading,
Badge,
BadgeGroup,
Search,
Waterfall, Waterfall,
Loading, Loading,
Panel, Panel,