Skip to content

Commit

Permalink
fix:修复select多选tag不能关闭问题
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoren1641 committed Oct 24, 2017
1 parent af3a9c2 commit 4f7e7d8
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 30 deletions.
12 changes: 6 additions & 6 deletions dist/atui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/atuiWidget.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/greater-blue.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/style.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tao-orange.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tmall-red.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/atui/introduce.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ english: AliTelecom UI System

## 版本

目前最新版本 v0.0.39
目前最新版本 v0.1.2

## 浏览器支持

Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@
"antd": "^1.6.3",
"antd-tools": "^0.10.0",
"autoprefixer": "~6.3.6",
"babel-cli": "^6.26.0",
"babel-core": "^6.9.0",
"babel-eslint": "^6.0.4",
"babel-loader": "^6.2.4",
"babel-plugin-coverage": "^1.0.0",
"babel-plugin-istanbul": "^3.1.2",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.9.0",
"babel-plugin-istanbul": "^3.1.2",
"rc-animate": "^2.3.1",
"bisheng": "^0.7.1",
"bisheng-plugin-atui": "0.1.1",
"bisheng-plugin-description": "^0.1.1",
"bisheng-plugin-toc": "0.2.0",
"bluebird": "^3.4.1",
"chai": "~3.5.0",
"conventional-changelog": "^1.1.0",
"classnames": "~2.2.0",
"codecov": "^1.0.1",
"conventional-changelog": "^1.1.0",
"css-loader": "^0.21.0",
"dora-plugin-upload": "^0.3.1",
"enquire.js": "^2.1.1",
Expand Down Expand Up @@ -89,11 +89,12 @@
"lodash": "^4.13.1",
"marked": "~0.3.5",
"mocha": "~3.1.2",
"phantomjs-prebuilt": "^2.1.14",
"postcss-loader": "^0.9.1",
"pre-commit": "~1.1.2",
"phantomjs-prebuilt": "^2.1.14",
"precss": "^1.4.0",
"prismjs": "^1.3.0",
"rc-animate": "^2.3.1",
"rc-queue-anim": "~0.11.12",
"rc-scroll-anim": "^0.3.0",
"rc-tween-one": "~0.6.20",
Expand Down Expand Up @@ -132,7 +133,7 @@
"cover": "NODE_ENV=local karma start build/karma.cover.config.js",
"codecov": "cat ./coverage/lcov.info | ./node_modules/.bin/codecov",
"authors": "git log --format='%aN <%aE>' | sort -u | grep -v 'users.noreply.github.com' | grep -v 'gitter.im' | grep -v '.local>' | grep -v 'alibaba-inc.com' > AUTHORS.txt",
"start": "webpack-dev-server --config build/webconfig.config.js --host 0.0.0.0 & bisheng start -c ./site/bisheng.config.js",
"start": "webpack-dev-server --config build/webconfig.config.js --host 0.0.0.0 --hot & bisheng start -c ./site/bisheng.config.js",
"ghpages": "bisheng build -c ./site/bisheng.config.js && sh post-site.sh && gh-pages -d _site",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -w -r 0",
"lib": "npm run transform && NODE_ENV=production webpack --config build/webpack.lib.js --progress",
Expand Down
2 changes: 1 addition & 1 deletion site/theme/static/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
var vuePath = '/atui/vue.min.js'
if(~hostname.indexOf('localhost') || ~hostname.indexOf('127.0.0.1') || ~hostname.indexOf('0.0.0.0')){
env = 'dev'
root = '//' + hostname + ':8080/dist/'
root = '//' + hostname + ':8080/build/'
vuePath = '//' + hostname + ':8080/dist/vue.js'
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion site/theme/template/Layout/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default class Footer extends React.Component {
</div>
</li>
<li>
<div>©2016 阿里通信</div>
<div>©2017 阿里通信</div>
<div>Powered by <a href="https://github.com/benjycui/bisheng">BiSheng</a></div>
</li>
</ul>
Expand Down
3 changes: 2 additions & 1 deletion src/components/Select/Option.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
},
computed: {
chosen () {
return this.$parent.$parent.selectedOptions.some((item) => {
let me = this
return me.$parent.$parent.selectedOptions.some((item) => {
return item.value === this.value
})
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Select/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</template>
<div v-else @click="focusInput">
<span :class="[prefixCls + '-select-placeholder']" v-show="showPlaceholder">{{placeholder}}</span>
<tag v-for="option in selectedOptions" closable @close="closeTag(option)" v-html="option.label"></tag>
<tag v-for="option in selectedOptions" closable @close="closeTag(option)">{{option.label}}</tag>
<input type="text" ref="searchField" :class="[prefixCls + '-select-search-field']" @input="onInput" @keydown.delete="deleteTag" @blur="createTag" @keydown.enter.prevent="createTag" v-model="searchText" autocomplete="off"/>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Tag/Tag.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div v-show="!closed"
<div v-if="!closed"
:class="[prefixCls + '-tag', color && (prefixCls + '-tag-color')]"
:style="{'background-color': color}">
<a :href="href" :target="href ? '_blank' : ''"
Expand Down Expand Up @@ -40,7 +40,7 @@ export default {
},
methods: {
closeHandler (e) {
this.closed = true
// this.closed = true
this.$emit('close', e)
}
},
Expand Down
3 changes: 2 additions & 1 deletion src/styles/dropdowns.less
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@
line-height: 27px;
color: @dropdown-link-color;
white-space: nowrap;
user-select: none;

&:hover, &:focus, &.@{prefix-cls-dropdown}-option-active {
&:hover, &:focus, &.@{prefix-cls-dropdown}-option-active,&.@{prefix-cls-dropdown}-option-chosen {
text-decoration: none;
background-color: @dropdown-link-hover-bg;
}
Expand Down
8 changes: 2 additions & 6 deletions src/styles/select.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
border-radius: 4px;
font-size: 12px;
padding: 0 10px;
height: 100%;
min-height: 100%;
overflow: hidden;

&:hover {
Expand All @@ -37,13 +37,9 @@
outline: none;
}




.atui-tag {
.@{prefix-cls}-tag {
margin: -4px 5px 0;
border-radius: 4px;
line-height: 1.5;
}

}
Expand Down

0 comments on commit 4f7e7d8

Please sign in to comment.