Update form.js

修复谷歌翻译,翻译成英文后下拉框会多出html标签问题
pull/1256/head
tsymq-live 2023-05-20 10:54:23 +08:00 committed by GitHub
parent a6e0276721
commit df632975ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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')){