From 87aa1dcafec06d8ae9c50eccbbb0781bbc63748a Mon Sep 17 00:00:00 2001 From: zhuangkaixing <1020526528@qq.com> Date: Tue, 5 May 2020 10:56:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20crud=20=E7=94=9F=E6=88=90?= =?UTF-8?q?=E7=9A=84=20js=20=E7=BC=BA=E5=B0=91=E5=AF=BC=E5=85=A5=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=EF=BC=8C=E6=8E=A7=E5=88=B6=E5=99=A8=E7=BC=BA=E5=B0=91?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/command/Crud/stubs/controller.stub | 7 ++++++- application/admin/command/Crud/stubs/javascript.stub | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/application/admin/command/Crud/stubs/controller.stub b/application/admin/command/Crud/stubs/controller.stub index 70b07a1a..72a268e0 100644 --- a/application/admin/command/Crud/stubs/controller.stub +++ b/application/admin/command/Crud/stubs/controller.stub @@ -24,7 +24,12 @@ class {%controllerName%} extends Backend $this->model = new \{%modelNamespace%}\{%modelName%}; {%controllerAssignList%} } - + + public function import() + { + parent::import(); + } + /** * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 diff --git a/application/admin/command/Crud/stubs/javascript.stub b/application/admin/command/Crud/stubs/javascript.stub index 933cfa39..4774dffa 100644 --- a/application/admin/command/Crud/stubs/javascript.stub +++ b/application/admin/command/Crud/stubs/javascript.stub @@ -10,6 +10,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin edit_url: '{%controllerUrl%}/edit', del_url: '{%controllerUrl%}/del', multi_url: '{%controllerUrl%}/multi', + import_url: '{%controllerUrl%}/import', table: '{%table%}', } });