解决单据录入中条码搜索框的变形的问题

This commit is contained in:
jishenghua
2026-01-12 16:59:48 +08:00
parent 8cfc6726a0
commit 4ba5338514

View File

@@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<a-input-group v-if="kind === 'material'" compact style="width:100%;top:0px"> <a-input-group v-if="kind === 'material'" compact style="width:100%;top:0px;display:flex;">
<a-select placeholder="输入条码或名称" :dropdownMatchSelectWidth="false" showSearch :showArrow="false" <a-select placeholder="输入条码或名称" :dropdownMatchSelectWidth="false" showSearch :showArrow="false"
v-model="names" optionFilterProp="children" :style="searchWidth" notFoundContent="需在商品管理先新增才能使用" v-model="names" optionFilterProp="children" style="flex:1; min-width:0;" notFoundContent="需在商品管理先新增才能使用"
@search="handleSearch" @change="handleChange"> @search="handleSearch" @change="handleChange">
<div slot="dropdownRender" slot-scope="menu"> <div slot="dropdownRender" slot-scope="menu">
<v-nodes :vnodes="menu" /> <v-nodes :vnodes="menu" />
@@ -69,8 +69,7 @@
ids: "", ids: "",
names: "", names: "",
materialData: [], materialData: [],
setTimeFlag: null, setTimeFlag: null
searchWidth: ""
} }
}, },
mounted() { mounted() {
@@ -82,12 +81,6 @@
} }
}, },
created () { created () {
const currentWidth = window.screen.width
if(currentWidth<1500) {
this.searchWidth = 'width:75%'
} else {
this.searchWidth = 'width:81%'
}
}, },
model: { model: {
prop: 'value', prop: 'value',