From 5e18bf58d03f4b6830afddb92af9079dcc5587e2 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期一, 11 三月 2024 09:25:26 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before into master --- src/views/quality/rawMaterial/testValue-select.vue | 64 ++++++++++++++++++++++++++++++- 1 files changed, 61 insertions(+), 3 deletions(-) diff --git a/src/views/quality/rawMaterial/testValue-select.vue b/src/views/quality/rawMaterial/testValue-select.vue index 0e814c9..3435f79 100644 --- a/src/views/quality/rawMaterial/testValue-select.vue +++ b/src/views/quality/rawMaterial/testValue-select.vue @@ -1,13 +1,71 @@ <!-- 鍘熸潗鏂欐楠�-妫�娴嬪�艰緭鍏ユ缁勪欢 --> <template> + <el-select v-model="selectedValue" @change="handleChange" clearable> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value" + ></el-option> + <el-input + v-model="inputValue" + slot="prefix" + placeholder="鑷畾涔夎緭鍏�" + @input="handleInput" + ></el-input> + </el-select> </template> <script> export default { - + props:{ + value: { + type: [String, Number], + default: '' + }, + options: { + type: Array, + default: () => [] + } + }, + data(){ + return { + selectedValue: '', + inputValue: '', + // options: [{ + // label:'鏄�', + // value: '鏄�' + // },{ + // label:'鍚�', + // value: '鍚�' + // }] + } + }, + created() { + this.selectedValue = this.value; + }, + watch: { + value(newValue) { + this.selectedValue = newValue; + } + }, + methods: { + handleChange(value) { + this.$emit('input1', value); + }, + handleInput(value) { + this.$emit('input1', value); + } + } } </script> -<style> - +<style scope> + .dropdown{ + position: relative; + right: 30px; + top: 5px; + color: #C0C4CC; + font-size: 14px; + } </style> -- Gitblit v1.9.3