@dinert/element-plus 1.1.0 → 1.1.2
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 +5 -1
- package/dist/element-plus.umd.js +1 -1
- package/dist/element-plus.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/es/node_modules/@element-plus/icons-vue/dist/index.mjs +63 -33
- package/es/node_modules/@element-plus/icons-vue/dist/index.mjs.map +1 -1
- package/es/packages/assets/fonts/iconfont.mjs +40 -0
- package/es/packages/assets/fonts/iconfont.mjs.map +1 -0
- package/es/packages/assets/scss/dinert-dialog.scss.mjs +2 -0
- package/es/packages/assets/scss/dinert-dialog.scss.mjs.map +1 -0
- package/es/packages/components/dialog/index.mjs +10 -0
- package/es/packages/components/dialog/index.mjs.map +1 -0
- package/es/packages/components/dialog/src/index.mjs +87 -0
- package/es/packages/components/dialog/src/index.mjs.map +1 -0
- package/es/packages/components/form/src/date.mjs.map +1 -1
- package/es/packages/components/form/src/index.mjs +111 -99
- package/es/packages/components/form/src/index.mjs.map +1 -1
- package/es/packages/components/form/src/select-v2.mjs +34 -0
- package/es/packages/components/form/src/select-v2.mjs.map +1 -0
- package/es/packages/components/form/utils/index.mjs +31 -51
- package/es/packages/components/form/utils/index.mjs.map +1 -1
- package/es/packages/components/index.mjs +6 -4
- package/es/packages/components/index.mjs.map +1 -1
- package/es/packages/components/table/hooks/index.mjs +4 -4
- package/es/packages/components/table/hooks/index.mjs.map +1 -1
- package/es/packages/components/table/src/index.mjs +131 -119
- package/es/packages/components/table/src/index.mjs.map +1 -1
- package/es/packages/components/table/src/recuve-table-column.mjs +157 -135
- package/es/packages/components/table/src/recuve-table-column.mjs.map +1 -1
- package/es/packages/components/table-page/src/index.mjs +19 -18
- package/es/packages/components/table-page/src/index.mjs.map +1 -1
- package/es/packages/components/tooltip/src/index.mjs +14 -14
- package/es/packages/components/tooltip/src/index.mjs.map +1 -1
- package/es/packages/hooks/TablePage/index.mjs +28 -22
- package/es/packages/hooks/TablePage/index.mjs.map +1 -1
- package/es/packages/index.mjs +13 -11
- package/es/packages/index.mjs.map +1 -1
- package/es/packages/utils/tools.mjs +39 -26
- package/es/packages/utils/tools.mjs.map +1 -1
- package/es/src/components/dialog/index.d.ts +3 -1
- package/es/src/components/dialog/src/index.d.ts +3 -0
- package/es/src/components/dialog/types/index.d.ts +10 -0
- package/es/src/components/form/src/date.d.ts +1 -239
- package/es/src/components/form/src/select-v2.d.ts +27 -0
- package/es/src/components/form/types/index.d.ts +1 -0
- package/es/src/components/index.d.ts +2 -0
- package/es/src/components/table/hooks/index.d.ts +1 -1
- package/es/src/components/table/index.d.ts +6 -25274
- package/es/src/components/table/src/index.d.ts +6 -25275
- package/es/src/components/table/src/recuve-table-column.d.ts +13 -2
- package/es/src/components/table/types/index.d.ts +3 -7
- package/es/src/components/table-page/index.d.ts +815 -0
- package/es/src/components/table-page/src/index.d.ts +816 -0
- package/es/src/hooks/TablePage/index.d.ts +12 -3
- package/es/style.css +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/src/components/dialog/index.d.ts +3 -1
- package/lib/src/components/dialog/src/index.d.ts +3 -0
- package/lib/src/components/dialog/types/index.d.ts +10 -0
- package/lib/src/components/form/src/date.d.ts +1 -239
- package/lib/src/components/form/src/select-v2.d.ts +27 -0
- package/lib/src/components/form/types/index.d.ts +1 -0
- package/lib/src/components/index.d.ts +2 -0
- package/lib/src/components/table/hooks/index.d.ts +1 -1
- package/lib/src/components/table/index.d.ts +6 -25274
- package/lib/src/components/table/src/index.d.ts +6 -25275
- package/lib/src/components/table/src/recuve-table-column.d.ts +13 -2
- package/lib/src/components/table/types/index.d.ts +3 -7
- package/lib/src/components/table-page/index.d.ts +815 -0
- package/lib/src/components/table-page/src/index.d.ts +816 -0
- package/lib/src/hooks/TablePage/index.d.ts +12 -3
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
typeof window < "u" && (window._iconfont_svg_string_ = '<svg><symbol id="icon-tuichuquanping" viewBox="0 0 1024 1024"><path d="M593.92 224.576a40.256 40.256 0 0 1 40.64-40.96 42.176 42.176 0 0 1 41.408 41.728l-2.624 68.096 212.032-213.376 0.448 0.448a41.28 41.28 0 0 1 3.776-4.608 40.512 40.512 0 0 1 57.6 0l1.088 1.088a41.152 41.152 0 0 1 0 57.6 41.728 41.728 0 0 1-4.544 3.776l0.384 0.384-211.904 213.184 67.328-2.688a42.176 42.176 0 0 1 41.472 41.728 40.256 40.256 0 0 1-40.64 40.96l-171.584 6.72a42.112 42.112 0 0 1-41.472-41.728z m344.64 721.024a40.32 40.32 0 0 1-57.6 0 41.152 41.152 0 0 1-3.776-4.608v0.32l-211.2-212.48 2.496 67.648a42.24 42.24 0 0 1-41.408 41.728 40.064 40.064 0 0 1-40.576-40.832l-6.4-172.416a42.24 42.24 0 0 1 41.472-41.728l171.328 6.4a40.064 40.064 0 0 1 40.576 40.832 42.24 42.24 0 0 1-41.472 41.728l-67.52-2.56 211.2 212.672-0.384 0.384a40.128 40.128 0 0 1 4.608 3.776 40.896 40.896 0 0 1 0 57.6zM86.016 885.76l-0.384-0.384 213.568-214.912-67.264 3.264a41.28 41.28 0 0 1 0-82.56l171.456-8.32a41.152 41.152 0 0 1 41.024 41.28l-8.256 172.8a41.024 41.024 0 1 1-82.048 0l3.264-68.032-213.76 215.104-0.448-0.448a43.072 43.072 0 0 1-3.776 4.672 40.832 40.832 0 0 1-57.984 0 40.32 40.32 0 0 1 4.608-62.144zM76.288 76.096a40.704 40.704 0 0 1 57.6 0 43.584 43.584 0 0 1 3.776 4.608l0.384-0.384 212.864 214.208-3.136-67.584a40.96 40.96 0 1 1 81.92 0l7.936 172.288a41.28 41.28 0 0 1-41.024 41.28l-171.2-8a41.216 41.216 0 0 1 0-82.368l67.52 3.136-213.056-214.4 0.448-0.448a42.048 42.048 0 0 1-4.608-3.776 41.28 41.28 0 0 1 0-58.176z m349.376 352" ></path></symbol><symbol id="icon-quanping" viewBox="0 0 1024 1024"><path d="M953.344 278.336a40.256 40.256 0 0 1-40.64 40.896 42.112 42.112 0 0 1-41.408-41.728l2.624-68.096-212.032 213.376-0.448-0.448a40.32 40.32 0 0 1-61.312 4.608l-1.088-1.088a41.088 41.088 0 0 1 0-57.6 39.936 39.936 0 0 1 4.544-3.776l-0.384-0.384 211.904-213.184-67.328 2.624a42.176 42.176 0 0 1-41.408-41.728 40.256 40.256 0 0 1 40.64-40.896l171.648-6.72a42.112 42.112 0 0 1 41.408 41.728l-6.4 172.8zM593.472 595.2a40.32 40.32 0 0 1 57.28 0 40.768 40.768 0 0 1 3.776 4.608v-0.32l211.2 212.48-2.496-67.648a42.24 42.24 0 0 1 41.408-41.728 40.064 40.064 0 0 1 40.512 40.768l6.4 172.416a42.24 42.24 0 0 1-41.408 41.728l-171.328-6.4a40.064 40.064 0 0 1-40.512-40.768 42.24 42.24 0 0 1 41.472-41.728l67.52 2.56-211.2-212.608 0.384-0.384a40.512 40.512 0 0 1-4.608-3.776 40.896 40.896 0 0 1 0-57.6l1.472-1.536z m-165.76 61.888l0.384 0.384-213.568 214.912 67.264-3.264a41.28 41.28 0 0 1 0 82.56l-171.52 8.32a41.152 41.152 0 0 1-41.024-41.28l8.256-172.8a41.024 41.024 0 1 1 82.048 0l-3.264 68.032 213.76-215.104 0.448 0.448a43.072 43.072 0 0 1 3.776-4.672 40.832 40.832 0 0 1 57.984 0 40.32 40.32 0 0 1-4.608 62.144zM425.6 428.352a40.704 40.704 0 0 1-57.6 0 43.008 43.008 0 0 1-3.776-4.608l-0.384 0.384-213.12-214.208 3.136 67.84a40.96 40.96 0 1 1-81.92 0L64 105.472a41.28 41.28 0 0 1 41.024-41.28l171.2 8a41.216 41.216 0 0 1 0 82.432l-67.52-3.136 213.056 214.4-0.448 0.448a42.432 42.432 0 0 1 4.608 3.776 41.28 41.28 0 0 1 0 58.176z" ></path></symbol></svg>', function(i) {
|
|
2
|
+
var n = (n = document.getElementsByTagName("script"))[n.length - 1];
|
|
3
|
+
const u = n.getAttribute("data-injectcss");
|
|
4
|
+
var n = n.getAttribute("data-disable-injectsvg");
|
|
5
|
+
if (!n) {
|
|
6
|
+
let l, d;
|
|
7
|
+
var s, a, o;
|
|
8
|
+
const m = function(e, t) {
|
|
9
|
+
t.parentNode.insertBefore(e, t);
|
|
10
|
+
};
|
|
11
|
+
if (u && !i.__iconfont__svg__cssinject__) {
|
|
12
|
+
i.__iconfont__svg__cssinject__ = !0;
|
|
13
|
+
try {
|
|
14
|
+
document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>");
|
|
15
|
+
} catch (e) {
|
|
16
|
+
console && console.log(e);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
l = function() {
|
|
20
|
+
let e, t = document.createElement("div");
|
|
21
|
+
t.innerHTML = i._iconfont_svg_string_, (t = t.getElementsByTagName("svg")[0]) && (t.setAttribute("aria-hidden", "true"), t.style.position = "absolute", t.style.width = 0, t.style.height = 0, t.style.overflow = "hidden", t = t, (e = document.body).firstChild ? m(t, e.firstChild) : e.appendChild(t));
|
|
22
|
+
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(l, 0) : (d = function() {
|
|
23
|
+
document.removeEventListener("DOMContentLoaded", d, !1), l();
|
|
24
|
+
}, document.addEventListener("DOMContentLoaded", d, !1)) : document.attachEvent && (s = l, a = i.document, o = !1, r(), a.onreadystatechange = function() {
|
|
25
|
+
a.readyState == "complete" && (a.onreadystatechange = null, c());
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function c() {
|
|
29
|
+
o || (o = !0, s());
|
|
30
|
+
}
|
|
31
|
+
function r() {
|
|
32
|
+
try {
|
|
33
|
+
a.documentElement.doScroll("left");
|
|
34
|
+
} catch {
|
|
35
|
+
return void setTimeout(r, 50);
|
|
36
|
+
}
|
|
37
|
+
c();
|
|
38
|
+
}
|
|
39
|
+
}(window));
|
|
40
|
+
//# sourceMappingURL=iconfont.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iconfont.mjs","sources":["../../../../packages/assets/fonts/iconfont.js"],"sourcesContent":["typeof window !== 'undefined' && (window._iconfont_svg_string_ = '<svg><symbol id=\"icon-tuichuquanping\" viewBox=\"0 0 1024 1024\"><path d=\"M593.92 224.576a40.256 40.256 0 0 1 40.64-40.96 42.176 42.176 0 0 1 41.408 41.728l-2.624 68.096 212.032-213.376 0.448 0.448a41.28 41.28 0 0 1 3.776-4.608 40.512 40.512 0 0 1 57.6 0l1.088 1.088a41.152 41.152 0 0 1 0 57.6 41.728 41.728 0 0 1-4.544 3.776l0.384 0.384-211.904 213.184 67.328-2.688a42.176 42.176 0 0 1 41.472 41.728 40.256 40.256 0 0 1-40.64 40.96l-171.584 6.72a42.112 42.112 0 0 1-41.472-41.728z m344.64 721.024a40.32 40.32 0 0 1-57.6 0 41.152 41.152 0 0 1-3.776-4.608v0.32l-211.2-212.48 2.496 67.648a42.24 42.24 0 0 1-41.408 41.728 40.064 40.064 0 0 1-40.576-40.832l-6.4-172.416a42.24 42.24 0 0 1 41.472-41.728l171.328 6.4a40.064 40.064 0 0 1 40.576 40.832 42.24 42.24 0 0 1-41.472 41.728l-67.52-2.56 211.2 212.672-0.384 0.384a40.128 40.128 0 0 1 4.608 3.776 40.896 40.896 0 0 1 0 57.6zM86.016 885.76l-0.384-0.384 213.568-214.912-67.264 3.264a41.28 41.28 0 0 1 0-82.56l171.456-8.32a41.152 41.152 0 0 1 41.024 41.28l-8.256 172.8a41.024 41.024 0 1 1-82.048 0l3.264-68.032-213.76 215.104-0.448-0.448a43.072 43.072 0 0 1-3.776 4.672 40.832 40.832 0 0 1-57.984 0 40.32 40.32 0 0 1 4.608-62.144zM76.288 76.096a40.704 40.704 0 0 1 57.6 0 43.584 43.584 0 0 1 3.776 4.608l0.384-0.384 212.864 214.208-3.136-67.584a40.96 40.96 0 1 1 81.92 0l7.936 172.288a41.28 41.28 0 0 1-41.024 41.28l-171.2-8a41.216 41.216 0 0 1 0-82.368l67.52 3.136-213.056-214.4 0.448-0.448a42.048 42.048 0 0 1-4.608-3.776 41.28 41.28 0 0 1 0-58.176z m349.376 352\" ></path></symbol><symbol id=\"icon-quanping\" viewBox=\"0 0 1024 1024\"><path d=\"M953.344 278.336a40.256 40.256 0 0 1-40.64 40.896 42.112 42.112 0 0 1-41.408-41.728l2.624-68.096-212.032 213.376-0.448-0.448a40.32 40.32 0 0 1-61.312 4.608l-1.088-1.088a41.088 41.088 0 0 1 0-57.6 39.936 39.936 0 0 1 4.544-3.776l-0.384-0.384 211.904-213.184-67.328 2.624a42.176 42.176 0 0 1-41.408-41.728 40.256 40.256 0 0 1 40.64-40.896l171.648-6.72a42.112 42.112 0 0 1 41.408 41.728l-6.4 172.8zM593.472 595.2a40.32 40.32 0 0 1 57.28 0 40.768 40.768 0 0 1 3.776 4.608v-0.32l211.2 212.48-2.496-67.648a42.24 42.24 0 0 1 41.408-41.728 40.064 40.064 0 0 1 40.512 40.768l6.4 172.416a42.24 42.24 0 0 1-41.408 41.728l-171.328-6.4a40.064 40.064 0 0 1-40.512-40.768 42.24 42.24 0 0 1 41.472-41.728l67.52 2.56-211.2-212.608 0.384-0.384a40.512 40.512 0 0 1-4.608-3.776 40.896 40.896 0 0 1 0-57.6l1.472-1.536z m-165.76 61.888l0.384 0.384-213.568 214.912 67.264-3.264a41.28 41.28 0 0 1 0 82.56l-171.52 8.32a41.152 41.152 0 0 1-41.024-41.28l8.256-172.8a41.024 41.024 0 1 1 82.048 0l-3.264 68.032 213.76-215.104 0.448 0.448a43.072 43.072 0 0 1 3.776-4.672 40.832 40.832 0 0 1 57.984 0 40.32 40.32 0 0 1-4.608 62.144zM425.6 428.352a40.704 40.704 0 0 1-57.6 0 43.008 43.008 0 0 1-3.776-4.608l-0.384 0.384-213.12-214.208 3.136 67.84a40.96 40.96 0 1 1-81.92 0L64 105.472a41.28 41.28 0 0 1 41.024-41.28l171.2 8a41.216 41.216 0 0 1 0 82.432l-67.52-3.136 213.056 214.4-0.448 0.448a42.432 42.432 0 0 1 4.608 3.776 41.28 41.28 0 0 1 0 58.176z\" ></path></symbol></svg>', (function (a) {var t = (t = document.getElementsByTagName('script'))[t.length - 1]; const e = t.getAttribute('data-injectcss'); var t = t.getAttribute('data-disable-injectsvg'); if (!t) {let n; let l; var i; var o; var c; const d = function (t, e) {e.parentNode.insertBefore(t, e)}; if (e && !a.__iconfont__svg__cssinject__) {a.__iconfont__svg__cssinject__ = !0; try {document.write('<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>')} catch (t) {console && console.log(t)}}n = function () {let t; let e = document.createElement('div'); e.innerHTML = a._iconfont_svg_string_, (e = e.getElementsByTagName('svg')[0]) && (e.setAttribute('aria-hidden', 'true'), e.style.position = 'absolute', e.style.width = 0, e.style.height = 0, e.style.overflow = 'hidden', e = e, (t = document.body).firstChild ? d(e, t.firstChild) : t.appendChild(e))}, document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) ? setTimeout(n, 0) : (l = function () {document.removeEventListener('DOMContentLoaded', l, !1), n()}, document.addEventListener('DOMContentLoaded', l, !1)) : document.attachEvent && (i = n, o = a.document, c = !1, r(), o.onreadystatechange = function () {o.readyState == 'complete' && (o.onreadystatechange = null, s())})} function s() {c || (c = !0, i())} function r() {try {o.documentElement.doScroll('left')} catch (t) {return void setTimeout(r, 50)}s()}}(window)))\n"],"names":["a","t","e","n","l","i","o","c","d","s"],"mappings":"AAAA,OAAO,SAAW,QAAgB,OAAO,wBAAwB,09FAA29F,SAAUA,GAAG;AAAC,MAAIC,KAAKA,IAAI,SAAS,qBAAqB,QAAQ,GAAGA,EAAE,SAAS,CAAC;AAAG,QAAMC,IAAID,EAAE,aAAa,gBAAgB;AAAG,MAAIA,IAAIA,EAAE,aAAa,wBAAwB;AAAG,MAAI,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;AAAC,QAAI;AAAC,MAAAC,EAAE,gBAAgB,SAAS,MAAM;AAAA,IAAC,QAAY;AAAC,aAAO,KAAK,WAAW,GAAG,EAAE;AAAA,IAAC;AAAC,IAAAG,EAAC;AAAA,EAAE;AAAC,EAAE,MAAM;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dinert-dialog.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/dialog/index.ts"],"sourcesContent":["import _Dialog from './src'\n\nimport type {App, Plugin} from 'vue'\ntype SFCWithInstall<T> = T & Plugin\nconst withInstall = <T>(comp: T) => {\n (comp as SFCWithInstall<T>).install = (app: App) => {\n const name = (comp as any).name\n // 注册组件\n app.component(name, comp as SFCWithInstall<T>)\n }\n return comp as SFCWithInstall<T>\n}\nexport const DinertDialog = withInstall(_Dialog)\nexport default DinertDialog\n"],"names":["withInstall","comp","app","name","DinertDialog","_Dialog"],"mappings":";AAIA,MAAMA,IAAc,CAAIC,OACnBA,EAA2B,UAAU,CAACC,MAAa;AAChD,QAAMC,IAAQF,EAAa;AAEvB,EAAAC,EAAA,UAAUC,GAAMF,CAAyB;AAAA,GAE1CA,IAEEG,IAAeJ,EAAYK,CAAO;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent as d, ref as o, watch as c, createVNode as i, resolveComponent as g, mergeProps as f, Fragment as m } from "vue";
|
|
2
|
+
import { getUuid as p } from "../../../utils/tools.mjs";
|
|
3
|
+
import a from "lodash";
|
|
4
|
+
import "../../../assets/scss/dinert-dialog.scss.mjs";
|
|
5
|
+
import "../../../assets/fonts/iconfont.mjs";
|
|
6
|
+
const h = (e) => {
|
|
7
|
+
const t = {
|
|
8
|
+
width: "65%",
|
|
9
|
+
height: "auto"
|
|
10
|
+
};
|
|
11
|
+
return e.size === "large" ? (t.width = 940, t.height = 706) : e.size === "small" ? (t.width = 482, t.height = 362) : e.size === "medium" && (t.width = 720, t.height = 440), t.width = e.width ? e.width : t.width, t.height = e.height ? e.height : t.height, t.height = String(t.height).replace("px", "") + "px", t;
|
|
12
|
+
}, F = /* @__PURE__ */ d({
|
|
13
|
+
name: "dinert-dialog",
|
|
14
|
+
props: {
|
|
15
|
+
fullscreen: {
|
|
16
|
+
type: Boolean
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
emits: ["update:fullscreen"],
|
|
20
|
+
setup(e, t) {
|
|
21
|
+
const s = "dialog_" + p(), l = {
|
|
22
|
+
title: "弹窗标题",
|
|
23
|
+
closeOnClickModal: !1,
|
|
24
|
+
closeOnPressEscape: !0,
|
|
25
|
+
appendToBody: !0
|
|
26
|
+
}, r = o(!1), u = () => {
|
|
27
|
+
r.value = !r.value, t.emit("update:fullscreen", r.value);
|
|
28
|
+
};
|
|
29
|
+
return c(() => e.fullscreen, (n) => {
|
|
30
|
+
r.value = n;
|
|
31
|
+
}, {
|
|
32
|
+
deep: !0,
|
|
33
|
+
immediate: !0
|
|
34
|
+
}), {
|
|
35
|
+
uuid: s,
|
|
36
|
+
defaultAttrs: l,
|
|
37
|
+
fullToggle: u,
|
|
38
|
+
currentFullScreen: r
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
render() {
|
|
42
|
+
var s;
|
|
43
|
+
const e = this.$slots, t = a.defaultsDeep(a.cloneDeep({
|
|
44
|
+
...this.$attrs,
|
|
45
|
+
class: this.$attrs.modalClass ? "dialog_" + this.$attrs.modalClass : "",
|
|
46
|
+
modalClass: `${this.uuid} el-overlay ${this.$attrs.modalClass || ""}`,
|
|
47
|
+
width: h(this.$attrs).width,
|
|
48
|
+
style: {
|
|
49
|
+
...(s = this.$attrs) == null ? void 0 : s.style,
|
|
50
|
+
height: this.currentFullScreen ? void 0 : h(this.$attrs).height
|
|
51
|
+
}
|
|
52
|
+
}), this.defaultAttrs);
|
|
53
|
+
return i("div", null, [i(g("el-dialog"), f({
|
|
54
|
+
"el-dialog": !0
|
|
55
|
+
}, t, {
|
|
56
|
+
fullscreen: this.currentFullScreen
|
|
57
|
+
}), {
|
|
58
|
+
default: () => {
|
|
59
|
+
var l;
|
|
60
|
+
return (l = e.default) == null ? void 0 : l.call(e);
|
|
61
|
+
},
|
|
62
|
+
header: () => {
|
|
63
|
+
var l;
|
|
64
|
+
return i(m, null, [i("span", {
|
|
65
|
+
role: "heading",
|
|
66
|
+
class: "el-dialog__title"
|
|
67
|
+
}, [((l = e.header) == null ? void 0 : l.call(e)) || t.title]), i("span", {
|
|
68
|
+
class: "full",
|
|
69
|
+
onClick: this.fullToggle
|
|
70
|
+
}, [i("svg", {
|
|
71
|
+
class: "icon",
|
|
72
|
+
"aria-hidden": "true"
|
|
73
|
+
}, [i("use", {
|
|
74
|
+
"xlink:href": this.currentFullScreen ? "#icon-tuichuquanping" : "#icon-quanping"
|
|
75
|
+
}, null)])])]);
|
|
76
|
+
},
|
|
77
|
+
footer: () => {
|
|
78
|
+
var l;
|
|
79
|
+
return (l = e.footer) == null ? void 0 : l.call(e);
|
|
80
|
+
}
|
|
81
|
+
})]);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export {
|
|
85
|
+
F as default
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/dialog/src/index.tsx"],"sourcesContent":["import {defineComponent, watch, ref} from 'vue'\nimport {getUuid} from '@packages/utils/tools'\nimport lodash from 'lodash'\nimport type {RewriteDialogProps, GETWH} from '../types'\nimport '@packages/assets/scss/dinert-dialog.scss'\nimport '@packages/assets/fonts/iconfont.js'\n\nconst getWH = (options: RewriteDialogProps): GETWH => {\n const result: GETWH = {\n width: '65%',\n height: 'auto'\n }\n if (options.size === 'large') {\n result.width = 940\n result.height = 706\n } else if (options.size === 'small') {\n result.width = 482\n result.height = 362\n } else if (options.size === 'medium') {\n result.width = 720\n result.height = 440\n }\n\n result.width = options.width ? options.width : result.width\n result.height = options.height ? options.height : result.height\n result.height = String(result.height).replace('px', '') + 'px'\n\n return result\n}\n\n\nexport default defineComponent({\n name: 'dinert-dialog',\n props: {\n fullscreen: {\n type: Boolean,\n }\n },\n emits: ['update:fullscreen'],\n setup(props, ctx) {\n\n const uuid = 'dialog_' + getUuid()\n const defaultAttrs = {\n title: '弹窗标题',\n closeOnClickModal: false,\n closeOnPressEscape: true,\n appendToBody: true,\n }\n const currentFullScreen = ref(false)\n\n const fullToggle = () => {\n currentFullScreen.value = !currentFullScreen.value\n ctx.emit('update:fullscreen', currentFullScreen.value)\n }\n\n watch(() => props.fullscreen, newVal => {\n currentFullScreen.value = newVal\n }, {\n deep: true,\n immediate: true\n })\n\n return {\n uuid,\n defaultAttrs,\n fullToggle,\n currentFullScreen\n }\n },\n render() {\n const slots = this.$slots\n\n const attrs = lodash.defaultsDeep(lodash.cloneDeep({\n ...this.$attrs,\n class: this.$attrs.modalClass ? 'dialog_' + this.$attrs.modalClass : '',\n modalClass: `${this.uuid} el-overlay ${this.$attrs.modalClass || ''}`,\n width: getWH(this.$attrs).width,\n style: {\n ...(this.$attrs?.style as any),\n height: this.currentFullScreen ? undefined : getWH(this.$attrs).height,\n }\n }), this.defaultAttrs)\n\n return (\n <div>\n <el-dialog el-dialog {...attrs} fullscreen={this.currentFullScreen}>\n {{\n default: () => slots.default?.(),\n header: () => {\n return (\n <>\n <span role=\"heading\" class=\"el-dialog__title\">\n { slots.header?.() || attrs.title }\n </span>\n\n <span class=\"full\" onClick={this.fullToggle}>\n <svg class=\"icon\" aria-hidden=\"true\">\n <use xlink:href={this.currentFullScreen ? '#icon-tuichuquanping' : '#icon-quanping'}></use>\n </svg>\n </span>\n </>\n )\n },\n footer: () => slots.footer?.(),\n }}\n </el-dialog>\n </div>\n )\n }\n}) as RewriteDialogProps\n\n"],"names":["getWH","options","result","width","height","size","String","replace","defineComponent","name","props","fullscreen","type","Boolean","emits","setup","ctx","uuid","getUuid","defaultAttrs","title","closeOnClickModal","closeOnPressEscape","appendToBody","currentFullScreen","ref","fullToggle","value","emit","watch","newVal","deep","immediate","render","slots","$slots","attrs","lodash","defaultsDeep","cloneDeep","$attrs","class","modalClass","style","_a","undefined","_createVNode","_resolveComponent","_mergeProps","default","header","_Fragment","footer"],"mappings":";;;;;AAOA,MAAMA,IAASC,CAAAA,MAAuC;AAClD,QAAMC,IAAgB;AAAA,IAClBC,OAAO;AAAA,IACPC,QAAQ;AAAA;AAEZ,SAAIH,EAAQI,SAAS,WACjBH,EAAOC,QAAQ,KACfD,EAAOE,SAAS,OACTH,EAAQI,SAAS,WACxBH,EAAOC,QAAQ,KACfD,EAAOE,SAAS,OACTH,EAAQI,SAAS,aACxBH,EAAOC,QAAQ,KACfD,EAAOE,SAAS,MAGpBF,EAAOC,QAAQF,EAAQE,QAAQF,EAAQE,QAAQD,EAAOC,OACtDD,EAAOE,SAASH,EAAQG,SAASH,EAAQG,SAASF,EAAOE,QACzDF,EAAOE,SAASE,OAAOJ,EAAOE,MAAM,EAAEG,QAAQ,MAAM,EAAE,IAAI,MAEnDL;AACX,GAGeM,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,YAAY;AAAA,MACRC,MAAMC;AAAAA,IACV;AAAA,EACH;AAAA,EACDC,OAAO,CAAC,mBAAmB;AAAA,EAC3BC,MAAML,GAAOM,GAAK;AAEd,UAAMC,IAAO,YAAYC,KACnBC,IAAe;AAAA,MACjBC,OAAO;AAAA,MACPC,mBAAmB;AAAA,MACnBC,oBAAoB;AAAA,MACpBC,cAAc;AAAA,OAEZC,IAAoBC,EAAI,EAAK,GAE7BC,IAAaA,MAAM;AACrBF,MAAAA,EAAkBG,QAAQ,CAACH,EAAkBG,OAC7CX,EAAIY,KAAK,qBAAqBJ,EAAkBG,KAAK;AAAA;AAGzDE,WAAAA,EAAM,MAAMnB,EAAMC,YAAYmB,CAAAA,MAAU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,UAAA,SAGT,KAAKpB;AAAAA,QAAU,GAAA,CAAAoB,EAAA,OAAA;AAAA,UAAA,OAAA;AAAA,UAAA,eAAA;AAAA,QAAA,GAAA,CAAAA,EAAA,OAAA;AAAA,UAAA,cAElB,KAAKtB,oBAAoB,yBAAyB;AAAA,QAAgB,GAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,MAKtG;AAAA,MACD4B,QAAQA,MAAAA;;AAAMlB,gBAAAA,IAAAA,EAAMkB,WAANlB,gBAAAA,EAAAA,KAAAA;AAAAA;AAAAA,IAAgB,CAAA,CAAA,CAAA;AAAA,EAKlD;AACJ,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.mjs","sources":["../../../../../packages/components/form/src/date.tsx"],"sourcesContent":["import {computed, defineComponent} from 'vue'\nimport {Calendar} from '@element-plus/icons-vue'\nimport {customPlaceholder} from '../utils'\n\n\nimport type {RewriteFormProps, CustomFormItemProps
|
|
1
|
+
{"version":3,"file":"date.mjs","sources":["../../../../../packages/components/form/src/date.tsx"],"sourcesContent":["import {computed, defineComponent} from 'vue'\nimport {Calendar} from '@element-plus/icons-vue'\nimport {customPlaceholder} from '../utils'\n\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\n\nconst datePickerPlaceholder = (_label: string, item: any) => {\n const type = item.type\n if (['week'].includes(type)) {\n return '周'\n } else if (['month', 'monthrange'].includes(type)) {\n return '月份'\n } else if (['year', 'yearrange'].includes(type)) {\n return '年份'\n }\n return '时间'\n}\n\nconst customValuFormat = (options: any): string => {\n if (['datetime', 'datetimerange'].includes(options.type)) {\n return 'YYYY-MM-DD HH:mm:ss'\n } else if (options.type === 'year') {\n return 'YYYY'\n } else if (['month', 'monthrange'].includes(options.type)) {\n return 'YYYY-MM'\n } else if (['date', 'daterange', 'dates'].includes(options.type)) {\n return 'YYYY-MM-DD'\n }\n return ''\n}\nexport default defineComponent({\n name: 'dinert-date',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['date']>(() => {\n const options = props.formItem.options || {}\n options.type = props.formItem.type\n\n return options\n })\n\n return {\n options\n }\n },\n render() {\n\n return (\n <el-date-picker\n v-model={this.form.model[this.formItem.key]}\n prefixIcon={Calendar}\n clearable\n placeholder={customPlaceholder(datePickerPlaceholder(this.options.label || '', this.options), 'select')}\n startPlaceholder={customPlaceholder(datePickerPlaceholder(this.options.label || '', this.options), 'input', '开始')}\n endPlaceholder={customPlaceholder(datePickerPlaceholder(this.options.label || '', this.options), 'input', '结束')}\n unlink-panels={true}\n valueFormat={customValuFormat(this.options)}\n format={this.options.type === 'week' ? 'YYYY第ww周' : this.options.format}\n {...this.options}\n v-slots={this.$slots}\n >\n </el-date-picker>\n )\n }\n})\n\n"],"names":["datePickerPlaceholder","_label","item","type","includes","customValuFormat","options","defineComponent","name","props","form","Object","default","formItem","setup","computed","render","_createVNode","_resolveComponent","_mergeProps","model","key","$event","Calendar","customPlaceholder","label","format","$slots"],"mappings":";;;AASA,MAAMA,IAAwBA,CAACC,GAAgBC,MAAc;AACzD,QAAMC,IAAOD,EAAKC;AAClB,SAAI,CAAC,MAAM,EAAEC,SAASD,CAAI,IACf,MACA,CAAC,SAAS,YAAY,EAAEC,SAASD,CAAI,IACrC,OACA,CAAC,QAAQ,WAAW,EAAEC,SAASD,CAAI,IACnC,OAEJ;AACX,GAEME,IAAoBC,CAAAA,MAClB,CAAC,YAAY,eAAe,EAAEF,SAASE,EAAQH,IAAI,IAC5C,wBACAG,EAAQH,SAAS,SACjB,SACA,CAAC,SAAS,YAAY,EAAEC,SAASE,EAAQH,IAAI,IAC7C,YACA,CAAC,QAAQ,aAAa,OAAO,EAAEC,SAASE,EAAQH,IAAI,IACpD,eAEJ,IAE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
|
-
import
|
|
1
|
+
import { defineComponent as L, ref as k, toRefs as R, computed as $, createVNode as o, resolveComponent as s, mergeProps as w, Fragment as F, createTextVNode as I, isVNode as x, nextTick as U } from "vue";
|
|
2
|
+
import D from "./input.mjs";
|
|
3
|
+
import V from "./input-number.mjs";
|
|
4
4
|
import A from "./input-autocomplete.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import N from "./
|
|
11
|
-
import O from "./
|
|
12
|
-
import q from "./
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
5
|
+
import T from "./select.mjs";
|
|
6
|
+
import E from "./select-v2.mjs";
|
|
7
|
+
import M from "./switch.mjs";
|
|
8
|
+
import j from "./date.mjs";
|
|
9
|
+
import B from "./radio.mjs";
|
|
10
|
+
import N from "./tree-select.mjs";
|
|
11
|
+
import O from "./rate.mjs";
|
|
12
|
+
import q from "./checkbox.mjs";
|
|
13
|
+
import z from "./cascader.mjs";
|
|
14
|
+
import H from "../../../hooks/useWindowResize.mjs";
|
|
15
|
+
import { customPlaceholder as P, labelMouseEnter as W, getTooltipValue as G, valueMouseEnter as J, formItemSlot as m } from "../utils/index.mjs";
|
|
16
|
+
import { getUuid as K, dataTransformRod as Q } from "../../../utils/tools.mjs";
|
|
17
|
+
import { ArrowUp as X, ArrowDown as Y } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
17
18
|
import "../../../assets/scss/dinert-form.scss.mjs";
|
|
18
|
-
function
|
|
19
|
-
return typeof f == "function" || Object.prototype.toString.call(f) === "[object Object]" &&
|
|
19
|
+
function Z(f) {
|
|
20
|
+
return typeof f == "function" || Object.prototype.toString.call(f) === "[object Object]" && !x(f);
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
+
const ke = /* @__PURE__ */ L({
|
|
22
23
|
name: "dinert-form",
|
|
23
24
|
props: {
|
|
24
25
|
form: {
|
|
@@ -34,41 +35,42 @@ const he = /* @__PURE__ */ _({
|
|
|
34
35
|
setup(f, {
|
|
35
36
|
emit: e
|
|
36
37
|
}) {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
const l = k(!0), i = k(!1), c = k(), u = k("form_" + K()), {
|
|
39
|
+
form: r
|
|
40
|
+
} = R(f), t = $(() => {
|
|
41
|
+
let n = 0;
|
|
42
|
+
const d = [];
|
|
43
|
+
return Object.keys(r.value.formItem).forEach((a) => {
|
|
44
|
+
const p = r.value.formItem[a];
|
|
45
|
+
d.push({
|
|
46
|
+
...p,
|
|
47
|
+
key: a,
|
|
48
|
+
sort: typeof p.sort > "u" ? n : p.sort
|
|
49
|
+
}), n += 10;
|
|
50
|
+
}), d.sort((a, p) => a.sort - p.sort), d;
|
|
51
|
+
}), b = () => {
|
|
52
|
+
const n = document.querySelectorAll(`.${u.value} .el-form-left > div`);
|
|
53
|
+
n[0] && U(() => {
|
|
54
|
+
const d = n[0].getBoundingClientRect().top, a = n[n.length - 1].getBoundingClientRect().top;
|
|
55
|
+
d !== a ? i.value = !0 : (l.value || (l.value = !0), i.value = !1);
|
|
42
56
|
});
|
|
43
57
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}, 10, !0)
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
formItemMap: F(() => {
|
|
50
|
-
const s = [];
|
|
51
|
-
return Object.keys(f.form.formItem).forEach((i) => {
|
|
52
|
-
const u = f.form.formItem[i];
|
|
53
|
-
s.push({
|
|
54
|
-
...u,
|
|
55
|
-
key: i,
|
|
56
|
-
sort: typeof u.sort > "u" ? t : u.sort
|
|
57
|
-
}), t++;
|
|
58
|
-
}), s.sort((i, u) => i.sort - u.sort), s;
|
|
59
|
-
}),
|
|
58
|
+
return H(() => {
|
|
59
|
+
b();
|
|
60
|
+
}, 10, !0), {
|
|
61
|
+
formItemMap: t,
|
|
60
62
|
unfold: () => {
|
|
61
|
-
|
|
63
|
+
l.value ? l.value = !1 : l.value = !0, e("UnFold", l.value);
|
|
62
64
|
},
|
|
63
|
-
formClass:
|
|
64
|
-
formRef:
|
|
65
|
-
packUp:
|
|
66
|
-
isArrow:
|
|
65
|
+
formClass: u,
|
|
66
|
+
formRef: c,
|
|
67
|
+
packUp: l,
|
|
68
|
+
isArrow: i
|
|
67
69
|
};
|
|
68
70
|
},
|
|
69
71
|
render() {
|
|
70
72
|
let f;
|
|
71
|
-
return o(
|
|
73
|
+
return o(s("el-form"), w({
|
|
72
74
|
inline: !0
|
|
73
75
|
}, this.form, {
|
|
74
76
|
ref: (e) => {
|
|
@@ -76,21 +78,21 @@ const he = /* @__PURE__ */ _({
|
|
|
76
78
|
},
|
|
77
79
|
class: [this.formClass, this.packUp ? "" : "packUp", "dinert-form"]
|
|
78
80
|
}), {
|
|
79
|
-
default: () => [o(
|
|
81
|
+
default: () => [o(s("el-row"), w(this.form.row, {
|
|
80
82
|
class: "el-form-left"
|
|
81
|
-
}),
|
|
82
|
-
const
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
87
|
-
let
|
|
88
|
-
return
|
|
83
|
+
}), Z(f = this.formItemMap.map((e) => {
|
|
84
|
+
const l = {};
|
|
85
|
+
let i = typeof e.vif == "function" ? e.vif(this.form.model) : e.vif;
|
|
86
|
+
i = i === void 0 ? !0 : i;
|
|
87
|
+
let c = typeof e.show == "function" ? e.show(this.form.model) : e.show;
|
|
88
|
+
if (c = c === void 0 ? !0 : c, c || (l.display = "none"), i) {
|
|
89
|
+
let u = e.rules || [];
|
|
90
|
+
return u = e.required ? [{
|
|
89
91
|
required: !0,
|
|
90
92
|
trigger: "blur",
|
|
91
|
-
message:
|
|
92
|
-
}].concat(
|
|
93
|
-
style:
|
|
93
|
+
message: P(e.label, e.type)
|
|
94
|
+
}].concat(u) : u, u = e.showLabel || this.form.showLabel ? [] : u, o(s("el-col"), w({
|
|
95
|
+
style: l,
|
|
94
96
|
class: [e.type, e.key],
|
|
95
97
|
key: e.key
|
|
96
98
|
}, {
|
|
@@ -102,33 +104,33 @@ const he = /* @__PURE__ */ _({
|
|
|
102
104
|
...this.form.colLayout,
|
|
103
105
|
...e.colLayout
|
|
104
106
|
}), {
|
|
105
|
-
default: () => [o(
|
|
107
|
+
default: () => [o(s("el-form-item"), w({
|
|
106
108
|
key: e.key,
|
|
107
109
|
prop: e.key,
|
|
108
110
|
class: [e.labelWrap ? "label-wrap" : "", e.showLabel || this.form.showLabel ? "show-label" : ""]
|
|
109
111
|
}, {
|
|
110
112
|
...e,
|
|
111
|
-
rules:
|
|
113
|
+
rules: u
|
|
112
114
|
}), {
|
|
113
|
-
label: () => o(
|
|
115
|
+
label: () => o(s("dinert-tooltip"), {
|
|
114
116
|
key: e.key,
|
|
115
117
|
content: e.label,
|
|
116
118
|
disabled: e.labelDisabled,
|
|
117
|
-
onLabelMouseEnter: (
|
|
119
|
+
onLabelMouseEnter: (r) => W(r, e, this)
|
|
118
120
|
}, null),
|
|
119
|
-
default: () => o(
|
|
121
|
+
default: () => o(s("dinert-tooltip"), {
|
|
120
122
|
key: e.key,
|
|
121
|
-
content: String(
|
|
123
|
+
content: String(G(this.form.model[e.key], e)),
|
|
122
124
|
disabled: e.showLabel || this.form.showLabel ? !0 : e.valueDisabled === void 0 ? e.tempValueDisabled : e.valueDisabled,
|
|
123
125
|
item: e,
|
|
124
|
-
onLabelMouseEnter: (
|
|
126
|
+
onLabelMouseEnter: (r) => J(r, e, this.form.model[e.key], this)
|
|
125
127
|
}, {
|
|
126
128
|
default: () => {
|
|
127
|
-
var
|
|
128
|
-
const
|
|
129
|
-
let t = o("span", null, [
|
|
130
|
-
if (this.$slots[
|
|
131
|
-
t = (
|
|
129
|
+
var b, C, n, d, a, p;
|
|
130
|
+
const r = {};
|
|
131
|
+
let t = o("span", null, [Q(this.form.model[e.key])]);
|
|
132
|
+
if (this.$slots[m(e.key)])
|
|
133
|
+
t = (C = (b = this.$slots)[m(e.key)]) == null ? void 0 : C.call(b, {
|
|
132
134
|
...e,
|
|
133
135
|
model: this.form.model
|
|
134
136
|
});
|
|
@@ -136,46 +138,49 @@ const he = /* @__PURE__ */ _({
|
|
|
136
138
|
if (e.showLabel || this.form.showLabel && [!0, void 0].includes(e.showLabel))
|
|
137
139
|
return t;
|
|
138
140
|
if (["input", "textarea"].includes(e.type)) {
|
|
139
|
-
const g = (
|
|
140
|
-
|
|
141
|
-
var
|
|
142
|
-
return (
|
|
143
|
-
}),
|
|
144
|
-
var
|
|
145
|
-
return (
|
|
146
|
-
}), t = o(
|
|
141
|
+
const g = (d = (n = this.$slots)[m(e.key + "_append")]) == null ? void 0 : d.call(n), S = g && g[0] && g[0].children, v = (p = (a = this.$slots)[m(e.key + "_prepend")]) == null ? void 0 : p.call(a), _ = v && v[0] && v[0].children;
|
|
142
|
+
S && (r.append = () => {
|
|
143
|
+
var h, y;
|
|
144
|
+
return (y = (h = this.$slots)[m(e.key + "_append")]) == null ? void 0 : y.call(h);
|
|
145
|
+
}), _ && (r.prepend = () => {
|
|
146
|
+
var h, y;
|
|
147
|
+
return (y = (h = this.$slots)[m(e.key + "_prepend")]) == null ? void 0 : y.call(h);
|
|
148
|
+
}), t = o(D, {
|
|
147
149
|
form: this.form,
|
|
148
150
|
formItem: e
|
|
149
|
-
},
|
|
151
|
+
}, r);
|
|
150
152
|
} else
|
|
151
|
-
["input-number"].includes(e.type) ? t = o(
|
|
153
|
+
["input-number"].includes(e.type) ? t = o(V, {
|
|
152
154
|
form: this.form,
|
|
153
155
|
formItem: e
|
|
154
156
|
}, null) : ["input-autocomplete"].includes(e.type) ? t = o(A, {
|
|
155
157
|
form: this.form,
|
|
156
158
|
formItem: e
|
|
157
|
-
}, null) : ["select"].includes(e.type) ? t = o(
|
|
159
|
+
}, null) : ["select"].includes(e.type) ? t = o(T, {
|
|
158
160
|
form: this.form,
|
|
159
161
|
formItem: e
|
|
160
|
-
}, null) : ["
|
|
162
|
+
}, null) : ["select-v2"].includes(e.type) ? t = o(E, {
|
|
161
163
|
form: this.form,
|
|
162
164
|
formItem: e
|
|
163
|
-
}, null) : ["
|
|
165
|
+
}, null) : ["switch"].includes(e.type) ? t = o(M, {
|
|
164
166
|
form: this.form,
|
|
165
167
|
formItem: e
|
|
166
|
-
}, null) : ["
|
|
168
|
+
}, null) : ["datetime", "date", "dates", "week", "month", "year", "years", "datetimerange", "daterange", "monthrange", "yearrange"].includes(e.type) ? t = o(j, {
|
|
167
169
|
form: this.form,
|
|
168
170
|
formItem: e
|
|
169
|
-
}, null) : ["
|
|
171
|
+
}, null) : ["radio", "radio-button"].includes(e.type) ? t = o(B, {
|
|
170
172
|
form: this.form,
|
|
171
173
|
formItem: e
|
|
172
|
-
}, null) : ["
|
|
174
|
+
}, null) : ["tree-select"].includes(e.type) ? t = o(N, {
|
|
173
175
|
form: this.form,
|
|
174
176
|
formItem: e
|
|
175
|
-
}, null) : ["
|
|
177
|
+
}, null) : ["rate"].includes(e.type) ? t = o(O, {
|
|
176
178
|
form: this.form,
|
|
177
179
|
formItem: e
|
|
178
|
-
}, null) : ["
|
|
180
|
+
}, null) : ["checkbox", "checkbox-button"].includes(e.type) ? t = o(q, {
|
|
181
|
+
form: this.form,
|
|
182
|
+
formItem: e
|
|
183
|
+
}, null) : ["cascader"].includes(e.type) && (t = o(z, {
|
|
179
184
|
form: this.form,
|
|
180
185
|
formItem: e
|
|
181
186
|
}, null));
|
|
@@ -183,8 +188,15 @@ const he = /* @__PURE__ */ _({
|
|
|
183
188
|
return t;
|
|
184
189
|
},
|
|
185
190
|
defaultAfter: () => {
|
|
186
|
-
var
|
|
187
|
-
return (t = (
|
|
191
|
+
var r, t;
|
|
192
|
+
return (t = (r = this.$slots)[m("after_" + e.key)]) == null ? void 0 : t.call(r, {
|
|
193
|
+
...e,
|
|
194
|
+
model: this.form.model
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
defaultBefore: () => {
|
|
198
|
+
var r, t;
|
|
199
|
+
return (t = (r = this.$slots)[m("before_" + e.key)]) == null ? void 0 : t.call(r, {
|
|
188
200
|
...e,
|
|
189
201
|
model: this.form.model
|
|
190
202
|
});
|
|
@@ -195,31 +207,31 @@ const he = /* @__PURE__ */ _({
|
|
|
195
207
|
}
|
|
196
208
|
})) ? f : {
|
|
197
209
|
default: () => [f]
|
|
198
|
-
}), this.search && o(
|
|
210
|
+
}), this.search && o(s("el-row"), {
|
|
199
211
|
class: "el-form-right"
|
|
200
212
|
}, {
|
|
201
213
|
default: () => {
|
|
202
|
-
var e,
|
|
203
|
-
return [this.isArrow && o(
|
|
214
|
+
var e, l;
|
|
215
|
+
return [this.isArrow && o(s("el-button"), {
|
|
204
216
|
class: "el-form-right-operation",
|
|
205
217
|
text: !0,
|
|
206
218
|
type: "primary",
|
|
207
219
|
onClick: this.unfold
|
|
208
220
|
}, {
|
|
209
|
-
default: () => [o(
|
|
210
|
-
default: () => [this.packUp ? o(
|
|
221
|
+
default: () => [o(s("el-icon"), null, {
|
|
222
|
+
default: () => [this.packUp ? o(X, null, null) : o(Y, null, null)]
|
|
211
223
|
}), this.packUp ? "收起" : "展开"]
|
|
212
|
-
}), ((
|
|
224
|
+
}), ((l = (e = this.$slots).form_search) == null ? void 0 : l.call(e)) || o(F, null, [o(s("el-button"), {
|
|
213
225
|
type: "primary",
|
|
214
226
|
onClick: () => this.$emit("SearchFn")
|
|
215
227
|
}, {
|
|
216
|
-
default: () => [
|
|
217
|
-
}), o(
|
|
228
|
+
default: () => [I("搜索")]
|
|
229
|
+
}), o(s("el-button"), {
|
|
218
230
|
type: "primary",
|
|
219
231
|
plain: !0,
|
|
220
232
|
onClick: () => this.$emit("ResetFn")
|
|
221
233
|
}, {
|
|
222
|
-
default: () => [
|
|
234
|
+
default: () => [I("重置")]
|
|
223
235
|
})])];
|
|
224
236
|
}
|
|
225
237
|
})]
|
|
@@ -227,6 +239,6 @@ const he = /* @__PURE__ */ _({
|
|
|
227
239
|
}
|
|
228
240
|
});
|
|
229
241
|
export {
|
|
230
|
-
|
|
242
|
+
ke as default
|
|
231
243
|
};
|
|
232
244
|
//# sourceMappingURL=index.mjs.map
|