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.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
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
|
|
|
10
|
-
import { getCurrentInstance, inject, ref, computed, unref, isRef, defineComponent, createVNode, Fragment, createElementBlock, openBlock, createElementVNode, reactive, createTextVNode, resolveComponent, Teleport, isVNode,
|
|
10
|
+
import { getCurrentInstance, inject, ref, computed, unref, isRef, defineComponent, createVNode, Fragment, createElementBlock, openBlock, createElementVNode, onUnmounted, reactive, createTextVNode, resolveComponent, Teleport, isVNode, provide, watch, nextTick, markRaw, watchEffect, h, onMounted, toRaw, render, toRef } from "vue";
|
|
11
11
|
|
|
12
12
|
import { localeContextKey as localeContextKey$1, ElMessage, ElTooltip, ElScrollbar, ElDivider, ElColorPicker, ElSwitch, ElDropdown, ElDropdownMenu, ElDropdownItem, ElIcon, ElDrawer, ElMenuItem, ElSubMenu, ElMenu, ElContainer, ElCol, ElFormItem, ElInput, ElSelect, ElOption, ElDatePicker, ElInputNumber, ElForm, ElRow, ElButton, ElTable, ElTableColumn, ElCheckbox, ElMessageBox, ElPagination, ElDialog, ElTag, ElCheckboxGroup, ElRadioGroup, ElRadio, ElUpload, ElImageViewer, ElImage, ElTreeSelect, ElCascader, ElTimeSelect, ElEmpty, ElPopover, ElPopconfirm } from "element-plus";
|
|
13
13
|
|
|
@@ -1617,345 +1617,6 @@ var LogoView = defineComponent({
|
|
|
1617
1617
|
fill: "currentColor",
|
|
1618
1618
|
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"
|
|
1619
1619
|
}) ]))
|
|
1620
|
-
}), LayoutSetting = defineComponent({
|
|
1621
|
-
setup() {},
|
|
1622
|
-
render() {
|
|
1623
|
-
const _slots = inject("__slots__", {}), _ns = inject("__ns__", {}), _config = inject("options", {}), _updateOptions = inject("updateOptions", null), settingConfig = reactive({
|
|
1624
|
-
..._config.setting
|
|
1625
|
-
});
|
|
1626
|
-
settingConfig.headerBarFontActiveColor || (settingConfig.headerBarFontActiveColor = settingConfig.themeColor);
|
|
1627
|
-
const _changeUpdateOptions = () => {
|
|
1628
|
-
const options = {
|
|
1629
|
-
..._config,
|
|
1630
|
-
setting: {
|
|
1631
|
-
...settingConfig
|
|
1632
|
-
}
|
|
1633
|
-
};
|
|
1634
|
-
_updateOptions(options);
|
|
1635
|
-
}, _onChangeThemeColor = color => {
|
|
1636
|
-
if (!color) return ElMessage({
|
|
1637
|
-
type: "warning",
|
|
1638
|
-
message: "主题颜色不能为空"
|
|
1639
|
-
}), !1;
|
|
1640
|
-
settingConfig.themeColor = color, nextUseCssTheme("--el-color-primary", color),
|
|
1641
|
-
_changeUpdateOptions();
|
|
1642
|
-
}, _onChangeSwitchDark = () => {
|
|
1643
|
-
const body = document.documentElement;
|
|
1644
|
-
settingConfig.isDark ? body.setAttribute("data-theme", "dark") : body.setAttribute("data-theme", ""),
|
|
1645
|
-
_changeUpdateOptions();
|
|
1646
|
-
}, _onChangeColor = (color, key, cssvar) => {
|
|
1647
|
-
settingConfig[key] = color, nextUseCssVar(cssvar, color), _changeUpdateOptions();
|
|
1648
|
-
}, layouts = [ {
|
|
1649
|
-
type: "defaults",
|
|
1650
|
-
text: "默认"
|
|
1651
|
-
}, {
|
|
1652
|
-
type: "classic",
|
|
1653
|
-
text: "经典"
|
|
1654
|
-
}, {
|
|
1655
|
-
type: "transverse",
|
|
1656
|
-
text: "横向"
|
|
1657
|
-
}, {
|
|
1658
|
-
type: "columns",
|
|
1659
|
-
text: "分栏"
|
|
1660
|
-
}, {
|
|
1661
|
-
type: "composite",
|
|
1662
|
-
text: "综合"
|
|
1663
|
-
} ];
|
|
1664
|
-
return createVNode(ElScrollbar, null, {
|
|
1665
|
-
default: () => [ createVNode(ElDivider, {
|
|
1666
|
-
"border-style": "dashed"
|
|
1667
|
-
}, {
|
|
1668
|
-
default: () => [ createTextVNode("全局主题") ]
|
|
1669
|
-
}), createVNode("div", {
|
|
1670
|
-
class: _ns.b("config-bar-item")
|
|
1671
|
-
}, [ createVNode("span", {
|
|
1672
|
-
class: _ns.be("config-bar-item", "label")
|
|
1673
|
-
}, [ createTextVNode("主题颜色") ]), createVNode("div", {
|
|
1674
|
-
class: _ns.be("config-bar-item", "value")
|
|
1675
|
-
}, [ createVNode(ElColorPicker, {
|
|
1676
|
-
modelValue: settingConfig.themeColor,
|
|
1677
|
-
"onUpdate:modelValue": $event => settingConfig.themeColor = $event,
|
|
1678
|
-
predefine: [ "#409eff", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1679
|
-
"show-alpha": !0,
|
|
1680
|
-
onChange: _onChangeThemeColor
|
|
1681
|
-
}, null) ]) ]), createVNode("div", {
|
|
1682
|
-
class: _ns.b("config-bar-item")
|
|
1683
|
-
}, [ createVNode("span", {
|
|
1684
|
-
class: _ns.be("config-bar-item", "label")
|
|
1685
|
-
}, [ createTextVNode("暗黑模式") ]), createVNode("div", {
|
|
1686
|
-
class: _ns.be("config-bar-item", "value")
|
|
1687
|
-
}, [ createVNode(ElSwitch, {
|
|
1688
|
-
modelValue: settingConfig.isDark,
|
|
1689
|
-
"onUpdate:modelValue": $event => settingConfig.isDark = $event,
|
|
1690
|
-
"inline-prompt": !0,
|
|
1691
|
-
size: "large",
|
|
1692
|
-
"active-icon": moon_night_default,
|
|
1693
|
-
"inactive-icon": sunny_default,
|
|
1694
|
-
"active-color": "#1f1f1f",
|
|
1695
|
-
"inactive-color": "#dcdfe6",
|
|
1696
|
-
onChange: _onChangeSwitchDark
|
|
1697
|
-
}, null) ]) ]), createVNode("div", {
|
|
1698
|
-
class: _ns.b("config-bar-item")
|
|
1699
|
-
}, [ createVNode("span", {
|
|
1700
|
-
class: _ns.be("config-bar-item", "label")
|
|
1701
|
-
}, [ createTextVNode("顶栏背景颜色") ]), createVNode("div", {
|
|
1702
|
-
class: _ns.be("config-bar-item", "value")
|
|
1703
|
-
}, [ createVNode(ElColorPicker, {
|
|
1704
|
-
modelValue: settingConfig.headerBarColor,
|
|
1705
|
-
"onUpdate:modelValue": $event => settingConfig.headerBarColor = $event,
|
|
1706
|
-
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1707
|
-
"show-alpha": !0,
|
|
1708
|
-
onChange: color => _onChangeColor(color, "headerBarColor", "--next-layout-bg-color")
|
|
1709
|
-
}, null) ]) ]), createVNode("div", {
|
|
1710
|
-
class: _ns.b("config-bar-item")
|
|
1711
|
-
}, [ createVNode("span", {
|
|
1712
|
-
class: _ns.be("config-bar-item", "label")
|
|
1713
|
-
}, [ createTextVNode("顶栏字体颜色") ]), createVNode("div", {
|
|
1714
|
-
class: _ns.be("config-bar-item", "value")
|
|
1715
|
-
}, [ createVNode(ElColorPicker, {
|
|
1716
|
-
modelValue: settingConfig.headerBarFontColor,
|
|
1717
|
-
"onUpdate:modelValue": $event => settingConfig.headerBarFontColor = $event,
|
|
1718
|
-
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1719
|
-
"show-alpha": !0,
|
|
1720
|
-
onChange: color => _onChangeColor(color, "headerBarFontColor", "--next-layout-font-color")
|
|
1721
|
-
}, null) ]) ]), createVNode("div", {
|
|
1722
|
-
class: _ns.b("config-bar-item")
|
|
1723
|
-
}, [ createVNode("span", {
|
|
1724
|
-
class: _ns.be("config-bar-item", "label")
|
|
1725
|
-
}, [ createTextVNode("顶栏激活字体颜色") ]), createVNode("div", {
|
|
1726
|
-
class: _ns.be("config-bar-item", "value")
|
|
1727
|
-
}, [ createVNode(ElColorPicker, {
|
|
1728
|
-
modelValue: settingConfig.headerBarFontActiveColor,
|
|
1729
|
-
"onUpdate:modelValue": $event => settingConfig.headerBarFontActiveColor = $event,
|
|
1730
|
-
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
1731
|
-
"show-alpha": !0,
|
|
1732
|
-
onChange: color => _onChangeColor(color, "headerBarFontActiveColor", "--next-layout-active-color")
|
|
1733
|
-
}, null) ]) ]), createVNode("div", {
|
|
1734
|
-
class: _ns.b("config-bar-item")
|
|
1735
|
-
}, [ createVNode("span", {
|
|
1736
|
-
class: _ns.be("config-bar-item", "label")
|
|
1737
|
-
}, [ createTextVNode("顶栏背景渐变") ]), createVNode("div", {
|
|
1738
|
-
class: _ns.be("config-bar-item", "value")
|
|
1739
|
-
}, [ createVNode(resolveComponent("el-switch"), {
|
|
1740
|
-
modelValue: settingConfig.isHeaderBarColorGradual,
|
|
1741
|
-
"onUpdate:modelValue": $event => settingConfig.isHeaderBarColorGradual = $event,
|
|
1742
|
-
onChange: _changeUpdateOptions
|
|
1743
|
-
}, null) ]) ]), createVNode(ElDivider, {
|
|
1744
|
-
"border-style": "dashed"
|
|
1745
|
-
}, {
|
|
1746
|
-
default: () => [ createTextVNode("布局方式") ]
|
|
1747
|
-
}), createVNode("ul", {
|
|
1748
|
-
class: _ns.b("config-bar-layout")
|
|
1749
|
-
}, [ layouts.map((item => createVNode("li", {
|
|
1750
|
-
class: [ _ns.be("config-bar-layout", item.type), _ns.is("active", settingConfig.layout === item.type) ],
|
|
1751
|
-
onClick: event => ((event, layout) => {
|
|
1752
|
-
event.stopPropagation(), settingConfig.layout = layout.type, _changeUpdateOptions();
|
|
1753
|
-
})(event, item)
|
|
1754
|
-
}, [ createVNode("div", {
|
|
1755
|
-
class: "layout-wrap"
|
|
1756
|
-
}, [ createVNode("div", {
|
|
1757
|
-
class: "layout-box"
|
|
1758
|
-
}, [ createVNode("p", {
|
|
1759
|
-
class: "layout-text"
|
|
1760
|
-
}, [ item.text ]) ]) ]), createVNode("aside", null, null) ]))) ]), createVNode("div", {
|
|
1761
|
-
class: _ns.b("config-bar-item"),
|
|
1762
|
-
style: {
|
|
1763
|
-
"margin-top": "20px"
|
|
1764
|
-
}
|
|
1765
|
-
}, [ createVNode("span", {
|
|
1766
|
-
class: _ns.be("config-bar-item", "label")
|
|
1767
|
-
}, [ createTextVNode("是否显示标签栏") ]), createVNode("div", {
|
|
1768
|
-
class: _ns.be("config-bar-item", "value")
|
|
1769
|
-
}, [ createVNode(ElSwitch, {
|
|
1770
|
-
modelValue: _config.showTabs,
|
|
1771
|
-
"onUpdate:modelValue": $event => _config.showTabs = $event
|
|
1772
|
-
}, null) ]) ]), _slots.setting?.({
|
|
1773
|
-
config: settingConfig
|
|
1774
|
-
}) ]
|
|
1775
|
-
});
|
|
1776
|
-
}
|
|
1777
|
-
});
|
|
1778
|
-
|
|
1779
|
-
var HeaderTools = defineComponent({
|
|
1780
|
-
setup() {
|
|
1781
|
-
const locale = inject(localeContextKey, ref()), config = inject("options", {}), {t: t} = useLocale(), {toggle: toggle, isFullscreen: isFullscreen} = useFullscreen(), language = ref(computed((() => config.language)).value), settingDrawer = ref(!1);
|
|
1782
|
-
return {
|
|
1783
|
-
locale: locale,
|
|
1784
|
-
config: config,
|
|
1785
|
-
t: t,
|
|
1786
|
-
toggle: toggle,
|
|
1787
|
-
isFullscreen: isFullscreen,
|
|
1788
|
-
language: language,
|
|
1789
|
-
settingDrawer: settingDrawer
|
|
1790
|
-
};
|
|
1791
|
-
},
|
|
1792
|
-
render() {
|
|
1793
|
-
const _ns = inject("__ns__", {}), _config = this.config, _emit = inject("__emit__", {}), slots = this.$slots, _t = this.t, isFullscreen = this.isFullscreen, profile_url = _config.profile, _userDropdown = _config.userDropdown, _languageDropdown = _config.languageDropdown, _closeSettingDrawer = () => {
|
|
1794
|
-
this.settingDrawer = !1;
|
|
1795
|
-
};
|
|
1796
|
-
return createVNode(Fragment, null, [ createVNode("ul", {
|
|
1797
|
-
class: _ns.b("header-tools")
|
|
1798
|
-
}, [ slots[slots_config_headerToolsPrefix]?.(), createVNode("li", null, [ createVNode(ElDropdown, {
|
|
1799
|
-
"show-timeout": 70,
|
|
1800
|
-
"hide-timeout": 50,
|
|
1801
|
-
trigger: "click",
|
|
1802
|
-
onCommand: command => {
|
|
1803
|
-
this.language = command, _emit("changeLanguage", command), _config.onChangeLanguage && _config.onChangeLanguage(command);
|
|
1804
|
-
}
|
|
1805
|
-
}, {
|
|
1806
|
-
default: () => createVNode("div", null, [ createVNode(ElIcon, {
|
|
1807
|
-
size: 16
|
|
1808
|
-
}, {
|
|
1809
|
-
default: () => [ createVNode("svg", {
|
|
1810
|
-
class: "icon",
|
|
1811
|
-
viewBox: "0 0 1070 1024",
|
|
1812
|
-
version: "1.1",
|
|
1813
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1814
|
-
"p-id": "1855",
|
|
1815
|
-
width: "128",
|
|
1816
|
-
height: "128"
|
|
1817
|
-
}, [ createVNode("path", {
|
|
1818
|
-
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",
|
|
1819
|
-
"p-id": "1856"
|
|
1820
|
-
}, null), createVNode("path", {
|
|
1821
|
-
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",
|
|
1822
|
-
"p-id": "1857"
|
|
1823
|
-
}, null), createVNode("path", {
|
|
1824
|
-
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",
|
|
1825
|
-
"p-id": "1858"
|
|
1826
|
-
}, null) ]) ]
|
|
1827
|
-
}) ]),
|
|
1828
|
-
dropdown: () => {
|
|
1829
|
-
let _slot;
|
|
1830
|
-
return createVNode(ElDropdownMenu, null, "function" == typeof (s = _slot = _languageDropdown.map((item => createVNode(ElDropdownItem, {
|
|
1831
|
-
command: item.value,
|
|
1832
|
-
disabled: this.language === item.value
|
|
1833
|
-
}, {
|
|
1834
|
-
default: () => [ item.label ]
|
|
1835
|
-
})))) || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? _slot : {
|
|
1836
|
-
default: () => [ _slot ]
|
|
1837
|
-
});
|
|
1838
|
-
var s;
|
|
1839
|
-
}
|
|
1840
|
-
}) ]), createVNode("li", null, [ createVNode("span", {
|
|
1841
|
-
style: {
|
|
1842
|
-
display: "inline-block",
|
|
1843
|
-
lineHeight: 1
|
|
1844
|
-
},
|
|
1845
|
-
onClick: this.toggle
|
|
1846
|
-
}, [ createVNode(ElIcon, {
|
|
1847
|
-
size: 16
|
|
1848
|
-
}, {
|
|
1849
|
-
default: () => [ isFullscreen ? createVNode("svg", {
|
|
1850
|
-
class: "icon",
|
|
1851
|
-
viewBox: "0 0 1024 1024",
|
|
1852
|
-
version: "1.1",
|
|
1853
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1854
|
-
"p-id": "2676",
|
|
1855
|
-
width: "128",
|
|
1856
|
-
height: "128"
|
|
1857
|
-
}, [ createVNode("path", {
|
|
1858
|
-
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",
|
|
1859
|
-
"p-id": "2677"
|
|
1860
|
-
}, null) ]) : createVNode("svg", {
|
|
1861
|
-
class: "icon",
|
|
1862
|
-
viewBox: "0 0 1024 1024",
|
|
1863
|
-
version: "1.1",
|
|
1864
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1865
|
-
"p-id": "2522",
|
|
1866
|
-
width: "128",
|
|
1867
|
-
height: "128"
|
|
1868
|
-
}, [ createVNode("path", {
|
|
1869
|
-
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",
|
|
1870
|
-
"p-id": "2523"
|
|
1871
|
-
}, null) ]) ]
|
|
1872
|
-
}) ]) ]), slots[slots_config_headerToolsSuffix]?.(), createVNode("li", null, [ createVNode(ElDropdown, {
|
|
1873
|
-
"show-timeout": 70,
|
|
1874
|
-
"hide-timeout": 80,
|
|
1875
|
-
"popper-class": _ns.be("header-tools", "userDropdown"),
|
|
1876
|
-
onCommand: command => {
|
|
1877
|
-
_emit("changeUserDropdown", command), _config.onChangeUserDropdown && _config.onChangeUserDropdown(command);
|
|
1878
|
-
}
|
|
1879
|
-
}, {
|
|
1880
|
-
default: () => createVNode("span", {
|
|
1881
|
-
class: _ns.be("header-tools", "user")
|
|
1882
|
-
}, [ profile_url ? createVNode("img", {
|
|
1883
|
-
class: "user-photo",
|
|
1884
|
-
src: profile_url
|
|
1885
|
-
}, null) : null, createVNode("span", null, [ _config.userName ]), createVNode(ElIcon, {
|
|
1886
|
-
class: "el-icon--right"
|
|
1887
|
-
}, {
|
|
1888
|
-
default: () => [ createVNode(arrow_down_default, null, null) ]
|
|
1889
|
-
}) ]),
|
|
1890
|
-
dropdown: () => createVNode(ElDropdownMenu, null, {
|
|
1891
|
-
default: () => [ _userDropdown?.map((item => createVNode(ElDropdownItem, {
|
|
1892
|
-
command: item.value,
|
|
1893
|
-
divided: !!item.divided
|
|
1894
|
-
}, {
|
|
1895
|
-
default: () => [ item.svg ? createVNode("span", {
|
|
1896
|
-
innerHTML: item.svg,
|
|
1897
|
-
class: "item-svg"
|
|
1898
|
-
}, null) : null, item.iconfont ? createVNode("i", {
|
|
1899
|
-
class: item.iconfont
|
|
1900
|
-
}, null) : null, _t(item.label) ]
|
|
1901
|
-
}))) ]
|
|
1902
|
-
})
|
|
1903
|
-
}) ]), createVNode("li", null, [ createVNode("span", {
|
|
1904
|
-
style: {
|
|
1905
|
-
display: "inline-block",
|
|
1906
|
-
lineHeight: 1
|
|
1907
|
-
},
|
|
1908
|
-
onClick: () => {
|
|
1909
|
-
this.settingDrawer = !0;
|
|
1910
|
-
}
|
|
1911
|
-
}, [ createVNode(ElIcon, {
|
|
1912
|
-
size: 16
|
|
1913
|
-
}, {
|
|
1914
|
-
default: () => [ createVNode(setting_default, null, null) ]
|
|
1915
|
-
}) ]) ]) ]), createVNode(Teleport, {
|
|
1916
|
-
to: "body"
|
|
1917
|
-
}, {
|
|
1918
|
-
default: () => [ createVNode(ElDrawer, {
|
|
1919
|
-
modelValue: this.settingDrawer,
|
|
1920
|
-
"onUpdate:modelValue": $event => this.settingDrawer = $event,
|
|
1921
|
-
title: this.t("next.layout.systemSetting"),
|
|
1922
|
-
direction: "rtl",
|
|
1923
|
-
size: "380px",
|
|
1924
|
-
class: _ns.be("drawer", "setting"),
|
|
1925
|
-
"destroy-on-close": !0,
|
|
1926
|
-
beforeClose: _closeSettingDrawer
|
|
1927
|
-
}, {
|
|
1928
|
-
default: () => [ createVNode(LayoutSetting, null, null) ]
|
|
1929
|
-
}) ]
|
|
1930
|
-
}) ]);
|
|
1931
|
-
}
|
|
1932
|
-
});
|
|
1933
|
-
|
|
1934
|
-
const {getLightColor: getLightColor$4} = useChangeColor();
|
|
1935
|
-
|
|
1936
|
-
var Header$4 = defineComponent({
|
|
1937
|
-
setup: () => ({
|
|
1938
|
-
ns: inject("ns", {})
|
|
1939
|
-
}),
|
|
1940
|
-
render() {
|
|
1941
|
-
const slots = this.$slots, _ns = this.ns, _config = inject("options", {}), headerStyle = computed((() => {
|
|
1942
|
-
const {isHeaderBarColorGradual: isHeaderBarColorGradual, headerBarColor: color} = _config.setting;
|
|
1943
|
-
return isHeaderBarColorGradual ? {
|
|
1944
|
-
background: `linear-gradient(to bottom , ${color}, ${getLightColor$4(color, .5)})`
|
|
1945
|
-
} : "";
|
|
1946
|
-
})), __slots_header_tools = {};
|
|
1947
|
-
return slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
1948
|
-
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]()),
|
|
1949
|
-
createVNode("header", {
|
|
1950
|
-
class: _ns.b("header"),
|
|
1951
|
-
style: headerStyle.value
|
|
1952
|
-
}, [ createVNode(LogoView, null, null), createVNode("div", {
|
|
1953
|
-
class: _ns.bf("header", "right")
|
|
1954
|
-
}, [ createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? __slots_header_tools : {
|
|
1955
|
-
default: () => [ __slots_header_tools ]
|
|
1956
|
-
})) ]) ]);
|
|
1957
|
-
var s;
|
|
1958
|
-
}
|
|
1959
1620
|
});
|
|
1960
1621
|
|
|
1961
1622
|
function getDefaultExportFromCjs(x) {
|
|
@@ -2487,160 +2148,503 @@ function isElement(obj) {
|
|
|
2487
2148
|
return obj && 1 === obj.nodeType;
|
|
2488
2149
|
}
|
|
2489
2150
|
|
|
2490
|
-
var elementResizeDetector = function(options) {
|
|
2491
|
-
var idHandler;
|
|
2492
|
-
if ((options = options || {}).idHandler) idHandler = {
|
|
2493
|
-
get: function(element) {
|
|
2494
|
-
return options.idHandler.get(element, !0);
|
|
2495
|
-
},
|
|
2496
|
-
set: options.idHandler.set
|
|
2497
|
-
}; else {
|
|
2498
|
-
var idGenerator = idGeneratorMaker(), defaultIdHandler = idHandlerMaker({
|
|
2499
|
-
idGenerator: idGenerator,
|
|
2500
|
-
stateHandler: stateHandler
|
|
2151
|
+
var elementResizeDetector = function(options) {
|
|
2152
|
+
var idHandler;
|
|
2153
|
+
if ((options = options || {}).idHandler) idHandler = {
|
|
2154
|
+
get: function(element) {
|
|
2155
|
+
return options.idHandler.get(element, !0);
|
|
2156
|
+
},
|
|
2157
|
+
set: options.idHandler.set
|
|
2158
|
+
}; else {
|
|
2159
|
+
var idGenerator = idGeneratorMaker(), defaultIdHandler = idHandlerMaker({
|
|
2160
|
+
idGenerator: idGenerator,
|
|
2161
|
+
stateHandler: stateHandler
|
|
2162
|
+
});
|
|
2163
|
+
idHandler = defaultIdHandler;
|
|
2164
|
+
}
|
|
2165
|
+
var reporter = options.reporter;
|
|
2166
|
+
reporter || (reporter = reporterMaker(!1 === reporter));
|
|
2167
|
+
var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({
|
|
2168
|
+
reporter: reporter
|
|
2169
|
+
})), globalOptions = {};
|
|
2170
|
+
globalOptions.callOnAdd = !!getOption(options, "callOnAdd", !0), globalOptions.debug = !!getOption(options, "debug", !1);
|
|
2171
|
+
var detectionStrategy, eventListenerHandler = listenerHandlerMaker(idHandler), elementUtils = elementUtilsMaker({
|
|
2172
|
+
stateHandler: stateHandler
|
|
2173
|
+
}), desiredStrategy = getOption(options, "strategy", "object"), importantCssRules = getOption(options, "important", !1), strategyOptions = {
|
|
2174
|
+
reporter: reporter,
|
|
2175
|
+
batchProcessor: batchProcessor,
|
|
2176
|
+
stateHandler: stateHandler,
|
|
2177
|
+
idHandler: idHandler,
|
|
2178
|
+
important: importantCssRules
|
|
2179
|
+
};
|
|
2180
|
+
if ("scroll" === desiredStrategy && (browserDetector.isLegacyOpera() ? (reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),
|
|
2181
|
+
desiredStrategy = "object") : browserDetector.isIE(9) && (reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),
|
|
2182
|
+
desiredStrategy = "object")), "scroll" === desiredStrategy) detectionStrategy = scrollStrategyMaker(strategyOptions); else {
|
|
2183
|
+
if ("object" !== desiredStrategy) throw new Error("Invalid strategy name: " + desiredStrategy);
|
|
2184
|
+
detectionStrategy = objectStrategyMaker(strategyOptions);
|
|
2185
|
+
}
|
|
2186
|
+
var onReadyCallbacks = {};
|
|
2187
|
+
return {
|
|
2188
|
+
listenTo: function(options, elements, listener) {
|
|
2189
|
+
function onResizeCallback(element) {
|
|
2190
|
+
var listeners = eventListenerHandler.get(element);
|
|
2191
|
+
forEach(listeners, (function(listener) {
|
|
2192
|
+
listener(element);
|
|
2193
|
+
}));
|
|
2194
|
+
}
|
|
2195
|
+
function addListener(callOnAdd, element, listener) {
|
|
2196
|
+
eventListenerHandler.add(element, listener), callOnAdd && listener(element);
|
|
2197
|
+
}
|
|
2198
|
+
if (listener || (listener = elements, elements = options, options = {}), !elements) throw new Error("At least one element required.");
|
|
2199
|
+
if (!listener) throw new Error("Listener required.");
|
|
2200
|
+
if (isElement(elements)) elements = [ elements ]; else {
|
|
2201
|
+
if (!isCollection(elements)) return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
|
|
2202
|
+
elements = toArray(elements);
|
|
2203
|
+
}
|
|
2204
|
+
var elementsReady = 0, callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd), onReadyCallback = getOption(options, "onReady", (function() {})), debug = getOption(options, "debug", globalOptions.debug);
|
|
2205
|
+
forEach(elements, (function(element) {
|
|
2206
|
+
stateHandler.getState(element) || (stateHandler.initState(element), idHandler.set(element));
|
|
2207
|
+
var id = idHandler.get(element);
|
|
2208
|
+
if (debug && reporter.log("Attaching listener to element", id, element), !elementUtils.isDetectable(element)) return debug && reporter.log(id, "Not detectable."),
|
|
2209
|
+
elementUtils.isBusy(element) ? (debug && reporter.log(id, "System busy making it detectable"),
|
|
2210
|
+
addListener(callOnAdd, element, listener), onReadyCallbacks[id] = onReadyCallbacks[id] || [],
|
|
2211
|
+
void onReadyCallbacks[id].push((function() {
|
|
2212
|
+
++elementsReady === elements.length && onReadyCallback();
|
|
2213
|
+
}))) : (debug && reporter.log(id, "Making detectable..."), elementUtils.markBusy(element, !0),
|
|
2214
|
+
detectionStrategy.makeDetectable({
|
|
2215
|
+
debug: debug,
|
|
2216
|
+
important: importantCssRules
|
|
2217
|
+
}, element, (function(element) {
|
|
2218
|
+
if (debug && reporter.log(id, "onElementDetectable"), stateHandler.getState(element)) {
|
|
2219
|
+
elementUtils.markAsDetectable(element), elementUtils.markBusy(element, !1), detectionStrategy.addListener(element, onResizeCallback),
|
|
2220
|
+
addListener(callOnAdd, element, listener);
|
|
2221
|
+
var state = stateHandler.getState(element);
|
|
2222
|
+
if (state && state.startSize) {
|
|
2223
|
+
var width = element.offsetWidth, height = element.offsetHeight;
|
|
2224
|
+
state.startSize.width === width && state.startSize.height === height || onResizeCallback(element);
|
|
2225
|
+
}
|
|
2226
|
+
onReadyCallbacks[id] && forEach(onReadyCallbacks[id], (function(callback) {
|
|
2227
|
+
callback();
|
|
2228
|
+
}));
|
|
2229
|
+
} else debug && reporter.log(id, "Element uninstalled before being detectable.");
|
|
2230
|
+
delete onReadyCallbacks[id], ++elementsReady === elements.length && onReadyCallback();
|
|
2231
|
+
})));
|
|
2232
|
+
debug && reporter.log(id, "Already detecable, adding listener."), addListener(callOnAdd, element, listener),
|
|
2233
|
+
elementsReady++;
|
|
2234
|
+
})), elementsReady === elements.length && onReadyCallback();
|
|
2235
|
+
},
|
|
2236
|
+
removeListener: eventListenerHandler.removeListener,
|
|
2237
|
+
removeAllListeners: eventListenerHandler.removeAllListeners,
|
|
2238
|
+
uninstall: function(elements) {
|
|
2239
|
+
if (!elements) return reporter.error("At least one element is required.");
|
|
2240
|
+
if (isElement(elements)) elements = [ elements ]; else {
|
|
2241
|
+
if (!isCollection(elements)) return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
|
|
2242
|
+
elements = toArray(elements);
|
|
2243
|
+
}
|
|
2244
|
+
forEach(elements, (function(element) {
|
|
2245
|
+
eventListenerHandler.removeAllListeners(element), detectionStrategy.uninstall(element),
|
|
2246
|
+
stateHandler.cleanState(element);
|
|
2247
|
+
}));
|
|
2248
|
+
},
|
|
2249
|
+
initDocument: function(targetDocument) {
|
|
2250
|
+
detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);
|
|
2251
|
+
}
|
|
2252
|
+
};
|
|
2253
|
+
};
|
|
2254
|
+
|
|
2255
|
+
function getOption(options, name, defaultValue) {
|
|
2256
|
+
var value = options[name];
|
|
2257
|
+
return null == value && void 0 !== defaultValue ? defaultValue : value;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
var elementResizeDetectorMaker = getDefaultExportFromCjs(elementResizeDetector);
|
|
2261
|
+
|
|
2262
|
+
const elementResize = (el, cb) => {
|
|
2263
|
+
const erd = elementResizeDetectorMaker();
|
|
2264
|
+
let timer = null;
|
|
2265
|
+
erd.listenTo(el, (() => {
|
|
2266
|
+
null !== timer && clearTimeout(timer), timer = setTimeout((() => {
|
|
2267
|
+
cb && cb(el), clearTimeout(timer);
|
|
2268
|
+
}), 200);
|
|
2269
|
+
})), onUnmounted((() => {
|
|
2270
|
+
erd.removeListener(el, (() => {}));
|
|
2271
|
+
}));
|
|
2272
|
+
}, deepClone = source => {
|
|
2273
|
+
if (null == source) return source;
|
|
2274
|
+
let target;
|
|
2275
|
+
if ("object" == typeof source) {
|
|
2276
|
+
target = Array.isArray(source) ? [] : {};
|
|
2277
|
+
for (let key in source) "object" == typeof source[key] ? target[key] = deepClone(source[key]) : target[key] = source[key];
|
|
2278
|
+
} else target = source;
|
|
2279
|
+
return target;
|
|
2280
|
+
}, arrayObjNoRepeat = (arr, property) => {
|
|
2281
|
+
const result = [], uniqueMap = new Map;
|
|
2282
|
+
for (const item of arr) {
|
|
2283
|
+
const key = item[property];
|
|
2284
|
+
uniqueMap.has(key) || (uniqueMap.set(key, !0), result.push(item));
|
|
2285
|
+
}
|
|
2286
|
+
return result;
|
|
2287
|
+
}, isValueExist = value => null != value && ("string" == typeof value ? "" !== value.trim() : !1 !== value), valueExist = (...arg) => {
|
|
2288
|
+
let exist = null;
|
|
2289
|
+
for (let i = 0; i < arg.length; i++) {
|
|
2290
|
+
const val = arg[i];
|
|
2291
|
+
if (null != val) {
|
|
2292
|
+
exist = val;
|
|
2293
|
+
break;
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
return exist;
|
|
2297
|
+
}, shareObjectProperty = (target, source, key) => (Object.defineProperty(target, key, {
|
|
2298
|
+
get: () => source[key]
|
|
2299
|
+
}), {
|
|
2300
|
+
target: target,
|
|
2301
|
+
source: source
|
|
2302
|
+
});
|
|
2303
|
+
|
|
2304
|
+
var LayoutSetting = defineComponent({
|
|
2305
|
+
setup() {
|
|
2306
|
+
const config = inject("options", {});
|
|
2307
|
+
return isValueExist(config.setting.headerBarFontActiveColor) || (config.setting.headerBarFontActiveColor = config.setting.themeColor),
|
|
2308
|
+
{
|
|
2309
|
+
config: config
|
|
2310
|
+
};
|
|
2311
|
+
},
|
|
2312
|
+
render() {
|
|
2313
|
+
const _slots = inject("__slots__", {}), _ns = inject("__ns__", {}), _config = this.config, _updateOptions = inject("updateOptions", null), settingConfig = reactive({
|
|
2314
|
+
..._config.setting
|
|
2315
|
+
}), _changeUpdateOptions = () => {
|
|
2316
|
+
const options = {
|
|
2317
|
+
..._config,
|
|
2318
|
+
setting: {
|
|
2319
|
+
...settingConfig
|
|
2320
|
+
}
|
|
2321
|
+
};
|
|
2322
|
+
_updateOptions(options);
|
|
2323
|
+
}, _onChangeThemeColor = color => {
|
|
2324
|
+
if (!color) return ElMessage({
|
|
2325
|
+
type: "warning",
|
|
2326
|
+
message: "主题颜色不能为空"
|
|
2327
|
+
}), !1;
|
|
2328
|
+
settingConfig.themeColor = color, nextUseCssTheme("--el-color-primary", color),
|
|
2329
|
+
_changeUpdateOptions();
|
|
2330
|
+
}, _onChangeSwitchDark = () => {
|
|
2331
|
+
const body = document.documentElement;
|
|
2332
|
+
settingConfig.isDark ? body.setAttribute("data-theme", "dark") : body.setAttribute("data-theme", ""),
|
|
2333
|
+
_changeUpdateOptions();
|
|
2334
|
+
}, _onChangeColor = (color, key, cssvar) => {
|
|
2335
|
+
settingConfig[key] = color, nextUseCssVar(cssvar, color), _changeUpdateOptions();
|
|
2336
|
+
}, layouts = [ {
|
|
2337
|
+
type: "defaults",
|
|
2338
|
+
text: "默认"
|
|
2339
|
+
}, {
|
|
2340
|
+
type: "classic",
|
|
2341
|
+
text: "经典"
|
|
2342
|
+
}, {
|
|
2343
|
+
type: "transverse",
|
|
2344
|
+
text: "横向"
|
|
2345
|
+
}, {
|
|
2346
|
+
type: "columns",
|
|
2347
|
+
text: "分栏"
|
|
2348
|
+
}, {
|
|
2349
|
+
type: "composite",
|
|
2350
|
+
text: "综合"
|
|
2351
|
+
} ];
|
|
2352
|
+
return createVNode(ElScrollbar, null, {
|
|
2353
|
+
default: () => [ createVNode(ElDivider, {
|
|
2354
|
+
"border-style": "dashed"
|
|
2355
|
+
}, {
|
|
2356
|
+
default: () => [ createTextVNode("全局主题") ]
|
|
2357
|
+
}), createVNode("div", {
|
|
2358
|
+
class: _ns.b("config-bar-item")
|
|
2359
|
+
}, [ createVNode("span", {
|
|
2360
|
+
class: _ns.be("config-bar-item", "label")
|
|
2361
|
+
}, [ createTextVNode("主题颜色") ]), createVNode("div", {
|
|
2362
|
+
class: _ns.be("config-bar-item", "value")
|
|
2363
|
+
}, [ createVNode(ElColorPicker, {
|
|
2364
|
+
modelValue: settingConfig.themeColor,
|
|
2365
|
+
"onUpdate:modelValue": $event => settingConfig.themeColor = $event,
|
|
2366
|
+
predefine: [ "#409eff", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
2367
|
+
"show-alpha": !0,
|
|
2368
|
+
onChange: _onChangeThemeColor
|
|
2369
|
+
}, null) ]) ]), createVNode("div", {
|
|
2370
|
+
class: _ns.b("config-bar-item")
|
|
2371
|
+
}, [ createVNode("span", {
|
|
2372
|
+
class: _ns.be("config-bar-item", "label")
|
|
2373
|
+
}, [ createTextVNode("暗黑模式") ]), createVNode("div", {
|
|
2374
|
+
class: _ns.be("config-bar-item", "value")
|
|
2375
|
+
}, [ createVNode(ElSwitch, {
|
|
2376
|
+
modelValue: settingConfig.isDark,
|
|
2377
|
+
"onUpdate:modelValue": $event => settingConfig.isDark = $event,
|
|
2378
|
+
"inline-prompt": !0,
|
|
2379
|
+
size: "large",
|
|
2380
|
+
"active-icon": moon_night_default,
|
|
2381
|
+
"inactive-icon": sunny_default,
|
|
2382
|
+
"active-color": "#1f1f1f",
|
|
2383
|
+
"inactive-color": "#dcdfe6",
|
|
2384
|
+
onChange: _onChangeSwitchDark
|
|
2385
|
+
}, null) ]) ]), createVNode("div", {
|
|
2386
|
+
class: _ns.b("config-bar-item")
|
|
2387
|
+
}, [ createVNode("span", {
|
|
2388
|
+
class: _ns.be("config-bar-item", "label")
|
|
2389
|
+
}, [ createTextVNode("顶栏背景颜色") ]), createVNode("div", {
|
|
2390
|
+
class: _ns.be("config-bar-item", "value")
|
|
2391
|
+
}, [ createVNode(ElColorPicker, {
|
|
2392
|
+
modelValue: settingConfig.headerBarColor,
|
|
2393
|
+
"onUpdate:modelValue": $event => settingConfig.headerBarColor = $event,
|
|
2394
|
+
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
2395
|
+
"show-alpha": !0,
|
|
2396
|
+
onChange: color => _onChangeColor(color, "headerBarColor", "--next-layout-bg-color")
|
|
2397
|
+
}, null) ]) ]), createVNode("div", {
|
|
2398
|
+
class: _ns.b("config-bar-item")
|
|
2399
|
+
}, [ createVNode("span", {
|
|
2400
|
+
class: _ns.be("config-bar-item", "label")
|
|
2401
|
+
}, [ createTextVNode("顶栏字体颜色") ]), createVNode("div", {
|
|
2402
|
+
class: _ns.be("config-bar-item", "value")
|
|
2403
|
+
}, [ createVNode(ElColorPicker, {
|
|
2404
|
+
modelValue: settingConfig.headerBarFontColor,
|
|
2405
|
+
"onUpdate:modelValue": $event => settingConfig.headerBarFontColor = $event,
|
|
2406
|
+
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
2407
|
+
"show-alpha": !0,
|
|
2408
|
+
onChange: color => _onChangeColor(color, "headerBarFontColor", "--next-layout-font-color")
|
|
2409
|
+
}, null) ]) ]), createVNode("div", {
|
|
2410
|
+
class: _ns.b("config-bar-item")
|
|
2411
|
+
}, [ createVNode("span", {
|
|
2412
|
+
class: _ns.be("config-bar-item", "label")
|
|
2413
|
+
}, [ createTextVNode("顶栏激活字体颜色") ]), createVNode("div", {
|
|
2414
|
+
class: _ns.be("config-bar-item", "value")
|
|
2415
|
+
}, [ createVNode(ElColorPicker, {
|
|
2416
|
+
modelValue: settingConfig.headerBarFontActiveColor,
|
|
2417
|
+
"onUpdate:modelValue": $event => settingConfig.headerBarFontActiveColor = $event,
|
|
2418
|
+
predefine: [ "#282c34", "#ff4500", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "#FB07A0" ],
|
|
2419
|
+
"show-alpha": !0,
|
|
2420
|
+
onChange: color => _onChangeColor(color, "headerBarFontActiveColor", "--next-layout-active-color")
|
|
2421
|
+
}, null) ]) ]), createVNode("div", {
|
|
2422
|
+
class: _ns.b("config-bar-item")
|
|
2423
|
+
}, [ createVNode("span", {
|
|
2424
|
+
class: _ns.be("config-bar-item", "label")
|
|
2425
|
+
}, [ createTextVNode("顶栏背景渐变") ]), createVNode("div", {
|
|
2426
|
+
class: _ns.be("config-bar-item", "value")
|
|
2427
|
+
}, [ createVNode(resolveComponent("el-switch"), {
|
|
2428
|
+
modelValue: settingConfig.isHeaderBarColorGradual,
|
|
2429
|
+
"onUpdate:modelValue": $event => settingConfig.isHeaderBarColorGradual = $event,
|
|
2430
|
+
onChange: _changeUpdateOptions
|
|
2431
|
+
}, null) ]) ]), createVNode(ElDivider, {
|
|
2432
|
+
"border-style": "dashed"
|
|
2433
|
+
}, {
|
|
2434
|
+
default: () => [ createTextVNode("布局方式") ]
|
|
2435
|
+
}), createVNode("ul", {
|
|
2436
|
+
class: _ns.b("config-bar-layout")
|
|
2437
|
+
}, [ layouts.map((item => createVNode("li", {
|
|
2438
|
+
class: [ _ns.be("config-bar-layout", item.type), _ns.is("active", settingConfig.layout === item.type) ],
|
|
2439
|
+
onClick: event => ((event, layout) => {
|
|
2440
|
+
event.stopPropagation(), settingConfig.layout = layout.type, _changeUpdateOptions();
|
|
2441
|
+
})(event, item)
|
|
2442
|
+
}, [ createVNode("div", {
|
|
2443
|
+
class: "layout-wrap"
|
|
2444
|
+
}, [ createVNode("div", {
|
|
2445
|
+
class: "layout-box"
|
|
2446
|
+
}, [ createVNode("p", {
|
|
2447
|
+
class: "layout-text"
|
|
2448
|
+
}, [ item.text ]) ]) ]), createVNode("aside", null, null) ]))) ]), createVNode("div", {
|
|
2449
|
+
class: _ns.b("config-bar-item"),
|
|
2450
|
+
style: {
|
|
2451
|
+
"margin-top": "20px"
|
|
2452
|
+
}
|
|
2453
|
+
}, [ createVNode("span", {
|
|
2454
|
+
class: _ns.be("config-bar-item", "label")
|
|
2455
|
+
}, [ createTextVNode("是否显示标签栏") ]), createVNode("div", {
|
|
2456
|
+
class: _ns.be("config-bar-item", "value")
|
|
2457
|
+
}, [ createVNode(ElSwitch, {
|
|
2458
|
+
modelValue: _config.showTabs,
|
|
2459
|
+
"onUpdate:modelValue": $event => _config.showTabs = $event
|
|
2460
|
+
}, null) ]) ]), _slots.setting?.({
|
|
2461
|
+
config: settingConfig
|
|
2462
|
+
}) ]
|
|
2501
2463
|
});
|
|
2502
|
-
idHandler = defaultIdHandler;
|
|
2503
|
-
}
|
|
2504
|
-
var reporter = options.reporter;
|
|
2505
|
-
reporter || (reporter = reporterMaker(!1 === reporter));
|
|
2506
|
-
var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({
|
|
2507
|
-
reporter: reporter
|
|
2508
|
-
})), globalOptions = {};
|
|
2509
|
-
globalOptions.callOnAdd = !!getOption(options, "callOnAdd", !0), globalOptions.debug = !!getOption(options, "debug", !1);
|
|
2510
|
-
var detectionStrategy, eventListenerHandler = listenerHandlerMaker(idHandler), elementUtils = elementUtilsMaker({
|
|
2511
|
-
stateHandler: stateHandler
|
|
2512
|
-
}), desiredStrategy = getOption(options, "strategy", "object"), importantCssRules = getOption(options, "important", !1), strategyOptions = {
|
|
2513
|
-
reporter: reporter,
|
|
2514
|
-
batchProcessor: batchProcessor,
|
|
2515
|
-
stateHandler: stateHandler,
|
|
2516
|
-
idHandler: idHandler,
|
|
2517
|
-
important: importantCssRules
|
|
2518
|
-
};
|
|
2519
|
-
if ("scroll" === desiredStrategy && (browserDetector.isLegacyOpera() ? (reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),
|
|
2520
|
-
desiredStrategy = "object") : browserDetector.isIE(9) && (reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),
|
|
2521
|
-
desiredStrategy = "object")), "scroll" === desiredStrategy) detectionStrategy = scrollStrategyMaker(strategyOptions); else {
|
|
2522
|
-
if ("object" !== desiredStrategy) throw new Error("Invalid strategy name: " + desiredStrategy);
|
|
2523
|
-
detectionStrategy = objectStrategyMaker(strategyOptions);
|
|
2524
2464
|
}
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2465
|
+
});
|
|
2466
|
+
|
|
2467
|
+
var HeaderTools = defineComponent({
|
|
2468
|
+
setup() {
|
|
2469
|
+
const locale = inject(localeContextKey, ref()), config = inject("options", {}), {t: t} = useLocale(), {toggle: toggle, isFullscreen: isFullscreen} = useFullscreen(), language = ref(computed((() => config.language)).value), settingDrawer = ref(!1);
|
|
2470
|
+
return {
|
|
2471
|
+
locale: locale,
|
|
2472
|
+
config: config,
|
|
2473
|
+
t: t,
|
|
2474
|
+
toggle: toggle,
|
|
2475
|
+
isFullscreen: isFullscreen,
|
|
2476
|
+
language: language,
|
|
2477
|
+
settingDrawer: settingDrawer
|
|
2478
|
+
};
|
|
2479
|
+
},
|
|
2480
|
+
render() {
|
|
2481
|
+
const _ns = inject("__ns__", {}), _config = this.config, _emit = inject("__emit__", {}), slots = this.$slots, _t = this.t, isFullscreen = this.isFullscreen, profile_url = _config.profile, _userDropdown = _config.userDropdown, _languageDropdown = _config.languageDropdown, _closeSettingDrawer = () => {
|
|
2482
|
+
this.settingDrawer = !1;
|
|
2483
|
+
};
|
|
2484
|
+
return createVNode(Fragment, null, [ createVNode("ul", {
|
|
2485
|
+
class: _ns.b("header-tools")
|
|
2486
|
+
}, [ slots[slots_config_headerToolsPrefix]?.(), createVNode("li", null, [ createVNode(ElDropdown, {
|
|
2487
|
+
"show-timeout": 70,
|
|
2488
|
+
"hide-timeout": 50,
|
|
2489
|
+
trigger: "click",
|
|
2490
|
+
onCommand: command => {
|
|
2491
|
+
this.language = command, _emit("changeLanguage", command), _config.onChangeLanguage && _config.onChangeLanguage(command);
|
|
2533
2492
|
}
|
|
2534
|
-
|
|
2535
|
-
|
|
2493
|
+
}, {
|
|
2494
|
+
default: () => createVNode("div", null, [ createVNode(ElIcon, {
|
|
2495
|
+
size: 16
|
|
2496
|
+
}, {
|
|
2497
|
+
default: () => [ createVNode("svg", {
|
|
2498
|
+
class: "icon",
|
|
2499
|
+
viewBox: "0 0 1070 1024",
|
|
2500
|
+
version: "1.1",
|
|
2501
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2502
|
+
"p-id": "1855",
|
|
2503
|
+
width: "128",
|
|
2504
|
+
height: "128"
|
|
2505
|
+
}, [ createVNode("path", {
|
|
2506
|
+
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",
|
|
2507
|
+
"p-id": "1856"
|
|
2508
|
+
}, null), createVNode("path", {
|
|
2509
|
+
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",
|
|
2510
|
+
"p-id": "1857"
|
|
2511
|
+
}, null), createVNode("path", {
|
|
2512
|
+
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",
|
|
2513
|
+
"p-id": "1858"
|
|
2514
|
+
}, null) ]) ]
|
|
2515
|
+
}) ]),
|
|
2516
|
+
dropdown: () => {
|
|
2517
|
+
let _slot;
|
|
2518
|
+
return createVNode(ElDropdownMenu, null, "function" == typeof (s = _slot = _languageDropdown.map((item => createVNode(ElDropdownItem, {
|
|
2519
|
+
command: item.value,
|
|
2520
|
+
disabled: this.language === item.value
|
|
2521
|
+
}, {
|
|
2522
|
+
default: () => [ item.label ]
|
|
2523
|
+
})))) || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? _slot : {
|
|
2524
|
+
default: () => [ _slot ]
|
|
2525
|
+
});
|
|
2526
|
+
var s;
|
|
2536
2527
|
}
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2528
|
+
}) ]), createVNode("li", null, [ createVNode("span", {
|
|
2529
|
+
style: {
|
|
2530
|
+
display: "inline-block",
|
|
2531
|
+
lineHeight: 1
|
|
2532
|
+
},
|
|
2533
|
+
onClick: this.toggle
|
|
2534
|
+
}, [ createVNode(ElIcon, {
|
|
2535
|
+
size: 16
|
|
2536
|
+
}, {
|
|
2537
|
+
default: () => [ isFullscreen ? createVNode("svg", {
|
|
2538
|
+
class: "icon",
|
|
2539
|
+
viewBox: "0 0 1024 1024",
|
|
2540
|
+
version: "1.1",
|
|
2541
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2542
|
+
"p-id": "2676",
|
|
2543
|
+
width: "128",
|
|
2544
|
+
height: "128"
|
|
2545
|
+
}, [ createVNode("path", {
|
|
2546
|
+
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",
|
|
2547
|
+
"p-id": "2677"
|
|
2548
|
+
}, null) ]) : createVNode("svg", {
|
|
2549
|
+
class: "icon",
|
|
2550
|
+
viewBox: "0 0 1024 1024",
|
|
2551
|
+
version: "1.1",
|
|
2552
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2553
|
+
"p-id": "2522",
|
|
2554
|
+
width: "128",
|
|
2555
|
+
height: "128"
|
|
2556
|
+
}, [ createVNode("path", {
|
|
2557
|
+
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",
|
|
2558
|
+
"p-id": "2523"
|
|
2559
|
+
}, null) ]) ]
|
|
2560
|
+
}) ]) ]), slots[slots_config_headerToolsSuffix]?.(), createVNode("li", null, [ createVNode(ElDropdown, {
|
|
2561
|
+
"show-timeout": 70,
|
|
2562
|
+
"hide-timeout": 80,
|
|
2563
|
+
"popper-class": _ns.be("header-tools", "userDropdown"),
|
|
2564
|
+
onCommand: command => {
|
|
2565
|
+
_emit("changeUserDropdown", command), _config.onChangeUserDropdown && _config.onChangeUserDropdown(command);
|
|
2542
2566
|
}
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
},
|
|
2575
|
-
removeListener: eventListenerHandler.removeListener,
|
|
2576
|
-
removeAllListeners: eventListenerHandler.removeAllListeners,
|
|
2577
|
-
uninstall: function(elements) {
|
|
2578
|
-
if (!elements) return reporter.error("At least one element is required.");
|
|
2579
|
-
if (isElement(elements)) elements = [ elements ]; else {
|
|
2580
|
-
if (!isCollection(elements)) return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
|
|
2581
|
-
elements = toArray(elements);
|
|
2567
|
+
}, {
|
|
2568
|
+
default: () => createVNode("span", {
|
|
2569
|
+
class: _ns.be("header-tools", "user")
|
|
2570
|
+
}, [ profile_url ? createVNode("img", {
|
|
2571
|
+
class: "user-photo",
|
|
2572
|
+
src: profile_url
|
|
2573
|
+
}, null) : null, createVNode("span", null, [ _config.userName ]), createVNode(ElIcon, {
|
|
2574
|
+
class: "el-icon--right"
|
|
2575
|
+
}, {
|
|
2576
|
+
default: () => [ createVNode(arrow_down_default, null, null) ]
|
|
2577
|
+
}) ]),
|
|
2578
|
+
dropdown: () => createVNode(ElDropdownMenu, null, {
|
|
2579
|
+
default: () => [ _userDropdown?.map((item => createVNode(ElDropdownItem, {
|
|
2580
|
+
command: item.value,
|
|
2581
|
+
divided: !!item.divided
|
|
2582
|
+
}, {
|
|
2583
|
+
default: () => [ item.svg ? createVNode("span", {
|
|
2584
|
+
innerHTML: item.svg,
|
|
2585
|
+
class: "item-svg"
|
|
2586
|
+
}, null) : null, item.iconfont ? createVNode("i", {
|
|
2587
|
+
class: item.iconfont
|
|
2588
|
+
}, null) : null, _t(item.label) ]
|
|
2589
|
+
}))) ]
|
|
2590
|
+
})
|
|
2591
|
+
}) ]), createVNode("li", null, [ createVNode("span", {
|
|
2592
|
+
style: {
|
|
2593
|
+
display: "inline-block",
|
|
2594
|
+
lineHeight: 1
|
|
2595
|
+
},
|
|
2596
|
+
onClick: () => {
|
|
2597
|
+
this.settingDrawer = !0;
|
|
2582
2598
|
}
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
},
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
let timer = null;
|
|
2604
|
-
erd.listenTo(el, (() => {
|
|
2605
|
-
null !== timer && clearTimeout(timer), timer = setTimeout((() => {
|
|
2606
|
-
cb && cb(el), clearTimeout(timer);
|
|
2607
|
-
}), 200);
|
|
2608
|
-
})), onUnmounted((() => {
|
|
2609
|
-
erd.removeListener(el, (() => {}));
|
|
2610
|
-
}));
|
|
2611
|
-
}, deepClone = source => {
|
|
2612
|
-
if (null == source) return source;
|
|
2613
|
-
let target;
|
|
2614
|
-
if ("object" == typeof source) {
|
|
2615
|
-
target = Array.isArray(source) ? [] : {};
|
|
2616
|
-
for (let key in source) "object" == typeof source[key] ? target[key] = deepClone(source[key]) : target[key] = source[key];
|
|
2617
|
-
} else target = source;
|
|
2618
|
-
return target;
|
|
2619
|
-
}, arrayObjNoRepeat = (arr, property) => {
|
|
2620
|
-
const result = [], uniqueMap = new Map;
|
|
2621
|
-
for (const item of arr) {
|
|
2622
|
-
const key = item[property];
|
|
2623
|
-
uniqueMap.has(key) || (uniqueMap.set(key, !0), result.push(item));
|
|
2624
|
-
}
|
|
2625
|
-
return result;
|
|
2626
|
-
}, isValueExist = value => null != value && ("string" == typeof value ? "" !== value.trim() : !1 !== value), valueExist = (...arg) => {
|
|
2627
|
-
let exist = null;
|
|
2628
|
-
for (let i = 0; i < arg.length; i++) {
|
|
2629
|
-
const val = arg[i];
|
|
2630
|
-
if (null != val) {
|
|
2631
|
-
exist = val;
|
|
2632
|
-
break;
|
|
2633
|
-
}
|
|
2599
|
+
}, [ createVNode(ElIcon, {
|
|
2600
|
+
size: 16
|
|
2601
|
+
}, {
|
|
2602
|
+
default: () => [ createVNode(setting_default, null, null) ]
|
|
2603
|
+
}) ]) ]) ]), createVNode(Teleport, {
|
|
2604
|
+
to: "body"
|
|
2605
|
+
}, {
|
|
2606
|
+
default: () => [ createVNode(ElDrawer, {
|
|
2607
|
+
modelValue: this.settingDrawer,
|
|
2608
|
+
"onUpdate:modelValue": $event => this.settingDrawer = $event,
|
|
2609
|
+
title: this.t("next.layout.systemSetting"),
|
|
2610
|
+
direction: "rtl",
|
|
2611
|
+
size: "380px",
|
|
2612
|
+
class: _ns.be("drawer", "setting"),
|
|
2613
|
+
"destroy-on-close": !0,
|
|
2614
|
+
beforeClose: _closeSettingDrawer
|
|
2615
|
+
}, {
|
|
2616
|
+
default: () => [ createVNode(LayoutSetting, null, null) ]
|
|
2617
|
+
}) ]
|
|
2618
|
+
}) ]);
|
|
2634
2619
|
}
|
|
2635
|
-
return exist;
|
|
2636
|
-
}, shareObjectProperty = (target, source, key) => (Object.defineProperty(target, key, {
|
|
2637
|
-
get: () => source[key]
|
|
2638
|
-
}), {
|
|
2639
|
-
target: target,
|
|
2640
|
-
source: source
|
|
2641
2620
|
});
|
|
2642
2621
|
|
|
2643
|
-
|
|
2622
|
+
const {getLightColor: getLightColor$4} = useChangeColor();
|
|
2623
|
+
|
|
2624
|
+
var Header$4 = defineComponent({
|
|
2625
|
+
setup: () => ({
|
|
2626
|
+
ns: inject("ns", {})
|
|
2627
|
+
}),
|
|
2628
|
+
render() {
|
|
2629
|
+
const slots = this.$slots, _ns = this.ns, _config = inject("options", {}), headerStyle = computed((() => {
|
|
2630
|
+
const {isHeaderBarColorGradual: isHeaderBarColorGradual, headerBarColor: color} = _config.setting;
|
|
2631
|
+
return isHeaderBarColorGradual ? {
|
|
2632
|
+
background: `linear-gradient(to bottom , ${color}, ${getLightColor$4(color, .5)})`
|
|
2633
|
+
} : "";
|
|
2634
|
+
})), __slots_header_tools = {};
|
|
2635
|
+
return slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2636
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]()),
|
|
2637
|
+
createVNode("header", {
|
|
2638
|
+
class: _ns.b("header"),
|
|
2639
|
+
style: headerStyle.value
|
|
2640
|
+
}, [ createVNode(LogoView, null, null), createVNode("div", {
|
|
2641
|
+
class: _ns.bf("header", "right")
|
|
2642
|
+
}, [ createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? __slots_header_tools : {
|
|
2643
|
+
default: () => [ __slots_header_tools ]
|
|
2644
|
+
})) ]) ]);
|
|
2645
|
+
var s;
|
|
2646
|
+
}
|
|
2647
|
+
}), MenuItemTitle = defineComponent({
|
|
2644
2648
|
props: {
|
|
2645
2649
|
meta: {
|
|
2646
2650
|
type: Object,
|
|
@@ -3429,20 +3433,31 @@ const NextContainer = withInstall(defineComponent({
|
|
|
3429
3433
|
padding: padding + "px"
|
|
3430
3434
|
}), style;
|
|
3431
3435
|
}));
|
|
3432
|
-
return () =>
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3436
|
+
return () => (() => {
|
|
3437
|
+
if (props.scrollbar) {
|
|
3438
|
+
const scrollStyle = {
|
|
3439
|
+
"--next-container-padding": styles.value.padding
|
|
3440
|
+
};
|
|
3441
|
+
return createVNode(ElScrollbar, {
|
|
3442
|
+
class: [ ns$e.b(), props.className ],
|
|
3443
|
+
style: {
|
|
3444
|
+
...scrollStyle,
|
|
3445
|
+
...props.style
|
|
3446
|
+
}
|
|
3447
|
+
}, {
|
|
3448
|
+
default: () => [ slots.default?.() ]
|
|
3449
|
+
});
|
|
3442
3450
|
}
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3451
|
+
return createVNode("div", {
|
|
3452
|
+
class: [ ns$e.b(), props.className ],
|
|
3453
|
+
style: {
|
|
3454
|
+
...styles.value,
|
|
3455
|
+
...props.style
|
|
3456
|
+
}
|
|
3457
|
+
}, [ props.card ? createVNode("div", {
|
|
3458
|
+
class: ns$e.b("card")
|
|
3459
|
+
}, [ slots.default?.() ]) : slots.default?.() ]);
|
|
3460
|
+
})();
|
|
3446
3461
|
}
|
|
3447
3462
|
}));
|
|
3448
3463
|
|
|
@@ -4051,14 +4066,17 @@ var HeaderSearch = defineComponent({
|
|
|
4051
4066
|
setup: () => ({}),
|
|
4052
4067
|
emits: [ "clickAdd", "clickRefresh", "deleteRows" ],
|
|
4053
4068
|
render() {
|
|
4054
|
-
const _options = inject("options", {}), options = isRef(_options) ? unref(_options) : _options, {t: t} = useLocale(), ns = inject("ns", {}), multipleSelection = inject("multipleSelection"), multipleSelectionLength = computed((() => multipleSelection.value.length)),
|
|
4069
|
+
const _options = inject("options", {}), options = isRef(_options) ? unref(_options) : _options, {t: t} = useLocale(), ns = inject("ns", {}), multipleSelection = inject("multipleSelection"), multipleSelectionLength = computed((() => multipleSelection.value.length)), onClickRefresh = () => {
|
|
4070
|
+
this.$emit("clickRefresh");
|
|
4071
|
+
}, drawerSettingRef = ref(), slotProps = {
|
|
4072
|
+
size: options.size,
|
|
4073
|
+
refresh: onClickRefresh
|
|
4074
|
+
};
|
|
4055
4075
|
return createVNode("div", {
|
|
4056
4076
|
class: ns.b("header-menu")
|
|
4057
4077
|
}, [ createVNode("div", {
|
|
4058
4078
|
class: ns.b("header-menu-left")
|
|
4059
|
-
}, [ this.$slots["menu-left-prefix"]?.({
|
|
4060
|
-
size: options.size
|
|
4061
|
-
}), options.addBtn && createVNode(ElButton, {
|
|
4079
|
+
}, [ this.$slots["menu-left-prefix"]?.(slotProps), options.addBtn && createVNode(ElButton, {
|
|
4062
4080
|
type: "primary",
|
|
4063
4081
|
size: options.size,
|
|
4064
4082
|
onClick: () => {
|
|
@@ -4095,18 +4113,12 @@ var HeaderSearch = defineComponent({
|
|
|
4095
4113
|
default: () => [ createVNode(delete_default, null, null) ]
|
|
4096
4114
|
}),
|
|
4097
4115
|
default: () => t("next.table.batchDelete")
|
|
4098
|
-
}), this.$slots["menu-left-suffix"]?.({
|
|
4099
|
-
size: options.size
|
|
4100
|
-
}) ]), createVNode("div", {
|
|
4116
|
+
}), this.$slots["menu-left-suffix"]?.(slotProps) ]), createVNode("div", {
|
|
4101
4117
|
class: ns.b("header-menu-right")
|
|
4102
|
-
}, [ this.$slots["menu-right-prefix"]?.({
|
|
4103
|
-
size: options.size
|
|
4104
|
-
}), options.refreshBtn && createVNode(ElButton, {
|
|
4118
|
+
}, [ this.$slots["menu-right-prefix"]?.(slotProps), options.refreshBtn && createVNode(ElButton, {
|
|
4105
4119
|
circle: !0,
|
|
4106
4120
|
size: options.size,
|
|
4107
|
-
onClick:
|
|
4108
|
-
this.$emit("clickRefresh");
|
|
4109
|
-
}
|
|
4121
|
+
onClick: onClickRefresh
|
|
4110
4122
|
}, {
|
|
4111
4123
|
icon: () => createVNode(ElIcon, null, {
|
|
4112
4124
|
default: () => [ createVNode(refresh_default, null, null) ]
|
|
@@ -4121,9 +4133,7 @@ var HeaderSearch = defineComponent({
|
|
|
4121
4133
|
icon: () => createVNode(ElIcon, null, {
|
|
4122
4134
|
default: () => [ createVNode(tools_default, null, null) ]
|
|
4123
4135
|
})
|
|
4124
|
-
}), this.$slots["menu-right-suffix"]?.({
|
|
4125
|
-
size: options.size
|
|
4126
|
-
}) ]), createVNode(DrawerSetting, {
|
|
4136
|
+
}), this.$slots["menu-right-suffix"]?.(slotProps) ]), createVNode(DrawerSetting, {
|
|
4127
4137
|
ref: drawerSettingRef
|
|
4128
4138
|
}, null) ]);
|
|
4129
4139
|
}
|
|
@@ -4161,11 +4171,19 @@ const TableColumnDynamic = defineComponent({
|
|
|
4161
4171
|
});
|
|
4162
4172
|
var s;
|
|
4163
4173
|
})) ]);
|
|
4164
|
-
if (slots[columnSlotName(_prop)])
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4174
|
+
if (slots[columnSlotName(_prop)]) {
|
|
4175
|
+
const btnCfg = {
|
|
4176
|
+
text: options.operationsBtnText,
|
|
4177
|
+
plain: options.operationsBtnPlain,
|
|
4178
|
+
size: options.operationsBtnSize
|
|
4179
|
+
};
|
|
4180
|
+
return slots[columnSlotName(_prop)]({
|
|
4181
|
+
row: row,
|
|
4182
|
+
index: $index,
|
|
4183
|
+
column: columnOption,
|
|
4184
|
+
btn: btnCfg
|
|
4185
|
+
});
|
|
4186
|
+
}
|
|
4169
4187
|
if (columnOption.dicData?.length > 0) {
|
|
4170
4188
|
const loopDicData = list => {
|
|
4171
4189
|
const temp = [];
|
|
@@ -8532,17 +8550,20 @@ const zoomDialog = app => {
|
|
|
8532
8550
|
}));
|
|
8533
8551
|
}
|
|
8534
8552
|
});
|
|
8535
|
-
}, version = "0.5.
|
|
8536
|
-
Object.keys(components).forEach((key => {
|
|
8553
|
+
}, configProviderContextKey = Symbol("configProviderContextKey"), version = "0.5.10", install = function(app, options) {
|
|
8554
|
+
if (Object.keys(components).forEach((key => {
|
|
8537
8555
|
const component = components[key];
|
|
8538
8556
|
app.component(component.name, component);
|
|
8539
8557
|
})), (app => {
|
|
8540
8558
|
zoomDialog(app);
|
|
8541
|
-
})(app)
|
|
8559
|
+
})(app), options) {
|
|
8560
|
+
const inSetup = !!getCurrentInstance();
|
|
8561
|
+
(app?.provide ?? (inSetup ? provide : void 0))(configProviderContextKey, computed((() => options)));
|
|
8562
|
+
}
|
|
8542
8563
|
};
|
|
8543
8564
|
|
|
8544
8565
|
var index = {
|
|
8545
|
-
version: "0.5.
|
|
8566
|
+
version: "0.5.10",
|
|
8546
8567
|
install: install
|
|
8547
8568
|
};
|
|
8548
8569
|
|