1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<template>
<div style="width: 100%;min-width: 100px">
<el-select @change="(e) =>{$emit('change', e)}" :disabled="disabled" v-model="val">
<el-option :value="item.id" :label="$l(item, 'title') + item.fuhao" v-for="(item) in options"></el-option>
</el-select>
</div>
</template>
<script>
export default {
name: "currency-select",
props:{
disabled:{
type:Boolean,
default:false
},
options:{
type:Array,
default:()=>[]
},
value:{
type: [Number,String],
default:undefined,
}
},
data(){
return{
val:''
}
},
created() {
this.val = this.value;
},
watch:{
val(){
this.$emit('input',this.val)
},
value(val){
console.log(val,'valllll')
this.val = val;
}
}
}
</script>
<style scoped>
</style>