-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from adcentury/develop
Version 0.3.0
- Loading branch information
Showing
29 changed files
with
1,639 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<template> | ||
<img :src="src" :alt="alt" class="weui_media_appmsg_thumb"> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
/** | ||
* 应用于图片的src | ||
*/ | ||
src: { | ||
type: String, | ||
required: true | ||
}, | ||
/** | ||
* 应用于图片的alt | ||
*/ | ||
alt: { | ||
type: String, | ||
required: false | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div class="weui_media_bd"><slot></slot></div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<a :href="link || 'javascript:;'" v-link="routerLink" class="weui_media_box" :class="typeClass" v-if="!!link || !!routerLink"> | ||
<slot></slot> | ||
</a> | ||
<div class="weui_media_box" :class="typeClass" v-else> | ||
<slot></slot> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
/** | ||
* 列表类型,可以为: | ||
* appmsg:图文组合列表 | ||
* text:文字组合列表 | ||
* small_appmsg:小图文组合列表 | ||
*/ | ||
type: { | ||
type: String, | ||
required: true | ||
}, | ||
/** | ||
* 跳转链接 | ||
*/ | ||
link: { | ||
type: String, | ||
required: false | ||
}, | ||
/** | ||
* vue-router使用的跳转链接 | ||
* 若使用vue-router,推荐使用router-link而非link | ||
*/ | ||
routerLink: { | ||
type: null, | ||
required: false | ||
} | ||
}, | ||
computed: { | ||
typeClass() { | ||
return `weui_media_${this.type}`; | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<p class="weui_media_desc"><slot></slot></p> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div class="weui_media_hd"><slot></slot></div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<li class="weui_media_info_meta" :class="{'weui_media_info_meta_extra': extra}"><slot></slot></li> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
/** | ||
* 是否为extra的标识,若是,则文字左方会有竖线隔离符 | ||
*/ | ||
extra: { | ||
type: Boolean, | ||
required: false, | ||
default: false | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<ul class="weui_media_info"><slot></slot></ul> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<h4 class="weui_media_title"><slot></slot></h4> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div class="weui_panel_bd"><slot></slot></div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<a class="weui_panel_ft" :href="link || 'javascript:;'" v-link="routerLink"><slot></slot></a> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
/** | ||
* 底部跳转链接 | ||
*/ | ||
link: { | ||
type: String, | ||
required: false | ||
}, | ||
/** | ||
* vue-router使用的跳转链接 | ||
* 若使用vue-router,推荐使用router-link而非link | ||
*/ | ||
routerLink: { | ||
type: null, | ||
required: false | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div class="weui_panel_hd"><slot></slot></div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<template> | ||
<div class="weui_panel" :class="{'weui_panel_access': access}"> | ||
<slot></slot> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
/** | ||
* 底部部分是否包含“查看更多”样式 | ||
*/ | ||
access: { | ||
type: Boolean, | ||
required: false, | ||
default: false | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<template> | ||
<div class="weui_search_bar" :class="{'weui_search_focusing': isFocusing || !!value}"> | ||
<form class="weui_search_outer"> | ||
<div class="weui_search_inner"> | ||
<i class="weui_icon_search"></i> | ||
<input type="search" class="weui_search_input" id="searchInput" :placeholder="placeholder" required v-model="value" v-el:input @focus="isFocusing = true" @blur="isFocusing = false"> | ||
<a href="javascript:;" class="weui_icon_clear" @click="clearInput"></a> | ||
</div> | ||
<label for="searchInput" class="weui_search_text"> | ||
<i class="weui_icon_search"></i> | ||
<span v-if="!!placeholder">{{placeholder}}</span> | ||
</label> | ||
</form> | ||
<a href="javascript:;" class="weui_search_cancel" v-if="!!cancelText && isFocusing" @click="cancelInput">{{cancelText}}</a> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
/** | ||
* 标签 | ||
*/ | ||
placeholder: { | ||
type: String, | ||
required: false | ||
}, | ||
/** | ||
* 取消按钮文本,若不设置则无取消按钮 | ||
*/ | ||
cancelText: { | ||
type: String, | ||
required: false | ||
}, | ||
/** | ||
* 双向绑定的搜索框输入内容 | ||
*/ | ||
value: { | ||
type: String, | ||
required: true, | ||
twoWay: true | ||
} | ||
}, | ||
data() { | ||
return { | ||
isFocusing: false | ||
}; | ||
}, | ||
methods: { | ||
clearInput() { | ||
this.value = ''; | ||
this.$els.input.focus(); | ||
}, | ||
cancelInput() { | ||
this.value = ''; | ||
} | ||
} | ||
} | ||
</script> |
Oops, something went wrong.