next-element-vue 0.5.7 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +542 -511
- package/dist/index.min.d.ts +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.umd.d.ts +1 -1
- package/dist/index.umd.js +701 -670
- package/dist/index.umd.min.d.ts +1 -1
- package/dist/index.umd.min.js +3 -3
- package/dist/packages/components/crud-table-virtualized/src/index.test.d.ts +1 -1
- package/dist/packages/components/layout/src/widgets/layout-setting.d.ts +3 -1
- package/dist/packages/hooks/global-config.d.ts +8 -0
- package/dist/packages/index.d.ts +3 -2
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* 作 者:huangteng
|
|
4
4
|
* 邮 箱:htengweb@163.com
|
|
5
|
-
* 当前版本:0.5.
|
|
6
|
-
* 发布日期:2025-04-
|
|
5
|
+
* 当前版本:0.5.9 v
|
|
6
|
+
* 发布日期:2025-04-28
|
|
7
7
|
* 地 址:https://www.npmjs.com/package/next-element-vue
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1148,7 +1148,7 @@
|
|
|
1148
1148
|
themeColor: "#c71585",
|
|
1149
1149
|
headerBarColor: "#282c34",
|
|
1150
1150
|
headerBarFontColor: "#FFFFFF",
|
|
1151
|
-
headerBarFontActiveColor: "
|
|
1151
|
+
headerBarFontActiveColor: "",
|
|
1152
1152
|
isHeaderBarColorGradual: !1,
|
|
1153
1153
|
asidebarColor: "#282c34",
|
|
1154
1154
|
asidebarFontColor: "#ffffff",
|
|
@@ -1485,340 +1485,6 @@
|
|
|
1485
1485
|
fill: "currentColor",
|
|
1486
1486
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"
|
|
1487
1487
|
}) ]))
|
|
1488
|
-
}), LayoutSetting = vue.defineComponent({
|
|
1489
|
-
setup() {},
|
|
1490
|
-
render() {
|
|
1491
|
-
const _slots = vue.inject("__slots__", {}), _ns = vue.inject("__ns__", {}), _config = vue.inject("options", {}), _updateOptions = vue.inject("updateOptions", null), settingConfig = vue.reactive({
|
|
1492
|
-
..._config.setting
|
|
1493
|
-
}), _changeUpdateOptions = () => {
|
|
1494
|
-
const options = {
|
|
1495
|
-
..._config,
|
|
1496
|
-
setting: {
|
|
1497
|
-
...settingConfig
|
|
1498
|
-
}
|
|
1499
|
-
};
|
|
1500
|
-
_updateOptions(options);
|
|
1501
|
-
}, _onChangeThemeColor = color => {
|
|
1502
|
-
if (!color) return elementPlus.ElMessage({
|
|
1503
|
-
type: "warning",
|
|
1504
|
-
message: "主题颜色不能为空"
|
|
1505
|
-
}), !1;
|
|
1506
|
-
settingConfig.themeColor = color, nextUseCssTheme("--el-color-primary", color),
|
|
1507
|
-
_changeUpdateOptions();
|
|
1508
|
-
}, _onChangeSwitchDark = () => {
|
|
1509
|
-
const body = document.documentElement;
|
|
1510
|
-
settingConfig.isDark ? body.setAttribute("data-theme", "dark") : body.setAttribute("data-theme", ""),
|
|
1511
|
-
_changeUpdateOptions();
|
|
1512
|
-
}, _onChangeColor = (color, key, cssvar) => {
|
|
1513
|
-
settingConfig[key] = color, nextUseCssVar(cssvar, color), _changeUpdateOptions();
|
|
1514
|
-
}, layouts = [ {
|
|
1515
|
-
type: "defaults",
|
|
1516
|
-
text: "默认"
|
|
1517
|
-
}, {
|
|
1518
|
-
type: "classic",
|
|
1519
|
-
text: "经典"
|
|
1520
|
-
}, {
|
|
1521
|
-
type: "transverse",
|
|
1522
|
-
text: "横向"
|
|
1523
|
-
}, {
|
|
1524
|
-
type: "columns",
|
|
1525
|
-
text: "分栏"
|
|
1526
|
-
}, {
|
|
1527
|
-
type: "composite",
|
|
1528
|
-
text: "综合"
|
|
1529
|
-
} ];
|
|
1530
|
-
return vue.createVNode(elementPlus.ElScrollbar, null, {
|
|
1531
|
-
default: () => [ vue.createVNode(elementPlus.ElDivider, {
|
|
1532
|
-
"border-style": "dashed"
|
|
1533
|
-
}, {
|
|
1534
|
-
default: () => [ vue.createTextVNode("全局主题") ]
|
|
1535
|
-
}), vue.createVNode("div", {
|
|
1536
|
-
class: _ns.b("config-bar-item")
|
|
1537
|
-
}, [ vue.createVNode("span", {
|
|
1538
|
-
class: _ns.be("config-bar-item", "label")
|
|
1539
|
-
}, [ vue.createTextVNode("主题颜色") ]), vue.createVNode("div", {
|
|
1540
|
-
class: _ns.be("config-bar-item", "value")
|
|
1541
|
-
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
1542
|
-
modelValue: settingConfig.themeColor,
|
|
1543
|
-
"onUpdate:modelValue": $event => settingConfig.themeColor = $event,
|
|
1544
|
-
predefine: [ "#409eff", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1545
|
-
"show-alpha": !0,
|
|
1546
|
-
onChange: _onChangeThemeColor
|
|
1547
|
-
}, null) ]) ]), vue.createVNode("div", {
|
|
1548
|
-
class: _ns.b("config-bar-item")
|
|
1549
|
-
}, [ vue.createVNode("span", {
|
|
1550
|
-
class: _ns.be("config-bar-item", "label")
|
|
1551
|
-
}, [ vue.createTextVNode("暗黑模式") ]), vue.createVNode("div", {
|
|
1552
|
-
class: _ns.be("config-bar-item", "value")
|
|
1553
|
-
}, [ vue.createVNode(elementPlus.ElSwitch, {
|
|
1554
|
-
modelValue: settingConfig.isDark,
|
|
1555
|
-
"onUpdate:modelValue": $event => settingConfig.isDark = $event,
|
|
1556
|
-
"inline-prompt": !0,
|
|
1557
|
-
size: "large",
|
|
1558
|
-
"active-icon": moon_night_default,
|
|
1559
|
-
"inactive-icon": sunny_default,
|
|
1560
|
-
"active-color": "#1f1f1f",
|
|
1561
|
-
"inactive-color": "#dcdfe6",
|
|
1562
|
-
onChange: _onChangeSwitchDark
|
|
1563
|
-
}, null) ]) ]), vue.createVNode("div", {
|
|
1564
|
-
class: _ns.b("config-bar-item")
|
|
1565
|
-
}, [ vue.createVNode("span", {
|
|
1566
|
-
class: _ns.be("config-bar-item", "label")
|
|
1567
|
-
}, [ vue.createTextVNode("顶栏背景颜色") ]), vue.createVNode("div", {
|
|
1568
|
-
class: _ns.be("config-bar-item", "value")
|
|
1569
|
-
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
1570
|
-
modelValue: settingConfig.headerBarColor,
|
|
1571
|
-
"onUpdate:modelValue": $event => settingConfig.headerBarColor = $event,
|
|
1572
|
-
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1573
|
-
"show-alpha": !0,
|
|
1574
|
-
onChange: color => _onChangeColor(color, "headerBarColor", "--next-layout-bg-color")
|
|
1575
|
-
}, null) ]) ]), vue.createVNode("div", {
|
|
1576
|
-
class: _ns.b("config-bar-item")
|
|
1577
|
-
}, [ vue.createVNode("span", {
|
|
1578
|
-
class: _ns.be("config-bar-item", "label")
|
|
1579
|
-
}, [ vue.createTextVNode("顶栏字体颜色") ]), vue.createVNode("div", {
|
|
1580
|
-
class: _ns.be("config-bar-item", "value")
|
|
1581
|
-
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
1582
|
-
modelValue: settingConfig.headerBarFontColor,
|
|
1583
|
-
"onUpdate:modelValue": $event => settingConfig.headerBarFontColor = $event,
|
|
1584
|
-
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1585
|
-
"show-alpha": !0,
|
|
1586
|
-
onChange: color => _onChangeColor(color, "headerBarFontColor", "--next-layout-font-color")
|
|
1587
|
-
}, null) ]) ]), vue.createVNode("div", {
|
|
1588
|
-
class: _ns.b("config-bar-item")
|
|
1589
|
-
}, [ vue.createVNode("span", {
|
|
1590
|
-
class: _ns.be("config-bar-item", "label")
|
|
1591
|
-
}, [ vue.createTextVNode("顶栏激活字体颜色") ]), vue.createVNode("div", {
|
|
1592
|
-
class: _ns.be("config-bar-item", "value")
|
|
1593
|
-
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
1594
|
-
modelValue: settingConfig.headerBarFontActiveColor,
|
|
1595
|
-
"onUpdate:modelValue": $event => settingConfig.headerBarFontActiveColor = $event,
|
|
1596
|
-
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1597
|
-
"show-alpha": !0,
|
|
1598
|
-
onChange: color => _onChangeColor(color, "headerBarFontActiveColor", "--next-layout-active-color")
|
|
1599
|
-
}, null) ]) ]), vue.createVNode("div", {
|
|
1600
|
-
class: _ns.b("config-bar-item")
|
|
1601
|
-
}, [ vue.createVNode("span", {
|
|
1602
|
-
class: _ns.be("config-bar-item", "label")
|
|
1603
|
-
}, [ vue.createTextVNode("顶栏背景渐变") ]), vue.createVNode("div", {
|
|
1604
|
-
class: _ns.be("config-bar-item", "value")
|
|
1605
|
-
}, [ vue.createVNode(vue.resolveComponent("el-switch"), {
|
|
1606
|
-
modelValue: settingConfig.isHeaderBarColorGradual,
|
|
1607
|
-
"onUpdate:modelValue": $event => settingConfig.isHeaderBarColorGradual = $event,
|
|
1608
|
-
onChange: _changeUpdateOptions
|
|
1609
|
-
}, null) ]) ]), vue.createVNode(elementPlus.ElDivider, {
|
|
1610
|
-
"border-style": "dashed"
|
|
1611
|
-
}, {
|
|
1612
|
-
default: () => [ vue.createTextVNode("布局方式") ]
|
|
1613
|
-
}), vue.createVNode("ul", {
|
|
1614
|
-
class: _ns.b("config-bar-layout")
|
|
1615
|
-
}, [ layouts.map((item => vue.createVNode("li", {
|
|
1616
|
-
class: [ _ns.be("config-bar-layout", item.type), _ns.is("active", settingConfig.layout === item.type) ],
|
|
1617
|
-
onClick: event => ((event, layout) => {
|
|
1618
|
-
event.stopPropagation(), settingConfig.layout = layout.type, _changeUpdateOptions();
|
|
1619
|
-
})(event, item)
|
|
1620
|
-
}, [ vue.createVNode("div", {
|
|
1621
|
-
class: "layout-wrap"
|
|
1622
|
-
}, [ vue.createVNode("div", {
|
|
1623
|
-
class: "layout-box"
|
|
1624
|
-
}, [ vue.createVNode("p", {
|
|
1625
|
-
class: "layout-text"
|
|
1626
|
-
}, [ item.text ]) ]) ]), vue.createVNode("aside", null, null) ]))) ]), vue.createVNode("div", {
|
|
1627
|
-
class: _ns.b("config-bar-item"),
|
|
1628
|
-
style: {
|
|
1629
|
-
"margin-top": "20px"
|
|
1630
|
-
}
|
|
1631
|
-
}, [ vue.createVNode("span", {
|
|
1632
|
-
class: _ns.be("config-bar-item", "label")
|
|
1633
|
-
}, [ vue.createTextVNode("是否显示标签栏") ]), vue.createVNode("div", {
|
|
1634
|
-
class: _ns.be("config-bar-item", "value")
|
|
1635
|
-
}, [ vue.createVNode(elementPlus.ElSwitch, {
|
|
1636
|
-
modelValue: _config.showTabs,
|
|
1637
|
-
"onUpdate:modelValue": $event => _config.showTabs = $event
|
|
1638
|
-
}, null) ]) ]), _slots.setting?.({
|
|
1639
|
-
config: settingConfig
|
|
1640
|
-
}) ]
|
|
1641
|
-
});
|
|
1642
|
-
}
|
|
1643
|
-
});
|
|
1644
|
-
var HeaderTools = vue.defineComponent({
|
|
1645
|
-
setup() {
|
|
1646
|
-
const locale = vue.inject(localeContextKey, vue.ref()), config = vue.inject("options", {}), {t: t} = useLocale(), {toggle: toggle, isFullscreen: isFullscreen} = core.useFullscreen(), language = vue.ref(vue.computed((() => config.language)).value), settingDrawer = vue.ref(!1);
|
|
1647
|
-
return {
|
|
1648
|
-
locale: locale,
|
|
1649
|
-
config: config,
|
|
1650
|
-
t: t,
|
|
1651
|
-
toggle: toggle,
|
|
1652
|
-
isFullscreen: isFullscreen,
|
|
1653
|
-
language: language,
|
|
1654
|
-
settingDrawer: settingDrawer
|
|
1655
|
-
};
|
|
1656
|
-
},
|
|
1657
|
-
render() {
|
|
1658
|
-
const _ns = vue.inject("__ns__", {}), _config = this.config, _emit = vue.inject("__emit__", {}), slots = this.$slots, _t = this.t, isFullscreen = this.isFullscreen, profile_url = _config.profile, _userDropdown = _config.userDropdown, _languageDropdown = _config.languageDropdown, _closeSettingDrawer = () => {
|
|
1659
|
-
this.settingDrawer = !1;
|
|
1660
|
-
};
|
|
1661
|
-
return vue.createVNode(vue.Fragment, null, [ vue.createVNode("ul", {
|
|
1662
|
-
class: _ns.b("header-tools")
|
|
1663
|
-
}, [ slots[slots_config_headerToolsPrefix]?.(), vue.createVNode("li", null, [ vue.createVNode(elementPlus.ElDropdown, {
|
|
1664
|
-
"show-timeout": 70,
|
|
1665
|
-
"hide-timeout": 50,
|
|
1666
|
-
trigger: "click",
|
|
1667
|
-
onCommand: command => {
|
|
1668
|
-
this.language = command, _emit("changeLanguage", command), _config.onChangeLanguage && _config.onChangeLanguage(command);
|
|
1669
|
-
}
|
|
1670
|
-
}, {
|
|
1671
|
-
default: () => vue.createVNode("div", null, [ vue.createVNode(elementPlus.ElIcon, {
|
|
1672
|
-
size: 16
|
|
1673
|
-
}, {
|
|
1674
|
-
default: () => [ vue.createVNode("svg", {
|
|
1675
|
-
class: "icon",
|
|
1676
|
-
viewBox: "0 0 1070 1024",
|
|
1677
|
-
version: "1.1",
|
|
1678
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1679
|
-
"p-id": "1855",
|
|
1680
|
-
width: "128",
|
|
1681
|
-
height: "128"
|
|
1682
|
-
}, [ vue.createVNode("path", {
|
|
1683
|
-
d: "M232.58156522 358.13286957C244.86956522 394.4626087 265.17147826 425.984 293.48730435 453.76556522c24.04173913-26.17878261 42.2066087-58.23443478 53.96034782-95.63269565H232.58156522z",
|
|
1684
|
-
"p-id": "1856"
|
|
1685
|
-
}, null), vue.createVNode("path", {
|
|
1686
|
-
d: "M981.61530435 143.36h-448.77913044L507.19165217 6.05495652h-416.72347826c-45.94643478 0-83.34469565 37.39826087-83.34469565 83.34469565v708.42991305c0 45.94643478 37.39826087 83.34469565 83.34469565 83.34469565h379.85947826l-30.45286956 137.30504348h541.74052174c45.94643478 0 83.34469565-37.39826087 83.34469565-83.34469565V226.70469565c0-45.94643478-37.39826087-83.34469565-83.34469565-83.34469565zM415.83304348 564.35756522c-49.152-18.16486957-89.75582609-41.13808696-122.34573913-67.85113044-34.19269565 30.45286957-76.93356522 52.89182609-126.61982609 66.7826087l-17.09634783-28.31582609c48.61773913-12.82226087 89.22156522-32.05565217 121.2772174-59.30295652-33.12417391-33.65843478-56.0973913-72.65947826-68.91965218-117.00313044h-46.48069565v-32.05565217H276.92521739c-7.47965217-13.89078261-17.09634783-27.24730435-28.31582609-40.06956522l32.05565218-11.75373913c11.21947826 14.42504348 21.37043478 31.5213913 30.45286956 51.28904348h115.9346087v32.05565218h-46.48069565c-14.95930435 45.94643478-36.32973913 84.41321739-64.64556522 115.40034782 31.5213913 25.11026087 71.05669565 45.94643478 117.5373913 63.04278261l-17.63060869 27.78156522z m607.45460869 370.24278261c0 22.97321739-18.69913043 41.67234783-41.67234782 41.67234782H492.23234783l20.83617391-95.63269565h156.53843478l-89.22156522-497.39686957-0.53426087 2.67130435-3.73982608-19.76765217 1.06852174 0.53426087-32.58991305-181.64869565H982.14956522c22.97321739 0 41.67234783 18.69913043 41.67234782 41.67234782v707.89565218z",
|
|
1687
|
-
"p-id": "1857"
|
|
1688
|
-
}, null), vue.createVNode("path", {
|
|
1689
|
-
d: "M684.56626087 541.38434783h114.86608696v-30.45286957h-114.86608696V450.02573913h122.34573913v-30.45286956h-158.14121739v219.04695652h162.94956522V608.16695652h-127.15408696v-66.78260869z m239.88313043-65.71408696c-9.61669565 0-18.16486957 1.60278261-26.1787826 5.87686956-7.47965217 3.73982609-14.95930435 9.61669565-20.83617392 17.09634783V479.94434783h-34.72695652v158.67547826h34.72695652v-95.63269566c1.06852174-12.82226087 5.3426087-22.43895652 12.82226087-29.38434782 6.41113043-5.87686957 13.89078261-9.08243478 22.43895652-9.08243478 24.04173913 0 35.79547826 12.82226087 35.79547826 39.00104347v94.56417392h34.72695653v-97.76973913c1.06852174-43.27513043-19.2333913-64.64556522-58.76869566-64.64556522z",
|
|
1690
|
-
"p-id": "1858"
|
|
1691
|
-
}, null) ]) ]
|
|
1692
|
-
}) ]),
|
|
1693
|
-
dropdown: () => {
|
|
1694
|
-
let _slot;
|
|
1695
|
-
return vue.createVNode(elementPlus.ElDropdownMenu, null, "function" == typeof (s = _slot = _languageDropdown.map((item => vue.createVNode(elementPlus.ElDropdownItem, {
|
|
1696
|
-
command: item.value,
|
|
1697
|
-
disabled: this.language === item.value
|
|
1698
|
-
}, {
|
|
1699
|
-
default: () => [ item.label ]
|
|
1700
|
-
})))) || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? _slot : {
|
|
1701
|
-
default: () => [ _slot ]
|
|
1702
|
-
});
|
|
1703
|
-
var s;
|
|
1704
|
-
}
|
|
1705
|
-
}) ]), vue.createVNode("li", null, [ vue.createVNode("span", {
|
|
1706
|
-
style: {
|
|
1707
|
-
display: "inline-block",
|
|
1708
|
-
lineHeight: 1
|
|
1709
|
-
},
|
|
1710
|
-
onClick: this.toggle
|
|
1711
|
-
}, [ vue.createVNode(elementPlus.ElIcon, {
|
|
1712
|
-
size: 16
|
|
1713
|
-
}, {
|
|
1714
|
-
default: () => [ isFullscreen ? vue.createVNode("svg", {
|
|
1715
|
-
class: "icon",
|
|
1716
|
-
viewBox: "0 0 1024 1024",
|
|
1717
|
-
version: "1.1",
|
|
1718
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1719
|
-
"p-id": "2676",
|
|
1720
|
-
width: "128",
|
|
1721
|
-
height: "128"
|
|
1722
|
-
}, [ vue.createVNode("path", {
|
|
1723
|
-
d: "M749.248 704H864a32 32 0 1 0 0-64H672a32 32 0 0 0-32 32v192a32 32 0 1 0 64 0v-114.752l137.36 137.36a32 32 0 1 0 45.232-45.264L749.248 704zM320 749.248V864a32 32 0 1 0 64 0V672a32 32 0 0 0-32-32H160a32 32 0 1 0 0 64h114.752l-137.36 137.36a32 32 0 1 0 45.264 45.232L320 749.248zM749.248 320H864a32 32 0 1 1 0 64H672a32 32 0 0 1-32-32V160a32 32 0 1 1 64 0v114.752l137.36-137.36a32 32 0 1 1 45.232 45.264L749.248 320zM320 274.752V160a32 32 0 1 1 64 0v192a32 32 0 0 1-32 32H160a32 32 0 1 1 0-64h114.752l-137.36-137.36a32 32 0 1 1 45.264-45.232L320 274.752z",
|
|
1724
|
-
"p-id": "2677"
|
|
1725
|
-
}, null) ]) : vue.createVNode("svg", {
|
|
1726
|
-
class: "icon",
|
|
1727
|
-
viewBox: "0 0 1024 1024",
|
|
1728
|
-
version: "1.1",
|
|
1729
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1730
|
-
"p-id": "2522",
|
|
1731
|
-
width: "128",
|
|
1732
|
-
height: "128"
|
|
1733
|
-
}, [ vue.createVNode("path", {
|
|
1734
|
-
d: "M237.248 192H352a32 32 0 1 0 0-64H160a32 32 0 0 0-32 32v192a32 32 0 1 0 64 0v-114.752l137.36 137.36a32 32 0 1 0 45.232-45.264L237.248 192zM832 237.248V352a32 32 0 1 0 64 0V160a32 32 0 0 0-32-32H672a32 32 0 1 0 0 64h114.752l-137.36 137.36a32 32 0 1 0 45.264 45.232L832 237.248zM237.248 832H352a32 32 0 1 1 0 64H160a32 32 0 0 1-32-32V672a32 32 0 1 1 64 0v114.752l137.36-137.36a32 32 0 1 1 45.232 45.264L237.248 832zM832 786.752V672a32 32 0 1 1 64 0v192a32 32 0 0 1-32 32H672a32 32 0 1 1 0-64h114.752l-137.36-137.36a32 32 0 1 1 45.264-45.232L832 786.752z",
|
|
1735
|
-
"p-id": "2523"
|
|
1736
|
-
}, null) ]) ]
|
|
1737
|
-
}) ]) ]), slots[slots_config_headerToolsSuffix]?.(), vue.createVNode("li", null, [ vue.createVNode(elementPlus.ElDropdown, {
|
|
1738
|
-
"show-timeout": 70,
|
|
1739
|
-
"hide-timeout": 80,
|
|
1740
|
-
"popper-class": _ns.be("header-tools", "userDropdown"),
|
|
1741
|
-
onCommand: command => {
|
|
1742
|
-
_emit("changeUserDropdown", command), _config.onChangeUserDropdown && _config.onChangeUserDropdown(command);
|
|
1743
|
-
}
|
|
1744
|
-
}, {
|
|
1745
|
-
default: () => vue.createVNode("span", {
|
|
1746
|
-
class: _ns.be("header-tools", "user")
|
|
1747
|
-
}, [ profile_url ? vue.createVNode("img", {
|
|
1748
|
-
class: "user-photo",
|
|
1749
|
-
src: profile_url
|
|
1750
|
-
}, null) : null, vue.createVNode("span", null, [ _config.userName ]), vue.createVNode(elementPlus.ElIcon, {
|
|
1751
|
-
class: "el-icon--right"
|
|
1752
|
-
}, {
|
|
1753
|
-
default: () => [ vue.createVNode(arrow_down_default, null, null) ]
|
|
1754
|
-
}) ]),
|
|
1755
|
-
dropdown: () => vue.createVNode(elementPlus.ElDropdownMenu, null, {
|
|
1756
|
-
default: () => [ _userDropdown?.map((item => vue.createVNode(elementPlus.ElDropdownItem, {
|
|
1757
|
-
command: item.value,
|
|
1758
|
-
divided: !!item.divided
|
|
1759
|
-
}, {
|
|
1760
|
-
default: () => [ item.svg ? vue.createVNode("span", {
|
|
1761
|
-
innerHTML: item.svg,
|
|
1762
|
-
class: "item-svg"
|
|
1763
|
-
}, null) : null, item.iconfont ? vue.createVNode("i", {
|
|
1764
|
-
class: item.iconfont
|
|
1765
|
-
}, null) : null, _t(item.label) ]
|
|
1766
|
-
}))) ]
|
|
1767
|
-
})
|
|
1768
|
-
}) ]), vue.createVNode("li", null, [ vue.createVNode("span", {
|
|
1769
|
-
style: {
|
|
1770
|
-
display: "inline-block",
|
|
1771
|
-
lineHeight: 1
|
|
1772
|
-
},
|
|
1773
|
-
onClick: () => {
|
|
1774
|
-
this.settingDrawer = !0;
|
|
1775
|
-
}
|
|
1776
|
-
}, [ vue.createVNode(elementPlus.ElIcon, {
|
|
1777
|
-
size: 16
|
|
1778
|
-
}, {
|
|
1779
|
-
default: () => [ vue.createVNode(setting_default, null, null) ]
|
|
1780
|
-
}) ]) ]) ]), vue.createVNode(vue.Teleport, {
|
|
1781
|
-
to: "body"
|
|
1782
|
-
}, {
|
|
1783
|
-
default: () => [ vue.createVNode(elementPlus.ElDrawer, {
|
|
1784
|
-
modelValue: this.settingDrawer,
|
|
1785
|
-
"onUpdate:modelValue": $event => this.settingDrawer = $event,
|
|
1786
|
-
title: this.t("next.layout.systemSetting"),
|
|
1787
|
-
direction: "rtl",
|
|
1788
|
-
size: "380px",
|
|
1789
|
-
class: _ns.be("drawer", "setting"),
|
|
1790
|
-
"destroy-on-close": !0,
|
|
1791
|
-
beforeClose: _closeSettingDrawer
|
|
1792
|
-
}, {
|
|
1793
|
-
default: () => [ vue.createVNode(LayoutSetting, null, null) ]
|
|
1794
|
-
}) ]
|
|
1795
|
-
}) ]);
|
|
1796
|
-
}
|
|
1797
|
-
});
|
|
1798
|
-
const {getLightColor: getLightColor$4} = useChangeColor();
|
|
1799
|
-
var Header$4 = vue.defineComponent({
|
|
1800
|
-
setup: () => ({
|
|
1801
|
-
ns: vue.inject("ns", {})
|
|
1802
|
-
}),
|
|
1803
|
-
render() {
|
|
1804
|
-
const slots = this.$slots, _ns = this.ns, _config = vue.inject("options", {}), headerStyle = vue.computed((() => {
|
|
1805
|
-
const {isHeaderBarColorGradual: isHeaderBarColorGradual, headerBarColor: color} = _config.setting;
|
|
1806
|
-
return isHeaderBarColorGradual ? {
|
|
1807
|
-
background: `linear-gradient(to bottom , ${color}, ${getLightColor$4(color, .5)})`
|
|
1808
|
-
} : "";
|
|
1809
|
-
})), __slots_header_tools = {};
|
|
1810
|
-
return slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
1811
|
-
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]()),
|
|
1812
|
-
vue.createVNode("header", {
|
|
1813
|
-
class: _ns.b("header"),
|
|
1814
|
-
style: headerStyle.value
|
|
1815
|
-
}, [ vue.createVNode(LogoView, null, null), vue.createVNode("div", {
|
|
1816
|
-
class: _ns.bf("header", "right")
|
|
1817
|
-
}, [ vue.createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
1818
|
-
default: () => [ __slots_header_tools ]
|
|
1819
|
-
})) ]) ]);
|
|
1820
|
-
var s;
|
|
1821
|
-
}
|
|
1822
1488
|
});
|
|
1823
1489
|
function getDefaultExportFromCjs(x) {
|
|
1824
1490
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
|
|
@@ -2164,327 +1830,667 @@
|
|
|
2164
1830
|
function getExpandHeight(height) {
|
|
2165
1831
|
return height + 10 + getHeightOffset();
|
|
2166
1832
|
}
|
|
2167
|
-
function positionScrollbars(element, width, height) {
|
|
2168
|
-
var expand = getExpandElement(element), shrink = getShrinkElement(element), expandWidth = getExpandWidth(width), expandHeight = getExpandHeight(height), shrinkWidth = function(width) {
|
|
2169
|
-
return 2 * width + getWidthOffset();
|
|
2170
|
-
}(width), shrinkHeight = function(height) {
|
|
2171
|
-
return 2 * height + getHeightOffset();
|
|
2172
|
-
}(height);
|
|
2173
|
-
expand.scrollLeft = expandWidth, expand.scrollTop = expandHeight, shrink.scrollLeft = shrinkWidth,
|
|
2174
|
-
shrink.scrollTop = shrinkHeight;
|
|
1833
|
+
function positionScrollbars(element, width, height) {
|
|
1834
|
+
var expand = getExpandElement(element), shrink = getShrinkElement(element), expandWidth = getExpandWidth(width), expandHeight = getExpandHeight(height), shrinkWidth = function(width) {
|
|
1835
|
+
return 2 * width + getWidthOffset();
|
|
1836
|
+
}(width), shrinkHeight = function(height) {
|
|
1837
|
+
return 2 * height + getHeightOffset();
|
|
1838
|
+
}(height);
|
|
1839
|
+
expand.scrollLeft = expandWidth, expand.scrollTop = expandHeight, shrink.scrollLeft = shrinkWidth,
|
|
1840
|
+
shrink.scrollTop = shrinkHeight;
|
|
1841
|
+
}
|
|
1842
|
+
function injectContainerElement() {
|
|
1843
|
+
var container = getState(element).container;
|
|
1844
|
+
if (!container) {
|
|
1845
|
+
(container = document.createElement("div")).className = "erd_scroll_detection_container",
|
|
1846
|
+
container.style.cssText = buildCssTextString([ "visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0" ]),
|
|
1847
|
+
getState(element).container = container, function(element) {
|
|
1848
|
+
element.className += " erd_scroll_detection_container_animation_active";
|
|
1849
|
+
}(container), element.appendChild(container);
|
|
1850
|
+
var onAnimationStart = function() {
|
|
1851
|
+
getState(element).onRendered && getState(element).onRendered();
|
|
1852
|
+
};
|
|
1853
|
+
addEvent(container, "animationstart", onAnimationStart), getState(element).onAnimationStart = onAnimationStart;
|
|
1854
|
+
}
|
|
1855
|
+
return container;
|
|
1856
|
+
}
|
|
1857
|
+
function injectScrollElements() {
|
|
1858
|
+
if (debug("Injecting elements"), getState(element)) {
|
|
1859
|
+
!function() {
|
|
1860
|
+
var style = getState(element).style;
|
|
1861
|
+
if ("static" === style.position) {
|
|
1862
|
+
element.style.setProperty("position", "relative", options.important ? "important" : "");
|
|
1863
|
+
var removeRelativeStyles = function(reporter, element, style, property) {
|
|
1864
|
+
var value = style[property];
|
|
1865
|
+
"auto" !== value && "0" !== function(value) {
|
|
1866
|
+
return value.replace(/[^-\d\.]/g, "");
|
|
1867
|
+
}(value) && (reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element),
|
|
1868
|
+
element.style[property] = 0);
|
|
1869
|
+
};
|
|
1870
|
+
removeRelativeStyles(reporter, element, style, "top"), removeRelativeStyles(reporter, element, style, "right"),
|
|
1871
|
+
removeRelativeStyles(reporter, element, style, "bottom"), removeRelativeStyles(reporter, element, style, "left");
|
|
1872
|
+
}
|
|
1873
|
+
}();
|
|
1874
|
+
var rootContainer = getState(element).container;
|
|
1875
|
+
rootContainer || (rootContainer = injectContainerElement());
|
|
1876
|
+
var left, top, bottom, right, scrollbarWidth = scrollbarSizes.width, scrollbarHeight = scrollbarSizes.height, containerContainerStyle = buildCssTextString([ "position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px" ]), containerStyle = buildCssTextString([ "position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden" ].concat([ "left: " + (left = (left = -(1 + scrollbarWidth)) ? left + "px" : "0"), "top: " + (top = (top = -(1 + scrollbarHeight)) ? top + "px" : "0"), "right: " + (right = (right = -scrollbarWidth) ? right + "px" : "0"), "bottom: " + (bottom = (bottom = -scrollbarHeight) ? bottom + "px" : "0") ])), expandStyle = buildCssTextString([ "position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%" ]), shrinkStyle = buildCssTextString([ "position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%" ]), expandChildStyle = buildCssTextString([ "position: absolute", "left: 0", "top: 0" ]), shrinkChildStyle = buildCssTextString([ "position: absolute", "width: 200%", "height: 200%" ]), containerContainer = document.createElement("div"), container = document.createElement("div"), expand = document.createElement("div"), expandChild = document.createElement("div"), shrink = document.createElement("div"), shrinkChild = document.createElement("div");
|
|
1877
|
+
containerContainer.dir = "ltr", containerContainer.style.cssText = containerContainerStyle,
|
|
1878
|
+
containerContainer.className = "erd_scroll_detection_container", container.className = "erd_scroll_detection_container",
|
|
1879
|
+
container.style.cssText = containerStyle, expand.style.cssText = expandStyle, expandChild.style.cssText = expandChildStyle,
|
|
1880
|
+
shrink.style.cssText = shrinkStyle, shrinkChild.style.cssText = shrinkChildStyle,
|
|
1881
|
+
expand.appendChild(expandChild), shrink.appendChild(shrinkChild), container.appendChild(expand),
|
|
1882
|
+
container.appendChild(shrink), containerContainer.appendChild(container), rootContainer.appendChild(containerContainer),
|
|
1883
|
+
addEvent(expand, "scroll", onExpandScroll), addEvent(shrink, "scroll", onShrinkScroll),
|
|
1884
|
+
getState(element).onExpandScroll = onExpandScroll, getState(element).onShrinkScroll = onShrinkScroll;
|
|
1885
|
+
} else debug("Aborting because element has been uninstalled");
|
|
1886
|
+
function onExpandScroll() {
|
|
1887
|
+
var state = getState(element);
|
|
1888
|
+
state && state.onExpand ? state.onExpand() : debug("Aborting expand scroll handler: element has been uninstalled");
|
|
1889
|
+
}
|
|
1890
|
+
function onShrinkScroll() {
|
|
1891
|
+
var state = getState(element);
|
|
1892
|
+
state && state.onShrink ? state.onShrink() : debug("Aborting shrink scroll handler: element has been uninstalled");
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
function registerListenersAndPositionElements() {
|
|
1896
|
+
function updateChildSizes(element, width, height) {
|
|
1897
|
+
var expandChild = function(element) {
|
|
1898
|
+
return getExpandElement(element).childNodes[0];
|
|
1899
|
+
}(element), expandWidth = getExpandWidth(width), expandHeight = getExpandHeight(height);
|
|
1900
|
+
expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : ""),
|
|
1901
|
+
expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : "");
|
|
1902
|
+
}
|
|
1903
|
+
function updateDetectorElements(done) {
|
|
1904
|
+
var width = element.offsetWidth, height = element.offsetHeight, sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;
|
|
1905
|
+
debug("Storing current size", width, height), storeCurrentSize(element, width, height),
|
|
1906
|
+
batchProcessor.add(0, (function() {
|
|
1907
|
+
if (sizeChanged) if (getState(element)) if (areElementsInjected()) {
|
|
1908
|
+
if (options.debug) {
|
|
1909
|
+
var w = element.offsetWidth, h = element.offsetHeight;
|
|
1910
|
+
w === width && h === height || reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements.");
|
|
1911
|
+
}
|
|
1912
|
+
updateChildSizes(element, width, height);
|
|
1913
|
+
} else debug("Aborting because element container has not been initialized"); else debug("Aborting because element has been uninstalled");
|
|
1914
|
+
})), batchProcessor.add(1, (function() {
|
|
1915
|
+
getState(element) ? areElementsInjected() ? positionScrollbars(element, width, height) : debug("Aborting because element container has not been initialized") : debug("Aborting because element has been uninstalled");
|
|
1916
|
+
})), sizeChanged && done && batchProcessor.add(2, (function() {
|
|
1917
|
+
getState(element) ? areElementsInjected() ? done() : debug("Aborting because element container has not been initialized") : debug("Aborting because element has been uninstalled");
|
|
1918
|
+
}));
|
|
1919
|
+
}
|
|
1920
|
+
function areElementsInjected() {
|
|
1921
|
+
return !!getState(element).container;
|
|
1922
|
+
}
|
|
1923
|
+
function notifyListenersIfNeeded() {
|
|
1924
|
+
debug("notifyListenersIfNeeded invoked");
|
|
1925
|
+
var state = getState(element);
|
|
1926
|
+
return void 0 === getState(element).lastNotifiedWidth && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height ? debug("Not notifying: Size is the same as the start size, and there has been no notification yet.") : state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight ? debug("Not notifying: Size already notified") : (debug("Current size not notified, notifying..."),
|
|
1927
|
+
state.lastNotifiedWidth = state.lastWidth, state.lastNotifiedHeight = state.lastHeight,
|
|
1928
|
+
void forEach$1(getState(element).listeners, (function(listener) {
|
|
1929
|
+
listener(element);
|
|
1930
|
+
})));
|
|
1931
|
+
}
|
|
1932
|
+
function handleScroll() {
|
|
1933
|
+
debug("Scroll detected."), isUnrendered(element) ? debug("Scroll event fired while unrendered. Ignoring...") : updateDetectorElements(notifyListenersIfNeeded);
|
|
1934
|
+
}
|
|
1935
|
+
if (debug("registerListenersAndPositionElements invoked."), getState(element)) {
|
|
1936
|
+
getState(element).onRendered = function() {
|
|
1937
|
+
if (debug("startanimation triggered."), isUnrendered(element)) debug("Ignoring since element is still unrendered..."); else {
|
|
1938
|
+
debug("Element rendered.");
|
|
1939
|
+
var expand = getExpandElement(element), shrink = getShrinkElement(element);
|
|
1940
|
+
0 !== expand.scrollLeft && 0 !== expand.scrollTop && 0 !== shrink.scrollLeft && 0 !== shrink.scrollTop || (debug("Scrollbars out of sync. Updating detector elements..."),
|
|
1941
|
+
updateDetectorElements(notifyListenersIfNeeded));
|
|
1942
|
+
}
|
|
1943
|
+
}, getState(element).onExpand = handleScroll, getState(element).onShrink = handleScroll;
|
|
1944
|
+
var style = getState(element).style;
|
|
1945
|
+
updateChildSizes(element, style.width, style.height);
|
|
1946
|
+
} else debug("Aborting because element has been uninstalled");
|
|
1947
|
+
}
|
|
1948
|
+
function finalizeDomMutation() {
|
|
1949
|
+
if (debug("finalizeDomMutation invoked."), getState(element)) {
|
|
1950
|
+
var style = getState(element).style;
|
|
1951
|
+
storeCurrentSize(element, style.width, style.height), positionScrollbars(element, style.width, style.height);
|
|
1952
|
+
} else debug("Aborting because element has been uninstalled");
|
|
1953
|
+
}
|
|
1954
|
+
function ready() {
|
|
1955
|
+
callback(element);
|
|
1956
|
+
}
|
|
1957
|
+
function install() {
|
|
1958
|
+
var style;
|
|
1959
|
+
debug("Installing..."), getState(element).listeners = [], style = getStyle(), getState(element).startSize = {
|
|
1960
|
+
width: style.width,
|
|
1961
|
+
height: style.height
|
|
1962
|
+
}, debug("Element start size", getState(element).startSize), batchProcessor.add(0, storeStyle),
|
|
1963
|
+
batchProcessor.add(1, injectScrollElements), batchProcessor.add(2, registerListenersAndPositionElements),
|
|
1964
|
+
batchProcessor.add(3, finalizeDomMutation), batchProcessor.add(4, ready);
|
|
1965
|
+
}
|
|
1966
|
+
callback || (callback = element, element = options, options = null), options = options || {},
|
|
1967
|
+
debug("Making detectable..."), !function(element) {
|
|
1968
|
+
return !function(element) {
|
|
1969
|
+
var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element);
|
|
1970
|
+
return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot;
|
|
1971
|
+
}(element) || null === window.getComputedStyle(element);
|
|
1972
|
+
}(element) ? install() : (debug("Element is detached"), injectContainerElement(),
|
|
1973
|
+
debug("Waiting until element is attached..."), getState(element).onRendered = function() {
|
|
1974
|
+
debug("Element is now attached"), install();
|
|
1975
|
+
});
|
|
1976
|
+
},
|
|
1977
|
+
addListener: function(element, listener) {
|
|
1978
|
+
if (!getState(element).listeners.push) throw new Error("Cannot add listener to an element that is not detectable.");
|
|
1979
|
+
getState(element).listeners.push(listener);
|
|
1980
|
+
},
|
|
1981
|
+
uninstall: function(element) {
|
|
1982
|
+
var state = getState(element);
|
|
1983
|
+
state && (state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll),
|
|
1984
|
+
state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll),
|
|
1985
|
+
state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart),
|
|
1986
|
+
state.container && element.removeChild(state.container));
|
|
1987
|
+
},
|
|
1988
|
+
initDocument: initDocument
|
|
1989
|
+
};
|
|
1990
|
+
};
|
|
1991
|
+
function isCollection(obj) {
|
|
1992
|
+
return Array.isArray(obj) || void 0 !== obj.length;
|
|
1993
|
+
}
|
|
1994
|
+
function toArray(collection) {
|
|
1995
|
+
if (Array.isArray(collection)) return collection;
|
|
1996
|
+
var array = [];
|
|
1997
|
+
return forEach(collection, (function(obj) {
|
|
1998
|
+
array.push(obj);
|
|
1999
|
+
})), array;
|
|
2000
|
+
}
|
|
2001
|
+
function isElement(obj) {
|
|
2002
|
+
return obj && 1 === obj.nodeType;
|
|
2003
|
+
}
|
|
2004
|
+
var elementResizeDetector = function(options) {
|
|
2005
|
+
var idHandler;
|
|
2006
|
+
if ((options = options || {}).idHandler) idHandler = {
|
|
2007
|
+
get: function(element) {
|
|
2008
|
+
return options.idHandler.get(element, !0);
|
|
2009
|
+
},
|
|
2010
|
+
set: options.idHandler.set
|
|
2011
|
+
}; else {
|
|
2012
|
+
var idGenerator = idGeneratorMaker(), defaultIdHandler = idHandlerMaker({
|
|
2013
|
+
idGenerator: idGenerator,
|
|
2014
|
+
stateHandler: stateHandler
|
|
2015
|
+
});
|
|
2016
|
+
idHandler = defaultIdHandler;
|
|
2017
|
+
}
|
|
2018
|
+
var reporter = options.reporter;
|
|
2019
|
+
reporter || (reporter = reporterMaker(!1 === reporter));
|
|
2020
|
+
var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({
|
|
2021
|
+
reporter: reporter
|
|
2022
|
+
})), globalOptions = {};
|
|
2023
|
+
globalOptions.callOnAdd = !!getOption(options, "callOnAdd", !0), globalOptions.debug = !!getOption(options, "debug", !1);
|
|
2024
|
+
var detectionStrategy, eventListenerHandler = listenerHandlerMaker(idHandler), elementUtils = elementUtilsMaker({
|
|
2025
|
+
stateHandler: stateHandler
|
|
2026
|
+
}), desiredStrategy = getOption(options, "strategy", "object"), importantCssRules = getOption(options, "important", !1), strategyOptions = {
|
|
2027
|
+
reporter: reporter,
|
|
2028
|
+
batchProcessor: batchProcessor,
|
|
2029
|
+
stateHandler: stateHandler,
|
|
2030
|
+
idHandler: idHandler,
|
|
2031
|
+
important: importantCssRules
|
|
2032
|
+
};
|
|
2033
|
+
if ("scroll" === desiredStrategy && (browserDetector.isLegacyOpera() ? (reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),
|
|
2034
|
+
desiredStrategy = "object") : browserDetector.isIE(9) && (reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),
|
|
2035
|
+
desiredStrategy = "object")), "scroll" === desiredStrategy) detectionStrategy = scrollStrategyMaker(strategyOptions); else {
|
|
2036
|
+
if ("object" !== desiredStrategy) throw new Error("Invalid strategy name: " + desiredStrategy);
|
|
2037
|
+
detectionStrategy = objectStrategyMaker(strategyOptions);
|
|
2038
|
+
}
|
|
2039
|
+
var onReadyCallbacks = {};
|
|
2040
|
+
return {
|
|
2041
|
+
listenTo: function(options, elements, listener) {
|
|
2042
|
+
function onResizeCallback(element) {
|
|
2043
|
+
var listeners = eventListenerHandler.get(element);
|
|
2044
|
+
forEach(listeners, (function(listener) {
|
|
2045
|
+
listener(element);
|
|
2046
|
+
}));
|
|
2047
|
+
}
|
|
2048
|
+
function addListener(callOnAdd, element, listener) {
|
|
2049
|
+
eventListenerHandler.add(element, listener), callOnAdd && listener(element);
|
|
2175
2050
|
}
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
getState(element).container = container, function(element) {
|
|
2182
|
-
element.className += " erd_scroll_detection_container_animation_active";
|
|
2183
|
-
}(container), element.appendChild(container);
|
|
2184
|
-
var onAnimationStart = function() {
|
|
2185
|
-
getState(element).onRendered && getState(element).onRendered();
|
|
2186
|
-
};
|
|
2187
|
-
addEvent(container, "animationstart", onAnimationStart), getState(element).onAnimationStart = onAnimationStart;
|
|
2188
|
-
}
|
|
2189
|
-
return container;
|
|
2051
|
+
if (listener || (listener = elements, elements = options, options = {}), !elements) throw new Error("At least one element required.");
|
|
2052
|
+
if (!listener) throw new Error("Listener required.");
|
|
2053
|
+
if (isElement(elements)) elements = [ elements ]; else {
|
|
2054
|
+
if (!isCollection(elements)) return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
|
|
2055
|
+
elements = toArray(elements);
|
|
2190
2056
|
}
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2057
|
+
var elementsReady = 0, callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd), onReadyCallback = getOption(options, "onReady", (function() {})), debug = getOption(options, "debug", globalOptions.debug);
|
|
2058
|
+
forEach(elements, (function(element) {
|
|
2059
|
+
stateHandler.getState(element) || (stateHandler.initState(element), idHandler.set(element));
|
|
2060
|
+
var id = idHandler.get(element);
|
|
2061
|
+
if (debug && reporter.log("Attaching listener to element", id, element), !elementUtils.isDetectable(element)) return debug && reporter.log(id, "Not detectable."),
|
|
2062
|
+
elementUtils.isBusy(element) ? (debug && reporter.log(id, "System busy making it detectable"),
|
|
2063
|
+
addListener(callOnAdd, element, listener), onReadyCallbacks[id] = onReadyCallbacks[id] || [],
|
|
2064
|
+
void onReadyCallbacks[id].push((function() {
|
|
2065
|
+
++elementsReady === elements.length && onReadyCallback();
|
|
2066
|
+
}))) : (debug && reporter.log(id, "Making detectable..."), elementUtils.markBusy(element, !0),
|
|
2067
|
+
detectionStrategy.makeDetectable({
|
|
2068
|
+
debug: debug,
|
|
2069
|
+
important: importantCssRules
|
|
2070
|
+
}, element, (function(element) {
|
|
2071
|
+
if (debug && reporter.log(id, "onElementDetectable"), stateHandler.getState(element)) {
|
|
2072
|
+
elementUtils.markAsDetectable(element), elementUtils.markBusy(element, !1), detectionStrategy.addListener(element, onResizeCallback),
|
|
2073
|
+
addListener(callOnAdd, element, listener);
|
|
2074
|
+
var state = stateHandler.getState(element);
|
|
2075
|
+
if (state && state.startSize) {
|
|
2076
|
+
var width = element.offsetWidth, height = element.offsetHeight;
|
|
2077
|
+
state.startSize.width === width && state.startSize.height === height || onResizeCallback(element);
|
|
2206
2078
|
}
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
function onShrinkScroll() {
|
|
2225
|
-
var state = getState(element);
|
|
2226
|
-
state && state.onShrink ? state.onShrink() : debug("Aborting shrink scroll handler: element has been uninstalled");
|
|
2227
|
-
}
|
|
2079
|
+
onReadyCallbacks[id] && forEach(onReadyCallbacks[id], (function(callback) {
|
|
2080
|
+
callback();
|
|
2081
|
+
}));
|
|
2082
|
+
} else debug && reporter.log(id, "Element uninstalled before being detectable.");
|
|
2083
|
+
delete onReadyCallbacks[id], ++elementsReady === elements.length && onReadyCallback();
|
|
2084
|
+
})));
|
|
2085
|
+
debug && reporter.log(id, "Already detecable, adding listener."), addListener(callOnAdd, element, listener),
|
|
2086
|
+
elementsReady++;
|
|
2087
|
+
})), elementsReady === elements.length && onReadyCallback();
|
|
2088
|
+
},
|
|
2089
|
+
removeListener: eventListenerHandler.removeListener,
|
|
2090
|
+
removeAllListeners: eventListenerHandler.removeAllListeners,
|
|
2091
|
+
uninstall: function(elements) {
|
|
2092
|
+
if (!elements) return reporter.error("At least one element is required.");
|
|
2093
|
+
if (isElement(elements)) elements = [ elements ]; else {
|
|
2094
|
+
if (!isCollection(elements)) return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
|
|
2095
|
+
elements = toArray(elements);
|
|
2228
2096
|
}
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2097
|
+
forEach(elements, (function(element) {
|
|
2098
|
+
eventListenerHandler.removeAllListeners(element), detectionStrategy.uninstall(element),
|
|
2099
|
+
stateHandler.cleanState(element);
|
|
2100
|
+
}));
|
|
2101
|
+
},
|
|
2102
|
+
initDocument: function(targetDocument) {
|
|
2103
|
+
detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);
|
|
2104
|
+
}
|
|
2105
|
+
};
|
|
2106
|
+
};
|
|
2107
|
+
function getOption(options, name, defaultValue) {
|
|
2108
|
+
var value = options[name];
|
|
2109
|
+
return null == value && void 0 !== defaultValue ? defaultValue : value;
|
|
2110
|
+
}
|
|
2111
|
+
var elementResizeDetectorMaker = getDefaultExportFromCjs(elementResizeDetector);
|
|
2112
|
+
const elementResize = (el, cb) => {
|
|
2113
|
+
const erd = elementResizeDetectorMaker();
|
|
2114
|
+
let timer = null;
|
|
2115
|
+
erd.listenTo(el, (() => {
|
|
2116
|
+
null !== timer && clearTimeout(timer), timer = setTimeout((() => {
|
|
2117
|
+
cb && cb(el), clearTimeout(timer);
|
|
2118
|
+
}), 200);
|
|
2119
|
+
})), vue.onUnmounted((() => {
|
|
2120
|
+
erd.removeListener(el, (() => {}));
|
|
2121
|
+
}));
|
|
2122
|
+
}, deepClone = source => {
|
|
2123
|
+
if (null == source) return source;
|
|
2124
|
+
let target;
|
|
2125
|
+
if ("object" == typeof source) {
|
|
2126
|
+
target = Array.isArray(source) ? [] : {};
|
|
2127
|
+
for (let key in source) "object" == typeof source[key] ? target[key] = deepClone(source[key]) : target[key] = source[key];
|
|
2128
|
+
} else target = source;
|
|
2129
|
+
return target;
|
|
2130
|
+
}, arrayObjNoRepeat = (arr, property) => {
|
|
2131
|
+
const result = [], uniqueMap = new Map;
|
|
2132
|
+
for (const item of arr) {
|
|
2133
|
+
const key = item[property];
|
|
2134
|
+
uniqueMap.has(key) || (uniqueMap.set(key, !0), result.push(item));
|
|
2135
|
+
}
|
|
2136
|
+
return result;
|
|
2137
|
+
}, isValueExist = value => null != value && ("string" == typeof value ? "" !== value.trim() : !1 !== value), valueExist = (...arg) => {
|
|
2138
|
+
let exist = null;
|
|
2139
|
+
for (let i = 0; i < arg.length; i++) {
|
|
2140
|
+
const val = arg[i];
|
|
2141
|
+
if (null != val) {
|
|
2142
|
+
exist = val;
|
|
2143
|
+
break;
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
return exist;
|
|
2147
|
+
}, shareObjectProperty = (target, source, key) => (Object.defineProperty(target, key, {
|
|
2148
|
+
get: () => source[key]
|
|
2149
|
+
}), {
|
|
2150
|
+
target: target,
|
|
2151
|
+
source: source
|
|
2152
|
+
});
|
|
2153
|
+
var LayoutSetting = vue.defineComponent({
|
|
2154
|
+
setup() {
|
|
2155
|
+
const config = vue.inject("options", {});
|
|
2156
|
+
return isValueExist(config.setting.headerBarFontActiveColor) || (config.setting.headerBarFontActiveColor = config.setting.themeColor),
|
|
2157
|
+
{
|
|
2158
|
+
config: config
|
|
2159
|
+
};
|
|
2160
|
+
},
|
|
2161
|
+
render() {
|
|
2162
|
+
const _slots = vue.inject("__slots__", {}), _ns = vue.inject("__ns__", {}), _config = this.config, _updateOptions = vue.inject("updateOptions", null), settingConfig = vue.reactive({
|
|
2163
|
+
..._config.setting
|
|
2164
|
+
}), _changeUpdateOptions = () => {
|
|
2165
|
+
const options = {
|
|
2166
|
+
..._config,
|
|
2167
|
+
setting: {
|
|
2168
|
+
...settingConfig
|
|
2265
2169
|
}
|
|
2266
|
-
|
|
2267
|
-
|
|
2170
|
+
};
|
|
2171
|
+
_updateOptions(options);
|
|
2172
|
+
}, _onChangeThemeColor = color => {
|
|
2173
|
+
if (!color) return elementPlus.ElMessage({
|
|
2174
|
+
type: "warning",
|
|
2175
|
+
message: "主题颜色不能为空"
|
|
2176
|
+
}), !1;
|
|
2177
|
+
settingConfig.themeColor = color, nextUseCssTheme("--el-color-primary", color),
|
|
2178
|
+
_changeUpdateOptions();
|
|
2179
|
+
}, _onChangeSwitchDark = () => {
|
|
2180
|
+
const body = document.documentElement;
|
|
2181
|
+
settingConfig.isDark ? body.setAttribute("data-theme", "dark") : body.setAttribute("data-theme", ""),
|
|
2182
|
+
_changeUpdateOptions();
|
|
2183
|
+
}, _onChangeColor = (color, key, cssvar) => {
|
|
2184
|
+
settingConfig[key] = color, nextUseCssVar(cssvar, color), _changeUpdateOptions();
|
|
2185
|
+
}, layouts = [ {
|
|
2186
|
+
type: "defaults",
|
|
2187
|
+
text: "默认"
|
|
2188
|
+
}, {
|
|
2189
|
+
type: "classic",
|
|
2190
|
+
text: "经典"
|
|
2191
|
+
}, {
|
|
2192
|
+
type: "transverse",
|
|
2193
|
+
text: "横向"
|
|
2194
|
+
}, {
|
|
2195
|
+
type: "columns",
|
|
2196
|
+
text: "分栏"
|
|
2197
|
+
}, {
|
|
2198
|
+
type: "composite",
|
|
2199
|
+
text: "综合"
|
|
2200
|
+
} ];
|
|
2201
|
+
return vue.createVNode(elementPlus.ElScrollbar, null, {
|
|
2202
|
+
default: () => [ vue.createVNode(elementPlus.ElDivider, {
|
|
2203
|
+
"border-style": "dashed"
|
|
2204
|
+
}, {
|
|
2205
|
+
default: () => [ vue.createTextVNode("全局主题") ]
|
|
2206
|
+
}), vue.createVNode("div", {
|
|
2207
|
+
class: _ns.b("config-bar-item")
|
|
2208
|
+
}, [ vue.createVNode("span", {
|
|
2209
|
+
class: _ns.be("config-bar-item", "label")
|
|
2210
|
+
}, [ vue.createTextVNode("主题颜色") ]), vue.createVNode("div", {
|
|
2211
|
+
class: _ns.be("config-bar-item", "value")
|
|
2212
|
+
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
2213
|
+
modelValue: settingConfig.themeColor,
|
|
2214
|
+
"onUpdate:modelValue": $event => settingConfig.themeColor = $event,
|
|
2215
|
+
predefine: [ "#409eff", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
2216
|
+
"show-alpha": !0,
|
|
2217
|
+
onChange: _onChangeThemeColor
|
|
2218
|
+
}, null) ]) ]), vue.createVNode("div", {
|
|
2219
|
+
class: _ns.b("config-bar-item")
|
|
2220
|
+
}, [ vue.createVNode("span", {
|
|
2221
|
+
class: _ns.be("config-bar-item", "label")
|
|
2222
|
+
}, [ vue.createTextVNode("暗黑模式") ]), vue.createVNode("div", {
|
|
2223
|
+
class: _ns.be("config-bar-item", "value")
|
|
2224
|
+
}, [ vue.createVNode(elementPlus.ElSwitch, {
|
|
2225
|
+
modelValue: settingConfig.isDark,
|
|
2226
|
+
"onUpdate:modelValue": $event => settingConfig.isDark = $event,
|
|
2227
|
+
"inline-prompt": !0,
|
|
2228
|
+
size: "large",
|
|
2229
|
+
"active-icon": moon_night_default,
|
|
2230
|
+
"inactive-icon": sunny_default,
|
|
2231
|
+
"active-color": "#1f1f1f",
|
|
2232
|
+
"inactive-color": "#dcdfe6",
|
|
2233
|
+
onChange: _onChangeSwitchDark
|
|
2234
|
+
}, null) ]) ]), vue.createVNode("div", {
|
|
2235
|
+
class: _ns.b("config-bar-item")
|
|
2236
|
+
}, [ vue.createVNode("span", {
|
|
2237
|
+
class: _ns.be("config-bar-item", "label")
|
|
2238
|
+
}, [ vue.createTextVNode("顶栏背景颜色") ]), vue.createVNode("div", {
|
|
2239
|
+
class: _ns.be("config-bar-item", "value")
|
|
2240
|
+
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
2241
|
+
modelValue: settingConfig.headerBarColor,
|
|
2242
|
+
"onUpdate:modelValue": $event => settingConfig.headerBarColor = $event,
|
|
2243
|
+
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
2244
|
+
"show-alpha": !0,
|
|
2245
|
+
onChange: color => _onChangeColor(color, "headerBarColor", "--next-layout-bg-color")
|
|
2246
|
+
}, null) ]) ]), vue.createVNode("div", {
|
|
2247
|
+
class: _ns.b("config-bar-item")
|
|
2248
|
+
}, [ vue.createVNode("span", {
|
|
2249
|
+
class: _ns.be("config-bar-item", "label")
|
|
2250
|
+
}, [ vue.createTextVNode("顶栏字体颜色") ]), vue.createVNode("div", {
|
|
2251
|
+
class: _ns.be("config-bar-item", "value")
|
|
2252
|
+
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
2253
|
+
modelValue: settingConfig.headerBarFontColor,
|
|
2254
|
+
"onUpdate:modelValue": $event => settingConfig.headerBarFontColor = $event,
|
|
2255
|
+
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
2256
|
+
"show-alpha": !0,
|
|
2257
|
+
onChange: color => _onChangeColor(color, "headerBarFontColor", "--next-layout-font-color")
|
|
2258
|
+
}, null) ]) ]), vue.createVNode("div", {
|
|
2259
|
+
class: _ns.b("config-bar-item")
|
|
2260
|
+
}, [ vue.createVNode("span", {
|
|
2261
|
+
class: _ns.be("config-bar-item", "label")
|
|
2262
|
+
}, [ vue.createTextVNode("顶栏激活字体颜色") ]), vue.createVNode("div", {
|
|
2263
|
+
class: _ns.be("config-bar-item", "value")
|
|
2264
|
+
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
2265
|
+
modelValue: settingConfig.headerBarFontActiveColor,
|
|
2266
|
+
"onUpdate:modelValue": $event => settingConfig.headerBarFontActiveColor = $event,
|
|
2267
|
+
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
2268
|
+
"show-alpha": !0,
|
|
2269
|
+
onChange: color => _onChangeColor(color, "headerBarFontActiveColor", "--next-layout-active-color")
|
|
2270
|
+
}, null) ]) ]), vue.createVNode("div", {
|
|
2271
|
+
class: _ns.b("config-bar-item")
|
|
2272
|
+
}, [ vue.createVNode("span", {
|
|
2273
|
+
class: _ns.be("config-bar-item", "label")
|
|
2274
|
+
}, [ vue.createTextVNode("顶栏背景渐变") ]), vue.createVNode("div", {
|
|
2275
|
+
class: _ns.be("config-bar-item", "value")
|
|
2276
|
+
}, [ vue.createVNode(vue.resolveComponent("el-switch"), {
|
|
2277
|
+
modelValue: settingConfig.isHeaderBarColorGradual,
|
|
2278
|
+
"onUpdate:modelValue": $event => settingConfig.isHeaderBarColorGradual = $event,
|
|
2279
|
+
onChange: _changeUpdateOptions
|
|
2280
|
+
}, null) ]) ]), vue.createVNode(elementPlus.ElDivider, {
|
|
2281
|
+
"border-style": "dashed"
|
|
2282
|
+
}, {
|
|
2283
|
+
default: () => [ vue.createTextVNode("布局方式") ]
|
|
2284
|
+
}), vue.createVNode("ul", {
|
|
2285
|
+
class: _ns.b("config-bar-layout")
|
|
2286
|
+
}, [ layouts.map((item => vue.createVNode("li", {
|
|
2287
|
+
class: [ _ns.be("config-bar-layout", item.type), _ns.is("active", settingConfig.layout === item.type) ],
|
|
2288
|
+
onClick: event => ((event, layout) => {
|
|
2289
|
+
event.stopPropagation(), settingConfig.layout = layout.type, _changeUpdateOptions();
|
|
2290
|
+
})(event, item)
|
|
2291
|
+
}, [ vue.createVNode("div", {
|
|
2292
|
+
class: "layout-wrap"
|
|
2293
|
+
}, [ vue.createVNode("div", {
|
|
2294
|
+
class: "layout-box"
|
|
2295
|
+
}, [ vue.createVNode("p", {
|
|
2296
|
+
class: "layout-text"
|
|
2297
|
+
}, [ item.text ]) ]) ]), vue.createVNode("aside", null, null) ]))) ]), vue.createVNode("div", {
|
|
2298
|
+
class: _ns.b("config-bar-item"),
|
|
2299
|
+
style: {
|
|
2300
|
+
"margin-top": "20px"
|
|
2268
2301
|
}
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
updateChildSizes(element, style.width, style.height);
|
|
2280
|
-
} else debug("Aborting because element has been uninstalled");
|
|
2281
|
-
}
|
|
2282
|
-
function finalizeDomMutation() {
|
|
2283
|
-
if (debug("finalizeDomMutation invoked."), getState(element)) {
|
|
2284
|
-
var style = getState(element).style;
|
|
2285
|
-
storeCurrentSize(element, style.width, style.height), positionScrollbars(element, style.width, style.height);
|
|
2286
|
-
} else debug("Aborting because element has been uninstalled");
|
|
2287
|
-
}
|
|
2288
|
-
function ready() {
|
|
2289
|
-
callback(element);
|
|
2290
|
-
}
|
|
2291
|
-
function install() {
|
|
2292
|
-
var style;
|
|
2293
|
-
debug("Installing..."), getState(element).listeners = [], style = getStyle(), getState(element).startSize = {
|
|
2294
|
-
width: style.width,
|
|
2295
|
-
height: style.height
|
|
2296
|
-
}, debug("Element start size", getState(element).startSize), batchProcessor.add(0, storeStyle),
|
|
2297
|
-
batchProcessor.add(1, injectScrollElements), batchProcessor.add(2, registerListenersAndPositionElements),
|
|
2298
|
-
batchProcessor.add(3, finalizeDomMutation), batchProcessor.add(4, ready);
|
|
2299
|
-
}
|
|
2300
|
-
callback || (callback = element, element = options, options = null), options = options || {},
|
|
2301
|
-
debug("Making detectable..."), !function(element) {
|
|
2302
|
-
return !function(element) {
|
|
2303
|
-
var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element);
|
|
2304
|
-
return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot;
|
|
2305
|
-
}(element) || null === window.getComputedStyle(element);
|
|
2306
|
-
}(element) ? install() : (debug("Element is detached"), injectContainerElement(),
|
|
2307
|
-
debug("Waiting until element is attached..."), getState(element).onRendered = function() {
|
|
2308
|
-
debug("Element is now attached"), install();
|
|
2309
|
-
});
|
|
2310
|
-
},
|
|
2311
|
-
addListener: function(element, listener) {
|
|
2312
|
-
if (!getState(element).listeners.push) throw new Error("Cannot add listener to an element that is not detectable.");
|
|
2313
|
-
getState(element).listeners.push(listener);
|
|
2314
|
-
},
|
|
2315
|
-
uninstall: function(element) {
|
|
2316
|
-
var state = getState(element);
|
|
2317
|
-
state && (state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll),
|
|
2318
|
-
state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll),
|
|
2319
|
-
state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart),
|
|
2320
|
-
state.container && element.removeChild(state.container));
|
|
2321
|
-
},
|
|
2322
|
-
initDocument: initDocument
|
|
2323
|
-
};
|
|
2324
|
-
};
|
|
2325
|
-
function isCollection(obj) {
|
|
2326
|
-
return Array.isArray(obj) || void 0 !== obj.length;
|
|
2327
|
-
}
|
|
2328
|
-
function toArray(collection) {
|
|
2329
|
-
if (Array.isArray(collection)) return collection;
|
|
2330
|
-
var array = [];
|
|
2331
|
-
return forEach(collection, (function(obj) {
|
|
2332
|
-
array.push(obj);
|
|
2333
|
-
})), array;
|
|
2334
|
-
}
|
|
2335
|
-
function isElement(obj) {
|
|
2336
|
-
return obj && 1 === obj.nodeType;
|
|
2337
|
-
}
|
|
2338
|
-
var elementResizeDetector = function(options) {
|
|
2339
|
-
var idHandler;
|
|
2340
|
-
if ((options = options || {}).idHandler) idHandler = {
|
|
2341
|
-
get: function(element) {
|
|
2342
|
-
return options.idHandler.get(element, !0);
|
|
2343
|
-
},
|
|
2344
|
-
set: options.idHandler.set
|
|
2345
|
-
}; else {
|
|
2346
|
-
var idGenerator = idGeneratorMaker(), defaultIdHandler = idHandlerMaker({
|
|
2347
|
-
idGenerator: idGenerator,
|
|
2348
|
-
stateHandler: stateHandler
|
|
2302
|
+
}, [ vue.createVNode("span", {
|
|
2303
|
+
class: _ns.be("config-bar-item", "label")
|
|
2304
|
+
}, [ vue.createTextVNode("是否显示标签栏") ]), vue.createVNode("div", {
|
|
2305
|
+
class: _ns.be("config-bar-item", "value")
|
|
2306
|
+
}, [ vue.createVNode(elementPlus.ElSwitch, {
|
|
2307
|
+
modelValue: _config.showTabs,
|
|
2308
|
+
"onUpdate:modelValue": $event => _config.showTabs = $event
|
|
2309
|
+
}, null) ]) ]), _slots.setting?.({
|
|
2310
|
+
config: settingConfig
|
|
2311
|
+
}) ]
|
|
2349
2312
|
});
|
|
2350
|
-
idHandler = defaultIdHandler;
|
|
2351
|
-
}
|
|
2352
|
-
var reporter = options.reporter;
|
|
2353
|
-
reporter || (reporter = reporterMaker(!1 === reporter));
|
|
2354
|
-
var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({
|
|
2355
|
-
reporter: reporter
|
|
2356
|
-
})), globalOptions = {};
|
|
2357
|
-
globalOptions.callOnAdd = !!getOption(options, "callOnAdd", !0), globalOptions.debug = !!getOption(options, "debug", !1);
|
|
2358
|
-
var detectionStrategy, eventListenerHandler = listenerHandlerMaker(idHandler), elementUtils = elementUtilsMaker({
|
|
2359
|
-
stateHandler: stateHandler
|
|
2360
|
-
}), desiredStrategy = getOption(options, "strategy", "object"), importantCssRules = getOption(options, "important", !1), strategyOptions = {
|
|
2361
|
-
reporter: reporter,
|
|
2362
|
-
batchProcessor: batchProcessor,
|
|
2363
|
-
stateHandler: stateHandler,
|
|
2364
|
-
idHandler: idHandler,
|
|
2365
|
-
important: importantCssRules
|
|
2366
|
-
};
|
|
2367
|
-
if ("scroll" === desiredStrategy && (browserDetector.isLegacyOpera() ? (reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),
|
|
2368
|
-
desiredStrategy = "object") : browserDetector.isIE(9) && (reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),
|
|
2369
|
-
desiredStrategy = "object")), "scroll" === desiredStrategy) detectionStrategy = scrollStrategyMaker(strategyOptions); else {
|
|
2370
|
-
if ("object" !== desiredStrategy) throw new Error("Invalid strategy name: " + desiredStrategy);
|
|
2371
|
-
detectionStrategy = objectStrategyMaker(strategyOptions);
|
|
2372
2313
|
}
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2314
|
+
});
|
|
2315
|
+
var HeaderTools = vue.defineComponent({
|
|
2316
|
+
setup() {
|
|
2317
|
+
const locale = vue.inject(localeContextKey, vue.ref()), config = vue.inject("options", {}), {t: t} = useLocale(), {toggle: toggle, isFullscreen: isFullscreen} = core.useFullscreen(), language = vue.ref(vue.computed((() => config.language)).value), settingDrawer = vue.ref(!1);
|
|
2318
|
+
return {
|
|
2319
|
+
locale: locale,
|
|
2320
|
+
config: config,
|
|
2321
|
+
t: t,
|
|
2322
|
+
toggle: toggle,
|
|
2323
|
+
isFullscreen: isFullscreen,
|
|
2324
|
+
language: language,
|
|
2325
|
+
settingDrawer: settingDrawer
|
|
2326
|
+
};
|
|
2327
|
+
},
|
|
2328
|
+
render() {
|
|
2329
|
+
const _ns = vue.inject("__ns__", {}), _config = this.config, _emit = vue.inject("__emit__", {}), slots = this.$slots, _t = this.t, isFullscreen = this.isFullscreen, profile_url = _config.profile, _userDropdown = _config.userDropdown, _languageDropdown = _config.languageDropdown, _closeSettingDrawer = () => {
|
|
2330
|
+
this.settingDrawer = !1;
|
|
2331
|
+
};
|
|
2332
|
+
return vue.createVNode(vue.Fragment, null, [ vue.createVNode("ul", {
|
|
2333
|
+
class: _ns.b("header-tools")
|
|
2334
|
+
}, [ slots[slots_config_headerToolsPrefix]?.(), vue.createVNode("li", null, [ vue.createVNode(elementPlus.ElDropdown, {
|
|
2335
|
+
"show-timeout": 70,
|
|
2336
|
+
"hide-timeout": 50,
|
|
2337
|
+
trigger: "click",
|
|
2338
|
+
onCommand: command => {
|
|
2339
|
+
this.language = command, _emit("changeLanguage", command), _config.onChangeLanguage && _config.onChangeLanguage(command);
|
|
2381
2340
|
}
|
|
2382
|
-
|
|
2383
|
-
|
|
2341
|
+
}, {
|
|
2342
|
+
default: () => vue.createVNode("div", null, [ vue.createVNode(elementPlus.ElIcon, {
|
|
2343
|
+
size: 16
|
|
2344
|
+
}, {
|
|
2345
|
+
default: () => [ vue.createVNode("svg", {
|
|
2346
|
+
class: "icon",
|
|
2347
|
+
viewBox: "0 0 1070 1024",
|
|
2348
|
+
version: "1.1",
|
|
2349
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2350
|
+
"p-id": "1855",
|
|
2351
|
+
width: "128",
|
|
2352
|
+
height: "128"
|
|
2353
|
+
}, [ vue.createVNode("path", {
|
|
2354
|
+
d: "M232.58156522 358.13286957C244.86956522 394.4626087 265.17147826 425.984 293.48730435 453.76556522c24.04173913-26.17878261 42.2066087-58.23443478 53.96034782-95.63269565H232.58156522z",
|
|
2355
|
+
"p-id": "1856"
|
|
2356
|
+
}, null), vue.createVNode("path", {
|
|
2357
|
+
d: "M981.61530435 143.36h-448.77913044L507.19165217 6.05495652h-416.72347826c-45.94643478 0-83.34469565 37.39826087-83.34469565 83.34469565v708.42991305c0 45.94643478 37.39826087 83.34469565 83.34469565 83.34469565h379.85947826l-30.45286956 137.30504348h541.74052174c45.94643478 0 83.34469565-37.39826087 83.34469565-83.34469565V226.70469565c0-45.94643478-37.39826087-83.34469565-83.34469565-83.34469565zM415.83304348 564.35756522c-49.152-18.16486957-89.75582609-41.13808696-122.34573913-67.85113044-34.19269565 30.45286957-76.93356522 52.89182609-126.61982609 66.7826087l-17.09634783-28.31582609c48.61773913-12.82226087 89.22156522-32.05565217 121.2772174-59.30295652-33.12417391-33.65843478-56.0973913-72.65947826-68.91965218-117.00313044h-46.48069565v-32.05565217H276.92521739c-7.47965217-13.89078261-17.09634783-27.24730435-28.31582609-40.06956522l32.05565218-11.75373913c11.21947826 14.42504348 21.37043478 31.5213913 30.45286956 51.28904348h115.9346087v32.05565218h-46.48069565c-14.95930435 45.94643478-36.32973913 84.41321739-64.64556522 115.40034782 31.5213913 25.11026087 71.05669565 45.94643478 117.5373913 63.04278261l-17.63060869 27.78156522z m607.45460869 370.24278261c0 22.97321739-18.69913043 41.67234783-41.67234782 41.67234782H492.23234783l20.83617391-95.63269565h156.53843478l-89.22156522-497.39686957-0.53426087 2.67130435-3.73982608-19.76765217 1.06852174 0.53426087-32.58991305-181.64869565H982.14956522c22.97321739 0 41.67234783 18.69913043 41.67234782 41.67234782v707.89565218z",
|
|
2358
|
+
"p-id": "1857"
|
|
2359
|
+
}, null), vue.createVNode("path", {
|
|
2360
|
+
d: "M684.56626087 541.38434783h114.86608696v-30.45286957h-114.86608696V450.02573913h122.34573913v-30.45286956h-158.14121739v219.04695652h162.94956522V608.16695652h-127.15408696v-66.78260869z m239.88313043-65.71408696c-9.61669565 0-18.16486957 1.60278261-26.1787826 5.87686956-7.47965217 3.73982609-14.95930435 9.61669565-20.83617392 17.09634783V479.94434783h-34.72695652v158.67547826h34.72695652v-95.63269566c1.06852174-12.82226087 5.3426087-22.43895652 12.82226087-29.38434782 6.41113043-5.87686957 13.89078261-9.08243478 22.43895652-9.08243478 24.04173913 0 35.79547826 12.82226087 35.79547826 39.00104347v94.56417392h34.72695653v-97.76973913c1.06852174-43.27513043-19.2333913-64.64556522-58.76869566-64.64556522z",
|
|
2361
|
+
"p-id": "1858"
|
|
2362
|
+
}, null) ]) ]
|
|
2363
|
+
}) ]),
|
|
2364
|
+
dropdown: () => {
|
|
2365
|
+
let _slot;
|
|
2366
|
+
return vue.createVNode(elementPlus.ElDropdownMenu, null, "function" == typeof (s = _slot = _languageDropdown.map((item => vue.createVNode(elementPlus.ElDropdownItem, {
|
|
2367
|
+
command: item.value,
|
|
2368
|
+
disabled: this.language === item.value
|
|
2369
|
+
}, {
|
|
2370
|
+
default: () => [ item.label ]
|
|
2371
|
+
})))) || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? _slot : {
|
|
2372
|
+
default: () => [ _slot ]
|
|
2373
|
+
});
|
|
2374
|
+
var s;
|
|
2384
2375
|
}
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2376
|
+
}) ]), vue.createVNode("li", null, [ vue.createVNode("span", {
|
|
2377
|
+
style: {
|
|
2378
|
+
display: "inline-block",
|
|
2379
|
+
lineHeight: 1
|
|
2380
|
+
},
|
|
2381
|
+
onClick: this.toggle
|
|
2382
|
+
}, [ vue.createVNode(elementPlus.ElIcon, {
|
|
2383
|
+
size: 16
|
|
2384
|
+
}, {
|
|
2385
|
+
default: () => [ isFullscreen ? vue.createVNode("svg", {
|
|
2386
|
+
class: "icon",
|
|
2387
|
+
viewBox: "0 0 1024 1024",
|
|
2388
|
+
version: "1.1",
|
|
2389
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2390
|
+
"p-id": "2676",
|
|
2391
|
+
width: "128",
|
|
2392
|
+
height: "128"
|
|
2393
|
+
}, [ vue.createVNode("path", {
|
|
2394
|
+
d: "M749.248 704H864a32 32 0 1 0 0-64H672a32 32 0 0 0-32 32v192a32 32 0 1 0 64 0v-114.752l137.36 137.36a32 32 0 1 0 45.232-45.264L749.248 704zM320 749.248V864a32 32 0 1 0 64 0V672a32 32 0 0 0-32-32H160a32 32 0 1 0 0 64h114.752l-137.36 137.36a32 32 0 1 0 45.264 45.232L320 749.248zM749.248 320H864a32 32 0 1 1 0 64H672a32 32 0 0 1-32-32V160a32 32 0 1 1 64 0v114.752l137.36-137.36a32 32 0 1 1 45.232 45.264L749.248 320zM320 274.752V160a32 32 0 1 1 64 0v192a32 32 0 0 1-32 32H160a32 32 0 1 1 0-64h114.752l-137.36-137.36a32 32 0 1 1 45.264-45.232L320 274.752z",
|
|
2395
|
+
"p-id": "2677"
|
|
2396
|
+
}, null) ]) : vue.createVNode("svg", {
|
|
2397
|
+
class: "icon",
|
|
2398
|
+
viewBox: "0 0 1024 1024",
|
|
2399
|
+
version: "1.1",
|
|
2400
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2401
|
+
"p-id": "2522",
|
|
2402
|
+
width: "128",
|
|
2403
|
+
height: "128"
|
|
2404
|
+
}, [ vue.createVNode("path", {
|
|
2405
|
+
d: "M237.248 192H352a32 32 0 1 0 0-64H160a32 32 0 0 0-32 32v192a32 32 0 1 0 64 0v-114.752l137.36 137.36a32 32 0 1 0 45.232-45.264L237.248 192zM832 237.248V352a32 32 0 1 0 64 0V160a32 32 0 0 0-32-32H672a32 32 0 1 0 0 64h114.752l-137.36 137.36a32 32 0 1 0 45.264 45.232L832 237.248zM237.248 832H352a32 32 0 1 1 0 64H160a32 32 0 0 1-32-32V672a32 32 0 1 1 64 0v114.752l137.36-137.36a32 32 0 1 1 45.232 45.264L237.248 832zM832 786.752V672a32 32 0 1 1 64 0v192a32 32 0 0 1-32 32H672a32 32 0 1 1 0-64h114.752l-137.36-137.36a32 32 0 1 1 45.264-45.232L832 786.752z",
|
|
2406
|
+
"p-id": "2523"
|
|
2407
|
+
}, null) ]) ]
|
|
2408
|
+
}) ]) ]), slots[slots_config_headerToolsSuffix]?.(), vue.createVNode("li", null, [ vue.createVNode(elementPlus.ElDropdown, {
|
|
2409
|
+
"show-timeout": 70,
|
|
2410
|
+
"hide-timeout": 80,
|
|
2411
|
+
"popper-class": _ns.be("header-tools", "userDropdown"),
|
|
2412
|
+
onCommand: command => {
|
|
2413
|
+
_emit("changeUserDropdown", command), _config.onChangeUserDropdown && _config.onChangeUserDropdown(command);
|
|
2390
2414
|
}
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
},
|
|
2423
|
-
removeListener: eventListenerHandler.removeListener,
|
|
2424
|
-
removeAllListeners: eventListenerHandler.removeAllListeners,
|
|
2425
|
-
uninstall: function(elements) {
|
|
2426
|
-
if (!elements) return reporter.error("At least one element is required.");
|
|
2427
|
-
if (isElement(elements)) elements = [ elements ]; else {
|
|
2428
|
-
if (!isCollection(elements)) return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
|
|
2429
|
-
elements = toArray(elements);
|
|
2415
|
+
}, {
|
|
2416
|
+
default: () => vue.createVNode("span", {
|
|
2417
|
+
class: _ns.be("header-tools", "user")
|
|
2418
|
+
}, [ profile_url ? vue.createVNode("img", {
|
|
2419
|
+
class: "user-photo",
|
|
2420
|
+
src: profile_url
|
|
2421
|
+
}, null) : null, vue.createVNode("span", null, [ _config.userName ]), vue.createVNode(elementPlus.ElIcon, {
|
|
2422
|
+
class: "el-icon--right"
|
|
2423
|
+
}, {
|
|
2424
|
+
default: () => [ vue.createVNode(arrow_down_default, null, null) ]
|
|
2425
|
+
}) ]),
|
|
2426
|
+
dropdown: () => vue.createVNode(elementPlus.ElDropdownMenu, null, {
|
|
2427
|
+
default: () => [ _userDropdown?.map((item => vue.createVNode(elementPlus.ElDropdownItem, {
|
|
2428
|
+
command: item.value,
|
|
2429
|
+
divided: !!item.divided
|
|
2430
|
+
}, {
|
|
2431
|
+
default: () => [ item.svg ? vue.createVNode("span", {
|
|
2432
|
+
innerHTML: item.svg,
|
|
2433
|
+
class: "item-svg"
|
|
2434
|
+
}, null) : null, item.iconfont ? vue.createVNode("i", {
|
|
2435
|
+
class: item.iconfont
|
|
2436
|
+
}, null) : null, _t(item.label) ]
|
|
2437
|
+
}))) ]
|
|
2438
|
+
})
|
|
2439
|
+
}) ]), vue.createVNode("li", null, [ vue.createVNode("span", {
|
|
2440
|
+
style: {
|
|
2441
|
+
display: "inline-block",
|
|
2442
|
+
lineHeight: 1
|
|
2443
|
+
},
|
|
2444
|
+
onClick: () => {
|
|
2445
|
+
this.settingDrawer = !0;
|
|
2430
2446
|
}
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
},
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
cb && cb(el), clearTimeout(timer);
|
|
2452
|
-
}), 200);
|
|
2453
|
-
})), vue.onUnmounted((() => {
|
|
2454
|
-
erd.removeListener(el, (() => {}));
|
|
2455
|
-
}));
|
|
2456
|
-
}, deepClone = source => {
|
|
2457
|
-
if (null == source) return source;
|
|
2458
|
-
let target;
|
|
2459
|
-
if ("object" == typeof source) {
|
|
2460
|
-
target = Array.isArray(source) ? [] : {};
|
|
2461
|
-
for (let key in source) "object" == typeof source[key] ? target[key] = deepClone(source[key]) : target[key] = source[key];
|
|
2462
|
-
} else target = source;
|
|
2463
|
-
return target;
|
|
2464
|
-
}, arrayObjNoRepeat = (arr, property) => {
|
|
2465
|
-
const result = [], uniqueMap = new Map;
|
|
2466
|
-
for (const item of arr) {
|
|
2467
|
-
const key = item[property];
|
|
2468
|
-
uniqueMap.has(key) || (uniqueMap.set(key, !0), result.push(item));
|
|
2469
|
-
}
|
|
2470
|
-
return result;
|
|
2471
|
-
}, isValueExist = value => null != value && ("string" == typeof value ? "" !== value.trim() : !1 !== value), valueExist = (...arg) => {
|
|
2472
|
-
let exist = null;
|
|
2473
|
-
for (let i = 0; i < arg.length; i++) {
|
|
2474
|
-
const val = arg[i];
|
|
2475
|
-
if (null != val) {
|
|
2476
|
-
exist = val;
|
|
2477
|
-
break;
|
|
2478
|
-
}
|
|
2447
|
+
}, [ vue.createVNode(elementPlus.ElIcon, {
|
|
2448
|
+
size: 16
|
|
2449
|
+
}, {
|
|
2450
|
+
default: () => [ vue.createVNode(setting_default, null, null) ]
|
|
2451
|
+
}) ]) ]) ]), vue.createVNode(vue.Teleport, {
|
|
2452
|
+
to: "body"
|
|
2453
|
+
}, {
|
|
2454
|
+
default: () => [ vue.createVNode(elementPlus.ElDrawer, {
|
|
2455
|
+
modelValue: this.settingDrawer,
|
|
2456
|
+
"onUpdate:modelValue": $event => this.settingDrawer = $event,
|
|
2457
|
+
title: this.t("next.layout.systemSetting"),
|
|
2458
|
+
direction: "rtl",
|
|
2459
|
+
size: "380px",
|
|
2460
|
+
class: _ns.be("drawer", "setting"),
|
|
2461
|
+
"destroy-on-close": !0,
|
|
2462
|
+
beforeClose: _closeSettingDrawer
|
|
2463
|
+
}, {
|
|
2464
|
+
default: () => [ vue.createVNode(LayoutSetting, null, null) ]
|
|
2465
|
+
}) ]
|
|
2466
|
+
}) ]);
|
|
2479
2467
|
}
|
|
2480
|
-
return exist;
|
|
2481
|
-
}, shareObjectProperty = (target, source, key) => (Object.defineProperty(target, key, {
|
|
2482
|
-
get: () => source[key]
|
|
2483
|
-
}), {
|
|
2484
|
-
target: target,
|
|
2485
|
-
source: source
|
|
2486
2468
|
});
|
|
2487
|
-
|
|
2469
|
+
const {getLightColor: getLightColor$4} = useChangeColor();
|
|
2470
|
+
var Header$4 = vue.defineComponent({
|
|
2471
|
+
setup: () => ({
|
|
2472
|
+
ns: vue.inject("ns", {})
|
|
2473
|
+
}),
|
|
2474
|
+
render() {
|
|
2475
|
+
const slots = this.$slots, _ns = this.ns, _config = vue.inject("options", {}), headerStyle = vue.computed((() => {
|
|
2476
|
+
const {isHeaderBarColorGradual: isHeaderBarColorGradual, headerBarColor: color} = _config.setting;
|
|
2477
|
+
return isHeaderBarColorGradual ? {
|
|
2478
|
+
background: `linear-gradient(to bottom , ${color}, ${getLightColor$4(color, .5)})`
|
|
2479
|
+
} : "";
|
|
2480
|
+
})), __slots_header_tools = {};
|
|
2481
|
+
return slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2482
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]()),
|
|
2483
|
+
vue.createVNode("header", {
|
|
2484
|
+
class: _ns.b("header"),
|
|
2485
|
+
style: headerStyle.value
|
|
2486
|
+
}, [ vue.createVNode(LogoView, null, null), vue.createVNode("div", {
|
|
2487
|
+
class: _ns.bf("header", "right")
|
|
2488
|
+
}, [ vue.createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
2489
|
+
default: () => [ __slots_header_tools ]
|
|
2490
|
+
})) ]) ]);
|
|
2491
|
+
var s;
|
|
2492
|
+
}
|
|
2493
|
+
}), MenuItemTitle = vue.defineComponent({
|
|
2488
2494
|
props: {
|
|
2489
2495
|
meta: {
|
|
2490
2496
|
type: Object,
|
|
@@ -3245,20 +3251,31 @@
|
|
|
3245
3251
|
padding: padding + "px"
|
|
3246
3252
|
}), style;
|
|
3247
3253
|
}));
|
|
3248
|
-
return () =>
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3254
|
+
return () => (() => {
|
|
3255
|
+
if (props.scrollbar) {
|
|
3256
|
+
const scrollStyle = {
|
|
3257
|
+
"--next-container-padding": styles.value.padding
|
|
3258
|
+
};
|
|
3259
|
+
return vue.createVNode(elementPlus.ElScrollbar, {
|
|
3260
|
+
class: [ ns$e.b(), props.className ],
|
|
3261
|
+
style: {
|
|
3262
|
+
...scrollStyle,
|
|
3263
|
+
...props.style
|
|
3264
|
+
}
|
|
3265
|
+
}, {
|
|
3266
|
+
default: () => [ slots.default?.() ]
|
|
3267
|
+
});
|
|
3258
3268
|
}
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3269
|
+
return vue.createVNode("div", {
|
|
3270
|
+
class: [ ns$e.b(), props.className ],
|
|
3271
|
+
style: {
|
|
3272
|
+
...styles.value,
|
|
3273
|
+
...props.style
|
|
3274
|
+
}
|
|
3275
|
+
}, [ props.card ? vue.createVNode("div", {
|
|
3276
|
+
class: ns$e.b("card")
|
|
3277
|
+
}, [ slots.default?.() ]) : slots.default?.() ]);
|
|
3278
|
+
})();
|
|
3262
3279
|
}
|
|
3263
3280
|
}));
|
|
3264
3281
|
function isEqual(value, other) {
|
|
@@ -3968,11 +3985,19 @@
|
|
|
3968
3985
|
});
|
|
3969
3986
|
var s;
|
|
3970
3987
|
})) ]);
|
|
3971
|
-
if (slots[columnSlotName(_prop)])
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3988
|
+
if (slots[columnSlotName(_prop)]) {
|
|
3989
|
+
const btnCfg = {
|
|
3990
|
+
text: options.operationsBtnText,
|
|
3991
|
+
plain: options.operationsBtnPlain,
|
|
3992
|
+
size: options.operationsBtnSize
|
|
3993
|
+
};
|
|
3994
|
+
return slots[columnSlotName(_prop)]({
|
|
3995
|
+
row: row,
|
|
3996
|
+
index: $index,
|
|
3997
|
+
column: columnOption,
|
|
3998
|
+
btn: btnCfg
|
|
3999
|
+
});
|
|
4000
|
+
}
|
|
3976
4001
|
if (columnOption.dicData?.length > 0) {
|
|
3977
4002
|
const loopDicData = list => {
|
|
3978
4003
|
const temp = [];
|
|
@@ -5211,10 +5236,10 @@
|
|
|
5211
5236
|
}, null);
|
|
5212
5237
|
if ("inputTableSelect" === col.type) {
|
|
5213
5238
|
const _slots = {};
|
|
5214
|
-
for (const key in col.tableSelect.slots) _slots[key] = () => col.tableSelect.slots[key]?.({
|
|
5239
|
+
for (const key in col.tableSelect.slots) _slots[key] = (...arg) => col.tableSelect.slots[key]?.({
|
|
5215
5240
|
column: col,
|
|
5216
5241
|
formParams: formParams
|
|
5217
|
-
});
|
|
5242
|
+
}, ...arg);
|
|
5218
5243
|
return vue.createVNode(InputTableSelect, {
|
|
5219
5244
|
modelValue: formParams[col.prop],
|
|
5220
5245
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
@@ -5634,7 +5659,10 @@
|
|
|
5634
5659
|
updateColumns: ops => {
|
|
5635
5660
|
_updateColumnsAll(ops);
|
|
5636
5661
|
},
|
|
5637
|
-
getSearchFormParams: () => _searchFormParams.value
|
|
5662
|
+
getSearchFormParams: () => _searchFormParams.value,
|
|
5663
|
+
reloadData: () => {
|
|
5664
|
+
onClickRefresh();
|
|
5665
|
+
}
|
|
5638
5666
|
});
|
|
5639
5667
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
5640
5668
|
ref: crudTableRef,
|
|
@@ -8288,16 +8316,19 @@
|
|
|
8288
8316
|
}));
|
|
8289
8317
|
}
|
|
8290
8318
|
});
|
|
8291
|
-
}, install = function(app) {
|
|
8292
|
-
Object.keys(components).forEach((key => {
|
|
8319
|
+
}, configProviderContextKey = Symbol("configProviderContextKey"), install = function(app, options) {
|
|
8320
|
+
if (Object.keys(components).forEach((key => {
|
|
8293
8321
|
const component = components[key];
|
|
8294
8322
|
app.component(component.name, component);
|
|
8295
8323
|
})), (app => {
|
|
8296
8324
|
zoomDialog(app);
|
|
8297
|
-
})(app)
|
|
8325
|
+
})(app), options) {
|
|
8326
|
+
const inSetup = !!vue.getCurrentInstance();
|
|
8327
|
+
(app?.provide ?? (inSetup ? vue.provide : void 0))(configProviderContextKey, vue.computed((() => options)));
|
|
8328
|
+
}
|
|
8298
8329
|
};
|
|
8299
8330
|
var index = {
|
|
8300
|
-
version: "0.5.
|
|
8331
|
+
version: "0.5.9",
|
|
8301
8332
|
install: install
|
|
8302
8333
|
};
|
|
8303
8334
|
exports.NextCarousel = NextCarousel, exports.NextContainer = NextContainer, exports.NextCrudTable = NextCrudTable,
|
|
@@ -8345,7 +8376,7 @@
|
|
|
8345
8376
|
}), exports.useGetDerivedNamespace = useGetDerivedNamespace, exports.useLanguage = (locale, lang) => {
|
|
8346
8377
|
const localeRef = vue.isRef(locale) ? locale : vue.ref(locale), nextLang = localeLang[lang] || localeLang["zh-cn"];
|
|
8347
8378
|
localeRef.value.name = lang, localeRef.value.next = nextLang.next;
|
|
8348
|
-
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.5.
|
|
8379
|
+
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.5.9",
|
|
8349
8380
|
Object.defineProperty(exports, "__esModule", {
|
|
8350
8381
|
value: !0
|
|
8351
8382
|
});
|