diff --git a/app/admin/view/api/upload/document.html b/app/admin/view/api/upload/document.html
index 010eccf9c..028ed6b4e 100644
--- a/app/admin/view/api/upload/document.html
+++ b/app/admin/view/api/upload/document.html
@@ -9,7 +9,7 @@
-
+
@@ -82,19 +82,21 @@
el: '#ImageDialog',
data: {
page: 1,
- keys: '',
limit: 15,
- items: [],
+ show: false,
$btn: null,
+ keys: '',
+ items: [],
},
created: function () {
- this.$btn = $('#{$get.id}');
+ this.$btn = $('#{$get.id|default=""}');
this.loadPage();
},
methods: {
// 创建分页工具条
addPage: function (count) {
var that = this;
+ this.show = true;
layui.laypage.render({
curr: this.page, count: count, limit: that.limit,
layout: ['count', 'prev', 'page', 'next', 'refresh'],
@@ -110,7 +112,7 @@
},
// 设置选择数据
setValue: function (url) {
- this.$btn = $('#{$get.id}').trigger('change', url);
+ this.$btn.trigger('choose', url);
if (this.$btn.data('input')) $(this.$btn.data('input')).val(url).trigger('change', url);
$('#ImageDialog').parents('.layui-layer-content').next().find('.layui-layer-close').trigger('click');
},
diff --git a/app/admin/view/api/upload/image.html b/app/admin/view/api/upload/image.html
index d4da9ad2b..028ed6b4e 100644
--- a/app/admin/view/api/upload/image.html
+++ b/app/admin/view/api/upload/image.html
@@ -112,7 +112,7 @@
},
// 设置选择数据
setValue: function (url) {
- this.$btn = $('#{$get.id}').trigger('change', url);
+ this.$btn.trigger('choose', url);
if (this.$btn.data('input')) $(this.$btn.data('input')).val(url).trigger('change', url);
$('#ImageDialog').parents('.layui-layer-content').next().find('.layui-layer-close').trigger('click');
},
diff --git a/app/admin/view/api/upload/video.html b/app/admin/view/api/upload/video.html
index af76501e3..028ed6b4e 100644
--- a/app/admin/view/api/upload/video.html
+++ b/app/admin/view/api/upload/video.html
@@ -9,7 +9,7 @@
-
+
@@ -82,19 +82,21 @@
el: '#ImageDialog',
data: {
page: 1,
- keys: '',
limit: 15,
- items: [],
+ show: false,
$btn: null,
+ keys: '',
+ items: [],
},
created: function () {
- this.$btn = $('#{$get.id}');
+ this.$btn = $('#{$get.id|default=""}');
this.loadPage();
},
methods: {
// 创建分页工具条
addPage: function (count) {
var that = this;
+ this.show = true;
layui.laypage.render({
curr: this.page, count: count, limit: that.limit,
layout: ['count', 'prev', 'page', 'next', 'refresh'],
@@ -110,7 +112,7 @@
},
// 设置选择数据
setValue: function (url) {
- this.$btn = $('#{$get.id}').trigger('change', url);
+ this.$btn.trigger('choose', url);
if (this.$btn.data('input')) $(this.$btn.data('input')).val(url).trigger('change', url);
$('#ImageDialog').parents('.layui-layer-content').next().find('.layui-layer-close').trigger('click');
},
@@ -143,8 +145,8 @@
\ No newline at end of file