Commit 6bfdf8f8929c3516dbbcc02e91b7ae41869b63b6

Authored by 梁灏
1 parent e5ac7925

release 0.9.16

release 0.9.16
1 { 1 {
2 "name": "iview", 2 "name": "iview",
3 - "version": "0.9.15", 3 + "version": "0.9.16",
4 "title": "iView", 4 "title": "iView",
5 "description": "A high quality UI components Library with Vue.js", 5 "description": "A high quality UI components Library with Vue.js",
6 "homepage": "http://www.iviewui.com", 6 "homepage": "http://www.iviewui.com",
src/components/rate/rate.vue
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 @click="handleClick(item)"> 7 @click="handleClick(item)">
8 <span :class="[prefixCls + '-star-content']" type="half"></span> 8 <span :class="[prefixCls + '-star-content']" type="half"></span>
9 </div> 9 </div>
10 - <div :class="[prefixCls + '-text']" v-if="showText"> 10 + <div :class="[prefixCls + '-text']" v-if="showText" v-show="value > 0">
11 <slot>{{ value }} <template v-if="value <= 1">{{ t('i.rate.star') }}</template><template v-else>{{ t('i.rate.stars') }}</template></slot> 11 <slot>{{ value }} <template v-if="value <= 1">{{ t('i.rate.star') }}</template><template v-else>{{ t('i.rate.stars') }}</template></slot>
12 </div> 12 </div>
13 </div> 13 </div>
test/routers/rate.vue
1 <template> 1 <template>
2 - <div style="margin: 100px">  
3 - {{value}}  
4 - <br><br><br>  
5 - <Rate :value.sync="value" :count="5" allow-half show-text></Rate>  
6 - <br><br><br>  
7 - <i-button @click="value++">add</i-button>  
8 - <i-button @click="value--">remove</i-button>  
9 - </div> 2 + <Row>
  3 + <i-col span="12">
  4 + <Rate show-text :value.sync="valueText"></Rate>
  5 + </i-col>
  6 + <i-col span="12">
  7 + <Rate show-text :value.sync="valueCustomText">
  8 + <span style="color: #f5a623">{{ valueCustomText }}</span>
  9 + </Rate>
  10 + </i-col>
  11 + </Row>
10 </template> 12 </template>
11 <script> 13 <script>
12 export default { 14 export default {
13 props: {}, 15 props: {},
14 data () { 16 data () {
15 return { 17 return {
16 - value: 3.8 18 + valueText: 3,
  19 + valueCustomText: 3.8
17 }; 20 };
18 }, 21 },
19 computed: {}, 22 computed: {},