修复默认选中问题
This commit is contained in:
@@ -16,17 +16,15 @@ export default {
|
|||||||
},
|
},
|
||||||
// 设置默认值
|
// 设置默认值
|
||||||
setDef: function (idstr, defval) {
|
setDef: function (idstr, defval) {
|
||||||
if (defval) {
|
for (let i = 0, len = $(idstr + ' option').length; i < len; i++) {
|
||||||
for (let i = 0, len = $(idstr + ' option').length; i < len; i++) {
|
let $option = $(idstr + ' option:eq(' + i + ')');
|
||||||
let $option = $(idstr + ' option:eq(' + i + ')');
|
if ($option.val() == defval) {
|
||||||
if ($option.val() == defval) {
|
$option.prop('selected', true);
|
||||||
$option.prop('selected', true);
|
} else {
|
||||||
} else {
|
$option.prop('selected', false);
|
||||||
$option.prop('selected', false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$(idstr).btComboBox('parse');
|
|
||||||
}
|
}
|
||||||
|
$(idstr).btComboBox('parse');
|
||||||
},
|
},
|
||||||
// 构建下拉组合框
|
// 构建下拉组合框
|
||||||
build: function (val, idstr, defval) {
|
build: function (val, idstr, defval) {
|
||||||
|
@@ -587,6 +587,12 @@ export default {
|
|||||||
$("#nobleId").btComboBox('disable');
|
$("#nobleId").btComboBox('disable');
|
||||||
ComboboxHelper.setDef("#nobleId", '0');
|
ComboboxHelper.setDef("#nobleId", '0');
|
||||||
ComboboxHelper.setDef("#enable", '2');
|
ComboboxHelper.setDef("#enable", '2');
|
||||||
|
$("input:radio[name='enable']")[0].checked = true;
|
||||||
|
$("input:radio[name='isSale']")[0].checked = true;
|
||||||
|
$("input:radio[name='isNobleLimit']")[0].checked = true;
|
||||||
|
$("input:radio[name='isMonsterLimit']")[0].checked = true;
|
||||||
|
$("input:radio[name='isWeekStarLimit']")[0].checked = true;
|
||||||
|
$("input:radio[name='isActivityLimit']")[0].checked = true;
|
||||||
});
|
});
|
||||||
$("#nobleId").on('change', function () {
|
$("#nobleId").on('change', function () {
|
||||||
if (ComboboxHelper.getSelected("#nobleId") != 0) {
|
if (ComboboxHelper.getSelected("#nobleId") != 0) {
|
||||||
@@ -882,11 +888,6 @@ export default {
|
|||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!effect) {
|
|
||||||
$("#tipMsg").text("请上传动画图片");
|
|
||||||
$("#tipModal").modal('show');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!days || days <= 0) {
|
if (!days || days <= 0) {
|
||||||
$("#tipMsg").text("请输入合理的购买天数");
|
$("#tipMsg").text("请输入合理的购买天数");
|
||||||
$("#tipModal").modal('show');
|
$("#tipModal").modal('show');
|
||||||
|
Reference in New Issue
Block a user