@tmagic/form 1.3.6 → 1.3.7
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/LICENSE +5432 -0
- package/dist/style.css +2 -10
- package/dist/tmagic-form.js +257 -251
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +256 -250
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +9 -9
- package/src/containers/Container.vue +1 -0
- package/src/containers/Table.vue +168 -166
- package/src/fields/Select.vue +5 -3
- package/src/theme/table.scss +4 -11
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
return valuesTmp || {};
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
const _hoisted_1$e = ["id"];
|
|
168
|
+
const _hoisted_1$e = ["id", "data-magic-id"];
|
|
169
169
|
const _hoisted_2$8 = ["innerHTML"];
|
|
170
170
|
const _hoisted_3$4 = ["innerHTML"];
|
|
171
171
|
const _hoisted_4$4 = ["innerHTML"];
|
|
@@ -332,6 +332,7 @@
|
|
|
332
332
|
return _ctx.config ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
333
333
|
key: 0,
|
|
334
334
|
id: _ctx.config.id,
|
|
335
|
+
"data-magic-id": _ctx.config.id,
|
|
335
336
|
style: vue.normalizeStyle(_ctx.config.tip ? "display: flex;align-items: baseline;" : ""),
|
|
336
337
|
class: vue.normalizeClass(`m-form-container m-container-${type.value || ""} ${_ctx.config.className || ""}`)
|
|
337
338
|
}, [
|
|
@@ -1680,267 +1681,272 @@
|
|
|
1680
1681
|
toggleRowSelection
|
|
1681
1682
|
});
|
|
1682
1683
|
return (_ctx, _cache) => {
|
|
1683
|
-
return vue.openBlock(), vue.
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
class: vue.normalizeClass(["m-fields-table", { "m-fields-table-item-extra": _ctx.config.itemExtra }])
|
|
1684
|
+
return vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
1685
|
+
to: "body",
|
|
1686
|
+
disabled: !isFullscreen.value
|
|
1687
1687
|
}, [
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
},
|
|
1693
|
-
|
|
1694
|
-
content: "拖拽可排序",
|
|
1695
|
-
placement: "left-start",
|
|
1696
|
-
disabled: _ctx.config.dropSort !== true
|
|
1697
|
-
}, {
|
|
1698
|
-
default: vue.withCtx(() => [
|
|
1699
|
-
_ctx.model[modelName.value] ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTable), {
|
|
1700
|
-
ref_key: "tMagicTable",
|
|
1701
|
-
ref: tMagicTable,
|
|
1702
|
-
style: { "width": "100%" },
|
|
1703
|
-
"row-key": _ctx.config.rowKey || "id",
|
|
1704
|
-
data: data.value,
|
|
1705
|
-
lastData: lastData.value,
|
|
1706
|
-
border: _ctx.config.border,
|
|
1707
|
-
"max-height": _ctx.config.maxHeight,
|
|
1708
|
-
"default-expand-all": true,
|
|
1709
|
-
key: updateKey.value,
|
|
1710
|
-
onSelect: selectHandle,
|
|
1711
|
-
onSortChange: sortChange
|
|
1712
|
-
}, {
|
|
1713
|
-
default: vue.withCtx(() => [
|
|
1714
|
-
_ctx.config.itemExtra ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTableColumn), {
|
|
1715
|
-
key: 0,
|
|
1716
|
-
fixed: "left",
|
|
1717
|
-
width: "30",
|
|
1718
|
-
type: "expand"
|
|
1719
|
-
}, {
|
|
1720
|
-
default: vue.withCtx((scope) => [
|
|
1721
|
-
vue.createElementVNode("span", {
|
|
1722
|
-
innerHTML: itemExtra(_ctx.config.itemExtra, scope.$index),
|
|
1723
|
-
class: "m-form-tip"
|
|
1724
|
-
}, null, 8, _hoisted_2$3)
|
|
1725
|
-
]),
|
|
1726
|
-
_: 1
|
|
1727
|
-
})) : vue.createCommentVNode("", true),
|
|
1728
|
-
vue.createVNode(vue.unref(design.TMagicTableColumn), {
|
|
1729
|
-
label: "操作",
|
|
1730
|
-
width: _ctx.config.operateColWidth || 55,
|
|
1731
|
-
align: "center",
|
|
1732
|
-
fixed: _ctx.config.fixed === false ? void 0 : "left"
|
|
1733
|
-
}, {
|
|
1734
|
-
default: vue.withCtx((scope) => [
|
|
1735
|
-
vue.renderSlot(_ctx.$slots, "operateCol", { scope }),
|
|
1736
|
-
vue.withDirectives(vue.createVNode(vue.unref(design.TMagicIcon), {
|
|
1737
|
-
class: "m-table-delete-icon",
|
|
1738
|
-
onClick: ($event) => removeHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1739
|
-
}, {
|
|
1740
|
-
default: vue.withCtx(() => [
|
|
1741
|
-
vue.createVNode(vue.unref(iconsVue.Delete))
|
|
1742
|
-
]),
|
|
1743
|
-
_: 2
|
|
1744
|
-
}, 1032, ["onClick"]), [
|
|
1745
|
-
[vue.vShow, showDelete(scope.$index + 1 + pagecontext.value * pagesize.value - 1)]
|
|
1746
|
-
])
|
|
1747
|
-
]),
|
|
1748
|
-
_: 3
|
|
1749
|
-
}, 8, ["width", "fixed"]),
|
|
1750
|
-
_ctx.sort && _ctx.model[modelName.value] && _ctx.model[modelName.value].length > 1 ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTableColumn), {
|
|
1751
|
-
key: 1,
|
|
1752
|
-
label: "排序",
|
|
1753
|
-
width: "60"
|
|
1754
|
-
}, {
|
|
1755
|
-
default: vue.withCtx((scope) => [
|
|
1756
|
-
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== 0 ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
|
|
1757
|
-
key: 0,
|
|
1758
|
-
content: "点击上移,双击置顶",
|
|
1759
|
-
placement: "top"
|
|
1760
|
-
}, {
|
|
1761
|
-
default: vue.withCtx(() => [
|
|
1762
|
-
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
1763
|
-
plain: "",
|
|
1764
|
-
size: "small",
|
|
1765
|
-
type: "primary",
|
|
1766
|
-
icon: vue.unref(iconsVue.ArrowUp),
|
|
1767
|
-
disabled: _ctx.disabled,
|
|
1768
|
-
text: "",
|
|
1769
|
-
onClick: ($event) => upHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1770
|
-
onDblclick: ($event) => topHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1771
|
-
}, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
|
|
1772
|
-
]),
|
|
1773
|
-
_: 2
|
|
1774
|
-
}, 1024)) : vue.createCommentVNode("", true),
|
|
1775
|
-
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== _ctx.model[modelName.value].length - 1 ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
|
|
1776
|
-
key: 1,
|
|
1777
|
-
content: "点击下移,双击置底",
|
|
1778
|
-
placement: "top"
|
|
1779
|
-
}, {
|
|
1780
|
-
default: vue.withCtx(() => [
|
|
1781
|
-
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
1782
|
-
plain: "",
|
|
1783
|
-
size: "small",
|
|
1784
|
-
type: "primary",
|
|
1785
|
-
icon: vue.unref(iconsVue.ArrowDown),
|
|
1786
|
-
disabled: _ctx.disabled,
|
|
1787
|
-
text: "",
|
|
1788
|
-
onClick: ($event) => downHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1789
|
-
onDblclick: ($event) => bottomHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1790
|
-
}, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
|
|
1791
|
-
]),
|
|
1792
|
-
_: 2
|
|
1793
|
-
}, 1024)) : vue.createCommentVNode("", true)
|
|
1794
|
-
]),
|
|
1795
|
-
_: 1
|
|
1796
|
-
})) : vue.createCommentVNode("", true),
|
|
1797
|
-
selection.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTableColumn), {
|
|
1798
|
-
key: 2,
|
|
1799
|
-
align: "center",
|
|
1800
|
-
"header-align": "center",
|
|
1801
|
-
type: "selection",
|
|
1802
|
-
width: "45"
|
|
1803
|
-
})) : vue.createCommentVNode("", true),
|
|
1804
|
-
_ctx.showIndex && _ctx.config.showIndex ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTableColumn), {
|
|
1805
|
-
key: 3,
|
|
1806
|
-
width: "60",
|
|
1807
|
-
label: "序号"
|
|
1808
|
-
}, {
|
|
1809
|
-
default: vue.withCtx((scope) => [
|
|
1810
|
-
vue.createTextVNode(vue.toDisplayString(scope.$index + 1 + pagecontext.value * pagesize.value), 1)
|
|
1811
|
-
]),
|
|
1812
|
-
_: 1
|
|
1813
|
-
})) : vue.createCommentVNode("", true),
|
|
1814
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.config.items, (column, index) => {
|
|
1815
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1816
|
-
column.type !== "hidden" && display$1(column.display) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTableColumn), {
|
|
1817
|
-
prop: column.name,
|
|
1818
|
-
width: column.width,
|
|
1819
|
-
label: column.label,
|
|
1820
|
-
sortable: column.sortable,
|
|
1821
|
-
"sort-orders": ["ascending", "descending"],
|
|
1822
|
-
key: column[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1823
|
-
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
1824
|
-
}, {
|
|
1825
|
-
default: vue.withCtx((scope) => [
|
|
1826
|
-
scope.$index > -1 ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
1827
|
-
key: 0,
|
|
1828
|
-
labelWidth: "0",
|
|
1829
|
-
disabled: _ctx.disabled,
|
|
1830
|
-
prop: getProp(scope.$index),
|
|
1831
|
-
rules: column.rules,
|
|
1832
|
-
config: makeConfig(column, scope.row),
|
|
1833
|
-
model: scope.row,
|
|
1834
|
-
lastValues: lastData.value[scope.$index],
|
|
1835
|
-
"is-compare": _ctx.isCompare,
|
|
1836
|
-
size: _ctx.size,
|
|
1837
|
-
onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("change", _ctx.model[modelName.value])),
|
|
1838
|
-
onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
|
|
1839
|
-
}, null, 8, ["disabled", "prop", "rules", "config", "model", "lastValues", "is-compare", "size"])) : vue.createCommentVNode("", true)
|
|
1840
|
-
]),
|
|
1841
|
-
_: 2
|
|
1842
|
-
}, 1032, ["prop", "width", "label", "sortable", "class-name"])) : vue.createCommentVNode("", true)
|
|
1843
|
-
], 64);
|
|
1844
|
-
}), 256))
|
|
1845
|
-
]),
|
|
1846
|
-
_: 3
|
|
1847
|
-
}, 8, ["row-key", "data", "lastData", "border", "max-height"])) : vue.createCommentVNode("", true)
|
|
1848
|
-
]),
|
|
1849
|
-
_: 3
|
|
1850
|
-
}, 8, ["disabled"]),
|
|
1851
|
-
vue.renderSlot(_ctx.$slots, "default"),
|
|
1852
|
-
vue.createElementVNode("div", _hoisted_3, [
|
|
1853
|
-
addable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
1688
|
+
vue.createElementVNode("div", {
|
|
1689
|
+
ref_key: "mTable",
|
|
1690
|
+
ref: mTable,
|
|
1691
|
+
class: vue.normalizeClass(["m-fields-table", { "m-fields-table-item-extra": _ctx.config.itemExtra }])
|
|
1692
|
+
}, [
|
|
1693
|
+
_ctx.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
1854
1694
|
key: 0,
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1695
|
+
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1696
|
+
innerHTML: _ctx.config.extra
|
|
1697
|
+
}, null, 8, _hoisted_1$9)) : vue.createCommentVNode("", true),
|
|
1698
|
+
vue.createVNode(vue.unref(design.TMagicTooltip), {
|
|
1699
|
+
content: "拖拽可排序",
|
|
1700
|
+
placement: "left-start",
|
|
1701
|
+
disabled: _ctx.config.dropSort !== true
|
|
1860
1702
|
}, {
|
|
1861
1703
|
default: vue.withCtx(() => [
|
|
1862
|
-
vue.
|
|
1704
|
+
_ctx.model[modelName.value] ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTable), {
|
|
1705
|
+
ref_key: "tMagicTable",
|
|
1706
|
+
ref: tMagicTable,
|
|
1707
|
+
style: { "width": "100%" },
|
|
1708
|
+
"row-key": _ctx.config.rowKey || "id",
|
|
1709
|
+
data: data.value,
|
|
1710
|
+
lastData: lastData.value,
|
|
1711
|
+
border: _ctx.config.border,
|
|
1712
|
+
"max-height": _ctx.config.maxHeight,
|
|
1713
|
+
"default-expand-all": true,
|
|
1714
|
+
key: updateKey.value,
|
|
1715
|
+
onSelect: selectHandle,
|
|
1716
|
+
onSortChange: sortChange
|
|
1717
|
+
}, {
|
|
1718
|
+
default: vue.withCtx(() => [
|
|
1719
|
+
_ctx.config.itemExtra ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTableColumn), {
|
|
1720
|
+
key: 0,
|
|
1721
|
+
fixed: "left",
|
|
1722
|
+
width: "30",
|
|
1723
|
+
type: "expand"
|
|
1724
|
+
}, {
|
|
1725
|
+
default: vue.withCtx((scope) => [
|
|
1726
|
+
vue.createElementVNode("span", {
|
|
1727
|
+
innerHTML: itemExtra(_ctx.config.itemExtra, scope.$index),
|
|
1728
|
+
class: "m-form-tip"
|
|
1729
|
+
}, null, 8, _hoisted_2$3)
|
|
1730
|
+
]),
|
|
1731
|
+
_: 1
|
|
1732
|
+
})) : vue.createCommentVNode("", true),
|
|
1733
|
+
vue.createVNode(vue.unref(design.TMagicTableColumn), {
|
|
1734
|
+
label: "操作",
|
|
1735
|
+
width: _ctx.config.operateColWidth || 55,
|
|
1736
|
+
align: "center",
|
|
1737
|
+
fixed: _ctx.config.fixed === false ? void 0 : "left"
|
|
1738
|
+
}, {
|
|
1739
|
+
default: vue.withCtx((scope) => [
|
|
1740
|
+
vue.renderSlot(_ctx.$slots, "operateCol", { scope }),
|
|
1741
|
+
vue.withDirectives(vue.createVNode(vue.unref(design.TMagicIcon), {
|
|
1742
|
+
class: "m-table-delete-icon",
|
|
1743
|
+
onClick: ($event) => removeHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1744
|
+
}, {
|
|
1745
|
+
default: vue.withCtx(() => [
|
|
1746
|
+
vue.createVNode(vue.unref(iconsVue.Delete))
|
|
1747
|
+
]),
|
|
1748
|
+
_: 2
|
|
1749
|
+
}, 1032, ["onClick"]), [
|
|
1750
|
+
[vue.vShow, showDelete(scope.$index + 1 + pagecontext.value * pagesize.value - 1)]
|
|
1751
|
+
])
|
|
1752
|
+
]),
|
|
1753
|
+
_: 3
|
|
1754
|
+
}, 8, ["width", "fixed"]),
|
|
1755
|
+
_ctx.sort && _ctx.model[modelName.value] && _ctx.model[modelName.value].length > 1 ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTableColumn), {
|
|
1756
|
+
key: 1,
|
|
1757
|
+
label: "排序",
|
|
1758
|
+
width: "60"
|
|
1759
|
+
}, {
|
|
1760
|
+
default: vue.withCtx((scope) => [
|
|
1761
|
+
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== 0 ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
|
|
1762
|
+
key: 0,
|
|
1763
|
+
content: "点击上移,双击置顶",
|
|
1764
|
+
placement: "top"
|
|
1765
|
+
}, {
|
|
1766
|
+
default: vue.withCtx(() => [
|
|
1767
|
+
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
1768
|
+
plain: "",
|
|
1769
|
+
size: "small",
|
|
1770
|
+
type: "primary",
|
|
1771
|
+
icon: vue.unref(iconsVue.ArrowUp),
|
|
1772
|
+
disabled: _ctx.disabled,
|
|
1773
|
+
text: "",
|
|
1774
|
+
onClick: ($event) => upHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1775
|
+
onDblclick: ($event) => topHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1776
|
+
}, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
|
|
1777
|
+
]),
|
|
1778
|
+
_: 2
|
|
1779
|
+
}, 1024)) : vue.createCommentVNode("", true),
|
|
1780
|
+
scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== _ctx.model[modelName.value].length - 1 ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
|
|
1781
|
+
key: 1,
|
|
1782
|
+
content: "点击下移,双击置底",
|
|
1783
|
+
placement: "top"
|
|
1784
|
+
}, {
|
|
1785
|
+
default: vue.withCtx(() => [
|
|
1786
|
+
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
1787
|
+
plain: "",
|
|
1788
|
+
size: "small",
|
|
1789
|
+
type: "primary",
|
|
1790
|
+
icon: vue.unref(iconsVue.ArrowDown),
|
|
1791
|
+
disabled: _ctx.disabled,
|
|
1792
|
+
text: "",
|
|
1793
|
+
onClick: ($event) => downHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1794
|
+
onDblclick: ($event) => bottomHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1795
|
+
}, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
|
|
1796
|
+
]),
|
|
1797
|
+
_: 2
|
|
1798
|
+
}, 1024)) : vue.createCommentVNode("", true)
|
|
1799
|
+
]),
|
|
1800
|
+
_: 1
|
|
1801
|
+
})) : vue.createCommentVNode("", true),
|
|
1802
|
+
selection.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTableColumn), {
|
|
1803
|
+
key: 2,
|
|
1804
|
+
align: "center",
|
|
1805
|
+
"header-align": "center",
|
|
1806
|
+
type: "selection",
|
|
1807
|
+
width: "45"
|
|
1808
|
+
})) : vue.createCommentVNode("", true),
|
|
1809
|
+
_ctx.showIndex && _ctx.config.showIndex ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTableColumn), {
|
|
1810
|
+
key: 3,
|
|
1811
|
+
width: "60",
|
|
1812
|
+
label: "序号"
|
|
1813
|
+
}, {
|
|
1814
|
+
default: vue.withCtx((scope) => [
|
|
1815
|
+
vue.createTextVNode(vue.toDisplayString(scope.$index + 1 + pagecontext.value * pagesize.value), 1)
|
|
1816
|
+
]),
|
|
1817
|
+
_: 1
|
|
1818
|
+
})) : vue.createCommentVNode("", true),
|
|
1819
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.config.items, (column, index) => {
|
|
1820
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1821
|
+
column.type !== "hidden" && display$1(column.display) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTableColumn), {
|
|
1822
|
+
prop: column.name,
|
|
1823
|
+
width: column.width,
|
|
1824
|
+
label: column.label,
|
|
1825
|
+
sortable: column.sortable,
|
|
1826
|
+
"sort-orders": ["ascending", "descending"],
|
|
1827
|
+
key: column[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1828
|
+
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
1829
|
+
}, {
|
|
1830
|
+
default: vue.withCtx((scope) => [
|
|
1831
|
+
scope.$index > -1 ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
1832
|
+
key: 0,
|
|
1833
|
+
labelWidth: "0",
|
|
1834
|
+
disabled: _ctx.disabled,
|
|
1835
|
+
prop: getProp(scope.$index),
|
|
1836
|
+
rules: column.rules,
|
|
1837
|
+
config: makeConfig(column, scope.row),
|
|
1838
|
+
model: scope.row,
|
|
1839
|
+
lastValues: lastData.value[scope.$index],
|
|
1840
|
+
"is-compare": _ctx.isCompare,
|
|
1841
|
+
size: _ctx.size,
|
|
1842
|
+
onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("change", _ctx.model[modelName.value])),
|
|
1843
|
+
onAddDiffCount: _cache[1] || (_cache[1] = ($event) => onAddDiffCount())
|
|
1844
|
+
}, null, 8, ["disabled", "prop", "rules", "config", "model", "lastValues", "is-compare", "size"])) : vue.createCommentVNode("", true)
|
|
1845
|
+
]),
|
|
1846
|
+
_: 2
|
|
1847
|
+
}, 1032, ["prop", "width", "label", "sortable", "class-name"])) : vue.createCommentVNode("", true)
|
|
1848
|
+
], 64);
|
|
1849
|
+
}), 256))
|
|
1850
|
+
]),
|
|
1851
|
+
_: 3
|
|
1852
|
+
}, 8, ["row-key", "data", "lastData", "border", "max-height"])) : vue.createCommentVNode("", true)
|
|
1863
1853
|
]),
|
|
1864
|
-
_:
|
|
1865
|
-
}, 8, ["disabled"])
|
|
1866
|
-
vue.
|
|
1867
|
-
|
|
1854
|
+
_: 3
|
|
1855
|
+
}, 8, ["disabled"]),
|
|
1856
|
+
vue.renderSlot(_ctx.$slots, "default"),
|
|
1857
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
1858
|
+
addable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
1868
1859
|
key: 0,
|
|
1869
|
-
icon: vue.unref(iconsVue.Grid),
|
|
1870
1860
|
size: "small",
|
|
1871
1861
|
type: "primary",
|
|
1872
|
-
onClick: toggleMode
|
|
1873
|
-
}, {
|
|
1874
|
-
default: vue.withCtx(() => [
|
|
1875
|
-
vue.createTextVNode("展开配置")
|
|
1876
|
-
]),
|
|
1877
|
-
_: 1
|
|
1878
|
-
}, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
1879
|
-
_ctx.config.enableFullscreen !== false ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
1880
|
-
key: 1,
|
|
1881
|
-
icon: vue.unref(iconsVue.FullScreen),
|
|
1882
|
-
size: "small",
|
|
1883
|
-
type: "primary",
|
|
1884
|
-
onClick: toggleFullscreen
|
|
1885
|
-
}, {
|
|
1886
|
-
default: vue.withCtx(() => [
|
|
1887
|
-
vue.createTextVNode(vue.toDisplayString(isFullscreen.value ? "退出全屏" : "全屏编辑"), 1)
|
|
1888
|
-
]),
|
|
1889
|
-
_: 1
|
|
1890
|
-
}, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
1891
|
-
importable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicUpload), {
|
|
1892
|
-
key: 2,
|
|
1893
|
-
style: { "display": "inline-block" },
|
|
1894
|
-
ref_key: "excelBtn",
|
|
1895
|
-
ref: excelBtn,
|
|
1896
|
-
action: "/noop",
|
|
1897
|
-
disabled: _ctx.disabled,
|
|
1898
|
-
"on-change": excelHandler,
|
|
1899
|
-
"auto-upload": false
|
|
1900
|
-
}, {
|
|
1901
|
-
default: vue.withCtx(() => [
|
|
1902
|
-
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
1903
|
-
size: "small",
|
|
1904
|
-
type: "success",
|
|
1905
|
-
disabled: _ctx.disabled,
|
|
1906
|
-
plain: ""
|
|
1907
|
-
}, {
|
|
1908
|
-
default: vue.withCtx(() => [
|
|
1909
|
-
vue.createTextVNode("导入EXCEL")
|
|
1910
|
-
]),
|
|
1911
|
-
_: 1
|
|
1912
|
-
}, 8, ["disabled"])
|
|
1913
|
-
]),
|
|
1914
|
-
_: 1
|
|
1915
|
-
}, 8, ["disabled"])) : vue.createCommentVNode("", true),
|
|
1916
|
-
importable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
1917
|
-
key: 3,
|
|
1918
|
-
size: "small",
|
|
1919
|
-
type: "warning",
|
|
1920
1862
|
disabled: _ctx.disabled,
|
|
1921
1863
|
plain: "",
|
|
1922
|
-
onClick: _cache[
|
|
1864
|
+
onClick: _cache[2] || (_cache[2] = ($event) => newHandler())
|
|
1923
1865
|
}, {
|
|
1924
1866
|
default: vue.withCtx(() => [
|
|
1925
|
-
vue.createTextVNode("
|
|
1867
|
+
vue.createTextVNode("新增一行")
|
|
1926
1868
|
]),
|
|
1927
1869
|
_: 1
|
|
1928
|
-
}, 8, ["disabled"])) : vue.createCommentVNode("", true)
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1870
|
+
}, 8, ["disabled"])) : vue.createCommentVNode("", true),
|
|
1871
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
1872
|
+
_ctx.enableToggleMode && _ctx.config.enableToggleMode !== false && !isFullscreen.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
1873
|
+
key: 0,
|
|
1874
|
+
icon: vue.unref(iconsVue.Grid),
|
|
1875
|
+
size: "small",
|
|
1876
|
+
type: "primary",
|
|
1877
|
+
onClick: toggleMode
|
|
1878
|
+
}, {
|
|
1879
|
+
default: vue.withCtx(() => [
|
|
1880
|
+
vue.createTextVNode("展开配置")
|
|
1881
|
+
]),
|
|
1882
|
+
_: 1
|
|
1883
|
+
}, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
1884
|
+
_ctx.config.enableFullscreen !== false ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
1885
|
+
key: 1,
|
|
1886
|
+
icon: vue.unref(iconsVue.FullScreen),
|
|
1887
|
+
size: "small",
|
|
1888
|
+
type: "primary",
|
|
1889
|
+
onClick: toggleFullscreen
|
|
1890
|
+
}, {
|
|
1891
|
+
default: vue.withCtx(() => [
|
|
1892
|
+
vue.createTextVNode(vue.toDisplayString(isFullscreen.value ? "退出全屏" : "全屏编辑"), 1)
|
|
1893
|
+
]),
|
|
1894
|
+
_: 1
|
|
1895
|
+
}, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
1896
|
+
importable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicUpload), {
|
|
1897
|
+
key: 2,
|
|
1898
|
+
style: { "display": "inline-block" },
|
|
1899
|
+
ref_key: "excelBtn",
|
|
1900
|
+
ref: excelBtn,
|
|
1901
|
+
action: "/noop",
|
|
1902
|
+
disabled: _ctx.disabled,
|
|
1903
|
+
"on-change": excelHandler,
|
|
1904
|
+
"auto-upload": false
|
|
1905
|
+
}, {
|
|
1906
|
+
default: vue.withCtx(() => [
|
|
1907
|
+
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
1908
|
+
size: "small",
|
|
1909
|
+
type: "success",
|
|
1910
|
+
disabled: _ctx.disabled,
|
|
1911
|
+
plain: ""
|
|
1912
|
+
}, {
|
|
1913
|
+
default: vue.withCtx(() => [
|
|
1914
|
+
vue.createTextVNode("导入EXCEL")
|
|
1915
|
+
]),
|
|
1916
|
+
_: 1
|
|
1917
|
+
}, 8, ["disabled"])
|
|
1918
|
+
]),
|
|
1919
|
+
_: 1
|
|
1920
|
+
}, 8, ["disabled"])) : vue.createCommentVNode("", true),
|
|
1921
|
+
importable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
1922
|
+
key: 3,
|
|
1923
|
+
size: "small",
|
|
1924
|
+
type: "warning",
|
|
1925
|
+
disabled: _ctx.disabled,
|
|
1926
|
+
plain: "",
|
|
1927
|
+
onClick: _cache[3] || (_cache[3] = ($event) => clearHandler())
|
|
1928
|
+
}, {
|
|
1929
|
+
default: vue.withCtx(() => [
|
|
1930
|
+
vue.createTextVNode("清空")
|
|
1931
|
+
]),
|
|
1932
|
+
_: 1
|
|
1933
|
+
}, 8, ["disabled"])) : vue.createCommentVNode("", true)
|
|
1934
|
+
])
|
|
1935
|
+
]),
|
|
1936
|
+
_ctx.config.pagination ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
1937
|
+
vue.createVNode(vue.unref(design.TMagicPagination), {
|
|
1938
|
+
layout: "total, sizes, prev, pager, next, jumper",
|
|
1939
|
+
"hide-on-single-page": _ctx.model[modelName.value].length < pagesize.value,
|
|
1940
|
+
"current-page": pagecontext.value + 1,
|
|
1941
|
+
"page-sizes": [pagesize.value, 60, 120, 300],
|
|
1942
|
+
"page-size": pagesize.value,
|
|
1943
|
+
total: _ctx.model[modelName.value].length,
|
|
1944
|
+
onSizeChange: handleSizeChange,
|
|
1945
|
+
onCurrentChange: handleCurrentChange
|
|
1946
|
+
}, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total"])
|
|
1947
|
+
])) : vue.createCommentVNode("", true)
|
|
1948
|
+
], 2)
|
|
1949
|
+
], 8, ["disabled"]);
|
|
1944
1950
|
};
|
|
1945
1951
|
}
|
|
1946
1952
|
});
|
|
@@ -3696,12 +3702,13 @@
|
|
|
3696
3702
|
});
|
|
3697
3703
|
}
|
|
3698
3704
|
if (props.config.remote) {
|
|
3699
|
-
const
|
|
3705
|
+
const unWatch = vue.watch(
|
|
3700
3706
|
() => tMagicSelect.value?.scrollbarWrap,
|
|
3701
3707
|
(scrollbarWrap) => {
|
|
3702
3708
|
if (!scrollbarWrap) {
|
|
3703
3709
|
return;
|
|
3704
3710
|
}
|
|
3711
|
+
vue.nextTick(() => unWatch());
|
|
3705
3712
|
scrollbarWrap.addEventListener("scroll", async (e) => {
|
|
3706
3713
|
const el = e.currentTarget;
|
|
3707
3714
|
if (moreLoadingVisible.value) {
|
|
@@ -3718,7 +3725,6 @@
|
|
|
3718
3725
|
options.value = await getOptions();
|
|
3719
3726
|
moreLoadingVisible.value = false;
|
|
3720
3727
|
});
|
|
3721
|
-
unWacth();
|
|
3722
3728
|
},
|
|
3723
3729
|
{
|
|
3724
3730
|
immediate: true
|