Merge pull request #1256 from tsymq-live/main

Update form.js
This commit is contained in:
贤心 2023-05-21 19:09:09 +08:00 committed by GitHub
commit 2ece6cc621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -519,7 +519,7 @@ layui.define(['lay', 'layer', 'util'], function(exports){
var selectedIndex = select[0].selectedIndex;
thatInput = input; // 当前的 select 中的 input 元素
initValue = $(select[0].options[selectedIndex]).html(); // 重新获得初始选中值
initValue = $(select[0].options[selectedIndex]).text(); // 重新获得初始选中值
// 如果是第一项,且文本值等于 placeholder则清空初始值
if(selectedIndex === 0 && initValue === input.attr('placeholder')){