From 86454a3acc4efb6dda4d18d92113d229752ad9e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Tue, 12 Sep 2023 17:37:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20code=20=E7=9A=84=20addTool?= =?UTF-8?q?s=20=E5=B1=9E=E6=80=A7=E7=94=9F=E6=95=88=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/code.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/code.js b/src/modules/code.js index e7ffc6d9..0e328482 100644 --- a/src/modules/code.js +++ b/src/modules/code.js @@ -341,8 +341,8 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){ }); // 增加工具栏 - if (options.addTools) { - options.tools = [].concat(options.tools || [], options.addTools); + if (options.addTools && options.tools) { + options.tools = [].concat(options.tools, options.addTools); } // 渲染工具栏