You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
clothesProject/pages/miniprogram_npm/@vant/weapp/picker/index.wxs

43 lines
823 B

/* eslint-disable */
var style = require('../wxs/style.wxs');
var addUnit = require('../wxs/add-unit.wxs');
var array = require('../wxs/array.wxs');
function columnsStyle(data) {
return style({
height: addUnit(data.itemHeight * data.visibleItemCount),
});
}
function maskStyle(data) {
return style({
'background-size':
'100% ' + addUnit((data.itemHeight * (data.visibleItemCount - 1)) / 2),
});
}
function frameStyle(data) {
return style({
height: addUnit(data.itemHeight),
});
}
function columns(columns) {
if (!array.isArray(columns)) {
return [];
}
if (columns.length && !columns[0].values) {
return [{ values: columns }];
}
return columns;
}
module.exports = {
columnsStyle: columnsStyle,
frameStyle: frameStyle,
maskStyle: maskStyle,
columns: columns,
};