From dd686a82b8908fe10c5118996396786a048d3995 Mon Sep 17 00:00:00 2001 From: morning-star <1453017105@qq.com> Date: Wed, 29 Nov 2023 17:14:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20tree=20=E8=8A=82=E7=82=B9?= =?UTF-8?q?=20title=20=E7=BC=96=E8=BE=91=E7=8A=B6=E6=80=81=E6=9C=89?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6=E6=97=B6=E7=9A=84=E8=BD=AC?= =?UTF-8?q?=E4=B9=89=E9=97=AE=E9=A2=98=20(#1432)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close https://gitee.com/layui/layui/issues/I8K79H --- src/modules/tree.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/tree.js b/src/modules/tree.js index 7497238f..7e391bbe 100644 --- a/src/modules/tree.js +++ b/src/modules/tree.js @@ -2,12 +2,13 @@ * tree 树组件 */ -layui.define('form', function(exports){ +layui.define(['form','util'], function(exports){ "use strict"; var $ = layui.$; var form = layui.form; var layer = layui.layer; + var util = layui.util; // 模块名 var MOD_NAME = 'tree'; @@ -547,7 +548,7 @@ layui.define('form', function(exports){ // 添加输入框,覆盖在文字上方 elemMain.append(''); // 获取焦点 - elemMain.children('.layui-tree-editInput').val(text).focus(); + elemMain.children('.layui-tree-editInput').val(util.unescape(text)).focus(); // 嵌入文字移除输入框 var getVal = function(input){ var textNew = input.val().trim();