mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[new feature] Area add 'title' prop & optimzie Picker performance (#450)
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
:visibileColumnCount="visibileColumnCount"
|
||||
@change="onChange(index)"
|
||||
/>
|
||||
<div class="van-picker__frame van-hairline--top-bottom" :style="frameStyle" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -41,7 +42,10 @@ export default create({
|
||||
type: String,
|
||||
default: 'text'
|
||||
},
|
||||
itemHeight: Number,
|
||||
itemHeight: {
|
||||
type: Number,
|
||||
default: 44
|
||||
},
|
||||
showToolbar: Boolean,
|
||||
visibileColumnCount: Number,
|
||||
columns: {
|
||||
@@ -67,6 +71,14 @@ export default create({
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
frameStyle() {
|
||||
return {
|
||||
height: this.itemHeight + 'px'
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
initColumns() {
|
||||
const columns = this.columns.map(deepClone);
|
||||
|
Reference in New Issue
Block a user