init
This commit is contained in:
15
miniprogram/utils/dict.wxs
Normal file
15
miniprogram/utils/dict.wxs
Normal file
@ -0,0 +1,15 @@
|
||||
var es6 = require("./es6.wxs");
|
||||
var getDictLabel = function (value, options) {
|
||||
var option = es6.find(options, function (el) {
|
||||
return el.value === value;
|
||||
});
|
||||
if (option) {
|
||||
return option.label;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getDictLabel: getDictLabel,
|
||||
};
|
Reference in New Issue
Block a user