feat: 支持其他类型默认值
This commit is contained in:
parent
befb17cb5a
commit
35517bed70
|
@ -414,6 +414,7 @@
|
||||||
getTextByValue: function (value) {
|
getTextByValue: function (value) {
|
||||||
// 通过value获取select控件的text属性
|
// 通过value获取select控件的text属性
|
||||||
var text = "";
|
var text = "";
|
||||||
|
if (typeof value !== "string") value = value.toString();
|
||||||
if (this.attr('data-toggle') === 'lgbSelect') {
|
if (this.attr('data-toggle') === 'lgbSelect') {
|
||||||
if (value === this.val()) text = this.attr('data-text');
|
if (value === this.val()) text = this.attr('data-text');
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue