如何控制 Element UI TreeSelect 选择框的长度
您可以通过添加样式来控制选择框的长度。在<el-tree-select>标签上添加一个style属性,设置width属性为88px,如下所示:
<el-tree-select ref="tree" v-model="formData.parentCategoryId" clearable :data="CategoryList"
node-key="id" check-strictly :default-expanded-keys="[formData.parentCategoryId]"
:default-checked-keys="[formData.parentCategoryId]"
:props="{ label: 'categoryId', value: 'categoryId' }" :suffix-icon="CaretBottom"
style="width: 88px" />
这样就可以将选择框的长度限制在88px了。
原文地址: https://www.cveoy.top/t/topic/qgjz 著作权归作者所有。请勿转载和采集!