Commit 7c1ac607 authored by JingChao's avatar JingChao

selectList

parent a6faeefe
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
let vm = this let vm = this
if (!vm.disabled) { if (!vm.disabled) {
let list = [] let list = []
vum.forEach(vm.dataArray, (date, index, array) => { vm.dataArray.forEach((date, index, array) => {
list.push({ list.push({
value: date[vm.valueKey], value: date[vm.valueKey],
name: date[vm.valueName], name: date[vm.valueName],
......
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
rangeHandleHeight: 20, rangeHandleHeight: 20,
sex: 0, sex: 0,
sexList: [{'code_value': 0, 'code_value_name': '女'}, {'code_value': 1, 'code_value_name': '男'}], sexList: [{'code_value': 0, 'code_value_name': '女'}, {'code_value': 0, 'code_value_name': '女'},{'code_value': 0, 'code_value_name': '女'}],
nowDate: '2020-12-25', nowDate: '2020-12-25',
} }
......
...@@ -285,14 +285,13 @@ export default { ...@@ -285,14 +285,13 @@ export default {
selectList: function (selectOption) { selectList: function (selectOption) {
if (typeof selectOption === 'object') { if (typeof selectOption === 'object') {
let list = [] let list = []
let length = selectOption.list.length selectOption.list.forEach((data, index, array) => {
vum.forEach(selectOption.list, function (date, index, array) {
list.push({ list.push({
value: date.code, value: data.code,
name: date.code_name, name: data.code_name,
parent: date.parent, parent: data.parent,
})
}) })
if (index === (length - 1)) {
SelectPlugin.show({ SelectPlugin.show({
list: list, list: list,
callBack: selectOption.returnItem, callBack: selectOption.returnItem,
...@@ -300,8 +299,6 @@ export default { ...@@ -300,8 +299,6 @@ export default {
object: selectOption.object, object: selectOption.object,
}) })
} }
})
}
}, },
/** /**
* 弹出数字键盘 * 弹出数字键盘
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment