奖品设置修改为搜索框
This commit is contained in:
@@ -32,10 +32,10 @@ export default {
|
|||||||
build: function (val, idstr, defval) {
|
build: function (val, idstr, defval) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
if (val) {
|
if (val) {
|
||||||
if (Object.prototype.toString.call(val) === '[object Object]') {
|
if (Object.prototype.toString.call(val) === '[object Array]') {
|
||||||
$(idstr).empty();
|
$(idstr).empty();
|
||||||
$.each(val, function (n, value) {
|
$.each(val, function (n, obj) {
|
||||||
$(idstr).append("<option value='" + value.oval + "' data-value='" + value.oval + "'>" + value.otxt + "</option>");
|
$(idstr).append("<option value='" + obj.value + "' data-value='" + obj.value + "'>" + obj.text + "</option>");
|
||||||
});
|
});
|
||||||
$(idstr).btComboBox();
|
$(idstr).btComboBox();
|
||||||
_this.setDef(idstr, defval);
|
_this.setDef(idstr, defval);
|
||||||
|
@@ -131,6 +131,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
|
import ComboboxHelper from '@/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper';
|
||||||
import { isNumber } from '@/utils/string';
|
import { isNumber } from '@/utils/string';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -258,6 +259,7 @@ export default {
|
|||||||
$select.append($option);
|
$select.append($option);
|
||||||
}
|
}
|
||||||
$div.append($select);
|
$div.append($select);
|
||||||
|
ComboboxHelper.build(options, '#rewardRefId', rewardRefId);
|
||||||
} else {
|
} else {
|
||||||
var $input = $('<input/>');
|
var $input = $('<input/>');
|
||||||
$input.attr('type', 'text');
|
$input.attr('type', 'text');
|
||||||
|
Reference in New Issue
Block a user