This commit is contained in:
cookfront
2017-03-03 16:40:48 +08:00
parent b8a16cabc2
commit 05edb4a391
9 changed files with 23 additions and 21 deletions
+2 -1
View File
@@ -5,6 +5,7 @@
{{title}}
</a>
</template>
<script>
export default {
name: 'zan-badge',
@@ -37,4 +38,4 @@ export default {
}
}
};
</script>
</script>
+7 -7
View File
@@ -66,8 +66,8 @@ export default {
computed: {
values() {
let columns = this.columns || [];
let values = [];
const columns = this.columns || [];
const values = [];
columns.forEach(column => {
values.push(column.value || column.values[column.defaultIndex || 0]);
@@ -89,7 +89,7 @@ export default {
* 获取对应索引的列的实例
*/
getColumn(index) {
let children = this.$children.filter(child => child.$options.name === 'zan-picker-column');
const children = this.$children.filter(child => child.$options.name === 'zan-picker-column');
return children[index];
},
@@ -97,7 +97,7 @@ export default {
* 获取对应列中选中的值
*/
getColumnValue(index) {
let column = this.getColumn(index);
const column = this.getColumn(index);
return column && column.values[column.valueIndex];
},
@@ -105,7 +105,7 @@ export default {
* 设置对应列中选中的值
*/
setColumnValue(index, value) {
let column = this.getColumn(index);
const column = this.getColumn(index);
if (column) {
column.currentValue = value;
}
@@ -115,7 +115,7 @@ export default {
* 获取对应列中所有的备选值
*/
getColumnValues(index) {
let column = this.getColumn(index);
const column = this.getColumn(index);
return column && column.currentValues;
},
@@ -123,7 +123,7 @@ export default {
* 设置对应列中所有的备选值
*/
setColumnValues(index, values) {
let column = this.getColumn(index);
const column = this.getColumn(index);
if (column) {
column.currentValues = values;
}
+2 -2
View File
@@ -21,8 +21,8 @@ export default {
computed: {
status() {
let index = this.$parent.steps.indexOf(this);
let active = this.$parent.active;
const index = this.$parent.steps.indexOf(this);
const active = this.$parent.active;
if (index === -1) {
return '';
+2 -2
View File
@@ -34,8 +34,8 @@ export default {
computed: {
computedIconClass() {
let iconName = `zan-icon-${this.icon}`;
let result = this.iconClass.split(' ');
const iconName = `zan-icon-${this.icon}`;
const result = this.iconClass.split(' ');
result.push(iconName);
return result;
+1 -1
View File
@@ -42,7 +42,7 @@ export default {
},
computed: {
switchStates: function() {
let switchStates = ['zan-switch--' + (this.checked ? 'on' : 'off'),
const switchStates = ['zan-switch--' + (this.checked ? 'on' : 'off'),
'zan-switch--' + (this.disabled ? 'disabled' : '')];
return switchStates;