vxe-table 4.7.15 → 4.7.16

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/es/ui/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
- VxeUI.version = "4.7.15";
3
- VxeUI.tableVersion = "4.7.15";
2
+ import { getFuncText } from './src/utils';
3
+ VxeUI.version = "4.7.16";
4
+ VxeUI.tableVersion = "4.7.16";
4
5
  VxeUI.setConfig({
5
6
  emptyCell: ' ',
6
7
  table: {
@@ -258,28 +259,28 @@ export const use = VxeUI.use;
258
259
  * @deprecated
259
260
  */
260
261
  export const setup = (options) => {
261
- return VxeUI.setup(options);
262
+ return VxeUI.setConfig(options);
262
263
  };
263
264
  /**
264
265
  * 已废弃
265
266
  * @deprecated
266
267
  */
267
268
  export const config = (options) => {
268
- return VxeUI.config(options);
269
+ return VxeUI.setConfig(options);
269
270
  };
270
271
  /**
271
272
  * 已废弃
272
273
  * @deprecated
273
274
  */
274
275
  export const t = (key, args) => {
275
- return VxeUI.t(key, args);
276
+ return VxeUI.getI18n(key, args);
276
277
  };
277
278
  /**
278
279
  * 已废弃
279
280
  * @deprecated
280
281
  */
281
- export const _t = (key, args) => {
282
- return VxeUI._t(key, args);
282
+ export const _t = (content, args) => {
283
+ return getFuncText(content, args);
283
284
  };
284
285
  /**
285
286
  * 已废弃,兼容老版本
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"4.7.15"}`;
3
+ const version = `table v${"4.7.16"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
@@ -23,10 +23,10 @@ export function getLastZIndex() {
23
23
  export function hasChildrenList(item) {
24
24
  return item && item.children && item.children.length > 0;
25
25
  }
26
- export function getFuncText(content) {
26
+ export function getFuncText(content, args) {
27
27
  if (content) {
28
28
  const translate = VxeUI.getConfig().translate;
29
- return XEUtils.toValueString(translate ? translate('' + content) : content);
29
+ return XEUtils.toValueString(translate ? translate('' + content, args) : content);
30
30
  }
31
31
  return '';
32
32
  }
package/lib/index.umd.js CHANGED
@@ -1788,10 +1788,169 @@ if (typeof window !== 'undefined') {
1788
1788
 
1789
1789
  // EXTERNAL MODULE: external {"root":"VxeUI","commonjs":"@vxe-ui/core","commonjs2":"@vxe-ui/core","amd":"@vxe-ui/core"}
1790
1790
  var core_ = __webpack_require__(4345);
1791
+ // EXTERNAL MODULE: external {"root":"XEUtils","commonjs":"xe-utils","commonjs2":"xe-utils","amd":"xe-utils"}
1792
+ var external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_ = __webpack_require__(8871);
1793
+ var external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default = /*#__PURE__*/__webpack_require__.n(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_);
1794
+ ;// CONCATENATED MODULE: ./node_modules/dom-zindex/es/index.esm.js
1795
+ var storeEl = null;
1796
+ var storeId = 'z-index-manage';
1797
+ var storeMainKey = 'm';
1798
+ var storeSubKey = 's';
1799
+ var storeData = {
1800
+ m: 1000,
1801
+ s: 1000
1802
+ };
1803
+ function isDocument() {
1804
+ return typeof document !== 'undefined';
1805
+ }
1806
+ function getDomMaxZIndex() {
1807
+ var max = 0;
1808
+ if (isDocument()) {
1809
+ var allElem = document.body.getElementsByTagName('*');
1810
+ for (var i = 0; i < allElem.length; i++) {
1811
+ var elem = allElem[i];
1812
+ if (elem && elem.style && elem.nodeType === 1) {
1813
+ var zIndex = elem.style.zIndex;
1814
+ if (zIndex && /^\d+$/.test(zIndex)) {
1815
+ max = Math.max(max, Number(zIndex));
1816
+ }
1817
+ }
1818
+ }
1819
+ }
1820
+ return max;
1821
+ }
1822
+ function getDom() {
1823
+ if (!storeEl) {
1824
+ if (isDocument()) {
1825
+ storeEl = document.getElementById(storeId);
1826
+ if (!storeEl) {
1827
+ storeEl = document.createElement('div');
1828
+ storeEl.id = storeId;
1829
+ storeEl.style.display = 'none';
1830
+ document.body.appendChild(storeEl);
1831
+ setCurrent(storeData.m);
1832
+ setSubCurrent(storeData.s);
1833
+ }
1834
+ }
1835
+ }
1836
+ return storeEl;
1837
+ }
1838
+ function createSetHandle(key) {
1839
+ return function (value) {
1840
+ if (value) {
1841
+ value = Number(value);
1842
+ storeData[key] = value;
1843
+ var doc = getDom();
1844
+ if (doc) {
1845
+ if (doc.dataset) {
1846
+ doc.dataset[key] = value + '';
1847
+ } else {
1848
+ doc.setAttribute('data-' + key, value + '');
1849
+ }
1850
+ }
1851
+ }
1852
+ return storeData[key];
1853
+ };
1854
+ }
1855
+ var setCurrent = createSetHandle(storeMainKey);
1856
+ function createGetHandle(key, nextMethod) {
1857
+ return function getCurrent(currZindex) {
1858
+ var zIndex;
1859
+ var doc = getDom();
1860
+ if (doc) {
1861
+ var domVal = doc.dataset ? doc.dataset[key] : doc.getAttribute('data-' + key);
1862
+ if (domVal) {
1863
+ zIndex = Number(domVal);
1864
+ }
1865
+ }
1866
+ if (!zIndex) {
1867
+ zIndex = storeData[key];
1868
+ }
1869
+ if (currZindex) {
1870
+ if (Number(currZindex) < zIndex) {
1871
+ return nextMethod();
1872
+ }
1873
+ return currZindex;
1874
+ }
1875
+ return zIndex;
1876
+ };
1877
+ }
1878
+ var getCurrent = createGetHandle(storeMainKey, getNext);
1879
+ function getNext() {
1880
+ return setCurrent(getCurrent() + 1);
1881
+ }
1882
+ var setSubCurrent = createSetHandle(storeSubKey);
1883
+ var _getSubCurrent = createGetHandle(storeSubKey, getSubNext);
1884
+ function getSubCurrent() {
1885
+ return getCurrent() + _getSubCurrent();
1886
+ }
1887
+ function getSubNext() {
1888
+ setSubCurrent(_getSubCurrent() + 1);
1889
+ return getSubCurrent();
1890
+ }
1891
+ /**
1892
+ * Web common z-index style management
1893
+ */
1894
+ var DomZIndex = {
1895
+ setCurrent: setCurrent,
1896
+ getCurrent: getCurrent,
1897
+ getNext: getNext,
1898
+ setSubCurrent: setSubCurrent,
1899
+ getSubCurrent: getSubCurrent,
1900
+ getSubNext: getSubNext,
1901
+ getMax: getDomMaxZIndex
1902
+ };
1903
+ /* harmony default export */ var index_esm = (DomZIndex);
1904
+ ;// CONCATENATED MODULE: ./packages/ui/src/utils.ts
1905
+
1906
+
1907
+
1908
+ function isEnableConf(conf) {
1909
+ return conf && conf.enabled !== false;
1910
+ }
1911
+ function isEmptyValue(cellValue) {
1912
+ return cellValue === null || cellValue === undefined || cellValue === '';
1913
+ }
1914
+ function parseFile(file) {
1915
+ const name = file.name;
1916
+ const tIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastIndexOf(name, '.');
1917
+ const type = name.substring(tIndex + 1, name.length).toLowerCase();
1918
+ const filename = name.substring(0, tIndex);
1919
+ return {
1920
+ filename,
1921
+ type
1922
+ };
1923
+ }
1924
+ function nextZIndex() {
1925
+ return index_esm.getNext();
1926
+ }
1927
+ function getLastZIndex() {
1928
+ return index_esm.getCurrent();
1929
+ }
1930
+ function hasChildrenList(item) {
1931
+ return item && item.children && item.children.length > 0;
1932
+ }
1933
+ function getFuncText(content, args) {
1934
+ if (content) {
1935
+ const translate = core_.VxeUI.getConfig().translate;
1936
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(translate ? translate('' + content, args) : content);
1937
+ }
1938
+ return '';
1939
+ }
1940
+ function formatText(value, placeholder) {
1941
+ return '' + (isEmptyValue(value) ? placeholder ? core_.VxeUI.getConfig().emptyCell : '' : value);
1942
+ }
1943
+ /**
1944
+ * 判断值为:'' | null | undefined 时都属于空值
1945
+ */
1946
+ function eqEmptyValue(cellValue) {
1947
+ return cellValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(cellValue);
1948
+ }
1791
1949
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
1792
1950
 
1793
- core_.VxeUI.version = "4.7.15";
1794
- core_.VxeUI.tableVersion = "4.7.15";
1951
+
1952
+ core_.VxeUI.version = "4.7.16";
1953
+ core_.VxeUI.tableVersion = "4.7.16";
1795
1954
  core_.VxeUI.setConfig({
1796
1955
  emptyCell: ' ',
1797
1956
  table: {
@@ -2049,28 +2208,28 @@ const use = core_.VxeUI.use;
2049
2208
  * @deprecated
2050
2209
  */
2051
2210
  const setup = options => {
2052
- return core_.VxeUI.setup(options);
2211
+ return core_.VxeUI.setConfig(options);
2053
2212
  };
2054
2213
  /**
2055
2214
  * 已废弃
2056
2215
  * @deprecated
2057
2216
  */
2058
2217
  const config = options => {
2059
- return core_.VxeUI.config(options);
2218
+ return core_.VxeUI.setConfig(options);
2060
2219
  };
2061
2220
  /**
2062
2221
  * 已废弃
2063
2222
  * @deprecated
2064
2223
  */
2065
2224
  const t = (key, args) => {
2066
- return core_.VxeUI.t(key, args);
2225
+ return core_.VxeUI.getI18n(key, args);
2067
2226
  };
2068
2227
  /**
2069
2228
  * 已废弃
2070
2229
  * @deprecated
2071
2230
  */
2072
- const _t = (key, args) => {
2073
- return core_.VxeUI._t(key, args);
2231
+ const _t = (content, args) => {
2232
+ return getFuncText(content, args);
2074
2233
  };
2075
2234
  /**
2076
2235
  * 已废弃,兼容老版本
@@ -2089,170 +2248,12 @@ const readFile = options => {
2089
2248
  var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(9274);
2090
2249
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
2091
2250
  var es_array_push = __webpack_require__(4114);
2092
- // EXTERNAL MODULE: external {"root":"XEUtils","commonjs":"xe-utils","commonjs2":"xe-utils","amd":"xe-utils"}
2093
- var external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_ = __webpack_require__(8871);
2094
- var external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default = /*#__PURE__*/__webpack_require__.n(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_);
2095
- ;// CONCATENATED MODULE: ./node_modules/dom-zindex/es/index.esm.js
2096
- var storeEl = null;
2097
- var storeId = 'z-index-manage';
2098
- var storeMainKey = 'm';
2099
- var storeSubKey = 's';
2100
- var storeData = {
2101
- m: 1000,
2102
- s: 1000
2103
- };
2104
- function isDocument() {
2105
- return typeof document !== 'undefined';
2106
- }
2107
- function getDomMaxZIndex() {
2108
- var max = 0;
2109
- if (isDocument()) {
2110
- var allElem = document.body.getElementsByTagName('*');
2111
- for (var i = 0; i < allElem.length; i++) {
2112
- var elem = allElem[i];
2113
- if (elem && elem.style && elem.nodeType === 1) {
2114
- var zIndex = elem.style.zIndex;
2115
- if (zIndex && /^\d+$/.test(zIndex)) {
2116
- max = Math.max(max, Number(zIndex));
2117
- }
2118
- }
2119
- }
2120
- }
2121
- return max;
2122
- }
2123
- function getDom() {
2124
- if (!storeEl) {
2125
- if (isDocument()) {
2126
- storeEl = document.getElementById(storeId);
2127
- if (!storeEl) {
2128
- storeEl = document.createElement('div');
2129
- storeEl.id = storeId;
2130
- storeEl.style.display = 'none';
2131
- document.body.appendChild(storeEl);
2132
- setCurrent(storeData.m);
2133
- setSubCurrent(storeData.s);
2134
- }
2135
- }
2136
- }
2137
- return storeEl;
2138
- }
2139
- function createSetHandle(key) {
2140
- return function (value) {
2141
- if (value) {
2142
- value = Number(value);
2143
- storeData[key] = value;
2144
- var doc = getDom();
2145
- if (doc) {
2146
- if (doc.dataset) {
2147
- doc.dataset[key] = value + '';
2148
- } else {
2149
- doc.setAttribute('data-' + key, value + '');
2150
- }
2151
- }
2152
- }
2153
- return storeData[key];
2154
- };
2155
- }
2156
- var setCurrent = createSetHandle(storeMainKey);
2157
- function createGetHandle(key, nextMethod) {
2158
- return function getCurrent(currZindex) {
2159
- var zIndex;
2160
- var doc = getDom();
2161
- if (doc) {
2162
- var domVal = doc.dataset ? doc.dataset[key] : doc.getAttribute('data-' + key);
2163
- if (domVal) {
2164
- zIndex = Number(domVal);
2165
- }
2166
- }
2167
- if (!zIndex) {
2168
- zIndex = storeData[key];
2169
- }
2170
- if (currZindex) {
2171
- if (Number(currZindex) < zIndex) {
2172
- return nextMethod();
2173
- }
2174
- return currZindex;
2175
- }
2176
- return zIndex;
2177
- };
2178
- }
2179
- var getCurrent = createGetHandle(storeMainKey, getNext);
2180
- function getNext() {
2181
- return setCurrent(getCurrent() + 1);
2182
- }
2183
- var setSubCurrent = createSetHandle(storeSubKey);
2184
- var _getSubCurrent = createGetHandle(storeSubKey, getSubNext);
2185
- function getSubCurrent() {
2186
- return getCurrent() + _getSubCurrent();
2187
- }
2188
- function getSubNext() {
2189
- setSubCurrent(_getSubCurrent() + 1);
2190
- return getSubCurrent();
2191
- }
2192
- /**
2193
- * Web common z-index style management
2194
- */
2195
- var DomZIndex = {
2196
- setCurrent: setCurrent,
2197
- getCurrent: getCurrent,
2198
- getNext: getNext,
2199
- setSubCurrent: setSubCurrent,
2200
- getSubCurrent: getSubCurrent,
2201
- getSubNext: getSubNext,
2202
- getMax: getDomMaxZIndex
2203
- };
2204
- /* harmony default export */ var index_esm = (DomZIndex);
2205
- ;// CONCATENATED MODULE: ./packages/ui/src/utils.ts
2206
-
2207
-
2208
-
2209
- function isEnableConf(conf) {
2210
- return conf && conf.enabled !== false;
2211
- }
2212
- function isEmptyValue(cellValue) {
2213
- return cellValue === null || cellValue === undefined || cellValue === '';
2214
- }
2215
- function parseFile(file) {
2216
- const name = file.name;
2217
- const tIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastIndexOf(name, '.');
2218
- const type = name.substring(tIndex + 1, name.length).toLowerCase();
2219
- const filename = name.substring(0, tIndex);
2220
- return {
2221
- filename,
2222
- type
2223
- };
2224
- }
2225
- function nextZIndex() {
2226
- return index_esm.getNext();
2227
- }
2228
- function getLastZIndex() {
2229
- return index_esm.getCurrent();
2230
- }
2231
- function hasChildrenList(item) {
2232
- return item && item.children && item.children.length > 0;
2233
- }
2234
- function getFuncText(content) {
2235
- if (content) {
2236
- const translate = core_.VxeUI.getConfig().translate;
2237
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(translate ? translate('' + content) : content);
2238
- }
2239
- return '';
2240
- }
2241
- function formatText(value, placeholder) {
2242
- return '' + (isEmptyValue(value) ? placeholder ? core_.VxeUI.getConfig().emptyCell : '' : value);
2243
- }
2244
- /**
2245
- * 判断值为:'' | null | undefined 时都属于空值
2246
- */
2247
- function eqEmptyValue(cellValue) {
2248
- return cellValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(cellValue);
2249
- }
2250
2251
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
2251
2252
 
2252
2253
  const {
2253
2254
  log: log_log
2254
2255
  } = core_.VxeUI;
2255
- const version = `table v${"4.7.15"}`;
2256
+ const version = `table v${"4.7.16"}`;
2256
2257
  const warnLog = log_log.create('warn', version);
2257
2258
  const errLog = log_log.create('error', version);
2258
2259
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts