提交 7f8616d3 编写于 作者: ModStart's avatar ModStart

develop

上级 1ef89a20
栏目内容详情访问权限控制
---
- 新增:栏目内容详情访问权限控制
......@@ -6,7 +6,7 @@
"Member",
"Banner:>=1.1.0"
],
"version": "2.2.0",
"version": "2.3.0",
"modstartVersion": ">=2.4.0",
"author": "ModStart",
"description": "提供通用的动态模型内容管理系统",
......
- 新增:本地模块筛选Tab,只显示本地模块
- 新增:可升级模块筛选,显示系统可升级的模块
......@@ -35,6 +35,17 @@
<i class="iconfont icon-close"></i> 已禁用
</span>
</el-tab-pane>
<el-tab-pane name="local">
<span slot="label">
<i class="iconfont icon-pc"></i> 本地模块
<i class="iconfont icon-warning" data-tip-popover="本地存在且模块市场不存在的模块"></i>
</span>
</el-tab-pane>
<el-tab-pane name="upgradeable">
<span slot="label">
<i class="iconfont icon-direction-up"></i> 可升级
</span>
</el-tab-pane>
</el-tabs>
<div class="ub-padding">
<div class="tw-float-right">
......@@ -455,6 +466,14 @@ export default {
case 'disabled':
if (!module._isInstalled || module._isEnabled) return false
break;
case 'local':
if (!module._isLocal) return false
break
case 'upgradeable':
if(!( module._isInstalled && !module._isLocal && module.latestVersion!==module._localVersion ) ){
return false
}
break
}
if (this.search.isRecommend) {
if (!module.isRecommend) {
......@@ -491,6 +510,7 @@ export default {
}
return true
})
console.log('xxx',results,this.modules)
return results
}
},
......
二级导航、批量删除、导航位置Tab切换
---
- 新增:二级导航功能
- 新增:二级导航功能(需要调用方支持)
- 新增:批量删除功能
- 新增:导航位置Tab切换
\ No newline at end of file
......@@ -9,7 +9,7 @@
],
"modstartVersion": ">=2.5.1",
"title": "通用导航配置",
"version": "1.1.0",
"version": "1.2.0",
"author": "官方",
"description": "提供多位置的导航配置工具",
"config": {
......
此差异已折叠。
layui.define([],function(t){var o=layui.$,i={},u=o("body");t("mstable",{render:function(t){i[t.id]=t;var e=this;layui.each(i,function(){!function(d,l){var t=o(l.elem),e=t.next().children(".layui-table-box").children(".layui-table-header").children("table").children("thead").children("tr").children("th"),i=t.next().children(".layui-table-box").children(".layui-table-fixed").children(".layui-table-header").children("table").children("thead").children("tr").children("th"),r=t.next().children(".layui-table-box").children(".layui-table-body").children("table").children("tbody").children("tr"),c=t.next().children(".layui-table-total").find("tr");String.prototype.width=function(t){var e=t||u.css("font"),t=o("<div>"+this+"</div>").css({position:"absolute",float:"left","white-space":"nowrap",visibility:"hidden",font:e}).appendTo(u),e=t.width();return t.remove(),e},e.add(i).on("dblclick",function(t){var e=o(this),i=t.clientX-e.offset().left,t=e.attr("data-key").split("-"),t=l.cols[t[1]][t[2]];s(0,e,0<e.parents(".layui-table-fixed-r").length?i<=10:e.width()-i<=10,t),h(l,e,0<e.parents(".layui-table-fixed-r").length?i<=10:e.width()-i<=10,t)});var a=0,n=0;e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&(s(0,o(this),!0,i),"widthAutoSize"in i&&"widthAutoOld"in i&&(a+=i.widthAutoOld,a-=i.widthAutoSize,n++))}),0<a&&0<n&&e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&(i.width=i.widthAutoSize+a/n)});function h(t,e,i,l){var a=e.data("key"),n=a.split("-");3===n.length&&(n[1],n[2]);1<e.attr("colspan")||e.data("unresize")||i&&d.getCssRule(t,a,function(t){t.style.width=l.width+"px"})}function s(t,e,i,l){var a,n,d=e.data("key"),h=d.split("-");3===h.length&&(h[1],h[2]);1<e.attr("colspan")||e.data("unresize")||i&&(l.widthAutoOld=e.width(),a=e.text().width(e.css("font"))+21,n=e.css("font"),r.children('td[data-key="'+d+'"]').each(function(t,e){var i=0;o(this).children().children()&&0<o(this).children().children().length?i+=o(this).children().html().width(n):i=o(this).text().width(n),a<i&&(a=i)}),0<c.length&&(d=c.children('td[data-key="'+d+'"]').text().width(n),a<d&&(a=d)),a+=32,a=Math.min(a,500),l.width=a,l.widthAutoSize=a)}e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&h(l,o(this),!0,i)})}(e,this)})},getCssRule:function(t,i,l){t=t.elem.next().find("style")[0],t=t.sheet||t.styleSheet||{},t=t.cssRules||t.rules;layui.each(t,function(t,e){if(e.selectorText===".laytable-cell-"+i)return l(e),!0})}})});
\ No newline at end of file
layui.define([],function(t){var o=layui.$,i={},l=o("body");String.prototype.width=function(t,e){e=e||!1;var i=t||l.css("font"),t=o("<div></div>");e?t.text(this):t.html(this),t.css({position:"absolute",float:"left","white-space":"nowrap",visibility:"hidden",font:i}).appendTo(l);i=t.width();return t.remove(),i},t("mstable",{render:function(t){i[t.id]=t;var e=this;layui.each(i,function(){!function(d,l){var t=o(l.elem),e=t.next().children(".layui-table-box").children(".layui-table-header").children("table").children("thead").children("tr").children("th"),i=t.next().children(".layui-table-box").children(".layui-table-fixed").children(".layui-table-header").children("table").children("thead").children("tr").children("th"),r=t.next().children(".layui-table-box").children(".layui-table-body").children("table").children("tbody").children("tr"),c=t.next().children(".layui-table-total").find("tr");e.add(i).on("dblclick",function(t){var e=o(this),i=t.clientX-e.offset().left,t=e.attr("data-key").split("-"),t=l.cols[t[1]][t[2]];s(0,e,0<e.parents(".layui-table-fixed-r").length?i<=10:e.width()-i<=10,t),h(l,e,0<e.parents(".layui-table-fixed-r").length?i<=10:e.width()-i<=10,t)});var a=0,n=0;e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&(s(0,o(this),!0,i),"widthAutoSize"in i&&"widthAutoOld"in i&&(a+=i.widthAutoOld,a-=i.widthAutoSize,n++))}),0<a&&0<n&&e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&(i.width=i.widthAutoSize+a/n)});function h(t,e,i,l){var a=e.data("key"),n=a.split("-");3===n.length&&(n[1],n[2]);1<e.attr("colspan")||e.data("unresize")||i&&d.getCssRule(t,a,function(t){t.style.width=l.width+"px"})}function s(t,e,i,l){var a,n,d=e.data("key"),h=d.split("-");3===h.length&&(h[1],h[2]);1<e.attr("colspan")||e.data("unresize")||i&&(l.widthAutoOld=e.width(),a=e.text().width(e.css("font"))+21,n=e.css("font"),r.children('td[data-key="'+d+'"]').each(function(t,e){var i=0;o(this).children().children()&&0<o(this).children().children().length?i+=o(this).children().html().width(n):i=o(this).text().width(n,!0),a<i&&(a=i)}),0<c.length&&(d=c.children('td[data-key="'+d+'"]').text().width(n),a<d&&(a=d)),a+=32,a=Math.min(a,500),l.width=a,l.widthAutoSize=a)}e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&h(l,o(this),!0,i)})}(e,this)})},getCssRule:function(t,i,l){t=t.elem.next().find("style")[0],t=t.sheet||t.styleSheet||{},t=t.cssRules||t.rules;layui.each(t,function(t,e){if(e.selectorText===".laytable-cell-"+i)return l(e),!0})}})});
\ No newline at end of file
layui.define([],function(t){var o=layui.$,i={},u=o("body");t("mstable",{render:function(t){i[t.id]=t;var e=this;layui.each(i,function(){!function(d,l){var t=o(l.elem),e=t.next().children(".layui-table-box").children(".layui-table-header").children("table").children("thead").children("tr").children("th"),i=t.next().children(".layui-table-box").children(".layui-table-fixed").children(".layui-table-header").children("table").children("thead").children("tr").children("th"),r=t.next().children(".layui-table-box").children(".layui-table-body").children("table").children("tbody").children("tr"),c=t.next().children(".layui-table-total").find("tr");String.prototype.width=function(t){var e=t||u.css("font"),t=o("<div>"+this+"</div>").css({position:"absolute",float:"left","white-space":"nowrap",visibility:"hidden",font:e}).appendTo(u),e=t.width();return t.remove(),e},e.add(i).on("dblclick",function(t){var e=o(this),i=t.clientX-e.offset().left,t=e.attr("data-key").split("-"),t=l.cols[t[1]][t[2]];s(0,e,0<e.parents(".layui-table-fixed-r").length?i<=10:e.width()-i<=10,t),h(l,e,0<e.parents(".layui-table-fixed-r").length?i<=10:e.width()-i<=10,t)});var a=0,n=0;e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&(s(0,o(this),!0,i),"widthAutoSize"in i&&"widthAutoOld"in i&&(a+=i.widthAutoOld,a-=i.widthAutoSize,n++))}),0<a&&0<n&&e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&(i.width=i.widthAutoSize+a/n)});function h(t,e,i,l){var a=e.data("key"),n=a.split("-");3===n.length&&(n[1],n[2]);1<e.attr("colspan")||e.data("unresize")||i&&d.getCssRule(t,a,function(t){t.style.width=l.width+"px"})}function s(t,e,i,l){var a,n,d=e.data("key"),h=d.split("-");3===h.length&&(h[1],h[2]);1<e.attr("colspan")||e.data("unresize")||i&&(l.widthAutoOld=e.width(),a=e.text().width(e.css("font"))+21,n=e.css("font"),r.children('td[data-key="'+d+'"]').each(function(t,e){var i=0;o(this).children().children()&&0<o(this).children().children().length?i+=o(this).children().html().width(n):i=o(this).text().width(n),a<i&&(a=i)}),0<c.length&&(d=c.children('td[data-key="'+d+'"]').text().width(n),a<d&&(a=d)),a+=32,a=Math.min(a,500),l.width=a,l.widthAutoSize=a)}e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&h(l,o(this),!0,i)})}(e,this)})},getCssRule:function(t,i,l){t=t.elem.next().find("style")[0],t=t.sheet||t.styleSheet||{},t=t.cssRules||t.rules;layui.each(t,function(t,e){if(e.selectorText===".laytable-cell-"+i)return l(e),!0})}})});
\ No newline at end of file
layui.define([],function(t){var o=layui.$,i={},l=o("body");String.prototype.width=function(t,e){e=e||!1;var i=t||l.css("font"),t=o("<div></div>");e?t.text(this):t.html(this),t.css({position:"absolute",float:"left","white-space":"nowrap",visibility:"hidden",font:i}).appendTo(l);i=t.width();return t.remove(),i},t("mstable",{render:function(t){i[t.id]=t;var e=this;layui.each(i,function(){!function(d,l){var t=o(l.elem),e=t.next().children(".layui-table-box").children(".layui-table-header").children("table").children("thead").children("tr").children("th"),i=t.next().children(".layui-table-box").children(".layui-table-fixed").children(".layui-table-header").children("table").children("thead").children("tr").children("th"),r=t.next().children(".layui-table-box").children(".layui-table-body").children("table").children("tbody").children("tr"),c=t.next().children(".layui-table-total").find("tr");e.add(i).on("dblclick",function(t){var e=o(this),i=t.clientX-e.offset().left,t=e.attr("data-key").split("-"),t=l.cols[t[1]][t[2]];s(0,e,0<e.parents(".layui-table-fixed-r").length?i<=10:e.width()-i<=10,t),h(l,e,0<e.parents(".layui-table-fixed-r").length?i<=10:e.width()-i<=10,t)});var a=0,n=0;e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&(s(0,o(this),!0,i),"widthAutoSize"in i&&"widthAutoOld"in i&&(a+=i.widthAutoOld,a-=i.widthAutoSize,n++))}),0<a&&0<n&&e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&(i.width=i.widthAutoSize+a/n)});function h(t,e,i,l){var a=e.data("key"),n=a.split("-");3===n.length&&(n[1],n[2]);1<e.attr("colspan")||e.data("unresize")||i&&d.getCssRule(t,a,function(t){t.style.width=l.width+"px"})}function s(t,e,i,l){var a,n,d=e.data("key"),h=d.split("-");3===h.length&&(h[1],h[2]);1<e.attr("colspan")||e.data("unresize")||i&&(l.widthAutoOld=e.width(),a=e.text().width(e.css("font"))+21,n=e.css("font"),r.children('td[data-key="'+d+'"]').each(function(t,e){var i=0;o(this).children().children()&&0<o(this).children().children().length?i+=o(this).children().html().width(n):i=o(this).text().width(n,!0),a<i&&(a=i)}),0<c.length&&(d=c.children('td[data-key="'+d+'"]').text().width(n),a<d&&(a=d)),a+=32,a=Math.min(a,500),l.width=a,l.widthAutoSize=a)}e.add(i).each(function(t,e){var i=o(this).attr("data-key").split("-"),i=l.cols[i[1]][i[2]];!0===i.withAuto&&h(l,o(this),!0,i)})}(e,this)})},getCssRule:function(t,i,l){t=t.elem.next().find("style")[0],t=t.sheet||t.styleSheet||{},t=t.cssRules||t.rules;layui.each(t,function(t,e){if(e.selectorText===".laytable-cell-"+i)return l(e),!0})}})});
\ No newline at end of file
......@@ -4,6 +4,28 @@ layui.define([], function (exports) {
tables = {},
_BODY = $('body');
String.prototype.width = function (font, isText) {
var html = this;
isText = isText || false
var f = font || _BODY.css('font'),
o = $('<div></div>');
if (isText) {
o.text(html)
} else {
o.html(html)
}
o.css({
'position': 'absolute',
'float': 'left',
'white-space': 'nowrap',
'visibility': 'hidden',
'font': f
}).appendTo(_BODY);
var w = o.width();
o.remove();
return w;
}
var mod = {
render: function (myTable) {
tables[myTable.id] = myTable
......@@ -19,22 +41,6 @@ layui.define([], function (exports) {
fixTh = $table.next().children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-header').children('table').children('thead').children('tr').children('th'),
$tableBodytr = $table.next().children('.layui-table-box').children('.layui-table-body').children('table').children('tbody').children('tr'),
$totalTr = $table.next().children('.layui-table-total').find('tr');
String.prototype.width = function (font) {
var f = font || _BODY.css('font'),
o = $('<div>' + this + '</div>')
.css({
'position': 'absolute',
'float': 'left',
'white-space': 'nowrap',
'visibility': 'hidden',
'font': f
})
.appendTo(_BODY),
w = o.width();
o.remove();
return w;
}
th.add(fixTh).on('dblclick', function (e) {
var othis = $(this),
pLeft = e.clientX - othis.offset().left;
......@@ -89,7 +95,6 @@ layui.define([], function (exports) {
}
}
function computeColumnWidth(myTable, othis, isHandle, config) {
var key = othis.data('key')
, keyArray = key.split('-')
......@@ -105,7 +110,7 @@ layui.define([], function (exports) {
if ($(this).children().children() && $(this).children().children().length > 0) {
curWidth += $(this).children().html().width(font)
} else {
curWidth = $(this).text().width(font);
curWidth = $(this).text().width(font, true);
}
if (maxWidth < curWidth) {
maxWidth = curWidth
......
......@@ -243,7 +243,9 @@ var Form = {
if (Dialog) {
var msg = $(this).attr('data-form-loading');
Dialog.loadingOn(msg);
if ($(this).is('[data-form-loading]')) {
Dialog.loadingOn(msg);
}
}
return true;
......
......@@ -238,7 +238,7 @@ class ModuleManager
if (!$v['isDir']) {
continue;
}
if (starts_with($v['filename'], '_delete_.')) {
if (starts_with($v['filename'], '_delete_.') || starts_with($v['filename'], '_')) {
continue;
}
$modules[$v['filename']] = [
......
......@@ -100,7 +100,7 @@
return items;
};
layui.extend({
mstable: window.__msCDN + 'asset/layui/lay/ext/mstable'
mstable: window.__msCDN + 'asset/layui/lay/ext/mstable.js?v20220119'
});
layui.use(['table', 'laypage','mstable'], function () {
var table = layui.table.render({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册