|
|
@ -1,6 +1,6 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<select class="form-control" :name="name">
|
|
|
|
<select class="form-control" :name="name" v-valid="valid">
|
|
|
|
<option value="">请选择</option>
|
|
|
|
<option value="">请选择</option>
|
|
|
|
<template v-for="item in list">
|
|
|
|
<template v-for="item in list">
|
|
|
|
<option v-if="item.value===value" :value="item.value" selected>{{item.text}}</option>
|
|
|
|
<option v-if="item.value===value" :value="item.value" selected>{{item.text}}</option>
|
|
|
@ -11,12 +11,11 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
props: ['name', 'value', 'data','prefix'],
|
|
|
|
props: ['name', 'value', 'valid', 'data', 'prefix'],
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
list: function () {
|
|
|
|
list: function () {
|
|
|
|
var key = this.name;
|
|
|
|
var key = this.name;
|
|
|
|
if(this.prefix)
|
|
|
|
if (this.prefix) {
|
|
|
|
{
|
|
|
|
|
|
|
|
key = this.name.substring(this.prefix.length + 1);
|
|
|
|
key = this.name.substring(this.prefix.length + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return this.data[key + 'SelectList'];
|
|
|
|
return this.data[key + 'SelectList'];
|
|
|
|