mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
adjust
This commit is contained in:
parent
5b34ea74ec
commit
abc876b254
@ -4,12 +4,12 @@
|
||||
|
||||
:::demo 样例代码
|
||||
```html
|
||||
<z-badge-group active-key="2">
|
||||
<z-badge mark="0" title="热销榜" info="8" url="http://baidu.com"></z-badge>
|
||||
<z-badge mark="1" title="花式寿司" info="99"></z-badge>
|
||||
<z-badge mark="2" title="火炽寿司"></z-badge>
|
||||
<z-badge mark="3" title="手握寿司" info="199"></z-badge>
|
||||
</z-badge-group>
|
||||
<zan-badge-group active-key="2">
|
||||
<zan-badge mark="0" title="热销榜" info="8" url="http://baidu.com"></zan-badge>
|
||||
<zan-badge mark="1" title="花式寿司" info="99"></zan-badge>
|
||||
<zan-badge mark="2" title="火炽寿司"></zan-badge>
|
||||
<zan-badge mark="3" title="手握寿司" info="199"></zan-badge>
|
||||
</zan-badge-group>
|
||||
```
|
||||
:::
|
||||
|
||||
|
@ -13,11 +13,11 @@ export default {
|
||||
|
||||
:::demo 样例代码
|
||||
```html
|
||||
<z-search
|
||||
<zan-search
|
||||
placeholder="商品名称"
|
||||
:on-search="goSearch"
|
||||
>
|
||||
</z-search>
|
||||
</zan-search>
|
||||
```
|
||||
|
||||
```javascript
|
||||
|
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div class="z-badge-group">
|
||||
<div class="zan-badge-group">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'z-badge-group',
|
||||
name: 'zan-badge-group',
|
||||
props: {
|
||||
// 当前激活 tab 面板的 key
|
||||
activeKey: {
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<a class="z-badge" :class="classNames" :href="url" @click="handleClick">
|
||||
<div class="z-badge__active"></div>
|
||||
<div v-if="info" class="z-badge__info">{{info}}</div>
|
||||
<a class="zan-badge" :class="classNames" :href="url" @click="handleClick">
|
||||
<div class="zan-badge__active"></div>
|
||||
<div v-if="info" class="zan-badge__info">{{info}}</div>
|
||||
{{title}}
|
||||
</a>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'z-badge',
|
||||
name: 'zan-badge',
|
||||
props: {
|
||||
mark: {
|
||||
type: [Number, String],
|
||||
|
@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<div class="z-search" :class="{ 'is-focus' : isFocus }">
|
||||
<div class="z-search__input-wrap">
|
||||
<div class="zan-search" :class="{ 'is-focus' : isFocus }">
|
||||
<div class="zan-search__input-wrap">
|
||||
<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>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'z-search',
|
||||
name: 'zan-search',
|
||||
props: {
|
||||
placeholder: {
|
||||
type: String,
|
||||
|
@ -1,7 +1,7 @@
|
||||
@import "./common/var.pcss";
|
||||
@import "./mixins/border_retina.pcss";
|
||||
|
||||
@component-namespace z {
|
||||
@component-namespace zan {
|
||||
@b badge-group {
|
||||
position: relative;
|
||||
width: 85px;
|
||||
@ -50,7 +50,7 @@
|
||||
font-weight: bold;
|
||||
color: $c-black;
|
||||
background-color: $c-white;
|
||||
.z-badge__active {
|
||||
.zan-badge__active {
|
||||
display: block;
|
||||
}
|
||||
&::after {
|
||||
|
@ -1,5 +1,5 @@
|
||||
@import "./common/var.pcss";
|
||||
@component-namespace z {
|
||||
@component-namespace zan {
|
||||
@b search {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@ -10,7 +10,7 @@
|
||||
padding: 4px 15px;
|
||||
background-color: #F2F2F2;
|
||||
@when focus {
|
||||
.z-search__input-wrap {
|
||||
.zan-search__input-wrap {
|
||||
width: 82%;
|
||||
}
|
||||
span {
|
||||
|
10
src/index.js
10
src/index.js
@ -11,9 +11,6 @@ import Picker from '../packages/picker/index.js';
|
||||
import RadioGroup from '../packages/radio-group/index.js';
|
||||
import Waterfall from '../packages/waterfall/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 Card from '../packages/card/index.js';
|
||||
import Steps from '../packages/steps/index.js';
|
||||
@ -35,9 +32,6 @@ const install = function(Vue) {
|
||||
Vue.component(Picker.name, Picker);
|
||||
Vue.component(RadioGroup.name, RadioGroup);
|
||||
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(Card.name, Card);
|
||||
Vue.component(Steps.name, Steps);
|
||||
@ -65,10 +59,6 @@ module.exports = {
|
||||
Dialog,
|
||||
Picker,
|
||||
RadioGroup,
|
||||
Loading,
|
||||
Badge,
|
||||
BadgeGroup,
|
||||
Search,
|
||||
Waterfall,
|
||||
Loading,
|
||||
Panel,
|
||||
|
Loading…
x
Reference in New Issue
Block a user