|
@@ -21,30 +21,7 @@ export default {
|
|
|
props: {
|
|
props: {
|
|
|
localData: {
|
|
localData: {
|
|
|
type: Array,
|
|
type: Array,
|
|
|
- default: [{
|
|
|
|
|
- text: "一年级",
|
|
|
|
|
- value: "1-0",
|
|
|
|
|
- children: [{
|
|
|
|
|
- text: "1.1班",
|
|
|
|
|
- value: "1-1"
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- text: "1.2班",
|
|
|
|
|
- value: "1-2"
|
|
|
|
|
- }]
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- text: "二年级",
|
|
|
|
|
- value: "2-0",
|
|
|
|
|
- children: [{
|
|
|
|
|
- text: "2.1班",
|
|
|
|
|
- value: "2-1"
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- text: "2.2班",
|
|
|
|
|
- value: "2-2"
|
|
|
|
|
- }]
|
|
|
|
|
- }]
|
|
|
|
|
|
|
+ default: []
|
|
|
},
|
|
},
|
|
|
label: {
|
|
label: {
|
|
|
type: String,
|
|
type: String,
|
|
@@ -73,7 +50,7 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
inputValue: [],
|
|
inputValue: [],
|
|
|
- optionName: '',
|
|
|
|
|
|
|
+ optionName: '23432432',
|
|
|
labelWidth: 0,
|
|
labelWidth: 0,
|
|
|
showPicker:false
|
|
showPicker:false
|
|
|
}
|
|
}
|
|
@@ -88,6 +65,7 @@ export default {
|
|
|
this.setValue()
|
|
this.setValue()
|
|
|
},
|
|
},
|
|
|
'inputValue': function () {
|
|
'inputValue': function () {
|
|
|
|
|
+ console.log(this.inputValue)
|
|
|
if(this.valueType==='1'){
|
|
if(this.valueType==='1'){
|
|
|
this.$emit('input', this.inputValue.join(','))
|
|
this.$emit('input', this.inputValue.join(','))
|
|
|
}else {
|
|
}else {
|
|
@@ -105,15 +83,15 @@ export default {
|
|
|
this.inputValue=value
|
|
this.inputValue=value
|
|
|
this.optionName = "";
|
|
this.optionName = "";
|
|
|
this.localData.forEach((one)=>{
|
|
this.localData.forEach((one)=>{
|
|
|
- if(one.value===this.inputValue[0]){
|
|
|
|
|
|
|
+ if(one.value+''===this.inputValue[0]+''){
|
|
|
this.optionName += one.text + " ";
|
|
this.optionName += one.text + " ";
|
|
|
if(one.children){
|
|
if(one.children){
|
|
|
one.children.forEach((two)=>{
|
|
one.children.forEach((two)=>{
|
|
|
- if(two.value===this.inputValue[1]){
|
|
|
|
|
|
|
+ if(two.value+''===this.inputValue[1]+''){
|
|
|
this.optionName += two.text + " ";
|
|
this.optionName += two.text + " ";
|
|
|
if(two.children){
|
|
if(two.children){
|
|
|
two.children.forEach((three)=>{
|
|
two.children.forEach((three)=>{
|
|
|
- if(three.value===this.inputValue[2]){
|
|
|
|
|
|
|
+ if(three.value+''===this.inputValue[2]+''){
|
|
|
this.optionName += three.text + " ";
|
|
this.optionName += three.text + " ";
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -130,7 +108,6 @@ export default {
|
|
|
this.showPicker = false;
|
|
this.showPicker = false;
|
|
|
},
|
|
},
|
|
|
showPickerObj() {
|
|
showPickerObj() {
|
|
|
- console.log(this.$refs.pickerObj)
|
|
|
|
|
this.$refs.pickerObj.show();
|
|
this.$refs.pickerObj.show();
|
|
|
this.showPicker = true;
|
|
this.showPicker = true;
|
|
|
},
|
|
},
|