From dfd8f541f5d554ba3dd634adb7f0b381f6e15264 Mon Sep 17 00:00:00 2001 From: augushong Date: Mon, 25 Jul 2022 16:03:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BC=B9=E6=A1=86=E6=A0=87?= =?UTF-8?q?=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/plugs/easy-admin/easy-admin.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/public/static/plugs/easy-admin/easy-admin.js b/public/static/plugs/easy-admin/easy-admin.js index a2ecd5f..e71d94a 100644 --- a/public/static/plugs/easy-admin/easy-admin.js +++ b/public/static/plugs/easy-admin/easy-admin.js @@ -736,20 +736,28 @@ define(["jquery", "tableSelect", "ckeditor", 'miniTheme', 'tableData', 'citypick operat.method = operat.method || 'open'; operat.field = operat.field || 'id'; operat.data = operat.data || ['id']; + operat.titleField = operat.titleField || 'title'; operat.title = operat.title || operat.text; operat.text = operat.text || operat.title; + var titleEndfix = ''; + + if (data[operat.titleField]) { + titleEndfix = '-' + data[operat.titleField]; + } + + var formatOperat = operat; formatOperat.icon = formatOperat.icon !== '' ? ' ' : ''; formatOperat.class = formatOperat.class !== '' ? 'class="' + formatOperat.class + '" ' : ''; if (operat.method === 'open') { - formatOperat.method = formatOperat.method !== '' ? 'data-open="' + formatOperat.url + '" data-title="' + formatOperat.title + '" ' : ''; + formatOperat.method = formatOperat.method !== '' ? 'data-open="' + formatOperat.url + '" data-title="' + formatOperat.title + titleEndfix + '" ' : ''; } else if (operat.method === 'none') { // 常用于与extend配合,自定义监听按钮 formatOperat.method = ''; } else if (operat.method === 'blank') { formatOperat.method = ' href="' + formatOperat.url + '" target="_blank" '; } else { - formatOperat.method = formatOperat.method !== '' ? 'data-request="' + formatOperat.url + '" data-title="' + formatOperat.title + '" ' : ''; + formatOperat.method = formatOperat.method !== '' ? 'data-request="' + formatOperat.url + '" data-title="' + formatOperat.title + titleEndfix + '" ' : ''; } formatOperat.dataBind = ' ';