vue2-components-plus 1.0.68 → 1.0.70
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/ComponentDemo/TableDemo.md +644 -644
- package/dist/vue2-components-plus.css +1 -1
- package/dist/vue2-components-plus.es5.js +329 -306
- package/dist/vue2-components-plus.js +241 -209
- package/dist/vue2-components-plus.umd.cjs +1 -1
- package/package.json +56 -56
|
@@ -331,16 +331,16 @@ function registerDirective(Vue2) {
|
|
|
331
331
|
Vue2.directive("enterClick", enterClickDirective);
|
|
332
332
|
Vue2.directive("enter-click", enterClickDirective);
|
|
333
333
|
}
|
|
334
|
-
var ThemeVar
|
|
334
|
+
var ThemeVar = /*#__PURE__*/_createClass(function ThemeVar() {
|
|
335
335
|
_classCallCheck(this, ThemeVar);
|
|
336
336
|
});
|
|
337
|
-
ThemeVar
|
|
338
|
-
function loadCssVars
|
|
337
|
+
ThemeVar.VARS = {};
|
|
338
|
+
function loadCssVars() {
|
|
339
339
|
if (typeof document === "undefined") {
|
|
340
|
-
return ThemeVar
|
|
340
|
+
return ThemeVar.VARS;
|
|
341
341
|
}
|
|
342
|
-
if (Object.keys(ThemeVar
|
|
343
|
-
return ThemeVar
|
|
342
|
+
if (Object.keys(ThemeVar.VARS).length > 0) {
|
|
343
|
+
return ThemeVar.VARS;
|
|
344
344
|
}
|
|
345
345
|
var variables = {};
|
|
346
346
|
Array.from(document.styleSheets || []).forEach(function (sheet) {
|
|
@@ -361,7 +361,7 @@ function loadCssVars$1() {
|
|
|
361
361
|
});
|
|
362
362
|
});
|
|
363
363
|
});
|
|
364
|
-
ThemeVar
|
|
364
|
+
ThemeVar.VARS = variables;
|
|
365
365
|
return variables;
|
|
366
366
|
}
|
|
367
367
|
function toKebabCase$1(value) {
|
|
@@ -1201,40 +1201,7 @@ var _sfc_render$5 = function render() {
|
|
|
1201
1201
|
var _sfc_staticRenderFns$5 = [];
|
|
1202
1202
|
var __component__$5 = /* @__PURE__ */normalizeComponent(_sfc_main$5, _sfc_render$5, _sfc_staticRenderFns$5, false, null, "a83d5d48", null, null);
|
|
1203
1203
|
var NsForm = __component__$5.exports;
|
|
1204
|
-
var
|
|
1205
|
-
_classCallCheck(this, ThemeVar2);
|
|
1206
|
-
});
|
|
1207
|
-
ThemeVar2.VARS = {};
|
|
1208
|
-
function loadCssVars() {
|
|
1209
|
-
if (typeof document === "undefined") {
|
|
1210
|
-
return ThemeVar2.VARS;
|
|
1211
|
-
}
|
|
1212
|
-
if (Object.keys(ThemeVar2.VARS).length > 0) {
|
|
1213
|
-
return ThemeVar2.VARS;
|
|
1214
|
-
}
|
|
1215
|
-
var variables = {};
|
|
1216
|
-
Array.from(document.styleSheets || []).forEach(function (sheet) {
|
|
1217
|
-
var cssRules = [];
|
|
1218
|
-
try {
|
|
1219
|
-
cssRules = Array.from(sheet.cssRules || []);
|
|
1220
|
-
} catch (error) {
|
|
1221
|
-
cssRules = [];
|
|
1222
|
-
}
|
|
1223
|
-
cssRules.forEach(function (rule) {
|
|
1224
|
-
if (rule.selectorText !== ":root") {
|
|
1225
|
-
return;
|
|
1226
|
-
}
|
|
1227
|
-
Array.from(rule.style || []).filter(function (name) {
|
|
1228
|
-
return name.indexOf("--matrix-") === 0;
|
|
1229
|
-
}).forEach(function (name) {
|
|
1230
|
-
variables[name] = rule.style.getPropertyValue(name).trim();
|
|
1231
|
-
});
|
|
1232
|
-
});
|
|
1233
|
-
});
|
|
1234
|
-
ThemeVar2.VARS = variables;
|
|
1235
|
-
return variables;
|
|
1236
|
-
}
|
|
1237
|
-
var DynamicFormTitle_vue_vue_type_style_index_0_scoped_29c80ec1_lang = "";
|
|
1204
|
+
var DynamicFormTitle_vue_vue_type_style_index_0_scoped_5d766a25_lang = "";
|
|
1238
1205
|
var _sfc_main$4 = {
|
|
1239
1206
|
name: "NsFormTitle",
|
|
1240
1207
|
props: {
|
|
@@ -1265,7 +1232,7 @@ var _sfc_render$4 = function render2() {
|
|
|
1265
1232
|
}, [_vm._t("default")], 2)]);
|
|
1266
1233
|
};
|
|
1267
1234
|
var _sfc_staticRenderFns$4 = [];
|
|
1268
|
-
var __component__$4 = /* @__PURE__ */normalizeComponent(_sfc_main$4, _sfc_render$4, _sfc_staticRenderFns$4, false, null, "
|
|
1235
|
+
var __component__$4 = /* @__PURE__ */normalizeComponent(_sfc_main$4, _sfc_render$4, _sfc_staticRenderFns$4, false, null, "5d766a25", null, null);
|
|
1269
1236
|
var NsFormTitle = __component__$4.exports;
|
|
1270
1237
|
function getImageBaseUrl(instance) {
|
|
1271
1238
|
var _a;
|
|
@@ -1773,8 +1740,193 @@ var _sfc_staticRenderFns$3 = [];
|
|
|
1773
1740
|
var __component__$3 = /* @__PURE__ */normalizeComponent(_sfc_main$3, _sfc_render$3, _sfc_staticRenderFns$3, false, null, "90982d04", null, null);
|
|
1774
1741
|
var NsSearch = __component__$3.exports;
|
|
1775
1742
|
var RESERVED_KEYS = ["children", "slot", "headerSlot", "buttons", "enum", "type", "imageWidth", "imageHeight", "linkText"];
|
|
1743
|
+
function getColumnProps(column) {
|
|
1744
|
+
var props = __spreadValues({}, column);
|
|
1745
|
+
RESERVED_KEYS.forEach(function (key) {
|
|
1746
|
+
return delete props[key];
|
|
1747
|
+
});
|
|
1748
|
+
return props;
|
|
1749
|
+
}
|
|
1750
|
+
function getRenderer(slotRenderers, name) {
|
|
1751
|
+
return name ? slotRenderers[name] : null;
|
|
1752
|
+
}
|
|
1753
|
+
function getCellValue(row, column) {
|
|
1754
|
+
return column.prop ? row[column.prop] : void 0;
|
|
1755
|
+
}
|
|
1756
|
+
function isVisible(config, row) {
|
|
1757
|
+
if (typeof config.show === "function") {
|
|
1758
|
+
return config.show(row) !== false;
|
|
1759
|
+
}
|
|
1760
|
+
if (config.show === void 0) {
|
|
1761
|
+
return true;
|
|
1762
|
+
}
|
|
1763
|
+
return !!config.show;
|
|
1764
|
+
}
|
|
1765
|
+
function isDisabled(config, row) {
|
|
1766
|
+
return typeof config.disabled === "function" ? !!config.disabled(row) : !!config.disabled;
|
|
1767
|
+
}
|
|
1768
|
+
function emit(listeners, name) {
|
|
1769
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
1770
|
+
args[_key2 - 2] = arguments[_key2];
|
|
1771
|
+
}
|
|
1772
|
+
var handler = listeners && listeners[name];
|
|
1773
|
+
if (!handler) {
|
|
1774
|
+
return;
|
|
1775
|
+
}
|
|
1776
|
+
if (Array.isArray(handler)) {
|
|
1777
|
+
handler.forEach(function (fn) {
|
|
1778
|
+
return typeof fn === "function" && fn.apply(void 0, args);
|
|
1779
|
+
});
|
|
1780
|
+
return;
|
|
1781
|
+
}
|
|
1782
|
+
if (typeof handler === "function") {
|
|
1783
|
+
handler.apply(void 0, args);
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
function resolveEnumText(column, value) {
|
|
1787
|
+
var enumList = column.enum || column.options || [];
|
|
1788
|
+
if (!Array.isArray(enumList)) {
|
|
1789
|
+
return value;
|
|
1790
|
+
}
|
|
1791
|
+
var matched = enumList.find(function (item) {
|
|
1792
|
+
return item.value === value;
|
|
1793
|
+
});
|
|
1794
|
+
return matched ? matched.label : value;
|
|
1795
|
+
}
|
|
1796
|
+
function renderActionButtons(h, scope, column, slotRenderers, listeners) {
|
|
1797
|
+
var buttons = Array.isArray(column.buttons) ? column.buttons : [];
|
|
1798
|
+
return buttons.filter(function (button) {
|
|
1799
|
+
return isVisible(button, scope.row);
|
|
1800
|
+
}).map(function (button, index2) {
|
|
1801
|
+
var slotRenderer = getRenderer(slotRenderers, button.slot);
|
|
1802
|
+
if (slotRenderer) {
|
|
1803
|
+
return slotRenderer(__spreadProps(__spreadValues({}, scope), {
|
|
1804
|
+
row: scope.row,
|
|
1805
|
+
column: column,
|
|
1806
|
+
button: button
|
|
1807
|
+
}));
|
|
1808
|
+
}
|
|
1809
|
+
return h("el-button", {
|
|
1810
|
+
key: button.label || index2,
|
|
1811
|
+
props: {
|
|
1812
|
+
size: button.size || "mini",
|
|
1813
|
+
type: button.link ? "text" : button.type || "text",
|
|
1814
|
+
icon: typeof button.icon === "string" ? button.icon : void 0,
|
|
1815
|
+
disabled: isDisabled(button, scope.row)
|
|
1816
|
+
},
|
|
1817
|
+
on: {
|
|
1818
|
+
click: function click() {
|
|
1819
|
+
if (typeof button.handler === "function") {
|
|
1820
|
+
button.handler(scope.row, scope.$index);
|
|
1821
|
+
}
|
|
1822
|
+
emit(listeners, "button-click", scope.row, column, button);
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
}, [button.label]);
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
function renderTag(h, scope, column) {
|
|
1829
|
+
var cellValue = getCellValue(scope.row, column);
|
|
1830
|
+
var tagType = typeof column.tagType === "function" ? column.tagType(scope.row, cellValue) : column.tagType;
|
|
1831
|
+
var text = typeof column.formatter === "function" ? column.formatter(scope.row, column, cellValue) : resolveEnumText(column, cellValue);
|
|
1832
|
+
return h("el-tag", {
|
|
1833
|
+
props: {
|
|
1834
|
+
type: tagType || "info",
|
|
1835
|
+
size: column.tagSize || "small"
|
|
1836
|
+
}
|
|
1837
|
+
}, [text]);
|
|
1838
|
+
}
|
|
1839
|
+
function renderImage(h, scope, column) {
|
|
1840
|
+
var src = getCellValue(scope.row, column);
|
|
1841
|
+
if (!src) {
|
|
1842
|
+
return "-";
|
|
1843
|
+
}
|
|
1844
|
+
return h("img", {
|
|
1845
|
+
style: {
|
|
1846
|
+
width: column.imageWidth || "40px",
|
|
1847
|
+
height: column.imageHeight || "40px",
|
|
1848
|
+
objectFit: "cover",
|
|
1849
|
+
borderRadius: "4px"
|
|
1850
|
+
},
|
|
1851
|
+
attrs: {
|
|
1852
|
+
src: src,
|
|
1853
|
+
alt: column.label || "image"
|
|
1854
|
+
}
|
|
1855
|
+
});
|
|
1856
|
+
}
|
|
1857
|
+
function renderLink(h, scope, column, slotRenderers, listeners) {
|
|
1858
|
+
var renderer = getRenderer(slotRenderers, column.slot);
|
|
1859
|
+
if (renderer) {
|
|
1860
|
+
return renderer(scope);
|
|
1861
|
+
}
|
|
1862
|
+
var cellValue = getCellValue(scope.row, column);
|
|
1863
|
+
return h("el-button", {
|
|
1864
|
+
props: {
|
|
1865
|
+
type: "text"
|
|
1866
|
+
},
|
|
1867
|
+
on: {
|
|
1868
|
+
click: function click() {
|
|
1869
|
+
return emit(listeners, "link-click", scope.row, column);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
}, [column.linkText || cellValue || "-"]);
|
|
1873
|
+
}
|
|
1874
|
+
function renderDefaultCell(h, scope, column, slotRenderers, listeners) {
|
|
1875
|
+
var renderer = getRenderer(slotRenderers, column.slot);
|
|
1876
|
+
if (renderer) {
|
|
1877
|
+
return renderer(scope);
|
|
1878
|
+
}
|
|
1879
|
+
if (column.type === "action") {
|
|
1880
|
+
return h("div", {
|
|
1881
|
+
class: "ns-table-column__actions"
|
|
1882
|
+
}, renderActionButtons(h, scope, column, slotRenderers, listeners));
|
|
1883
|
+
}
|
|
1884
|
+
if (column.type === "tag") {
|
|
1885
|
+
return renderTag(h, scope, column);
|
|
1886
|
+
}
|
|
1887
|
+
if (column.type === "image") {
|
|
1888
|
+
return renderImage(h, scope, column);
|
|
1889
|
+
}
|
|
1890
|
+
if (column.type === "link") {
|
|
1891
|
+
return renderLink(h, scope, column, slotRenderers, listeners);
|
|
1892
|
+
}
|
|
1893
|
+
var cellValue = getCellValue(scope.row, column);
|
|
1894
|
+
if (typeof column.formatter === "function") {
|
|
1895
|
+
return column.formatter(scope.row, column, cellValue);
|
|
1896
|
+
}
|
|
1897
|
+
if (column.enum) {
|
|
1898
|
+
return resolveEnumText(column, cellValue);
|
|
1899
|
+
}
|
|
1900
|
+
return cellValue === void 0 || cellValue === null || cellValue === "" ? "-" : cellValue;
|
|
1901
|
+
}
|
|
1902
|
+
function renderColumn(h, column, slotRenderers, listeners) {
|
|
1903
|
+
var children = Array.isArray(column.children) ? column.children.map(function (child, index2) {
|
|
1904
|
+
return h(TableColumn, {
|
|
1905
|
+
key: child.prop || child.label || index2,
|
|
1906
|
+
props: {
|
|
1907
|
+
column: child,
|
|
1908
|
+
slotRenderers: slotRenderers
|
|
1909
|
+
},
|
|
1910
|
+
on: listeners
|
|
1911
|
+
});
|
|
1912
|
+
}) : [];
|
|
1913
|
+
var headerRenderer = getRenderer(slotRenderers, column.headerSlot);
|
|
1914
|
+
return h("el-table-column", {
|
|
1915
|
+
props: getColumnProps(column),
|
|
1916
|
+
scopedSlots: children.length ? headerRenderer ? {
|
|
1917
|
+
header: headerRenderer
|
|
1918
|
+
} : void 0 : __spreadValues({
|
|
1919
|
+
default: function _default(scope) {
|
|
1920
|
+
return renderDefaultCell(h, scope, column, slotRenderers, listeners);
|
|
1921
|
+
}
|
|
1922
|
+
}, headerRenderer ? {
|
|
1923
|
+
header: headerRenderer
|
|
1924
|
+
} : {})
|
|
1925
|
+
}, children);
|
|
1926
|
+
}
|
|
1776
1927
|
var TableColumn = {
|
|
1777
1928
|
name: "NsTableColumn",
|
|
1929
|
+
functional: true,
|
|
1778
1930
|
props: {
|
|
1779
1931
|
column: {
|
|
1780
1932
|
type: Object,
|
|
@@ -1787,192 +1939,8 @@ var TableColumn = {
|
|
|
1787
1939
|
}
|
|
1788
1940
|
}
|
|
1789
1941
|
},
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
var props = __spreadValues({}, column);
|
|
1793
|
-
RESERVED_KEYS.forEach(function (key) {
|
|
1794
|
-
return delete props[key];
|
|
1795
|
-
});
|
|
1796
|
-
return props;
|
|
1797
|
-
},
|
|
1798
|
-
getRenderer: function getRenderer(name) {
|
|
1799
|
-
return name ? this.slotRenderers[name] : null;
|
|
1800
|
-
},
|
|
1801
|
-
getCellValue: function getCellValue(row, column) {
|
|
1802
|
-
return column.prop ? row[column.prop] : void 0;
|
|
1803
|
-
},
|
|
1804
|
-
isVisible: function isVisible(config, row) {
|
|
1805
|
-
if (typeof config.show === "function") {
|
|
1806
|
-
return config.show(row) !== false;
|
|
1807
|
-
}
|
|
1808
|
-
if (config.show === void 0) {
|
|
1809
|
-
return true;
|
|
1810
|
-
}
|
|
1811
|
-
return !!config.show;
|
|
1812
|
-
},
|
|
1813
|
-
isDisabled: function isDisabled(config, row) {
|
|
1814
|
-
return typeof config.disabled === "function" ? !!config.disabled(row) : !!config.disabled;
|
|
1815
|
-
},
|
|
1816
|
-
renderActionButtons: function renderActionButtons(h, scope, column) {
|
|
1817
|
-
var _this7 = this;
|
|
1818
|
-
var buttons = Array.isArray(column.buttons) ? column.buttons : [];
|
|
1819
|
-
return buttons.filter(function (button) {
|
|
1820
|
-
return _this7.isVisible(button, scope.row);
|
|
1821
|
-
}).map(function (button, index2) {
|
|
1822
|
-
var slotRenderer = _this7.getRenderer(button.slot);
|
|
1823
|
-
if (slotRenderer) {
|
|
1824
|
-
return slotRenderer(__spreadProps(__spreadValues({}, scope), {
|
|
1825
|
-
row: scope.row,
|
|
1826
|
-
column: column,
|
|
1827
|
-
button: button
|
|
1828
|
-
}));
|
|
1829
|
-
}
|
|
1830
|
-
return h("el-button", {
|
|
1831
|
-
key: button.label || index2,
|
|
1832
|
-
props: {
|
|
1833
|
-
size: button.size || "mini",
|
|
1834
|
-
type: button.link ? "text" : button.type || "text",
|
|
1835
|
-
icon: typeof button.icon === "string" ? button.icon : void 0,
|
|
1836
|
-
disabled: _this7.isDisabled(button, scope.row)
|
|
1837
|
-
},
|
|
1838
|
-
on: {
|
|
1839
|
-
click: function click() {
|
|
1840
|
-
if (typeof button.handler === "function") {
|
|
1841
|
-
button.handler(scope.row, scope.$index);
|
|
1842
|
-
}
|
|
1843
|
-
_this7.$emit("button-click", scope.row, column, button);
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
}, [button.label]);
|
|
1847
|
-
});
|
|
1848
|
-
},
|
|
1849
|
-
renderTag: function renderTag(h, scope, column) {
|
|
1850
|
-
var cellValue = this.getCellValue(scope.row, column);
|
|
1851
|
-
var tagType = typeof column.tagType === "function" ? column.tagType(scope.row, cellValue) : column.tagType;
|
|
1852
|
-
var text = typeof column.formatter === "function" ? column.formatter(scope.row, column, cellValue) : this.resolveEnumText(column, cellValue);
|
|
1853
|
-
return h("el-tag", {
|
|
1854
|
-
props: {
|
|
1855
|
-
type: tagType || "info",
|
|
1856
|
-
size: column.tagSize || "small"
|
|
1857
|
-
}
|
|
1858
|
-
}, [text]);
|
|
1859
|
-
},
|
|
1860
|
-
renderImage: function renderImage(h, scope, column) {
|
|
1861
|
-
var src = this.getCellValue(scope.row, column);
|
|
1862
|
-
if (!src) {
|
|
1863
|
-
return "-";
|
|
1864
|
-
}
|
|
1865
|
-
return h("img", {
|
|
1866
|
-
style: {
|
|
1867
|
-
width: column.imageWidth || "40px",
|
|
1868
|
-
height: column.imageHeight || "40px",
|
|
1869
|
-
objectFit: "cover",
|
|
1870
|
-
borderRadius: "4px"
|
|
1871
|
-
},
|
|
1872
|
-
attrs: {
|
|
1873
|
-
src: src,
|
|
1874
|
-
alt: column.label || "image"
|
|
1875
|
-
}
|
|
1876
|
-
});
|
|
1877
|
-
},
|
|
1878
|
-
renderLink: function renderLink(h, scope, column) {
|
|
1879
|
-
var _this8 = this;
|
|
1880
|
-
var renderer = this.getRenderer(column.slot);
|
|
1881
|
-
if (renderer) {
|
|
1882
|
-
return renderer(scope);
|
|
1883
|
-
}
|
|
1884
|
-
var cellValue = this.getCellValue(scope.row, column);
|
|
1885
|
-
return h("el-button", {
|
|
1886
|
-
props: {
|
|
1887
|
-
type: "text"
|
|
1888
|
-
},
|
|
1889
|
-
on: {
|
|
1890
|
-
click: function click() {
|
|
1891
|
-
return _this8.$emit("link-click", scope.row, column);
|
|
1892
|
-
}
|
|
1893
|
-
}
|
|
1894
|
-
}, [column.linkText || cellValue || "-"]);
|
|
1895
|
-
},
|
|
1896
|
-
resolveEnumText: function resolveEnumText(column, value) {
|
|
1897
|
-
var enumList = column.enum || column.options || [];
|
|
1898
|
-
if (!Array.isArray(enumList)) {
|
|
1899
|
-
return value;
|
|
1900
|
-
}
|
|
1901
|
-
var matched = enumList.find(function (item) {
|
|
1902
|
-
return item.value === value;
|
|
1903
|
-
});
|
|
1904
|
-
return matched ? matched.label : value;
|
|
1905
|
-
},
|
|
1906
|
-
renderDefaultCell: function renderDefaultCell(h, scope, column) {
|
|
1907
|
-
var renderer = this.getRenderer(column.slot);
|
|
1908
|
-
if (renderer) {
|
|
1909
|
-
return renderer(scope);
|
|
1910
|
-
}
|
|
1911
|
-
if (column.type === "action") {
|
|
1912
|
-
return h("div", {
|
|
1913
|
-
class: "ns-table-column__actions"
|
|
1914
|
-
}, this.renderActionButtons(h, scope, column));
|
|
1915
|
-
}
|
|
1916
|
-
if (column.type === "tag") {
|
|
1917
|
-
return this.renderTag(h, scope, column);
|
|
1918
|
-
}
|
|
1919
|
-
if (column.type === "image") {
|
|
1920
|
-
return this.renderImage(h, scope, column);
|
|
1921
|
-
}
|
|
1922
|
-
if (column.type === "link") {
|
|
1923
|
-
return this.renderLink(h, scope, column);
|
|
1924
|
-
}
|
|
1925
|
-
var cellValue = this.getCellValue(scope.row, column);
|
|
1926
|
-
if (typeof column.formatter === "function") {
|
|
1927
|
-
return column.formatter(scope.row, column, cellValue);
|
|
1928
|
-
}
|
|
1929
|
-
if (column.enum) {
|
|
1930
|
-
return this.resolveEnumText(column, cellValue);
|
|
1931
|
-
}
|
|
1932
|
-
return cellValue === void 0 || cellValue === null || cellValue === "" ? "-" : cellValue;
|
|
1933
|
-
},
|
|
1934
|
-
renderColumn: function renderColumn(h, column) {
|
|
1935
|
-
var _this9 = this;
|
|
1936
|
-
var children = Array.isArray(column.children) ? column.children.map(function (child, index2) {
|
|
1937
|
-
return h(TableColumn, {
|
|
1938
|
-
key: child.prop || child.label || index2,
|
|
1939
|
-
props: {
|
|
1940
|
-
column: child,
|
|
1941
|
-
slotRenderers: _this9.slotRenderers
|
|
1942
|
-
},
|
|
1943
|
-
on: {
|
|
1944
|
-
"link-click": function linkClick() {
|
|
1945
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
1946
|
-
args[_key2] = arguments[_key2];
|
|
1947
|
-
}
|
|
1948
|
-
return _this9.$emit.apply(_this9, ["link-click"].concat(args));
|
|
1949
|
-
},
|
|
1950
|
-
"button-click": function buttonClick() {
|
|
1951
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
1952
|
-
args[_key3] = arguments[_key3];
|
|
1953
|
-
}
|
|
1954
|
-
return _this9.$emit.apply(_this9, ["button-click"].concat(args));
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
});
|
|
1958
|
-
}) : [];
|
|
1959
|
-
var headerRenderer = this.getRenderer(column.headerSlot);
|
|
1960
|
-
return h("el-table-column", {
|
|
1961
|
-
props: this.getColumnProps(column),
|
|
1962
|
-
scopedSlots: children.length ? headerRenderer ? {
|
|
1963
|
-
header: headerRenderer
|
|
1964
|
-
} : void 0 : __spreadValues({
|
|
1965
|
-
default: function _default(scope) {
|
|
1966
|
-
return _this9.renderDefaultCell(h, scope, column);
|
|
1967
|
-
}
|
|
1968
|
-
}, headerRenderer ? {
|
|
1969
|
-
header: headerRenderer
|
|
1970
|
-
} : {})
|
|
1971
|
-
}, children);
|
|
1972
|
-
}
|
|
1973
|
-
},
|
|
1974
|
-
render: function render(h) {
|
|
1975
|
-
return this.renderColumn(h, this.column);
|
|
1942
|
+
render: function render(h, ctx) {
|
|
1943
|
+
return renderColumn(h, ctx.props.column, ctx.props.slotRenderers || {}, ctx.listeners || {});
|
|
1976
1944
|
}
|
|
1977
1945
|
};
|
|
1978
1946
|
var TableColumn$1 = TableColumn;
|
|
@@ -2001,7 +1969,7 @@ function resetPagination(pagination) {
|
|
|
2001
1969
|
pagination.pageSize = 10;
|
|
2002
1970
|
return pagination;
|
|
2003
1971
|
}
|
|
2004
|
-
var
|
|
1972
|
+
var PageTable_vue_vue_type_style_index_0_scoped_31eeea22_lang = "";
|
|
2005
1973
|
var RESERVED_LISTENERS = ["add", "selection-change", "sort-change", "row-click", "size-change", "current-change", "link-click"];
|
|
2006
1974
|
var _sfc_main$2 = {
|
|
2007
1975
|
name: "NsTable",
|
|
@@ -2144,7 +2112,9 @@ var _sfc_main$2 = {
|
|
|
2144
2112
|
},
|
|
2145
2113
|
data: function data() {
|
|
2146
2114
|
return {
|
|
2147
|
-
internalPagination: createPagination()
|
|
2115
|
+
internalPagination: createPagination(),
|
|
2116
|
+
resizeObserver: null,
|
|
2117
|
+
layoutTimer: null
|
|
2148
2118
|
};
|
|
2149
2119
|
},
|
|
2150
2120
|
computed: {
|
|
@@ -2165,12 +2135,9 @@ var _sfc_main$2 = {
|
|
|
2165
2135
|
return listeners;
|
|
2166
2136
|
},
|
|
2167
2137
|
resolvedHeight: function resolvedHeight() {
|
|
2168
|
-
if (this.height !== void 0) {
|
|
2138
|
+
if (this.height !== void 0 && this.height !== null && this.height !== "") {
|
|
2169
2139
|
return this.height;
|
|
2170
2140
|
}
|
|
2171
|
-
if (this.autoHeight && this.maxHeight === void 0) {
|
|
2172
|
-
return "100%";
|
|
2173
|
-
}
|
|
2174
2141
|
return void 0;
|
|
2175
2142
|
},
|
|
2176
2143
|
resolvedMaxHeight: function resolvedMaxHeight() {
|
|
@@ -2196,9 +2163,65 @@ var _sfc_main$2 = {
|
|
|
2196
2163
|
}
|
|
2197
2164
|
},
|
|
2198
2165
|
immediate: true
|
|
2166
|
+
},
|
|
2167
|
+
tableData: {
|
|
2168
|
+
handler: function handler() {
|
|
2169
|
+
this.scheduleLayout();
|
|
2170
|
+
},
|
|
2171
|
+
deep: true,
|
|
2172
|
+
immediate: true
|
|
2173
|
+
},
|
|
2174
|
+
columns: {
|
|
2175
|
+
handler: function handler() {
|
|
2176
|
+
this.scheduleLayout();
|
|
2177
|
+
},
|
|
2178
|
+
deep: true,
|
|
2179
|
+
immediate: true
|
|
2180
|
+
}
|
|
2181
|
+
},
|
|
2182
|
+
mounted: function mounted() {
|
|
2183
|
+
this.scheduleLayout();
|
|
2184
|
+
this.initResizeObserver();
|
|
2185
|
+
},
|
|
2186
|
+
beforeDestroy: function beforeDestroy() {
|
|
2187
|
+
if (this.resizeObserver) {
|
|
2188
|
+
this.resizeObserver.disconnect();
|
|
2189
|
+
this.resizeObserver = null;
|
|
2190
|
+
}
|
|
2191
|
+
if (this.layoutTimer) {
|
|
2192
|
+
clearTimeout(this.layoutTimer);
|
|
2193
|
+
this.layoutTimer = null;
|
|
2199
2194
|
}
|
|
2200
2195
|
},
|
|
2201
2196
|
methods: {
|
|
2197
|
+
scheduleLayout: function scheduleLayout() {
|
|
2198
|
+
var _this7 = this;
|
|
2199
|
+
this.$nextTick(function () {
|
|
2200
|
+
_this7.doLayout();
|
|
2201
|
+
if (_this7.layoutTimer) {
|
|
2202
|
+
clearTimeout(_this7.layoutTimer);
|
|
2203
|
+
}
|
|
2204
|
+
_this7.layoutTimer = setTimeout(function () {
|
|
2205
|
+
_this7.doLayout();
|
|
2206
|
+
_this7.layoutTimer = null;
|
|
2207
|
+
}, 50);
|
|
2208
|
+
});
|
|
2209
|
+
},
|
|
2210
|
+
initResizeObserver: function initResizeObserver() {
|
|
2211
|
+
var _this8 = this;
|
|
2212
|
+
if (typeof ResizeObserver === "undefined") {
|
|
2213
|
+
return;
|
|
2214
|
+
}
|
|
2215
|
+
this.resizeObserver = new ResizeObserver(function () {
|
|
2216
|
+
_this8.scheduleLayout();
|
|
2217
|
+
});
|
|
2218
|
+
if (this.$el) {
|
|
2219
|
+
this.resizeObserver.observe(this.$el);
|
|
2220
|
+
}
|
|
2221
|
+
if (this.$el && this.$el.parentElement) {
|
|
2222
|
+
this.resizeObserver.observe(this.$el.parentElement);
|
|
2223
|
+
}
|
|
2224
|
+
},
|
|
2202
2225
|
handleAdd: function handleAdd() {
|
|
2203
2226
|
this.$emit("add");
|
|
2204
2227
|
},
|
|
@@ -2236,33 +2259,33 @@ var _sfc_main$2 = {
|
|
|
2236
2259
|
return this.$refs.tableRef && this.$refs.tableRef.selection ? this.$refs.tableRef.selection : [];
|
|
2237
2260
|
},
|
|
2238
2261
|
getSelectionKeys: function getSelectionKeys() {
|
|
2239
|
-
var
|
|
2262
|
+
var _this9 = this;
|
|
2240
2263
|
var rows = this.getSelectionRows();
|
|
2241
2264
|
if (!this.rowKey) {
|
|
2242
2265
|
return rows;
|
|
2243
2266
|
}
|
|
2244
2267
|
return rows.map(function (row) {
|
|
2245
|
-
return typeof
|
|
2268
|
+
return typeof _this9.rowKey === "function" ? _this9.rowKey(row) : row[_this9.rowKey];
|
|
2246
2269
|
});
|
|
2247
2270
|
},
|
|
2248
2271
|
setSelectionRows: function setSelectionRows(rows) {
|
|
2249
|
-
var
|
|
2272
|
+
var _this0 = this;
|
|
2250
2273
|
if (!this.$refs.tableRef) return;
|
|
2251
2274
|
this.$refs.tableRef.clearSelection();
|
|
2252
2275
|
(rows || []).forEach(function (row) {
|
|
2253
|
-
|
|
2276
|
+
_this0.$refs.tableRef.toggleRowSelection(row, true);
|
|
2254
2277
|
});
|
|
2255
2278
|
},
|
|
2256
2279
|
setSelectionKeys: function setSelectionKeys(keys) {
|
|
2257
|
-
var
|
|
2280
|
+
var _this1 = this;
|
|
2258
2281
|
if (!this.$refs.tableRef || !this.rowKey) return;
|
|
2259
2282
|
this.$refs.tableRef.clearSelection();
|
|
2260
2283
|
(keys || []).forEach(function (key) {
|
|
2261
|
-
var row = (
|
|
2262
|
-
return (typeof
|
|
2284
|
+
var row = (_this1.tableData || []).find(function (item) {
|
|
2285
|
+
return (typeof _this1.rowKey === "function" ? _this1.rowKey(item) : item[_this1.rowKey]) === key;
|
|
2263
2286
|
});
|
|
2264
2287
|
if (row) {
|
|
2265
|
-
|
|
2288
|
+
_this1.$refs.tableRef.toggleRowSelection(row, true);
|
|
2266
2289
|
}
|
|
2267
2290
|
});
|
|
2268
2291
|
},
|
|
@@ -2444,7 +2467,7 @@ var _sfc_render$2 = function render4() {
|
|
|
2444
2467
|
})], 1) : _vm._e()]);
|
|
2445
2468
|
};
|
|
2446
2469
|
var _sfc_staticRenderFns$2 = [];
|
|
2447
|
-
var __component__$2 = /* @__PURE__ */normalizeComponent(_sfc_main$2, _sfc_render$2, _sfc_staticRenderFns$2, false, null, "
|
|
2470
|
+
var __component__$2 = /* @__PURE__ */normalizeComponent(_sfc_main$2, _sfc_render$2, _sfc_staticRenderFns$2, false, null, "31eeea22", null, null);
|
|
2448
2471
|
var NsTable = __component__$2.exports;
|
|
2449
2472
|
var PageContainer_vue_vue_type_style_index_0_scoped_1c664e81_lang = "";
|
|
2450
2473
|
var _sfc_main$1 = {
|
|
@@ -2571,9 +2594,9 @@ var _sfc_main$1 = {
|
|
|
2571
2594
|
},
|
|
2572
2595
|
tableData: {
|
|
2573
2596
|
handler: function handler() {
|
|
2574
|
-
var
|
|
2597
|
+
var _this10 = this;
|
|
2575
2598
|
this.$nextTick(function () {
|
|
2576
|
-
|
|
2599
|
+
_this10.syncSelectionToCurrentPage();
|
|
2577
2600
|
});
|
|
2578
2601
|
},
|
|
2579
2602
|
deep: true,
|
|
@@ -2591,21 +2614,21 @@ var _sfc_main$1 = {
|
|
|
2591
2614
|
this.$refs.tableRef && this.$refs.tableRef.clearSelection && this.$refs.tableRef.clearSelection();
|
|
2592
2615
|
},
|
|
2593
2616
|
syncSelectionToCurrentPage: function syncSelectionToCurrentPage() {
|
|
2594
|
-
var
|
|
2617
|
+
var _this11 = this;
|
|
2595
2618
|
if (!this.currentRowKey || !this.$refs.tableRef) {
|
|
2596
2619
|
return;
|
|
2597
2620
|
}
|
|
2598
2621
|
this.isSyncingSelection = true;
|
|
2599
2622
|
this.$refs.tableRef.clearSelection();
|
|
2600
2623
|
(this.tableData || []).forEach(function (row) {
|
|
2601
|
-
var key =
|
|
2602
|
-
if (
|
|
2603
|
-
|
|
2604
|
-
|
|
2624
|
+
var key = _this11.getRowKey(row);
|
|
2625
|
+
if (_this11.pendingSelectionKeys.has(key)) {
|
|
2626
|
+
_this11.$set(_this11.selectionRowMap, key, row);
|
|
2627
|
+
_this11.$refs.tableRef.toggleRowSelection(row, true);
|
|
2605
2628
|
}
|
|
2606
2629
|
});
|
|
2607
2630
|
this.$nextTick(function () {
|
|
2608
|
-
|
|
2631
|
+
_this11.isSyncingSelection = false;
|
|
2609
2632
|
});
|
|
2610
2633
|
},
|
|
2611
2634
|
handleSearch: function handleSearch(params) {
|
|
@@ -2653,7 +2676,7 @@ var _sfc_main$1 = {
|
|
|
2653
2676
|
}
|
|
2654
2677
|
},
|
|
2655
2678
|
handleSelectionChange: function handleSelectionChange(selection) {
|
|
2656
|
-
var
|
|
2679
|
+
var _this12 = this;
|
|
2657
2680
|
if (this.isSyncingSelection) {
|
|
2658
2681
|
return;
|
|
2659
2682
|
}
|
|
@@ -2662,16 +2685,16 @@ var _sfc_main$1 = {
|
|
|
2662
2685
|
return;
|
|
2663
2686
|
}
|
|
2664
2687
|
var currentPageKeys = (this.tableData || []).map(function (row) {
|
|
2665
|
-
return
|
|
2688
|
+
return _this12.getRowKey(row);
|
|
2666
2689
|
});
|
|
2667
2690
|
currentPageKeys.forEach(function (key) {
|
|
2668
|
-
|
|
2669
|
-
|
|
2691
|
+
_this12.pendingSelectionKeys.delete(key);
|
|
2692
|
+
_this12.$delete(_this12.selectionRowMap, key);
|
|
2670
2693
|
});
|
|
2671
2694
|
(selection || []).forEach(function (row) {
|
|
2672
|
-
var key =
|
|
2673
|
-
|
|
2674
|
-
|
|
2695
|
+
var key = _this12.getRowKey(row);
|
|
2696
|
+
_this12.pendingSelectionKeys.add(key);
|
|
2697
|
+
_this12.$set(_this12.selectionRowMap, key, row);
|
|
2675
2698
|
});
|
|
2676
2699
|
this.$emit("selection-change", Object.values(this.selectionRowMap));
|
|
2677
2700
|
},
|
|
@@ -2685,14 +2708,14 @@ var _sfc_main$1 = {
|
|
|
2685
2708
|
this.$emit("link-click", row, column);
|
|
2686
2709
|
},
|
|
2687
2710
|
initSearchAndLoad: function initSearchAndLoad() {
|
|
2688
|
-
var
|
|
2711
|
+
var _this13 = this;
|
|
2689
2712
|
this.$nextTick(function () {
|
|
2690
|
-
if (
|
|
2691
|
-
|
|
2713
|
+
if (_this13.showSearch && _this13.$refs.searchRef) {
|
|
2714
|
+
_this13.$emit("search", _this13.$refs.searchRef.getFormData());
|
|
2692
2715
|
return;
|
|
2693
2716
|
}
|
|
2694
|
-
if (
|
|
2695
|
-
|
|
2717
|
+
if (_this13.loadData) {
|
|
2718
|
+
_this13.loadData();
|
|
2696
2719
|
}
|
|
2697
2720
|
});
|
|
2698
2721
|
},
|
|
@@ -2720,7 +2743,7 @@ var _sfc_main$1 = {
|
|
|
2720
2743
|
return this.currentRowKey ? Array.from(this.pendingSelectionKeys) : ((_b = (_a = this.$refs.tableRef) == null ? void 0 : _a.getSelectionKeys) == null ? void 0 : _b.call(_a)) || [];
|
|
2721
2744
|
},
|
|
2722
2745
|
setSelectionRows: function setSelectionRows(rows) {
|
|
2723
|
-
var
|
|
2746
|
+
var _this14 = this;
|
|
2724
2747
|
if (!this.currentRowKey) {
|
|
2725
2748
|
this.$refs.tableRef && this.$refs.tableRef.setSelectionRows(rows);
|
|
2726
2749
|
return;
|
|
@@ -2728,23 +2751,23 @@ var _sfc_main$1 = {
|
|
|
2728
2751
|
this.pendingSelectionKeys = /* @__PURE__ */new Set();
|
|
2729
2752
|
this.selectionRowMap = {};
|
|
2730
2753
|
(rows || []).forEach(function (row) {
|
|
2731
|
-
var key =
|
|
2732
|
-
|
|
2733
|
-
|
|
2754
|
+
var key = _this14.getRowKey(row);
|
|
2755
|
+
_this14.pendingSelectionKeys.add(key);
|
|
2756
|
+
_this14.$set(_this14.selectionRowMap, key, row);
|
|
2734
2757
|
});
|
|
2735
2758
|
this.syncSelectionToCurrentPage();
|
|
2736
2759
|
},
|
|
2737
2760
|
setSelectionKeys: function setSelectionKeys(keys) {
|
|
2738
|
-
var
|
|
2761
|
+
var _this15 = this;
|
|
2739
2762
|
if (!this.currentRowKey) {
|
|
2740
2763
|
this.$refs.tableRef && this.$refs.tableRef.setSelectionKeys(keys);
|
|
2741
2764
|
return;
|
|
2742
2765
|
}
|
|
2743
2766
|
this.pendingSelectionKeys = new Set(keys || []);
|
|
2744
2767
|
(this.tableData || []).forEach(function (row) {
|
|
2745
|
-
var key =
|
|
2746
|
-
if (
|
|
2747
|
-
|
|
2768
|
+
var key = _this15.getRowKey(row);
|
|
2769
|
+
if (_this15.pendingSelectionKeys.has(key)) {
|
|
2770
|
+
_this15.$set(_this15.selectionRowMap, key, row);
|
|
2748
2771
|
}
|
|
2749
2772
|
});
|
|
2750
2773
|
this.syncSelectionToCurrentPage();
|
|
@@ -2753,16 +2776,16 @@ var _sfc_main$1 = {
|
|
|
2753
2776
|
this.resetSelectionState();
|
|
2754
2777
|
},
|
|
2755
2778
|
selectAll: function selectAll() {
|
|
2756
|
-
var
|
|
2779
|
+
var _this16 = this;
|
|
2757
2780
|
if (!this.$refs.tableRef) return;
|
|
2758
2781
|
if (!this.currentRowKey) {
|
|
2759
2782
|
this.$refs.tableRef.selectAll();
|
|
2760
2783
|
return;
|
|
2761
2784
|
}
|
|
2762
2785
|
(this.tableData || []).forEach(function (row) {
|
|
2763
|
-
var key =
|
|
2764
|
-
|
|
2765
|
-
|
|
2786
|
+
var key = _this16.getRowKey(row);
|
|
2787
|
+
_this16.pendingSelectionKeys.add(key);
|
|
2788
|
+
_this16.$set(_this16.selectionRowMap, key, row);
|
|
2766
2789
|
});
|
|
2767
2790
|
this.$refs.tableRef.setSelectionRows(this.tableData);
|
|
2768
2791
|
},
|
|
@@ -3079,33 +3102,33 @@ var _sfc_main = {
|
|
|
3079
3102
|
if (!this.isMaximized) this.currentY = value;
|
|
3080
3103
|
},
|
|
3081
3104
|
visible: function visible() {
|
|
3082
|
-
var
|
|
3105
|
+
var _this17 = this;
|
|
3083
3106
|
this.$nextTick(function () {
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3107
|
+
_this17.applyDialogLayout();
|
|
3108
|
+
_this17.syncDialogInstance();
|
|
3109
|
+
_this17.triggerDomCompleted();
|
|
3087
3110
|
});
|
|
3088
3111
|
}
|
|
3089
3112
|
},
|
|
3090
3113
|
mounted: function mounted() {
|
|
3091
|
-
var
|
|
3092
|
-
loadCssVars
|
|
3114
|
+
var _this18 = this;
|
|
3115
|
+
loadCssVars();
|
|
3093
3116
|
this.visible = true;
|
|
3094
3117
|
this.updateModalStyle();
|
|
3095
3118
|
this.syncDialogInstance();
|
|
3096
3119
|
this.$nextTick(function () {
|
|
3097
|
-
|
|
3098
|
-
|
|
3120
|
+
_this18.applyDialogLayout();
|
|
3121
|
+
_this18.triggerDomCompleted();
|
|
3099
3122
|
});
|
|
3100
3123
|
document.addEventListener("keydown", this.handleKeydown);
|
|
3101
3124
|
window.addEventListener("resize", this.applyDialogLayout);
|
|
3102
3125
|
},
|
|
3103
3126
|
updated: function updated() {
|
|
3104
|
-
var
|
|
3127
|
+
var _this19 = this;
|
|
3105
3128
|
this.syncDialogInstance();
|
|
3106
3129
|
this.triggerDomCompleted();
|
|
3107
3130
|
this.$nextTick(function () {
|
|
3108
|
-
|
|
3131
|
+
_this19.applyDialogLayout();
|
|
3109
3132
|
});
|
|
3110
3133
|
},
|
|
3111
3134
|
beforeDestroy: function beforeDestroy() {
|
|
@@ -3142,10 +3165,10 @@ var _sfc_main = {
|
|
|
3142
3165
|
return Number.isNaN(Number(str)) ? str : "".concat(Number(str), "px");
|
|
3143
3166
|
},
|
|
3144
3167
|
resolvePadding: function resolvePadding() {
|
|
3145
|
-
var
|
|
3168
|
+
var _this20 = this;
|
|
3146
3169
|
if (Array.isArray(this.dialogPadding)) {
|
|
3147
3170
|
return this.dialogPadding.map(function (item) {
|
|
3148
|
-
return
|
|
3171
|
+
return _this20.normalizeSize(item);
|
|
3149
3172
|
}).join(" ");
|
|
3150
3173
|
}
|
|
3151
3174
|
if (this.dialogPadding === -1 || this.dialogPadding === "-1") {
|
|
@@ -3166,11 +3189,11 @@ var _sfc_main = {
|
|
|
3166
3189
|
return source;
|
|
3167
3190
|
},
|
|
3168
3191
|
mergeEvents: function mergeEvents() {
|
|
3169
|
-
var
|
|
3192
|
+
var _this21 = this;
|
|
3170
3193
|
var listeners = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3171
3194
|
return __spreadProps(__spreadValues({}, listeners), {
|
|
3172
3195
|
close: function close() {
|
|
3173
|
-
return
|
|
3196
|
+
return _this21.closeDialog();
|
|
3174
3197
|
}
|
|
3175
3198
|
});
|
|
3176
3199
|
},
|
|
@@ -3240,25 +3263,25 @@ var _sfc_main = {
|
|
|
3240
3263
|
}
|
|
3241
3264
|
},
|
|
3242
3265
|
syncDialogInstance: function syncDialogInstance() {
|
|
3243
|
-
var
|
|
3266
|
+
var _this22 = this;
|
|
3244
3267
|
if (!this.dialogInstance) return;
|
|
3245
3268
|
this.dialogInstance.domRef = this.$refs.contentRef || null;
|
|
3246
3269
|
this.dialogInstance.updateOption = function () {
|
|
3247
3270
|
var newOption = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3248
3271
|
if (Object.prototype.hasOwnProperty.call(newOption, "title")) {
|
|
3249
|
-
|
|
3272
|
+
_this22.currentTitle = newOption.title;
|
|
3250
3273
|
}
|
|
3251
3274
|
if (Object.prototype.hasOwnProperty.call(newOption, "width")) {
|
|
3252
|
-
|
|
3275
|
+
_this22.currentWidth = newOption.width;
|
|
3253
3276
|
}
|
|
3254
3277
|
if (Object.prototype.hasOwnProperty.call(newOption, "height")) {
|
|
3255
|
-
|
|
3278
|
+
_this22.currentHeight = newOption.height;
|
|
3256
3279
|
}
|
|
3257
3280
|
if (Object.prototype.hasOwnProperty.call(newOption, "x")) {
|
|
3258
|
-
|
|
3281
|
+
_this22.currentX = newOption.x;
|
|
3259
3282
|
}
|
|
3260
3283
|
if (Object.prototype.hasOwnProperty.call(newOption, "y")) {
|
|
3261
|
-
|
|
3284
|
+
_this22.currentY = newOption.y;
|
|
3262
3285
|
}
|
|
3263
3286
|
var mergedOption = __spreadValues({}, newOption);
|
|
3264
3287
|
delete mergedOption.title;
|
|
@@ -3266,20 +3289,20 @@ var _sfc_main = {
|
|
|
3266
3289
|
delete mergedOption.height;
|
|
3267
3290
|
delete mergedOption.x;
|
|
3268
3291
|
delete mergedOption.y;
|
|
3269
|
-
|
|
3292
|
+
_this22.currentOption = __spreadValues(__spreadValues({}, _this22.currentOption), mergedOption);
|
|
3270
3293
|
};
|
|
3271
3294
|
this.dialogInstance.callMethod = function (methodName) {
|
|
3272
|
-
var target =
|
|
3295
|
+
var target = _this22.$refs.contentRef;
|
|
3273
3296
|
if (target && typeof target[methodName] === "function") {
|
|
3274
|
-
for (var
|
|
3275
|
-
args[
|
|
3297
|
+
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
3298
|
+
args[_key3 - 1] = arguments[_key3];
|
|
3276
3299
|
}
|
|
3277
3300
|
return target[methodName].apply(target, args);
|
|
3278
3301
|
}
|
|
3279
3302
|
return void 0;
|
|
3280
3303
|
};
|
|
3281
3304
|
this.dialogInstance.close = function () {
|
|
3282
|
-
return
|
|
3305
|
+
return _this22.closeDialog();
|
|
3283
3306
|
};
|
|
3284
3307
|
},
|
|
3285
3308
|
triggerDomCompleted: function triggerDomCompleted() {
|
|
@@ -3292,7 +3315,7 @@ var _sfc_main = {
|
|
|
3292
3315
|
}
|
|
3293
3316
|
},
|
|
3294
3317
|
toggleMaximize: function toggleMaximize() {
|
|
3295
|
-
var
|
|
3318
|
+
var _this23 = this;
|
|
3296
3319
|
if (!this.showMaximizeButton) return;
|
|
3297
3320
|
if (!this.isMaximized) {
|
|
3298
3321
|
this.originalSize = {
|
|
@@ -3316,7 +3339,7 @@ var _sfc_main = {
|
|
|
3316
3339
|
}
|
|
3317
3340
|
this.notifySizeChange();
|
|
3318
3341
|
this.$nextTick(function () {
|
|
3319
|
-
return
|
|
3342
|
+
return _this23.applyDialogLayout(false);
|
|
3320
3343
|
});
|
|
3321
3344
|
},
|
|
3322
3345
|
closeDialog: function closeDialog() {
|
|
@@ -3333,7 +3356,7 @@ var _sfc_main = {
|
|
|
3333
3356
|
}
|
|
3334
3357
|
},
|
|
3335
3358
|
dealConfirm: function dealConfirm() {
|
|
3336
|
-
var
|
|
3359
|
+
var _this24 = this;
|
|
3337
3360
|
var vm = this;
|
|
3338
3361
|
var loadingController = {
|
|
3339
3362
|
get value() {
|
|
@@ -3355,8 +3378,8 @@ var _sfc_main = {
|
|
|
3355
3378
|
return;
|
|
3356
3379
|
}
|
|
3357
3380
|
this.confirm(function () {
|
|
3358
|
-
|
|
3359
|
-
|
|
3381
|
+
_this24.footerLoading = false;
|
|
3382
|
+
_this24.visible = false;
|
|
3360
3383
|
}, this.$refs.contentRef, loadingController);
|
|
3361
3384
|
},
|
|
3362
3385
|
handleKeydown: function handleKeydown(event) {
|
|
@@ -3688,7 +3711,7 @@ function install2(Vue2) {
|
|
|
3688
3711
|
}
|
|
3689
3712
|
});
|
|
3690
3713
|
setExternalApp(Vue2, options);
|
|
3691
|
-
loadCssVars
|
|
3714
|
+
loadCssVars();
|
|
3692
3715
|
if (Vue2 && Vue2.prototype) {
|
|
3693
3716
|
Vue2.prototype.$NsDialog = NsDialog;
|
|
3694
3717
|
Vue2.prototype.$closeAllNsDialog = closeAllNsDialog;
|