@vtx/ember
Advanced tools
@@ -106,3 +106,3 @@ <template> | ||
| export default { | ||
| mixins: [i18nMixins], | ||
| mixins: [i18nMixins], | ||
| props: { | ||
@@ -175,3 +175,3 @@ // 列数据 | ||
| type: String, | ||
| default: '' | ||
| default: '', | ||
| }, | ||
@@ -181,3 +181,3 @@ // 确认按钮的文字 | ||
| type: String, | ||
| default: '' | ||
| default: '', | ||
| }, | ||
@@ -187,4 +187,8 @@ // 搜索框placeholder显示值 | ||
| type: String, | ||
| default: '' | ||
| default: '', | ||
| }, | ||
| keyName: { | ||
| type: String, | ||
| default: 'label', | ||
| }, | ||
| itemHeight: { | ||
@@ -243,5 +247,6 @@ type: Number, | ||
| list() { | ||
| console.log('data', this.data); | ||
| const { searchText, data } = this; | ||
| // 根据搜索框内容刷选 | ||
| return searchText ? [data.filter((item) => item.label.includes(searchText))] : [data]; | ||
| return searchText ? [data.filter(item => item.label.includes(searchText))] : [data]; | ||
| }, | ||
@@ -252,3 +257,5 @@ placeholderI18n() { | ||
| searchPlaceholderI18n() { | ||
| return this.searchPlaceholder ? this.searchPlaceholder : this.toI18n('qing-shu-ru-guan-jian-zi'); | ||
| return this.searchPlaceholder | ||
| ? this.searchPlaceholder | ||
| : this.toI18n('qing-shu-ru-guan-jian-zi'); | ||
| }, | ||
@@ -266,2 +273,3 @@ confirmTextI18n() { | ||
| if (uni.$u.test.object(item)) { | ||
| console.log('item', item, this.keyName); | ||
| return item[this.keyName]; | ||
@@ -268,0 +276,0 @@ } else { |
+1
-1
| { | ||
| "name": "@vtx/ember", | ||
| "version": "2.0.13", | ||
| "version": "2.0.14", | ||
| "description": "uni-app组件库", | ||
@@ -5,0 +5,0 @@ "files": [ |
215142
0.1%