@vxe-ui/core 0.0.1 → 0.1.1
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/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/es/index.esm.js +4 -6
- package/es/src/commands.js +3 -3
- package/es/src/core.js +49 -14
- package/es/src/event.js +38 -19
- package/es/src/formats.js +3 -3
- package/es/src/globalStore.js +2 -3
- package/es/src/i18n.js +3 -5
- package/es/src/i18nStore.js +4 -0
- package/es/src/iconStore.js +1 -2
- package/es/src/interceptor.js +2 -2
- package/es/src/log.js +8 -8
- package/es/src/menus.js +3 -3
- package/es/src/renderer.js +2 -2
- package/es/src/resize.js +9 -7
- package/es/src/store.js +2 -2
- package/es/src/themeStore.js +3 -0
- package/lib/index.common.js +2 -4
- package/lib/index.umd.js +326 -99
- package/lib/index.umd.min.js +1 -1
- package/lib/src/commands.js +2 -2
- package/lib/src/commands.min.js +1 -1
- package/lib/src/core.js +105 -22
- package/lib/src/core.min.js +1 -1
- package/lib/src/event.js +41 -23
- package/lib/src/event.min.js +1 -1
- package/lib/src/formats.js +2 -2
- package/lib/src/formats.min.js +1 -1
- package/lib/src/globalStore.js +4 -5
- package/lib/src/globalStore.min.js +1 -1
- package/lib/src/i18n.js +3 -5
- package/lib/src/i18n.min.js +1 -1
- package/lib/src/i18nStore.js +10 -0
- package/lib/src/i18nStore.min.js +1 -0
- package/lib/src/iconStore.js +2 -3
- package/lib/src/iconStore.min.js +1 -1
- package/lib/src/interceptor.js +1 -1
- package/lib/src/interceptor.min.js +1 -1
- package/lib/src/log.js +9 -11
- package/lib/src/log.min.js +1 -1
- package/lib/src/menus.js +2 -2
- package/lib/src/menus.min.js +1 -1
- package/lib/src/renderer.js +1 -1
- package/lib/src/renderer.min.js +1 -1
- package/lib/src/resize.js +10 -10
- package/lib/src/resize.min.js +1 -1
- package/lib/src/store.js +1 -1
- package/lib/src/store.min.js +1 -1
- package/lib/src/themeStore.js +9 -0
- package/lib/src/themeStore.min.js +1 -0
- package/package.json +2 -2
- package/packages/index.ts +4 -6
- package/packages/src/commands.ts +6 -6
- package/packages/src/core.ts +61 -18
- package/packages/src/event.ts +40 -23
- package/packages/src/formats.ts +6 -6
- package/packages/src/globalStore.ts +2 -4
- package/packages/src/i18n.ts +3 -5
- package/packages/src/i18nStore.ts +9 -0
- package/packages/src/iconStore.ts +1 -3
- package/packages/src/interceptor.ts +3 -3
- package/packages/src/log.ts +9 -8
- package/packages/src/menus.ts +6 -6
- package/packages/src/renderer.ts +5 -5
- package/packages/src/resize.ts +10 -6
- package/packages/src/store.ts +3 -3
- package/packages/src/themeStore.ts +7 -0
- package/packages/src/validators.ts +1 -1
- package/types/core/global-config.d.ts +3 -3
- package/types/core/global-event.d.ts +28 -0
- package/types/core/global-icon.d.ts +3 -1
- package/types/core/global-lang.d.ts +1 -0
- package/types/core/global-resize.d.ts +3 -0
- package/types/core/global-theme.d.ts +1 -0
- package/types/core/index.d.ts +63 -10
- package/types/core/log.d.ts +8 -0
- package/types/core/renderer.d.ts +5 -16
- package/types/index.d.ts +2 -2
- package/types/tool/common.d.ts +18 -8
- package/es/src/theme.js +0 -10
- package/lib/src/theme.js +0 -17
- package/lib/src/theme.min.js +0 -1
- package/packages/src/theme.ts +0 -13
package/lib/index.umd.js
CHANGED
|
@@ -1662,20 +1662,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1662
1662
|
|
|
1663
1663
|
// EXPORTS
|
|
1664
1664
|
__webpack_require__.d(__webpack_exports__, {
|
|
1665
|
+
GLOBAL_EVENT_KEYS: function() { return /* reexport */ GLOBAL_EVENT_KEYS; },
|
|
1666
|
+
VxeUI: function() { return /* reexport */ VxeUI; },
|
|
1667
|
+
clipboard: function() { return /* reexport */ clipboard; },
|
|
1665
1668
|
commands: function() { return /* reexport */ commands; },
|
|
1669
|
+
coreVersion: function() { return /* reexport */ coreVersion; },
|
|
1670
|
+
createEvent: function() { return /* reexport */ createEvent; },
|
|
1666
1671
|
"default": function() { return /* binding */ entry_lib; },
|
|
1667
1672
|
formats: function() { return /* reexport */ formats; },
|
|
1668
1673
|
getConfig: function() { return /* reexport */ getConfig; },
|
|
1669
1674
|
getI18n: function() { return /* reexport */ getI18n; },
|
|
1670
1675
|
getIcon: function() { return /* reexport */ getIcon; },
|
|
1676
|
+
getTheme: function() { return /* reexport */ getTheme; },
|
|
1677
|
+
globalEvents: function() { return /* reexport */ globalEvents; },
|
|
1678
|
+
globalResize: function() { return /* reexport */ globalResize; },
|
|
1671
1679
|
hooks: function() { return /* reexport */ hooks; },
|
|
1672
1680
|
interceptor: function() { return /* reexport */ interceptor; },
|
|
1681
|
+
log: function() { return /* reexport */ log; },
|
|
1673
1682
|
menus: function() { return /* reexport */ menus; },
|
|
1674
1683
|
renderer: function() { return /* reexport */ renderer; },
|
|
1675
1684
|
setConfig: function() { return /* reexport */ setConfig; },
|
|
1685
|
+
setI18n: function() { return /* reexport */ setI18n; },
|
|
1676
1686
|
setIcon: function() { return /* reexport */ setIcon; },
|
|
1677
|
-
|
|
1678
|
-
|
|
1687
|
+
setLanguage: function() { return /* reexport */ setLanguage; },
|
|
1688
|
+
setTheme: function() { return /* reexport */ setTheme; },
|
|
1689
|
+
validators: function() { return /* reexport */ validators; }
|
|
1679
1690
|
});
|
|
1680
1691
|
|
|
1681
1692
|
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
@@ -1810,50 +1821,280 @@ var DomZIndex = {
|
|
|
1810
1821
|
/* harmony default export */ var index_esm = (DomZIndex);
|
|
1811
1822
|
;// CONCATENATED MODULE: ./packages/src/globalStore.ts
|
|
1812
1823
|
const globalConfigStore = {
|
|
1824
|
+
authId: '',
|
|
1813
1825
|
size: '',
|
|
1814
|
-
theme: '',
|
|
1815
1826
|
version: 1,
|
|
1816
1827
|
zIndex: 999,
|
|
1817
1828
|
resizeInterval: 500,
|
|
1818
1829
|
i18n: key => key
|
|
1819
1830
|
};
|
|
1820
|
-
/* harmony default export */ var globalStore = (globalConfigStore);
|
|
1821
1831
|
;// CONCATENATED MODULE: ./packages/src/iconStore.ts
|
|
1822
1832
|
const iconConfigStore = {};
|
|
1823
|
-
|
|
1824
|
-
|
|
1833
|
+
;// CONCATENATED MODULE: ./packages/src/themeStore.ts
|
|
1834
|
+
const themeConfigStore = {
|
|
1835
|
+
theme: ''
|
|
1836
|
+
};
|
|
1837
|
+
;// CONCATENATED MODULE: ./packages/src/i18nStore.ts
|
|
1838
|
+
const i18nConfigStore = {
|
|
1839
|
+
language: '',
|
|
1840
|
+
langMaps: {}
|
|
1841
|
+
};
|
|
1842
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1843
|
+
function _typeof(o) {
|
|
1844
|
+
"@babel/helpers - typeof";
|
|
1825
1845
|
|
|
1826
|
-
function
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1846
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
1847
|
+
return typeof o;
|
|
1848
|
+
} : function (o) {
|
|
1849
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
1850
|
+
}, _typeof(o);
|
|
1851
|
+
}
|
|
1852
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
1853
|
+
|
|
1854
|
+
function toPrimitive(t, r) {
|
|
1855
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
1856
|
+
var e = t[Symbol.toPrimitive];
|
|
1857
|
+
if (void 0 !== e) {
|
|
1858
|
+
var i = e.call(t, r || "default");
|
|
1859
|
+
if ("object" != _typeof(i)) return i;
|
|
1860
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1861
|
+
}
|
|
1862
|
+
return ("string" === r ? String : Number)(t);
|
|
1863
|
+
}
|
|
1864
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
1865
|
+
|
|
1866
|
+
|
|
1867
|
+
function toPropertyKey(t) {
|
|
1868
|
+
var i = toPrimitive(t, "string");
|
|
1869
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
1870
|
+
}
|
|
1871
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
1872
|
+
|
|
1873
|
+
function _defineProperty(obj, key, value) {
|
|
1874
|
+
key = toPropertyKey(key);
|
|
1875
|
+
if (key in obj) {
|
|
1876
|
+
Object.defineProperty(obj, key, {
|
|
1877
|
+
value: value,
|
|
1878
|
+
enumerable: true,
|
|
1879
|
+
configurable: true,
|
|
1880
|
+
writable: true
|
|
1881
|
+
});
|
|
1882
|
+
} else {
|
|
1883
|
+
obj[key] = value;
|
|
1884
|
+
}
|
|
1885
|
+
return obj;
|
|
1886
|
+
}
|
|
1887
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
1888
|
+
var es_array_push = __webpack_require__(4114);
|
|
1889
|
+
;// CONCATENATED MODULE: ./packages/src/event.ts
|
|
1890
|
+
|
|
1891
|
+
|
|
1892
|
+
|
|
1893
|
+
const GLOBAL_EVENT_KEYS = {
|
|
1894
|
+
F2: 'F2',
|
|
1895
|
+
ESCAPE: 'Escape',
|
|
1896
|
+
ENTER: 'Enter',
|
|
1897
|
+
TAB: 'Tab',
|
|
1898
|
+
DELETE: 'Delete',
|
|
1899
|
+
BACKSPACE: 'Backspace',
|
|
1900
|
+
SPACEBAR: ' ',
|
|
1901
|
+
CONTEXT_MENU: 'ContextMenu',
|
|
1902
|
+
ARROW_UP: 'ArrowUp',
|
|
1903
|
+
ARROW_DOWN: 'ArrowDown',
|
|
1904
|
+
ARROW_LEFT: 'ArrowLeft',
|
|
1905
|
+
ARROW_RIGHT: 'ArrowRight',
|
|
1906
|
+
PAGE_UP: 'PageUp',
|
|
1907
|
+
PAGE_DOWN: 'PageDown'
|
|
1908
|
+
};
|
|
1909
|
+
const browse = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
|
|
1910
|
+
const convertEventKeys = {
|
|
1911
|
+
' ': 'Spacebar',
|
|
1912
|
+
Apps: GLOBAL_EVENT_KEYS.CONTEXT_MENU,
|
|
1913
|
+
Del: GLOBAL_EVENT_KEYS.DELETE,
|
|
1914
|
+
Up: GLOBAL_EVENT_KEYS.ARROW_UP,
|
|
1915
|
+
Down: GLOBAL_EVENT_KEYS.ARROW_DOWN,
|
|
1916
|
+
Left: GLOBAL_EVENT_KEYS.ARROW_LEFT,
|
|
1917
|
+
Right: GLOBAL_EVENT_KEYS.ARROW_RIGHT
|
|
1918
|
+
};
|
|
1919
|
+
// 监听全局事件
|
|
1920
|
+
const wheelName = browse.firefox ? 'DOMMouseScroll' : 'mousewheel';
|
|
1921
|
+
const eventStore = [];
|
|
1922
|
+
function triggerEvent(evnt) {
|
|
1923
|
+
const isWheel = evnt.type === wheelName;
|
|
1924
|
+
eventStore.forEach(({
|
|
1925
|
+
type,
|
|
1926
|
+
cb
|
|
1927
|
+
}) => {
|
|
1928
|
+
// 如果被取消冒泡,不再执行
|
|
1929
|
+
if (!evnt.cancelBubble) {
|
|
1930
|
+
if (type === evnt.type || isWheel && type === 'mousewheel') {
|
|
1931
|
+
cb(evnt);
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
});
|
|
1935
|
+
}
|
|
1936
|
+
const globalEvents = {
|
|
1937
|
+
on(comp, type, cb) {
|
|
1938
|
+
eventStore.push({
|
|
1939
|
+
comp,
|
|
1940
|
+
type,
|
|
1941
|
+
cb
|
|
1942
|
+
});
|
|
1943
|
+
},
|
|
1944
|
+
off(comp, type) {
|
|
1945
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(eventStore, item => item.comp === comp && item.type === type);
|
|
1946
|
+
},
|
|
1947
|
+
hasKey(evnt, targetKey) {
|
|
1948
|
+
const {
|
|
1949
|
+
key
|
|
1950
|
+
} = evnt;
|
|
1951
|
+
targetKey = targetKey.toLowerCase();
|
|
1952
|
+
return key ? targetKey === key.toLowerCase() || !!(convertEventKeys[key] && convertEventKeys[key].toLowerCase() === targetKey) : false;
|
|
1953
|
+
}
|
|
1954
|
+
};
|
|
1955
|
+
class VxeComponentEvent {
|
|
1956
|
+
constructor(evnt, params1, params2) {
|
|
1957
|
+
_defineProperty(this, "$event", void 0);
|
|
1958
|
+
this.$event = evnt;
|
|
1959
|
+
Object.assign(this, params1, params2);
|
|
1960
|
+
}
|
|
1961
|
+
stopPropagation() {
|
|
1962
|
+
const evnt = this.$event;
|
|
1963
|
+
if (evnt) {
|
|
1964
|
+
evnt.stopPropagation();
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
preventDefault() {
|
|
1968
|
+
const evnt = this.$event;
|
|
1969
|
+
if (evnt) {
|
|
1970
|
+
evnt.preventDefault();
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
function createEvent(evnt, params1, params2) {
|
|
1975
|
+
return new VxeComponentEvent(evnt, params1, params2);
|
|
1976
|
+
}
|
|
1977
|
+
if (browse.isDoc) {
|
|
1978
|
+
if (!browse.msie) {
|
|
1979
|
+
window.addEventListener('copy', triggerEvent, false);
|
|
1980
|
+
window.addEventListener('cut', triggerEvent, false);
|
|
1981
|
+
window.addEventListener('paste', triggerEvent, false);
|
|
1982
|
+
}
|
|
1983
|
+
document.addEventListener('keydown', triggerEvent, false);
|
|
1984
|
+
document.addEventListener('contextmenu', triggerEvent, false);
|
|
1985
|
+
window.addEventListener('mousedown', triggerEvent, false);
|
|
1986
|
+
window.addEventListener('blur', triggerEvent, false);
|
|
1987
|
+
window.addEventListener('resize', triggerEvent, false);
|
|
1988
|
+
window.addEventListener(wheelName, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().throttle(triggerEvent, 100, {
|
|
1989
|
+
leading: true,
|
|
1990
|
+
trailing: false
|
|
1991
|
+
}), {
|
|
1992
|
+
passive: true,
|
|
1993
|
+
capture: false
|
|
1994
|
+
});
|
|
1995
|
+
}
|
|
1996
|
+
;// CONCATENATED MODULE: ./packages/src/resize.ts
|
|
1997
|
+
|
|
1998
|
+
|
|
1999
|
+
|
|
2000
|
+
|
|
2001
|
+
/**
|
|
2002
|
+
* 监听 resize 事件
|
|
2003
|
+
* 如果项目中已使用了 resize-observer-polyfill,那么只需要将方法定义全局,该组件就会自动使用
|
|
2004
|
+
*/
|
|
2005
|
+
let resizeTimeout;
|
|
2006
|
+
/* eslint-disable no-use-before-define */
|
|
2007
|
+
const resize_eventStore = [];
|
|
2008
|
+
const defaultInterval = 500;
|
|
2009
|
+
function eventHandle() {
|
|
2010
|
+
if (resize_eventStore.length) {
|
|
2011
|
+
resize_eventStore.forEach(item => {
|
|
2012
|
+
item.tarList.forEach(observer => {
|
|
2013
|
+
const {
|
|
2014
|
+
target,
|
|
2015
|
+
width,
|
|
2016
|
+
heighe
|
|
2017
|
+
} = observer;
|
|
2018
|
+
const clientWidth = target.clientWidth;
|
|
2019
|
+
const clientHeight = target.clientHeight;
|
|
2020
|
+
const rWidth = clientWidth && width !== clientWidth;
|
|
2021
|
+
const rHeight = clientHeight && heighe !== clientHeight;
|
|
2022
|
+
if (rWidth || rHeight) {
|
|
2023
|
+
observer.width = clientWidth;
|
|
2024
|
+
observer.heighe = clientHeight;
|
|
2025
|
+
setTimeout(item.callback);
|
|
2026
|
+
}
|
|
2027
|
+
});
|
|
2028
|
+
});
|
|
2029
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
2030
|
+
eventListener();
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
function eventListener() {
|
|
2034
|
+
clearTimeout(resizeTimeout);
|
|
2035
|
+
resizeTimeout = setTimeout(eventHandle, globalConfigStore.resizeInterval || defaultInterval);
|
|
2036
|
+
}
|
|
2037
|
+
class XEResizeObserver {
|
|
2038
|
+
constructor(callback) {
|
|
2039
|
+
_defineProperty(this, "tarList", []);
|
|
2040
|
+
_defineProperty(this, "callback", void 0);
|
|
2041
|
+
this.callback = callback;
|
|
2042
|
+
}
|
|
2043
|
+
observe(target) {
|
|
2044
|
+
if (target) {
|
|
2045
|
+
const {
|
|
2046
|
+
tarList
|
|
2047
|
+
} = this;
|
|
2048
|
+
if (!tarList.some(observer => observer.target === target)) {
|
|
2049
|
+
tarList.push({
|
|
2050
|
+
target,
|
|
2051
|
+
width: target.clientWidth,
|
|
2052
|
+
heighe: target.clientHeight
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
if (!resize_eventStore.length) {
|
|
2056
|
+
eventListener();
|
|
2057
|
+
}
|
|
2058
|
+
if (!resize_eventStore.some(item => item === this)) {
|
|
2059
|
+
resize_eventStore.push(this);
|
|
2060
|
+
}
|
|
1832
2061
|
}
|
|
1833
2062
|
}
|
|
2063
|
+
unobserve(target) {
|
|
2064
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(resize_eventStore, item => item.tarList.some(observer => observer.target === target));
|
|
2065
|
+
}
|
|
2066
|
+
disconnect() {
|
|
2067
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(resize_eventStore, item => item === this);
|
|
2068
|
+
}
|
|
1834
2069
|
}
|
|
2070
|
+
const globalResize = {
|
|
2071
|
+
create(callback) {
|
|
2072
|
+
if (window.ResizeObserver) {
|
|
2073
|
+
return new window.ResizeObserver(callback);
|
|
2074
|
+
}
|
|
2075
|
+
return new XEResizeObserver(callback);
|
|
2076
|
+
}
|
|
2077
|
+
};
|
|
1835
2078
|
;// CONCATENATED MODULE: ./packages/src/i18n.ts
|
|
1836
2079
|
|
|
2080
|
+
|
|
1837
2081
|
function getI18n(key, args) {
|
|
1838
|
-
|
|
1839
|
-
return globalStore.i18n(key, args);
|
|
1840
|
-
}
|
|
1841
|
-
return key;
|
|
2082
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFormatString(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(i18nConfigStore.langMaps[i18nConfigStore.language], key), args);
|
|
1842
2083
|
}
|
|
1843
2084
|
;// CONCATENATED MODULE: ./packages/src/log.ts
|
|
1844
2085
|
|
|
1845
|
-
function
|
|
1846
|
-
return
|
|
1847
|
-
}
|
|
1848
|
-
function outLog(type) {
|
|
1849
|
-
return function (message, params) {
|
|
1850
|
-
const msg = getLog(message, params);
|
|
2086
|
+
function createLog(type, name) {
|
|
2087
|
+
return function (key, args) {
|
|
2088
|
+
const msg = `[${name || 'vxe'} v${"0.1.1"}] ${getI18n(key, args)}`;
|
|
1851
2089
|
console[type](msg);
|
|
1852
2090
|
return msg;
|
|
1853
2091
|
};
|
|
1854
2092
|
}
|
|
1855
|
-
const
|
|
1856
|
-
|
|
2093
|
+
const log = {
|
|
2094
|
+
create: createLog,
|
|
2095
|
+
warn: createLog('warn'),
|
|
2096
|
+
err: createLog('error')
|
|
2097
|
+
};
|
|
1857
2098
|
;// CONCATENATED MODULE: ./packages/src/renderer.ts
|
|
1858
2099
|
|
|
1859
2100
|
|
|
@@ -1880,7 +2121,7 @@ const renderer = {
|
|
|
1880
2121
|
if (true) {
|
|
1881
2122
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, (val, key) => {
|
|
1882
2123
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(renders[key]) && renders[key] !== val) {
|
|
1883
|
-
|
|
2124
|
+
log.warn('vxe.error.coverProp', [`Renderer.${name}`, key]);
|
|
1884
2125
|
}
|
|
1885
2126
|
});
|
|
1886
2127
|
}
|
|
@@ -1900,51 +2141,6 @@ const renderer = {
|
|
|
1900
2141
|
return renderer;
|
|
1901
2142
|
}
|
|
1902
2143
|
};
|
|
1903
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1904
|
-
function _typeof(o) {
|
|
1905
|
-
"@babel/helpers - typeof";
|
|
1906
|
-
|
|
1907
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
1908
|
-
return typeof o;
|
|
1909
|
-
} : function (o) {
|
|
1910
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
1911
|
-
}, _typeof(o);
|
|
1912
|
-
}
|
|
1913
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
1914
|
-
|
|
1915
|
-
function toPrimitive(t, r) {
|
|
1916
|
-
if ("object" != _typeof(t) || !t) return t;
|
|
1917
|
-
var e = t[Symbol.toPrimitive];
|
|
1918
|
-
if (void 0 !== e) {
|
|
1919
|
-
var i = e.call(t, r || "default");
|
|
1920
|
-
if ("object" != _typeof(i)) return i;
|
|
1921
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1922
|
-
}
|
|
1923
|
-
return ("string" === r ? String : Number)(t);
|
|
1924
|
-
}
|
|
1925
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
function toPropertyKey(t) {
|
|
1929
|
-
var i = toPrimitive(t, "string");
|
|
1930
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
1931
|
-
}
|
|
1932
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
1933
|
-
|
|
1934
|
-
function _defineProperty(obj, key, value) {
|
|
1935
|
-
key = toPropertyKey(key);
|
|
1936
|
-
if (key in obj) {
|
|
1937
|
-
Object.defineProperty(obj, key, {
|
|
1938
|
-
value: value,
|
|
1939
|
-
enumerable: true,
|
|
1940
|
-
configurable: true,
|
|
1941
|
-
writable: true
|
|
1942
|
-
});
|
|
1943
|
-
} else {
|
|
1944
|
-
obj[key] = value;
|
|
1945
|
-
}
|
|
1946
|
-
return obj;
|
|
1947
|
-
}
|
|
1948
2144
|
;// CONCATENATED MODULE: ./packages/src/store.ts
|
|
1949
2145
|
|
|
1950
2146
|
|
|
@@ -1975,7 +2171,7 @@ class Store {
|
|
|
1975
2171
|
const confKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(conf);
|
|
1976
2172
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, (item, key) => {
|
|
1977
2173
|
if (confKeys.includes(key)) {
|
|
1978
|
-
|
|
2174
|
+
log.warn('vxe.error.coverProp', [name, key]);
|
|
1979
2175
|
}
|
|
1980
2176
|
});
|
|
1981
2177
|
}
|
|
@@ -2023,7 +2219,7 @@ class VXEMenusStore {
|
|
|
2023
2219
|
// 兼容
|
|
2024
2220
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
|
|
2025
2221
|
if (true) {
|
|
2026
|
-
|
|
2222
|
+
log.warn('vxe.error.delProp', ['menus -> callback', 'menuMethod']);
|
|
2027
2223
|
}
|
|
2028
2224
|
render = {
|
|
2029
2225
|
menuMethod: render
|
|
@@ -2034,7 +2230,7 @@ class VXEMenusStore {
|
|
|
2034
2230
|
const confKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(conf);
|
|
2035
2231
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(render, (item, key) => {
|
|
2036
2232
|
if (confKeys.includes(key)) {
|
|
2037
|
-
|
|
2233
|
+
log.warn('vxe.error.coverProp', [name, key]);
|
|
2038
2234
|
}
|
|
2039
2235
|
});
|
|
2040
2236
|
}
|
|
@@ -2079,7 +2275,7 @@ class VXEFormatsStore {
|
|
|
2079
2275
|
// 兼容
|
|
2080
2276
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
|
|
2081
2277
|
if (true) {
|
|
2082
|
-
|
|
2278
|
+
log.warn('vxe.error.delProp', ['formats -> callback', 'cellFormatMethod']);
|
|
2083
2279
|
}
|
|
2084
2280
|
render = {
|
|
2085
2281
|
cellFormatMethod: render
|
|
@@ -2090,7 +2286,7 @@ class VXEFormatsStore {
|
|
|
2090
2286
|
const confKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(conf);
|
|
2091
2287
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(render, (item, key) => {
|
|
2092
2288
|
if (confKeys.includes(key)) {
|
|
2093
|
-
|
|
2289
|
+
log.warn('vxe.error.coverProp', [name, key]);
|
|
2094
2290
|
}
|
|
2095
2291
|
});
|
|
2096
2292
|
}
|
|
@@ -2135,7 +2331,7 @@ class VXECommandsStore {
|
|
|
2135
2331
|
// 兼容
|
|
2136
2332
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
|
|
2137
2333
|
if (true) {
|
|
2138
|
-
|
|
2334
|
+
log.warn('vxe.error.delProp', ['commands -> callback', 'commandMethod']);
|
|
2139
2335
|
}
|
|
2140
2336
|
render = {
|
|
2141
2337
|
commandMethod: render
|
|
@@ -2146,7 +2342,7 @@ class VXECommandsStore {
|
|
|
2146
2342
|
const confKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(conf);
|
|
2147
2343
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(render, (item, key) => {
|
|
2148
2344
|
if (confKeys.includes(key)) {
|
|
2149
|
-
|
|
2345
|
+
log.warn('vxe.error.coverProp', [name, key]);
|
|
2150
2346
|
}
|
|
2151
2347
|
});
|
|
2152
2348
|
}
|
|
@@ -2166,8 +2362,6 @@ if (true) {
|
|
|
2166
2362
|
_name: 'Commands'
|
|
2167
2363
|
});
|
|
2168
2364
|
}
|
|
2169
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
2170
|
-
var es_array_push = __webpack_require__(4114);
|
|
2171
2365
|
;// CONCATENATED MODULE: ./packages/src/interceptor.ts
|
|
2172
2366
|
|
|
2173
2367
|
|
|
@@ -2192,7 +2386,7 @@ const interceptor = {
|
|
|
2192
2386
|
// 检测重复
|
|
2193
2387
|
if (true) {
|
|
2194
2388
|
if (eList.indexOf(callback) > -1) {
|
|
2195
|
-
|
|
2389
|
+
log.warn('vxe.error.coverProp', ['Interceptor', type]);
|
|
2196
2390
|
}
|
|
2197
2391
|
}
|
|
2198
2392
|
eList.push(callback);
|
|
@@ -2263,44 +2457,74 @@ const hooks = new store();
|
|
|
2263
2457
|
|
|
2264
2458
|
|
|
2265
2459
|
|
|
2460
|
+
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
function setTheme(name) {
|
|
2465
|
+
const theme = name || 'default';
|
|
2466
|
+
themeConfigStore.theme = theme;
|
|
2467
|
+
if (typeof document !== 'undefined') {
|
|
2468
|
+
const documentElement = document.documentElement;
|
|
2469
|
+
if (documentElement) {
|
|
2470
|
+
documentElement.setAttribute('data-vxe-theme', theme);
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
return VxeUI;
|
|
2474
|
+
}
|
|
2475
|
+
function getTheme() {
|
|
2476
|
+
return themeConfigStore.theme;
|
|
2477
|
+
}
|
|
2478
|
+
function setLanguage(locale) {
|
|
2479
|
+
i18nConfigStore.language = locale;
|
|
2480
|
+
return VxeUI;
|
|
2481
|
+
}
|
|
2482
|
+
function setI18n(locale, data) {
|
|
2483
|
+
i18nConfigStore.language = locale;
|
|
2484
|
+
i18nConfigStore.langMaps[i18nConfigStore.language] = data || {};
|
|
2485
|
+
return VxeUI;
|
|
2486
|
+
}
|
|
2266
2487
|
/**
|
|
2267
2488
|
* 全局参数设置
|
|
2268
2489
|
*/
|
|
2269
2490
|
function setConfig(options) {
|
|
2270
2491
|
if (options) {
|
|
2271
|
-
if (options.theme) {
|
|
2272
|
-
setTheme(options);
|
|
2273
|
-
}
|
|
2274
2492
|
if (options.zIndex) {
|
|
2275
2493
|
index_esm.setCurrent(options.zIndex);
|
|
2276
2494
|
}
|
|
2277
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(
|
|
2495
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(globalConfigStore, options);
|
|
2278
2496
|
}
|
|
2279
|
-
return
|
|
2497
|
+
return VxeUI;
|
|
2280
2498
|
}
|
|
2281
2499
|
/**
|
|
2282
2500
|
* 获取全局参数
|
|
2283
2501
|
*/
|
|
2284
2502
|
function getConfig(key, defaultValue) {
|
|
2285
|
-
return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(
|
|
2503
|
+
return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(globalConfigStore, key, defaultValue) : globalConfigStore;
|
|
2286
2504
|
}
|
|
2287
2505
|
function setIcon(options) {
|
|
2288
2506
|
if (options) {
|
|
2289
|
-
Object.assign(
|
|
2507
|
+
Object.assign(iconConfigStore, options);
|
|
2290
2508
|
}
|
|
2291
|
-
return
|
|
2509
|
+
return VxeUI;
|
|
2292
2510
|
}
|
|
2293
2511
|
function getIcon(key) {
|
|
2294
|
-
return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(
|
|
2512
|
+
return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(iconConfigStore, key) : iconConfigStore;
|
|
2295
2513
|
}
|
|
2296
|
-
const
|
|
2297
|
-
const
|
|
2298
|
-
|
|
2514
|
+
const coreVersion = "0.1.1";
|
|
2515
|
+
const VxeUI = {
|
|
2516
|
+
coreVersion,
|
|
2517
|
+
setTheme,
|
|
2518
|
+
getTheme,
|
|
2299
2519
|
setConfig,
|
|
2300
|
-
getConfig,
|
|
2520
|
+
getConfig: getConfig,
|
|
2301
2521
|
setIcon,
|
|
2302
|
-
getIcon,
|
|
2522
|
+
getIcon: getIcon,
|
|
2523
|
+
setLanguage,
|
|
2524
|
+
setI18n,
|
|
2303
2525
|
getI18n: getI18n,
|
|
2526
|
+
globalEvents: globalEvents,
|
|
2527
|
+
globalResize: globalResize,
|
|
2304
2528
|
renderer: renderer,
|
|
2305
2529
|
validators: validators,
|
|
2306
2530
|
menus: menus,
|
|
@@ -2308,6 +2532,7 @@ const VxeCore = {
|
|
|
2308
2532
|
commands: commands,
|
|
2309
2533
|
interceptor: interceptor,
|
|
2310
2534
|
clipboard: clipboard,
|
|
2535
|
+
log: log,
|
|
2311
2536
|
hooks: hooks
|
|
2312
2537
|
};
|
|
2313
2538
|
setTheme();
|
|
@@ -2319,7 +2544,11 @@ setTheme();
|
|
|
2319
2544
|
|
|
2320
2545
|
|
|
2321
2546
|
|
|
2322
|
-
|
|
2547
|
+
|
|
2548
|
+
|
|
2549
|
+
|
|
2550
|
+
|
|
2551
|
+
/* harmony default export */ var core = (VxeUI);
|
|
2323
2552
|
;// CONCATENATED MODULE: ./packages/language/zh-CN.ts
|
|
2324
2553
|
/* harmony default export */ var zh_CN = ({
|
|
2325
2554
|
vxe: {
|
|
@@ -2804,11 +3033,9 @@ setTheme();
|
|
|
2804
3033
|
;// CONCATENATED MODULE: ./packages/index.ts
|
|
2805
3034
|
|
|
2806
3035
|
|
|
2807
|
-
|
|
2808
3036
|
// 默认中文
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
});
|
|
3037
|
+
setI18n('zh-CN', zh_CN);
|
|
3038
|
+
setTheme('default');
|
|
2812
3039
|
|
|
2813
3040
|
/* harmony default export */ var packages_0 = (core);
|
|
2814
3041
|
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|