奖品设置修改为搜索框

This commit is contained in:
liaozetao
2023-10-23 12:32:38 +08:00
parent 815356ce7f
commit 059d43db48
2 changed files with 5 additions and 3 deletions

View File

@@ -32,10 +32,10 @@ export default {
build: function (val, idstr, defval) {
var _this = this;
if (val) {
if (Object.prototype.toString.call(val) === '[object Object]') {
if (Object.prototype.toString.call(val) === '[object Array]') {
$(idstr).empty();
$.each(val, function (n, value) {
$(idstr).append("<option value='" + value.oval + "' data-value='" + value.oval + "'>" + value.otxt + "</option>");
$.each(val, function (n, obj) {
$(idstr).append("<option value='" + obj.value + "' data-value='" + obj.value + "'>" + obj.text + "</option>");
});
$(idstr).btComboBox();
_this.setDef(idstr, defval);

View File

@@ -131,6 +131,7 @@
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import ComboboxHelper from '@/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper';
import { isNumber } from '@/utils/string';
export default {
@@ -258,6 +259,7 @@ export default {
$select.append($option);
}
$div.append($select);
ComboboxHelper.build(options, '#rewardRefId', rewardRefId);
} else {
var $input = $('<input/>');
$input.attr('type', 'text');