This commit is contained in:
zhaoxinyu
2024-12-06 11:57:18 +08:00
parent c957e2ddd4
commit 185cc5022a
10 changed files with 1824 additions and 266 deletions
@@ -619,6 +619,27 @@ ol.list-style-none, ul.list-style-none {
width: 180px;
}
.sidebar .el-menu i{
margin-right: 5px;
width: 24px;
text-align: center;
}
.sidebar .el-menu .el-menu-item.is-active{
background-color: #ecf5ff;
}
.sidebar .el-menu .el-menu-item.is-active a{
color: #0e78c5;
}
.sidebar .el-menu .el-menu-item a{
height: 50px;
line-height: 50px;
min-width: 200px;
display: inline-block;
}
.sidebar .nav-title {
font-size: 11px;
padding: 25px 15px 0;
@@ -8590,3 +8611,29 @@ td.no-b {
.w-e-toolbar, .w-e-text-container {
z-index: 1 !important;
}
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-track {
background: transparent;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 6px;
border: 2px solid transparent;
background-color: hsla(0, 0%, 67%, 0.5);
background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
background-color: hsla(0, 0%, 67%, 0.8);
}
::-webkit-scrollbar-corner {
background: transparent;
}
@@ -14,6 +14,23 @@ $.ajaxSetup({
}
});
function pjaxReplace(url, data = {}) {
const { pathname, search } = location
if (url === pathname + search) {
return
}
$.pjax({
url: url,
container: "#container",
maxCacheLength: 0,
push: false,
replace: true,
fragment: "#container",
timeout: 8000,
data
})
}
function removeHTMLTag(str) {
str = str.replace(/<\/?[^>]*>/g, ''); //去除HTML tag
str = str.replace(/[ | ]*\n/g, '\n'); //去除行尾空白
@@ -202,13 +219,8 @@ var sublime = function () {
function initHome() {
$(".gallery-loader").fadeOut();
$.get(base + "/platform/home/path?url=" + window.location.href + "&rnd=" + new Date().getTime(), function (data) {
// $("#leftnav").html(data);
bindLeft();
}, "html");
//PJAX实现
if ($.support.pjax) {
$(document).pjax('a[data-pjax]', '#container', {
maxCacheLength: 0,
push: false,
@@ -273,40 +285,7 @@ var sublime = function () {
},
//2022/02/14 zxy pjax跳转自定义页面
jumpPagePjax(pageUrl) {
// const url = new URL(location.protocol + "//" + location.host + jump_url)
// const pathname = url.pathname
// headerNavBarVueApp.matchMenu(pathname)
// setTimeout(() => {
// const a = document.querySelector('a[href="' + pathname + '"][data-pjax]')
// if (a) {
// a.href = jump_url
// a.click()
// a.href = pathname
// // leftMenuApp.assignmentMenu()
// }
// }, 0)
const index = pageUrl.indexOf("?")
const doMainUrl = index > -1 ? pageUrl.substring(0, index) : pageUrl
const {protocol, host} = window.location
const nodes = document.querySelectorAll('a[data-pjax]')
for (let node of nodes) {
if (node.hasAttribute('data-pjax') && node.href.trim() === protocol + "//" + host + doMainUrl) {
const metaHref = node.href
node.href = pageUrl
node.click()
//父级节点展开
const links = $(node).parents('li'),
parentLink = $(node).closest("li");
links.addClass("open")
links.children(".sub-menu").slideDown()
parentLink.removeClass("open")
node.href = metaHref
} else {
}
}
store.dispatch('pjaxRoute', pageUrl)
}
};
}();
@@ -0,0 +1,172 @@
!(function (e, r) {
"object" == typeof exports && "undefined" != typeof module
? (module.exports = r())
: "function" == typeof define && define.amd
? define(r)
: ((e || self).createPersistedState = r())
})(this, function () {
var e = function (e) {
return (
(function (e) {
return !!e && "object" == typeof e
})(e) &&
!(function (e) {
var t = Object.prototype.toString.call(e)
return (
"[object RegExp]" === t ||
"[object Date]" === t ||
(function (e) {
return e.$$typeof === r
})(e)
)
})(e)
)
},
r = "function" == typeof Symbol && Symbol.for ? Symbol.for("react.element") : 60103
function t(e, r) {
return !1 !== r.clone && r.isMergeableObject(e) ? u(Array.isArray(e) ? [] : {}, e, r) : e
}
function n(e, r, n) {
return e.concat(r).map(function (e) {
return t(e, n)
})
}
function o(e) {
return Object.keys(e).concat(
(function (e) {
return Object.getOwnPropertySymbols
? Object.getOwnPropertySymbols(e).filter(function (r) {
return e.propertyIsEnumerable(r)
})
: []
})(e)
)
}
function c(e, r) {
try {
return r in e
} catch (e) {
return !1
}
}
function u(r, i, a) {
;((a = a || {}).arrayMerge = a.arrayMerge || n), (a.isMergeableObject = a.isMergeableObject || e), (a.cloneUnlessOtherwiseSpecified = t)
var f = Array.isArray(i)
return f === Array.isArray(r)
? f
? a.arrayMerge(r, i, a)
: (function (e, r, n) {
var i = {}
return (
n.isMergeableObject(e) &&
o(e).forEach(function (r) {
i[r] = t(e[r], n)
}),
o(r).forEach(function (o) {
;(function (e, r) {
return c(e, r) && !(Object.hasOwnProperty.call(e, r) && Object.propertyIsEnumerable.call(e, r))
})(e, o) ||
(i[o] =
c(e, o) && n.isMergeableObject(r[o])
? (function (e, r) {
if (!r.customMerge) return u
var t = r.customMerge(e)
return "function" == typeof t ? t : u
})(o, n)(e[o], r[o], n)
: t(r[o], n))
}),
i
)
})(r, i, a)
: t(i, a)
}
u.all = function (e, r) {
if (!Array.isArray(e)) throw new Error("first argument should be an array")
return e.reduce(function (e, t) {
return u(e, t, r)
}, {})
}
var i = u
return function (e) {
var r = (e = e || {}).storage || (window && window.localStorage),
t = e.key || "vuex"
function n(e, r) {
var t = r.getItem(e)
try {
return "string" == typeof t ? JSON.parse(t) : "object" == typeof t ? t : void 0
} catch (e) {}
}
function o() {
return !0
}
function c(e, r, t) {
return t.setItem(e, JSON.stringify(r))
}
function u(e, r) {
return Array.isArray(r)
? r.reduce(function (r, t) {
return (function (e, r, t, n) {
return (
!/^(__proto__|constructor|prototype)$/.test(r) &&
((r = r.split ? r.split(".") : r.slice(0)).slice(0, -1).reduce(function (e, r) {
return (e[r] = e[r] || {})
}, e)[r.pop()] = t),
e
)
})(
r,
t,
((n = e),
void 0 ===
(n = ((o = t).split ? o.split(".") : o).reduce(function (e, r) {
return e && e[r]
}, n))
? void 0
: n)
)
var n, o
}, {})
: e
}
function a(e) {
return function (r) {
return e.subscribe(r)
}
}
;(
e.assertStorage ||
function () {
r.setItem("@@", 1), r.removeItem("@@")
}
)(r)
var f,
s = function () {
return (e.getState || n)(t, r)
}
return (
e.fetchBeforeUse && (f = s()),
function (n) {
e.fetchBeforeUse || (f = s()),
"object" == typeof f &&
null !== f &&
(n.replaceState(
e.overwrite
? f
: i(n.state, f, {
arrayMerge:
e.arrayMerger ||
function (e, r) {
return r
},
clone: !1
})
),
(e.rehydrated || function () {})(n)),
(e.subscriber || a)(n)(function (n, i) {
;(e.filter || o)(n) && (e.setState || c)(t, (e.reducer || u)(i, e.paths), r)
})
}
)
}
})
//# sourceMappingURL=vuex-persistedstate.umd.js.map
File diff suppressed because it is too large Load Diff