next-element-vue 0.5.8 → 0.5.10
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.d.ts +1 -1
- package/dist/index.js +546 -525
- 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 +705 -684
- package/dist/index.umd.min.d.ts +1 -1
- package/dist/index.umd.min.js +3 -3
- package/dist/packages/components/form/src/widgets/upload-image.d.ts +2 -0
- 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 +3 -3
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.10 v
|
|
6
|
+
* 发布日期:2025-04-30
|
|
7
7
|
* 地 址:https://www.npmjs.com/package/next-element-vue
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1485,342 +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
|
-
});
|
|
1494
|
-
settingConfig.headerBarFontActiveColor || (settingConfig.headerBarFontActiveColor = settingConfig.themeColor);
|
|
1495
|
-
const _changeUpdateOptions = () => {
|
|
1496
|
-
const options = {
|
|
1497
|
-
..._config,
|
|
1498
|
-
setting: {
|
|
1499
|
-
...settingConfig
|
|
1500
|
-
}
|
|
1501
|
-
};
|
|
1502
|
-
_updateOptions(options);
|
|
1503
|
-
}, _onChangeThemeColor = color => {
|
|
1504
|
-
if (!color) return elementPlus.ElMessage({
|
|
1505
|
-
type: "warning",
|
|
1506
|
-
message: "主题颜色不能为空"
|
|
1507
|
-
}), !1;
|
|
1508
|
-
settingConfig.themeColor = color, nextUseCssTheme("--el-color-primary", color),
|
|
1509
|
-
_changeUpdateOptions();
|
|
1510
|
-
}, _onChangeSwitchDark = () => {
|
|
1511
|
-
const body = document.documentElement;
|
|
1512
|
-
settingConfig.isDark ? body.setAttribute("data-theme", "dark") : body.setAttribute("data-theme", ""),
|
|
1513
|
-
_changeUpdateOptions();
|
|
1514
|
-
}, _onChangeColor = (color, key, cssvar) => {
|
|
1515
|
-
settingConfig[key] = color, nextUseCssVar(cssvar, color), _changeUpdateOptions();
|
|
1516
|
-
}, layouts = [ {
|
|
1517
|
-
type: "defaults",
|
|
1518
|
-
text: "默认"
|
|
1519
|
-
}, {
|
|
1520
|
-
type: "classic",
|
|
1521
|
-
text: "经典"
|
|
1522
|
-
}, {
|
|
1523
|
-
type: "transverse",
|
|
1524
|
-
text: "横向"
|
|
1525
|
-
}, {
|
|
1526
|
-
type: "columns",
|
|
1527
|
-
text: "分栏"
|
|
1528
|
-
}, {
|
|
1529
|
-
type: "composite",
|
|
1530
|
-
text: "综合"
|
|
1531
|
-
} ];
|
|
1532
|
-
return vue.createVNode(elementPlus.ElScrollbar, null, {
|
|
1533
|
-
default: () => [ vue.createVNode(elementPlus.ElDivider, {
|
|
1534
|
-
"border-style": "dashed"
|
|
1535
|
-
}, {
|
|
1536
|
-
default: () => [ vue.createTextVNode("全局主题") ]
|
|
1537
|
-
}), vue.createVNode("div", {
|
|
1538
|
-
class: _ns.b("config-bar-item")
|
|
1539
|
-
}, [ vue.createVNode("span", {
|
|
1540
|
-
class: _ns.be("config-bar-item", "label")
|
|
1541
|
-
}, [ vue.createTextVNode("主题颜色") ]), vue.createVNode("div", {
|
|
1542
|
-
class: _ns.be("config-bar-item", "value")
|
|
1543
|
-
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
1544
|
-
modelValue: settingConfig.themeColor,
|
|
1545
|
-
"onUpdate:modelValue": $event => settingConfig.themeColor = $event,
|
|
1546
|
-
predefine: [ "#409eff", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1547
|
-
"show-alpha": !0,
|
|
1548
|
-
onChange: _onChangeThemeColor
|
|
1549
|
-
}, null) ]) ]), vue.createVNode("div", {
|
|
1550
|
-
class: _ns.b("config-bar-item")
|
|
1551
|
-
}, [ vue.createVNode("span", {
|
|
1552
|
-
class: _ns.be("config-bar-item", "label")
|
|
1553
|
-
}, [ vue.createTextVNode("暗黑模式") ]), vue.createVNode("div", {
|
|
1554
|
-
class: _ns.be("config-bar-item", "value")
|
|
1555
|
-
}, [ vue.createVNode(elementPlus.ElSwitch, {
|
|
1556
|
-
modelValue: settingConfig.isDark,
|
|
1557
|
-
"onUpdate:modelValue": $event => settingConfig.isDark = $event,
|
|
1558
|
-
"inline-prompt": !0,
|
|
1559
|
-
size: "large",
|
|
1560
|
-
"active-icon": moon_night_default,
|
|
1561
|
-
"inactive-icon": sunny_default,
|
|
1562
|
-
"active-color": "#1f1f1f",
|
|
1563
|
-
"inactive-color": "#dcdfe6",
|
|
1564
|
-
onChange: _onChangeSwitchDark
|
|
1565
|
-
}, null) ]) ]), vue.createVNode("div", {
|
|
1566
|
-
class: _ns.b("config-bar-item")
|
|
1567
|
-
}, [ vue.createVNode("span", {
|
|
1568
|
-
class: _ns.be("config-bar-item", "label")
|
|
1569
|
-
}, [ vue.createTextVNode("顶栏背景颜色") ]), vue.createVNode("div", {
|
|
1570
|
-
class: _ns.be("config-bar-item", "value")
|
|
1571
|
-
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
1572
|
-
modelValue: settingConfig.headerBarColor,
|
|
1573
|
-
"onUpdate:modelValue": $event => settingConfig.headerBarColor = $event,
|
|
1574
|
-
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1575
|
-
"show-alpha": !0,
|
|
1576
|
-
onChange: color => _onChangeColor(color, "headerBarColor", "--next-layout-bg-color")
|
|
1577
|
-
}, null) ]) ]), vue.createVNode("div", {
|
|
1578
|
-
class: _ns.b("config-bar-item")
|
|
1579
|
-
}, [ vue.createVNode("span", {
|
|
1580
|
-
class: _ns.be("config-bar-item", "label")
|
|
1581
|
-
}, [ vue.createTextVNode("顶栏字体颜色") ]), vue.createVNode("div", {
|
|
1582
|
-
class: _ns.be("config-bar-item", "value")
|
|
1583
|
-
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
1584
|
-
modelValue: settingConfig.headerBarFontColor,
|
|
1585
|
-
"onUpdate:modelValue": $event => settingConfig.headerBarFontColor = $event,
|
|
1586
|
-
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1587
|
-
"show-alpha": !0,
|
|
1588
|
-
onChange: color => _onChangeColor(color, "headerBarFontColor", "--next-layout-font-color")
|
|
1589
|
-
}, null) ]) ]), vue.createVNode("div", {
|
|
1590
|
-
class: _ns.b("config-bar-item")
|
|
1591
|
-
}, [ vue.createVNode("span", {
|
|
1592
|
-
class: _ns.be("config-bar-item", "label")
|
|
1593
|
-
}, [ vue.createTextVNode("顶栏激活字体颜色") ]), vue.createVNode("div", {
|
|
1594
|
-
class: _ns.be("config-bar-item", "value")
|
|
1595
|
-
}, [ vue.createVNode(elementPlus.ElColorPicker, {
|
|
1596
|
-
modelValue: settingConfig.headerBarFontActiveColor,
|
|
1597
|
-
"onUpdate:modelValue": $event => settingConfig.headerBarFontActiveColor = $event,
|
|
1598
|
-
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1599
|
-
"show-alpha": !0,
|
|
1600
|
-
onChange: color => _onChangeColor(color, "headerBarFontActiveColor", "--next-layout-active-color")
|
|
1601
|
-
}, null) ]) ]), vue.createVNode("div", {
|
|
1602
|
-
class: _ns.b("config-bar-item")
|
|
1603
|
-
}, [ vue.createVNode("span", {
|
|
1604
|
-
class: _ns.be("config-bar-item", "label")
|
|
1605
|
-
}, [ vue.createTextVNode("顶栏背景渐变") ]), vue.createVNode("div", {
|
|
1606
|
-
class: _ns.be("config-bar-item", "value")
|
|
1607
|
-
}, [ vue.createVNode(vue.resolveComponent("el-switch"), {
|
|
1608
|
-
modelValue: settingConfig.isHeaderBarColorGradual,
|
|
1609
|
-
"onUpdate:modelValue": $event => settingConfig.isHeaderBarColorGradual = $event,
|
|
1610
|
-
onChange: _changeUpdateOptions
|
|
1611
|
-
}, null) ]) ]), vue.createVNode(elementPlus.ElDivider, {
|
|
1612
|
-
"border-style": "dashed"
|
|
1613
|
-
}, {
|
|
1614
|
-
default: () => [ vue.createTextVNode("布局方式") ]
|
|
1615
|
-
}), vue.createVNode("ul", {
|
|
1616
|
-
class: _ns.b("config-bar-layout")
|
|
1617
|
-
}, [ layouts.map((item => vue.createVNode("li", {
|
|
1618
|
-
class: [ _ns.be("config-bar-layout", item.type), _ns.is("active", settingConfig.layout === item.type) ],
|
|
1619
|
-
onClick: event => ((event, layout) => {
|
|
1620
|
-
event.stopPropagation(), settingConfig.layout = layout.type, _changeUpdateOptions();
|
|
1621
|
-
})(event, item)
|
|
1622
|
-
}, [ vue.createVNode("div", {
|
|
1623
|
-
class: "layout-wrap"
|
|
1624
|
-
}, [ vue.createVNode("div", {
|
|
1625
|
-
class: "layout-box"
|
|
1626
|
-
}, [ vue.createVNode("p", {
|
|
1627
|
-
class: "layout-text"
|
|
1628
|
-
}, [ item.text ]) ]) ]), vue.createVNode("aside", null, null) ]))) ]), vue.createVNode("div", {
|
|
1629
|
-
class: _ns.b("config-bar-item"),
|
|
1630
|
-
style: {
|
|
1631
|
-
"margin-top": "20px"
|
|
1632
|
-
}
|
|
1633
|
-
}, [ vue.createVNode("span", {
|
|
1634
|
-
class: _ns.be("config-bar-item", "label")
|
|
1635
|
-
}, [ vue.createTextVNode("是否显示标签栏") ]), vue.createVNode("div", {
|
|
1636
|
-
class: _ns.be("config-bar-item", "value")
|
|
1637
|
-
}, [ vue.createVNode(elementPlus.ElSwitch, {
|
|
1638
|
-
modelValue: _config.showTabs,
|
|
1639
|
-
"onUpdate:modelValue": $event => _config.showTabs = $event
|
|
1640
|
-
}, null) ]) ]), _slots.setting?.({
|
|
1641
|
-
config: settingConfig
|
|
1642
|
-
}) ]
|
|
1643
|
-
});
|
|
1644
|
-
}
|
|
1645
|
-
});
|
|
1646
|
-
var HeaderTools = vue.defineComponent({
|
|
1647
|
-
setup() {
|
|
1648
|
-
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);
|
|
1649
|
-
return {
|
|
1650
|
-
locale: locale,
|
|
1651
|
-
config: config,
|
|
1652
|
-
t: t,
|
|
1653
|
-
toggle: toggle,
|
|
1654
|
-
isFullscreen: isFullscreen,
|
|
1655
|
-
language: language,
|
|
1656
|
-
settingDrawer: settingDrawer
|
|
1657
|
-
};
|
|
1658
|
-
},
|
|
1659
|
-
render() {
|
|
1660
|
-
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 = () => {
|
|
1661
|
-
this.settingDrawer = !1;
|
|
1662
|
-
};
|
|
1663
|
-
return vue.createVNode(vue.Fragment, null, [ vue.createVNode("ul", {
|
|
1664
|
-
class: _ns.b("header-tools")
|
|
1665
|
-
}, [ slots[slots_config_headerToolsPrefix]?.(), vue.createVNode("li", null, [ vue.createVNode(elementPlus.ElDropdown, {
|
|
1666
|
-
"show-timeout": 70,
|
|
1667
|
-
"hide-timeout": 50,
|
|
1668
|
-
trigger: "click",
|
|
1669
|
-
onCommand: command => {
|
|
1670
|
-
this.language = command, _emit("changeLanguage", command), _config.onChangeLanguage && _config.onChangeLanguage(command);
|
|
1671
|
-
}
|
|
1672
|
-
}, {
|
|
1673
|
-
default: () => vue.createVNode("div", null, [ vue.createVNode(elementPlus.ElIcon, {
|
|
1674
|
-
size: 16
|
|
1675
|
-
}, {
|
|
1676
|
-
default: () => [ vue.createVNode("svg", {
|
|
1677
|
-
class: "icon",
|
|
1678
|
-
viewBox: "0 0 1070 1024",
|
|
1679
|
-
version: "1.1",
|
|
1680
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1681
|
-
"p-id": "1855",
|
|
1682
|
-
width: "128",
|
|
1683
|
-
height: "128"
|
|
1684
|
-
}, [ vue.createVNode("path", {
|
|
1685
|
-
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",
|
|
1686
|
-
"p-id": "1856"
|
|
1687
|
-
}, null), vue.createVNode("path", {
|
|
1688
|
-
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",
|
|
1689
|
-
"p-id": "1857"
|
|
1690
|
-
}, null), vue.createVNode("path", {
|
|
1691
|
-
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",
|
|
1692
|
-
"p-id": "1858"
|
|
1693
|
-
}, null) ]) ]
|
|
1694
|
-
}) ]),
|
|
1695
|
-
dropdown: () => {
|
|
1696
|
-
let _slot;
|
|
1697
|
-
return vue.createVNode(elementPlus.ElDropdownMenu, null, "function" == typeof (s = _slot = _languageDropdown.map((item => vue.createVNode(elementPlus.ElDropdownItem, {
|
|
1698
|
-
command: item.value,
|
|
1699
|
-
disabled: this.language === item.value
|
|
1700
|
-
}, {
|
|
1701
|
-
default: () => [ item.label ]
|
|
1702
|
-
})))) || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? _slot : {
|
|
1703
|
-
default: () => [ _slot ]
|
|
1704
|
-
});
|
|
1705
|
-
var s;
|
|
1706
|
-
}
|
|
1707
|
-
}) ]), vue.createVNode("li", null, [ vue.createVNode("span", {
|
|
1708
|
-
style: {
|
|
1709
|
-
display: "inline-block",
|
|
1710
|
-
lineHeight: 1
|
|
1711
|
-
},
|
|
1712
|
-
onClick: this.toggle
|
|
1713
|
-
}, [ vue.createVNode(elementPlus.ElIcon, {
|
|
1714
|
-
size: 16
|
|
1715
|
-
}, {
|
|
1716
|
-
default: () => [ isFullscreen ? vue.createVNode("svg", {
|
|
1717
|
-
class: "icon",
|
|
1718
|
-
viewBox: "0 0 1024 1024",
|
|
1719
|
-
version: "1.1",
|
|
1720
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1721
|
-
"p-id": "2676",
|
|
1722
|
-
width: "128",
|
|
1723
|
-
height: "128"
|
|
1724
|
-
}, [ vue.createVNode("path", {
|
|
1725
|
-
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",
|
|
1726
|
-
"p-id": "2677"
|
|
1727
|
-
}, null) ]) : vue.createVNode("svg", {
|
|
1728
|
-
class: "icon",
|
|
1729
|
-
viewBox: "0 0 1024 1024",
|
|
1730
|
-
version: "1.1",
|
|
1731
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1732
|
-
"p-id": "2522",
|
|
1733
|
-
width: "128",
|
|
1734
|
-
height: "128"
|
|
1735
|
-
}, [ vue.createVNode("path", {
|
|
1736
|
-
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",
|
|
1737
|
-
"p-id": "2523"
|
|
1738
|
-
}, null) ]) ]
|
|
1739
|
-
}) ]) ]), slots[slots_config_headerToolsSuffix]?.(), vue.createVNode("li", null, [ vue.createVNode(elementPlus.ElDropdown, {
|
|
1740
|
-
"show-timeout": 70,
|
|
1741
|
-
"hide-timeout": 80,
|
|
1742
|
-
"popper-class": _ns.be("header-tools", "userDropdown"),
|
|
1743
|
-
onCommand: command => {
|
|
1744
|
-
_emit("changeUserDropdown", command), _config.onChangeUserDropdown && _config.onChangeUserDropdown(command);
|
|
1745
|
-
}
|
|
1746
|
-
}, {
|
|
1747
|
-
default: () => vue.createVNode("span", {
|
|
1748
|
-
class: _ns.be("header-tools", "user")
|
|
1749
|
-
}, [ profile_url ? vue.createVNode("img", {
|
|
1750
|
-
class: "user-photo",
|
|
1751
|
-
src: profile_url
|
|
1752
|
-
}, null) : null, vue.createVNode("span", null, [ _config.userName ]), vue.createVNode(elementPlus.ElIcon, {
|
|
1753
|
-
class: "el-icon--right"
|
|
1754
|
-
}, {
|
|
1755
|
-
default: () => [ vue.createVNode(arrow_down_default, null, null) ]
|
|
1756
|
-
}) ]),
|
|
1757
|
-
dropdown: () => vue.createVNode(elementPlus.ElDropdownMenu, null, {
|
|
1758
|
-
default: () => [ _userDropdown?.map((item => vue.createVNode(elementPlus.ElDropdownItem, {
|
|
1759
|
-
command: item.value,
|
|
1760
|
-
divided: !!item.divided
|
|
1761
|
-
}, {
|
|
1762
|
-
default: () => [ item.svg ? vue.createVNode("span", {
|
|
1763
|
-
innerHTML: item.svg,
|
|
1764
|
-
class: "item-svg"
|
|
1765
|
-
}, null) : null, item.iconfont ? vue.createVNode("i", {
|
|
1766
|
-
class: item.iconfont
|
|
1767
|
-
}, null) : null, _t(item.label) ]
|
|
1768
|
-
}))) ]
|
|
1769
|
-
})
|
|
1770
|
-
}) ]), vue.createVNode("li", null, [ vue.createVNode("span", {
|
|
1771
|
-
style: {
|
|
1772
|
-
display: "inline-block",
|
|
1773
|
-
lineHeight: 1
|
|
1774
|
-
},
|
|
1775
|
-
onClick: () => {
|
|
1776
|
-
this.settingDrawer = !0;
|
|
1777
|
-
}
|
|
1778
|
-
}, [ vue.createVNode(elementPlus.ElIcon, {
|
|
1779
|
-
size: 16
|
|
1780
|
-
}, {
|
|
1781
|
-
default: () => [ vue.createVNode(setting_default, null, null) ]
|
|
1782
|
-
}) ]) ]) ]), vue.createVNode(vue.Teleport, {
|
|
1783
|
-
to: "body"
|
|
1784
|
-
}, {
|
|
1785
|
-
default: () => [ vue.createVNode(elementPlus.ElDrawer, {
|
|
1786
|
-
modelValue: this.settingDrawer,
|
|
1787
|
-
"onUpdate:modelValue": $event => this.settingDrawer = $event,
|
|
1788
|
-
title: this.t("next.layout.systemSetting"),
|
|
1789
|
-
direction: "rtl",
|
|
1790
|
-
size: "380px",
|
|
1791
|
-
class: _ns.be("drawer", "setting"),
|
|
1792
|
-
"destroy-on-close": !0,
|
|
1793
|
-
beforeClose: _closeSettingDrawer
|
|
1794
|
-
}, {
|
|
1795
|
-
default: () => [ vue.createVNode(LayoutSetting, null, null) ]
|
|
1796
|
-
}) ]
|
|
1797
|
-
}) ]);
|
|
1798
|
-
}
|
|
1799
|
-
});
|
|
1800
|
-
const {getLightColor: getLightColor$4} = useChangeColor();
|
|
1801
|
-
var Header$4 = vue.defineComponent({
|
|
1802
|
-
setup: () => ({
|
|
1803
|
-
ns: vue.inject("ns", {})
|
|
1804
|
-
}),
|
|
1805
|
-
render() {
|
|
1806
|
-
const slots = this.$slots, _ns = this.ns, _config = vue.inject("options", {}), headerStyle = vue.computed((() => {
|
|
1807
|
-
const {isHeaderBarColorGradual: isHeaderBarColorGradual, headerBarColor: color} = _config.setting;
|
|
1808
|
-
return isHeaderBarColorGradual ? {
|
|
1809
|
-
background: `linear-gradient(to bottom , ${color}, ${getLightColor$4(color, .5)})`
|
|
1810
|
-
} : "";
|
|
1811
|
-
})), __slots_header_tools = {};
|
|
1812
|
-
return slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
1813
|
-
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]()),
|
|
1814
|
-
vue.createVNode("header", {
|
|
1815
|
-
class: _ns.b("header"),
|
|
1816
|
-
style: headerStyle.value
|
|
1817
|
-
}, [ vue.createVNode(LogoView, null, null), vue.createVNode("div", {
|
|
1818
|
-
class: _ns.bf("header", "right")
|
|
1819
|
-
}, [ vue.createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
1820
|
-
default: () => [ __slots_header_tools ]
|
|
1821
|
-
})) ]) ]);
|
|
1822
|
-
var s;
|
|
1823
|
-
}
|
|
1824
1488
|
});
|
|
1825
1489
|
function getDefaultExportFromCjs(x) {
|
|
1826
1490
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
|
|
@@ -2166,327 +1830,667 @@
|
|
|
2166
1830
|
function getExpandHeight(height) {
|
|
2167
1831
|
return height + 10 + getHeightOffset();
|
|
2168
1832
|
}
|
|
2169
|
-
function positionScrollbars(element, width, height) {
|
|
2170
|
-
var expand = getExpandElement(element), shrink = getShrinkElement(element), expandWidth = getExpandWidth(width), expandHeight = getExpandHeight(height), shrinkWidth = function(width) {
|
|
2171
|
-
return 2 * width + getWidthOffset();
|
|
2172
|
-
}(width), shrinkHeight = function(height) {
|
|
2173
|
-
return 2 * height + getHeightOffset();
|
|
2174
|
-
}(height);
|
|
2175
|
-
expand.scrollLeft = expandWidth, expand.scrollTop = expandHeight, shrink.scrollLeft = shrinkWidth,
|
|
2176
|
-
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);
|
|
2177
2050
|
}
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
getState(element).container = container, function(element) {
|
|
2184
|
-
element.className += " erd_scroll_detection_container_animation_active";
|
|
2185
|
-
}(container), element.appendChild(container);
|
|
2186
|
-
var onAnimationStart = function() {
|
|
2187
|
-
getState(element).onRendered && getState(element).onRendered();
|
|
2188
|
-
};
|
|
2189
|
-
addEvent(container, "animationstart", onAnimationStart), getState(element).onAnimationStart = onAnimationStart;
|
|
2190
|
-
}
|
|
2191
|
-
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);
|
|
2192
2056
|
}
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
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);
|
|
2208
2078
|
}
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
function onShrinkScroll() {
|
|
2227
|
-
var state = getState(element);
|
|
2228
|
-
state && state.onShrink ? state.onShrink() : debug("Aborting shrink scroll handler: element has been uninstalled");
|
|
2229
|
-
}
|
|
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);
|
|
2230
2096
|
}
|
|
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
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
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
|
|
2267
2169
|
}
|
|
2268
|
-
|
|
2269
|
-
|
|
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"
|
|
2270
2301
|
}
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
updateChildSizes(element, style.width, style.height);
|
|
2282
|
-
} else debug("Aborting because element has been uninstalled");
|
|
2283
|
-
}
|
|
2284
|
-
function finalizeDomMutation() {
|
|
2285
|
-
if (debug("finalizeDomMutation invoked."), getState(element)) {
|
|
2286
|
-
var style = getState(element).style;
|
|
2287
|
-
storeCurrentSize(element, style.width, style.height), positionScrollbars(element, style.width, style.height);
|
|
2288
|
-
} else debug("Aborting because element has been uninstalled");
|
|
2289
|
-
}
|
|
2290
|
-
function ready() {
|
|
2291
|
-
callback(element);
|
|
2292
|
-
}
|
|
2293
|
-
function install() {
|
|
2294
|
-
var style;
|
|
2295
|
-
debug("Installing..."), getState(element).listeners = [], style = getStyle(), getState(element).startSize = {
|
|
2296
|
-
width: style.width,
|
|
2297
|
-
height: style.height
|
|
2298
|
-
}, debug("Element start size", getState(element).startSize), batchProcessor.add(0, storeStyle),
|
|
2299
|
-
batchProcessor.add(1, injectScrollElements), batchProcessor.add(2, registerListenersAndPositionElements),
|
|
2300
|
-
batchProcessor.add(3, finalizeDomMutation), batchProcessor.add(4, ready);
|
|
2301
|
-
}
|
|
2302
|
-
callback || (callback = element, element = options, options = null), options = options || {},
|
|
2303
|
-
debug("Making detectable..."), !function(element) {
|
|
2304
|
-
return !function(element) {
|
|
2305
|
-
var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element);
|
|
2306
|
-
return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot;
|
|
2307
|
-
}(element) || null === window.getComputedStyle(element);
|
|
2308
|
-
}(element) ? install() : (debug("Element is detached"), injectContainerElement(),
|
|
2309
|
-
debug("Waiting until element is attached..."), getState(element).onRendered = function() {
|
|
2310
|
-
debug("Element is now attached"), install();
|
|
2311
|
-
});
|
|
2312
|
-
},
|
|
2313
|
-
addListener: function(element, listener) {
|
|
2314
|
-
if (!getState(element).listeners.push) throw new Error("Cannot add listener to an element that is not detectable.");
|
|
2315
|
-
getState(element).listeners.push(listener);
|
|
2316
|
-
},
|
|
2317
|
-
uninstall: function(element) {
|
|
2318
|
-
var state = getState(element);
|
|
2319
|
-
state && (state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll),
|
|
2320
|
-
state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll),
|
|
2321
|
-
state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart),
|
|
2322
|
-
state.container && element.removeChild(state.container));
|
|
2323
|
-
},
|
|
2324
|
-
initDocument: initDocument
|
|
2325
|
-
};
|
|
2326
|
-
};
|
|
2327
|
-
function isCollection(obj) {
|
|
2328
|
-
return Array.isArray(obj) || void 0 !== obj.length;
|
|
2329
|
-
}
|
|
2330
|
-
function toArray(collection) {
|
|
2331
|
-
if (Array.isArray(collection)) return collection;
|
|
2332
|
-
var array = [];
|
|
2333
|
-
return forEach(collection, (function(obj) {
|
|
2334
|
-
array.push(obj);
|
|
2335
|
-
})), array;
|
|
2336
|
-
}
|
|
2337
|
-
function isElement(obj) {
|
|
2338
|
-
return obj && 1 === obj.nodeType;
|
|
2339
|
-
}
|
|
2340
|
-
var elementResizeDetector = function(options) {
|
|
2341
|
-
var idHandler;
|
|
2342
|
-
if ((options = options || {}).idHandler) idHandler = {
|
|
2343
|
-
get: function(element) {
|
|
2344
|
-
return options.idHandler.get(element, !0);
|
|
2345
|
-
},
|
|
2346
|
-
set: options.idHandler.set
|
|
2347
|
-
}; else {
|
|
2348
|
-
var idGenerator = idGeneratorMaker(), defaultIdHandler = idHandlerMaker({
|
|
2349
|
-
idGenerator: idGenerator,
|
|
2350
|
-
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
|
+
}) ]
|
|
2351
2312
|
});
|
|
2352
|
-
idHandler = defaultIdHandler;
|
|
2353
|
-
}
|
|
2354
|
-
var reporter = options.reporter;
|
|
2355
|
-
reporter || (reporter = reporterMaker(!1 === reporter));
|
|
2356
|
-
var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({
|
|
2357
|
-
reporter: reporter
|
|
2358
|
-
})), globalOptions = {};
|
|
2359
|
-
globalOptions.callOnAdd = !!getOption(options, "callOnAdd", !0), globalOptions.debug = !!getOption(options, "debug", !1);
|
|
2360
|
-
var detectionStrategy, eventListenerHandler = listenerHandlerMaker(idHandler), elementUtils = elementUtilsMaker({
|
|
2361
|
-
stateHandler: stateHandler
|
|
2362
|
-
}), desiredStrategy = getOption(options, "strategy", "object"), importantCssRules = getOption(options, "important", !1), strategyOptions = {
|
|
2363
|
-
reporter: reporter,
|
|
2364
|
-
batchProcessor: batchProcessor,
|
|
2365
|
-
stateHandler: stateHandler,
|
|
2366
|
-
idHandler: idHandler,
|
|
2367
|
-
important: importantCssRules
|
|
2368
|
-
};
|
|
2369
|
-
if ("scroll" === desiredStrategy && (browserDetector.isLegacyOpera() ? (reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),
|
|
2370
|
-
desiredStrategy = "object") : browserDetector.isIE(9) && (reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),
|
|
2371
|
-
desiredStrategy = "object")), "scroll" === desiredStrategy) detectionStrategy = scrollStrategyMaker(strategyOptions); else {
|
|
2372
|
-
if ("object" !== desiredStrategy) throw new Error("Invalid strategy name: " + desiredStrategy);
|
|
2373
|
-
detectionStrategy = objectStrategyMaker(strategyOptions);
|
|
2374
2313
|
}
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
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);
|
|
2383
2340
|
}
|
|
2384
|
-
|
|
2385
|
-
|
|
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;
|
|
2386
2375
|
}
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
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);
|
|
2392
2414
|
}
|
|
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
|
-
|
|
2424
|
-
},
|
|
2425
|
-
removeListener: eventListenerHandler.removeListener,
|
|
2426
|
-
removeAllListeners: eventListenerHandler.removeAllListeners,
|
|
2427
|
-
uninstall: function(elements) {
|
|
2428
|
-
if (!elements) return reporter.error("At least one element is required.");
|
|
2429
|
-
if (isElement(elements)) elements = [ elements ]; else {
|
|
2430
|
-
if (!isCollection(elements)) return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
|
|
2431
|
-
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;
|
|
2432
2446
|
}
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
},
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
cb && cb(el), clearTimeout(timer);
|
|
2454
|
-
}), 200);
|
|
2455
|
-
})), vue.onUnmounted((() => {
|
|
2456
|
-
erd.removeListener(el, (() => {}));
|
|
2457
|
-
}));
|
|
2458
|
-
}, deepClone = source => {
|
|
2459
|
-
if (null == source) return source;
|
|
2460
|
-
let target;
|
|
2461
|
-
if ("object" == typeof source) {
|
|
2462
|
-
target = Array.isArray(source) ? [] : {};
|
|
2463
|
-
for (let key in source) "object" == typeof source[key] ? target[key] = deepClone(source[key]) : target[key] = source[key];
|
|
2464
|
-
} else target = source;
|
|
2465
|
-
return target;
|
|
2466
|
-
}, arrayObjNoRepeat = (arr, property) => {
|
|
2467
|
-
const result = [], uniqueMap = new Map;
|
|
2468
|
-
for (const item of arr) {
|
|
2469
|
-
const key = item[property];
|
|
2470
|
-
uniqueMap.has(key) || (uniqueMap.set(key, !0), result.push(item));
|
|
2471
|
-
}
|
|
2472
|
-
return result;
|
|
2473
|
-
}, isValueExist = value => null != value && ("string" == typeof value ? "" !== value.trim() : !1 !== value), valueExist = (...arg) => {
|
|
2474
|
-
let exist = null;
|
|
2475
|
-
for (let i = 0; i < arg.length; i++) {
|
|
2476
|
-
const val = arg[i];
|
|
2477
|
-
if (null != val) {
|
|
2478
|
-
exist = val;
|
|
2479
|
-
break;
|
|
2480
|
-
}
|
|
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
|
+
}) ]);
|
|
2481
2467
|
}
|
|
2482
|
-
return exist;
|
|
2483
|
-
}, shareObjectProperty = (target, source, key) => (Object.defineProperty(target, key, {
|
|
2484
|
-
get: () => source[key]
|
|
2485
|
-
}), {
|
|
2486
|
-
target: target,
|
|
2487
|
-
source: source
|
|
2488
2468
|
});
|
|
2489
|
-
|
|
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({
|
|
2490
2494
|
props: {
|
|
2491
2495
|
meta: {
|
|
2492
2496
|
type: Object,
|
|
@@ -3247,20 +3251,31 @@
|
|
|
3247
3251
|
padding: padding + "px"
|
|
3248
3252
|
}), style;
|
|
3249
3253
|
}));
|
|
3250
|
-
return () =>
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
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
|
+
});
|
|
3260
3268
|
}
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
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
|
+
})();
|
|
3264
3279
|
}
|
|
3265
3280
|
}));
|
|
3266
3281
|
function isEqual(value, other) {
|
|
@@ -3861,14 +3876,17 @@
|
|
|
3861
3876
|
setup: () => ({}),
|
|
3862
3877
|
emits: [ "clickAdd", "clickRefresh", "deleteRows" ],
|
|
3863
3878
|
render() {
|
|
3864
|
-
const _options = vue.inject("options", {}), options = vue.isRef(_options) ? vue.unref(_options) : _options, {t: t} = useLocale(), ns = vue.inject("ns", {}), multipleSelection = vue.inject("multipleSelection"), multipleSelectionLength = vue.computed((() => multipleSelection.value.length)),
|
|
3879
|
+
const _options = vue.inject("options", {}), options = vue.isRef(_options) ? vue.unref(_options) : _options, {t: t} = useLocale(), ns = vue.inject("ns", {}), multipleSelection = vue.inject("multipleSelection"), multipleSelectionLength = vue.computed((() => multipleSelection.value.length)), onClickRefresh = () => {
|
|
3880
|
+
this.$emit("clickRefresh");
|
|
3881
|
+
}, drawerSettingRef = vue.ref(), slotProps = {
|
|
3882
|
+
size: options.size,
|
|
3883
|
+
refresh: onClickRefresh
|
|
3884
|
+
};
|
|
3865
3885
|
return vue.createVNode("div", {
|
|
3866
3886
|
class: ns.b("header-menu")
|
|
3867
3887
|
}, [ vue.createVNode("div", {
|
|
3868
3888
|
class: ns.b("header-menu-left")
|
|
3869
|
-
}, [ this.$slots["menu-left-prefix"]?.({
|
|
3870
|
-
size: options.size
|
|
3871
|
-
}), options.addBtn && vue.createVNode(elementPlus.ElButton, {
|
|
3889
|
+
}, [ this.$slots["menu-left-prefix"]?.(slotProps), options.addBtn && vue.createVNode(elementPlus.ElButton, {
|
|
3872
3890
|
type: "primary",
|
|
3873
3891
|
size: options.size,
|
|
3874
3892
|
onClick: () => {
|
|
@@ -3905,18 +3923,12 @@
|
|
|
3905
3923
|
default: () => [ vue.createVNode(delete_default, null, null) ]
|
|
3906
3924
|
}),
|
|
3907
3925
|
default: () => t("next.table.batchDelete")
|
|
3908
|
-
}), this.$slots["menu-left-suffix"]?.({
|
|
3909
|
-
size: options.size
|
|
3910
|
-
}) ]), vue.createVNode("div", {
|
|
3926
|
+
}), this.$slots["menu-left-suffix"]?.(slotProps) ]), vue.createVNode("div", {
|
|
3911
3927
|
class: ns.b("header-menu-right")
|
|
3912
|
-
}, [ this.$slots["menu-right-prefix"]?.({
|
|
3913
|
-
size: options.size
|
|
3914
|
-
}), options.refreshBtn && vue.createVNode(elementPlus.ElButton, {
|
|
3928
|
+
}, [ this.$slots["menu-right-prefix"]?.(slotProps), options.refreshBtn && vue.createVNode(elementPlus.ElButton, {
|
|
3915
3929
|
circle: !0,
|
|
3916
3930
|
size: options.size,
|
|
3917
|
-
onClick:
|
|
3918
|
-
this.$emit("clickRefresh");
|
|
3919
|
-
}
|
|
3931
|
+
onClick: onClickRefresh
|
|
3920
3932
|
}, {
|
|
3921
3933
|
icon: () => vue.createVNode(elementPlus.ElIcon, null, {
|
|
3922
3934
|
default: () => [ vue.createVNode(refresh_default, null, null) ]
|
|
@@ -3931,9 +3943,7 @@
|
|
|
3931
3943
|
icon: () => vue.createVNode(elementPlus.ElIcon, null, {
|
|
3932
3944
|
default: () => [ vue.createVNode(tools_default, null, null) ]
|
|
3933
3945
|
})
|
|
3934
|
-
}), this.$slots["menu-right-suffix"]?.({
|
|
3935
|
-
size: options.size
|
|
3936
|
-
}) ]), vue.createVNode(DrawerSetting, {
|
|
3946
|
+
}), this.$slots["menu-right-suffix"]?.(slotProps) ]), vue.createVNode(DrawerSetting, {
|
|
3937
3947
|
ref: drawerSettingRef
|
|
3938
3948
|
}, null) ]);
|
|
3939
3949
|
}
|
|
@@ -3970,11 +3980,19 @@
|
|
|
3970
3980
|
});
|
|
3971
3981
|
var s;
|
|
3972
3982
|
})) ]);
|
|
3973
|
-
if (slots[columnSlotName(_prop)])
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3983
|
+
if (slots[columnSlotName(_prop)]) {
|
|
3984
|
+
const btnCfg = {
|
|
3985
|
+
text: options.operationsBtnText,
|
|
3986
|
+
plain: options.operationsBtnPlain,
|
|
3987
|
+
size: options.operationsBtnSize
|
|
3988
|
+
};
|
|
3989
|
+
return slots[columnSlotName(_prop)]({
|
|
3990
|
+
row: row,
|
|
3991
|
+
index: $index,
|
|
3992
|
+
column: columnOption,
|
|
3993
|
+
btn: btnCfg
|
|
3994
|
+
});
|
|
3995
|
+
}
|
|
3978
3996
|
if (columnOption.dicData?.length > 0) {
|
|
3979
3997
|
const loopDicData = list => {
|
|
3980
3998
|
const temp = [];
|
|
@@ -8293,16 +8311,19 @@
|
|
|
8293
8311
|
}));
|
|
8294
8312
|
}
|
|
8295
8313
|
});
|
|
8296
|
-
}, install = function(app) {
|
|
8297
|
-
Object.keys(components).forEach((key => {
|
|
8314
|
+
}, configProviderContextKey = Symbol("configProviderContextKey"), install = function(app, options) {
|
|
8315
|
+
if (Object.keys(components).forEach((key => {
|
|
8298
8316
|
const component = components[key];
|
|
8299
8317
|
app.component(component.name, component);
|
|
8300
8318
|
})), (app => {
|
|
8301
8319
|
zoomDialog(app);
|
|
8302
|
-
})(app)
|
|
8320
|
+
})(app), options) {
|
|
8321
|
+
const inSetup = !!vue.getCurrentInstance();
|
|
8322
|
+
(app?.provide ?? (inSetup ? vue.provide : void 0))(configProviderContextKey, vue.computed((() => options)));
|
|
8323
|
+
}
|
|
8303
8324
|
};
|
|
8304
8325
|
var index = {
|
|
8305
|
-
version: "0.5.
|
|
8326
|
+
version: "0.5.10",
|
|
8306
8327
|
install: install
|
|
8307
8328
|
};
|
|
8308
8329
|
exports.NextCarousel = NextCarousel, exports.NextContainer = NextContainer, exports.NextCrudTable = NextCrudTable,
|
|
@@ -8350,7 +8371,7 @@
|
|
|
8350
8371
|
}), exports.useGetDerivedNamespace = useGetDerivedNamespace, exports.useLanguage = (locale, lang) => {
|
|
8351
8372
|
const localeRef = vue.isRef(locale) ? locale : vue.ref(locale), nextLang = localeLang[lang] || localeLang["zh-cn"];
|
|
8352
8373
|
localeRef.value.name = lang, localeRef.value.next = nextLang.next;
|
|
8353
|
-
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.5.
|
|
8374
|
+
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.5.10",
|
|
8354
8375
|
Object.defineProperty(exports, "__esModule", {
|
|
8355
8376
|
value: !0
|
|
8356
8377
|
});
|