Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Jun 7, 2018
2 parents 306c822 + b157dff commit b118788
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 51 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## 0.6.4
- [+] [`wxc-searchbar`](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-searchbar/) supports the type of setting the keyboard return key. [issues/287](https://github.com/alibaba/weex-ui/issues/287)
- [!] Fixed the [wxc-slider-bar](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-slider-bar/) bug about position. [issues/282](https://github.com/alibaba/weex-ui/issues/282)
- [+] [wxc-slider-bar](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-slider-bar/) supports dynamic modification of data and style in real time display.
- [!] Fixed the bug about [wxc-button](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-button/) when set the `type`. [issues/268](https://github.com/alibaba/weex-ui/issues/268)
- [+] Fixed the bug about [wxc-grid-select](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-grid-select/) when using more than one.
- [!] Fixed the bug about [`wxc-ep-slider`](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-ep-slider/) when slide to last one. [issues/277](https://github.com/alibaba/weex-ui/issues/277)

## 0.6.3
- [!] Fixed the bug about [`wxc-minibar`](https://alibaba.github.io/weex-ui/#/packages/wxc-minibar/) when setting right slot. [issue/263](https://github.com/alibaba/weex-ui/issues/263)
- [+] [`wxc-ep-slider`](https://alibaba.github.io/weex-ui/#/packages/wxc-ep-slider/) supports pull more by setting `pull-more` slot.
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG_cn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# 升级日志

## 0.6.4
- [+] [`wxc-searchbar`](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-searchbar/) 支持设置键盘返回键的类型 [issues/287](https://github.com/alibaba/weex-ui/issues/287)
- [!] 修复 [wxc-slider-bar](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-slider-bar/) 浮动定位问题 [issues/282](https://github.com/alibaba/weex-ui/issues/282)
- [+] [wxc-slider-bar](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-slider-bar/) 支持动态修改数据并样式实时展示
- [!] 修复 [wxc-button](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-button/) type 使用的 bug 问题
- [+] 修复 [wxc-grid-select](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-grid-select/) 多个时候会存在 key 重复的问题
- [!] 修复 [`wxc-ep-slider`](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-ep-slider/) 最后一个可能卡顿问题 [issues/277](https://github.com/alibaba/weex-ui/issues/277)

## 0.6.3
- [!] 修复 [`wxc-minibar`](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-minibar/) 设置右侧 slot 时候回调无效问题 [issue/263](https://github.com/alibaba/weex-ui/issues/263)
- [+] [`wxc-ep-slider`](https://alibaba.github.io/weex-ui/#/cn/packages/wxc-ep-slider/) 支持设置右滑加载更多设置,通过配置 `pull-more` slot 即可
Expand Down
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<img src="https://img.alicdn.com/tfs/TB1kCs_er_I8KJjy1XaXXbsxpXa-419-495.png" width="146px">

# <span style="font-weight:400;">Weex Ui</span> <span style="font-size:14px">0.6.3</span>
# <span style="font-weight:400;">Weex Ui</span> <span style="font-size:14px">0.6.4</span>

> <span style="line-height:1.8rem;font-weight:400;font-size:1.3rem">A rich interaction, lightweight, high performance UI library.<span>
Expand Down
4 changes: 2 additions & 2 deletions example/slider-bar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@
disabled: true
}
}),
created () {
created() {
setTitle('SliderBar');
this.barValue = this.sliderBarCfg1.value || this.sliderBarCfg1.defaultValue;
this.minValue = this.sliderBarCfg2.value[0] || this.sliderBarCfg1.defaultValue[0];
this.maxValue = this.sliderBarCfg2.value[1] || this.sliderBarCfg1.defaultValue[1];
},
methods: {
updateValue (value) {
updateValue(value) {
if (typeof value === 'number') {
this.barValue = value;
} else if (value.length && value.length === 2) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weex-ui",
"version": "0.6.3",
"version": "0.6.4",
"description": "A rich interaction, lightweight, high performance UI library based on Weex",
"main": "index.js",
"lib": "vue",
Expand Down
9 changes: 6 additions & 3 deletions packages/wxc-button/type.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ export const STYLE_MAP = {
};

export const TEXT_STYLE_MAP = {
taobao: {
red: {
color: '#FFFFFF'
},
fliggy: {
color: '#3D3D3D'
yellow: {
color: '#FFFFFF'
},
blue: {
color: '#FFFFFF'
},
white: {
color: '#3D3D3D'
Expand Down
1 change: 0 additions & 1 deletion packages/wxc-ep-slider/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@

if(isPullMore){
this.$emit('wxcEpSliderPullMore', { currentIndex: selectIndex });
console.log(this.$slots)
}

if (moveX < -panOffset || (moveX < -10 && duration < 200)) {
Expand Down
1 change: 1 addition & 0 deletions packages/wxc-searchbar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ More details can be found in [here](https://github.com/alibaba/weex-ui/blob/mast
| placeholder | `String` |`N`| `搜索` | input placeholder|
| cancel-label | `String` |`N`| `取消 ` | cancel button label|
| input-type | `String` |`N`| `text` | `text,password,url,email,tel`|
| return-key-type | `String` |`N`| `default` |the keybord returen key type support `default/go/next/search/send/done`|
| autofocus | `Boolean` |`N`| `false` | input auto focus |
| default-value | `String` |`N`| `-` | default value |
| disabled | `Boolean` |`N`| `false` | whether is been disabled|
Expand Down
1 change: 1 addition & 0 deletions packages/wxc-searchbar/README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
| mod | `String` |`N`| `default` | 搜索框样式 `default(默认)`/`hasDep(带出发地)` |
| placeholder | `String` |`N`| `搜索` | input placeholder|
| input-type | `String` |`N`| `text` | `text,password,url,email,tel`|
| return-key-type | `String` |`N`| `default` |键盘返回键的类型 `default/go/next/search/send/done`|
| cancel-label | `String` |`N`| `取消 ` |右侧按钮文案|
| autofocus | `Boolean` |`N`| `false` | 是否在页面加载时控件自动获得输入焦点 |
| default-value | `String` |`N`| `-` | 默认值 |
Expand Down
42 changes: 24 additions & 18 deletions packages/wxc-searchbar/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- CopyRight (C) 2017-2022 Alibaba Group Holding Limited. -->
<!-- Created by Tw93 on 16/10/25. -->
<!--A sSearch bar for city Search-->
<!--A Search bar for city Search-->

<template>
<div>
Expand All @@ -11,14 +11,15 @@
@focus="onFocus"
@input="onInput"
@return="onSubmit"
:return-key-type="returnKeyType"
:autofocus="autofocus"
:disabled="disabled"
:value="value"
ref="search-input"
:type="inputType"
:placeholder="placeholder"
:style="{ width: needShowCancel ? '624px' : '710px' }"
:class="['search-bar-input','search-bar-input-'+theme]"/>
:class="['search-bar-input','search-bar-input-'+theme]" />
<div v-if="disabled"
@click="inputDisabledClicked"
class="disabled-input"></div>
Expand All @@ -44,10 +45,11 @@
@return="onSubmit"
:disabled="disabled"
:autofocus="autofocus"
:return-key-type="returnKeyType"
:value="value"
:type="inputType"
:placeholder="placeholder"
:class="['search-bar-input','input-has-dep','search-bar-input-'+theme]"/>
:class="['search-bar-input','input-has-dep','search-bar-input-'+theme]" />
<div v-if="disabled"
@click="inputDisabledClicked"
class="disabled-input has-dep-disabled"></div>
Expand Down Expand Up @@ -206,6 +208,10 @@
type: String,
default: 'text'
},
returnKeyType: {
type: String,
default: 'default'
},
mod: {
type: String,
default: 'default'
Expand Down Expand Up @@ -240,13 +246,13 @@
}
},
computed: {
needShowCancel () {
needShowCancel() {
return this.alwaysShowCancel || this.showCancel;
},
buttonStyle () {
buttonStyle() {
const { barStyle } = this;
if (barStyle.backgroundColor) {
return {backgroundColor:barStyle.backgroundColor}
return { backgroundColor: barStyle.backgroundColor }
}
return {}
}
Expand All @@ -260,68 +266,68 @@
value: ''

}),
created () {
created() {
this.defaultValue && (this.value = this.defaultValue);
if (this.disabled) {
this.showCancel = false;
this.showClose = false;
}
},
methods: {
onBlur () {
onBlur() {
const self = this;
setTimeout(() => {
self.showCancel = false;
self.detectShowClose();
self.$emit('wxcSearchbarInputOnBlur', { value: self.value });
}, 10);
},
autoBlur () {
autoBlur() {
this.$refs['search-input'].blur();
},
onFocus () {
onFocus() {
if (this.isDisabled) {
return;
}
this.showCancel = true;
this.detectShowClose();
this.$emit('wxcSearchbarInputOnFocus', { value: this.value });
},
closeClicked () {
closeClicked() {
this.value = '';
this.showCancel && (this.showCancel = false);
this.showClose && (this.showClose = false);
this.$emit('wxcSearchbarCloseClicked', { value: this.value });
this.$emit('wxcSearchbarInputOnInput', { value: this.value });
},
onInput (e) {
onInput(e) {
this.value = e.value;
this.showCancel = true;
this.detectShowClose();
this.$emit('wxcSearchbarInputOnInput', { value: this.value });
},
onSubmit (e) {
onSubmit(e) {
this.onBlur();
this.value = e.value;
this.showCancel = true;
this.detectShowClose();
this.$emit('wxcSearchbarInputReturned', { value: this.value });
},
cancelClicked () {
cancelClicked() {
this.showCancel && (this.showCancel = false);
this.showClose && (this.showClose = false);
this.$emit('wxcSearchbarCancelClicked', { value: this.value });
},
detectShowClose () {
detectShowClose() {
this.showClose = (this.value.length > 0) && this.showCancel;
},
depClicked () {
depClicked() {
this.$emit('wxcSearchbarDepChooseClicked', {});
},
inputDisabledClicked () {
inputDisabledClicked() {
this.$emit('wxcSearchbarInputDisabledClicked', {});
},
setValue (value) {
setValue(value) {
this.value = value;
}
}
Expand Down
Loading

0 comments on commit b118788

Please sign in to comment.