lew-ui 1.20.1 → 1.20.3
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/lew.es.ts +1776 -1670
- package/dist/lew.umd.ts +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/lew.es.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, renderSlot, onUnmounted, onMounted, getCurrentInstance, h, ref,
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, renderSlot, onUnmounted, onMounted, getCurrentInstance, h, watch, ref, readonly, getCurrentScope, onScopeDispose, nextTick, shallowRef, reactive, createElementVNode, Fragment, renderList, toDisplayString, createCommentVNode, pushScopeId, popScopeId, resolveComponent, createBlock, withCtx, withDirectives, vModelText, vModelDynamic, withModifiers, createVNode, vShow, createTextVNode, toRaw, toRefs, vModelCheckbox, onActivated, Teleport, resolveDirective, Transition, createApp } from "vue";
|
|
2
2
|
function _mergeNamespaces(n, m) {
|
|
3
3
|
m.forEach(function(e) {
|
|
4
4
|
e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
@@ -58,7 +58,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
58
58
|
}
|
|
59
59
|
return target;
|
|
60
60
|
};
|
|
61
|
-
const _sfc_main$
|
|
61
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
62
62
|
__name: "LewFlex",
|
|
63
63
|
props: flexProps,
|
|
64
64
|
setup(__props) {
|
|
@@ -88,10 +88,10 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
var LewFlex = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
91
|
+
var LewFlex = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-0a8a3e9b"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/flex/src/LewFlex.vue"]]);
|
|
92
92
|
var LewSpace_vue_vue_type_style_index_0_lang = "";
|
|
93
|
-
const _hoisted_1$
|
|
94
|
-
const _sfc_main$
|
|
93
|
+
const _hoisted_1$v = { class: "lew-space" };
|
|
94
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
95
95
|
__name: "LewSpace",
|
|
96
96
|
props: {
|
|
97
97
|
direction: {
|
|
@@ -101,15 +101,15 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
101
101
|
},
|
|
102
102
|
setup(__props) {
|
|
103
103
|
return (_ctx, _cache) => {
|
|
104
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
104
|
+
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
105
105
|
renderSlot(_ctx.$slots, "default")
|
|
106
106
|
]);
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
|
-
var LewSpace = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
110
|
+
var LewSpace = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/space/src/LewSpace.vue"]]);
|
|
111
111
|
var LewLayout_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
112
|
-
const _sfc_main$
|
|
112
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
113
113
|
__name: "LewLayout",
|
|
114
114
|
props: {
|
|
115
115
|
direction: {
|
|
@@ -139,7 +139,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
-
var LewLayout = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
142
|
+
var LewLayout = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-38cc287d"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/layout/src/LewLayout.vue"]]);
|
|
143
143
|
function useDOMCreate(nodeId) {
|
|
144
144
|
const node = document.createElement("div");
|
|
145
145
|
node.id = nodeId;
|
|
@@ -174,7 +174,7 @@ function useEventListener$1(target, event, callback) {
|
|
|
174
174
|
onUnmounted(() => target.removeEventListener(event, callback, true));
|
|
175
175
|
}
|
|
176
176
|
var LewMark_vue_vue_type_style_index_0_lang = "";
|
|
177
|
-
const _sfc_main$
|
|
177
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
178
178
|
__name: "LewMark",
|
|
179
179
|
props: {
|
|
180
180
|
type: {
|
|
@@ -207,7 +207,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
|
-
var LewMark = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
210
|
+
var LewMark = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/mark/src/LewMark.vue"]]);
|
|
211
211
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
212
212
|
function getDefaultExportFromCjs(x) {
|
|
213
213
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -1749,8 +1749,7 @@ styleInject(css_248z);
|
|
|
1749
1749
|
script.name = "LewIcon";
|
|
1750
1750
|
const tabsProps = {
|
|
1751
1751
|
modelValue: {
|
|
1752
|
-
type: String,
|
|
1753
|
-
default: ""
|
|
1752
|
+
type: [String, Number]
|
|
1754
1753
|
},
|
|
1755
1754
|
options: {
|
|
1756
1755
|
type: Array,
|
|
@@ -1763,10 +1762,7 @@ const tabsProps = {
|
|
|
1763
1762
|
default: ""
|
|
1764
1763
|
},
|
|
1765
1764
|
itemWidth: {
|
|
1766
|
-
type:
|
|
1767
|
-
default() {
|
|
1768
|
-
return "";
|
|
1769
|
-
}
|
|
1765
|
+
type: Number
|
|
1770
1766
|
},
|
|
1771
1767
|
round: {
|
|
1772
1768
|
type: Boolean,
|
|
@@ -1777,1613 +1773,1653 @@ const tabsProps = {
|
|
|
1777
1773
|
default: "block"
|
|
1778
1774
|
}
|
|
1779
1775
|
};
|
|
1780
|
-
var
|
|
1781
|
-
const
|
|
1782
|
-
const
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1776
|
+
var _a;
|
|
1777
|
+
const isClient = typeof window !== "undefined";
|
|
1778
|
+
const isDef = (val) => typeof val !== "undefined";
|
|
1779
|
+
const isFunction$1 = (val) => typeof val === "function";
|
|
1780
|
+
const isString$1 = (val) => typeof val === "string";
|
|
1781
|
+
const noop = () => {
|
|
1782
|
+
};
|
|
1783
|
+
const isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1784
|
+
function resolveUnref(r) {
|
|
1785
|
+
return typeof r === "function" ? r() : unref(r);
|
|
1786
|
+
}
|
|
1787
|
+
function createFilterWrapper(filter, fn2) {
|
|
1788
|
+
function wrapper(...args) {
|
|
1789
|
+
return new Promise((resolve, reject) => {
|
|
1790
|
+
Promise.resolve(filter(() => fn2.apply(this, args), { fn: fn2, thisArg: this, args })).then(resolve).catch(reject);
|
|
1791
|
+
});
|
|
1792
|
+
}
|
|
1793
|
+
return wrapper;
|
|
1794
|
+
}
|
|
1795
|
+
const bypassFilter = (invoke) => {
|
|
1796
|
+
return invoke();
|
|
1797
|
+
};
|
|
1798
|
+
function debounceFilter(ms, options = {}) {
|
|
1799
|
+
let timer2;
|
|
1800
|
+
let maxTimer;
|
|
1801
|
+
let lastRejector = noop;
|
|
1802
|
+
const _clearTimeout = (timer22) => {
|
|
1803
|
+
clearTimeout(timer22);
|
|
1804
|
+
lastRejector();
|
|
1805
|
+
lastRejector = noop;
|
|
1806
|
+
};
|
|
1807
|
+
const filter = (invoke) => {
|
|
1808
|
+
const duration = resolveUnref(ms);
|
|
1809
|
+
const maxDuration = resolveUnref(options.maxWait);
|
|
1810
|
+
if (timer2)
|
|
1811
|
+
_clearTimeout(timer2);
|
|
1812
|
+
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
|
1813
|
+
if (maxTimer) {
|
|
1814
|
+
_clearTimeout(maxTimer);
|
|
1815
|
+
maxTimer = null;
|
|
1796
1816
|
}
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
const _item = props.options[index2];
|
|
1809
|
-
if (v.value != _item.value) {
|
|
1810
|
-
v.value = _item.value;
|
|
1811
|
-
}
|
|
1812
|
-
const activeRef = itemRef.value[index2];
|
|
1813
|
-
activeItemStyle.value = `width:${activeRef.offsetWidth}px;transform: translate(${activeRef.offsetLeft}px);`;
|
|
1814
|
-
if (v.value != props.modelValue) {
|
|
1815
|
-
emit("change", {
|
|
1816
|
-
label: _item.label,
|
|
1817
|
-
value: _item.value,
|
|
1818
|
-
activeIndex: index2
|
|
1819
|
-
});
|
|
1820
|
-
emit("update:modelValue", v.value);
|
|
1821
|
-
}
|
|
1822
|
-
curIndex = index2;
|
|
1817
|
+
return Promise.resolve(invoke());
|
|
1818
|
+
}
|
|
1819
|
+
return new Promise((resolve, reject) => {
|
|
1820
|
+
lastRejector = options.rejectOnCancel ? reject : resolve;
|
|
1821
|
+
if (maxDuration && !maxTimer) {
|
|
1822
|
+
maxTimer = setTimeout(() => {
|
|
1823
|
+
if (timer2)
|
|
1824
|
+
_clearTimeout(timer2);
|
|
1825
|
+
maxTimer = null;
|
|
1826
|
+
resolve(invoke());
|
|
1827
|
+
}, maxDuration);
|
|
1823
1828
|
}
|
|
1824
|
-
};
|
|
1825
|
-
let timer2;
|
|
1826
|
-
const debounce2 = () => {
|
|
1827
|
-
clearTimeout(timer2);
|
|
1828
1829
|
timer2 = setTimeout(() => {
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
if (props.modelValue === "") {
|
|
1835
|
-
v.value = props.options[0].value;
|
|
1836
|
-
}
|
|
1837
|
-
init();
|
|
1838
|
-
window.addEventListener("resize", debounce2, false);
|
|
1839
|
-
});
|
|
1840
|
-
onUnmounted(() => {
|
|
1841
|
-
window.removeEventListener("resize", debounce2);
|
|
1830
|
+
if (maxTimer)
|
|
1831
|
+
_clearTimeout(maxTimer);
|
|
1832
|
+
maxTimer = null;
|
|
1833
|
+
resolve(invoke());
|
|
1834
|
+
}, duration);
|
|
1842
1835
|
});
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
style: normalizeStyle(`width:${_ctx.itemWidth}`),
|
|
1862
|
-
onClick: ($event) => setStyle(item.value)
|
|
1863
|
-
}, toDisplayString(item.label), 15, _hoisted_1$t);
|
|
1864
|
-
}), 128))
|
|
1865
|
-
], 6);
|
|
1866
|
-
};
|
|
1836
|
+
};
|
|
1837
|
+
return filter;
|
|
1838
|
+
}
|
|
1839
|
+
function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
|
|
1840
|
+
return new Promise((resolve, reject) => {
|
|
1841
|
+
if (throwOnTimeout)
|
|
1842
|
+
setTimeout(() => reject(reason), ms);
|
|
1843
|
+
else
|
|
1844
|
+
setTimeout(resolve, ms);
|
|
1845
|
+
});
|
|
1846
|
+
}
|
|
1847
|
+
function identity(arg) {
|
|
1848
|
+
return arg;
|
|
1849
|
+
}
|
|
1850
|
+
function tryOnScopeDispose(fn2) {
|
|
1851
|
+
if (getCurrentScope()) {
|
|
1852
|
+
onScopeDispose(fn2);
|
|
1853
|
+
return true;
|
|
1867
1854
|
}
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1855
|
+
return false;
|
|
1856
|
+
}
|
|
1857
|
+
function useDebounceFn(fn2, ms = 200, options = {}) {
|
|
1858
|
+
return createFilterWrapper(debounceFilter(ms, options), fn2);
|
|
1859
|
+
}
|
|
1860
|
+
function resolveRef(r) {
|
|
1861
|
+
return typeof r === "function" ? computed(r) : ref(r);
|
|
1862
|
+
}
|
|
1863
|
+
function tryOnMounted(fn2, sync = true) {
|
|
1864
|
+
if (getCurrentInstance())
|
|
1865
|
+
onMounted(fn2);
|
|
1866
|
+
else if (sync)
|
|
1867
|
+
fn2();
|
|
1868
|
+
else
|
|
1869
|
+
nextTick(fn2);
|
|
1870
|
+
}
|
|
1871
|
+
function useTimeoutFn(cb, interval, options = {}) {
|
|
1872
|
+
const {
|
|
1873
|
+
immediate = true
|
|
1874
|
+
} = options;
|
|
1875
|
+
const isPending = ref(false);
|
|
1876
|
+
let timer2 = null;
|
|
1877
|
+
function clear2() {
|
|
1878
|
+
if (timer2) {
|
|
1879
|
+
clearTimeout(timer2);
|
|
1880
|
+
timer2 = null;
|
|
1881
|
+
}
|
|
1879
1882
|
}
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1883
|
+
function stop() {
|
|
1884
|
+
isPending.value = false;
|
|
1885
|
+
clear2();
|
|
1886
|
+
}
|
|
1887
|
+
function start2(...args) {
|
|
1888
|
+
clear2();
|
|
1889
|
+
isPending.value = true;
|
|
1890
|
+
timer2 = setTimeout(() => {
|
|
1891
|
+
isPending.value = false;
|
|
1892
|
+
timer2 = null;
|
|
1893
|
+
cb(...args);
|
|
1894
|
+
}, resolveUnref(interval));
|
|
1895
|
+
}
|
|
1896
|
+
if (immediate) {
|
|
1897
|
+
isPending.value = true;
|
|
1898
|
+
if (isClient)
|
|
1899
|
+
start2();
|
|
1900
|
+
}
|
|
1901
|
+
tryOnScopeDispose(stop);
|
|
1902
|
+
return {
|
|
1903
|
+
isPending: readonly(isPending),
|
|
1904
|
+
start: start2,
|
|
1905
|
+
stop
|
|
1906
|
+
};
|
|
1907
|
+
}
|
|
1908
|
+
function watchArray(source, cb, options) {
|
|
1909
|
+
let oldList = (options == null ? void 0 : options.immediate) ? [] : [
|
|
1910
|
+
...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)
|
|
1911
|
+
];
|
|
1912
|
+
return watch(source, (newList, _, onCleanup) => {
|
|
1913
|
+
const oldListRemains = new Array(oldList.length);
|
|
1914
|
+
const added = [];
|
|
1915
|
+
for (const obj of newList) {
|
|
1916
|
+
let found = false;
|
|
1917
|
+
for (let i = 0; i < oldList.length; i++) {
|
|
1918
|
+
if (!oldListRemains[i] && obj === oldList[i]) {
|
|
1919
|
+
oldListRemains[i] = true;
|
|
1920
|
+
found = true;
|
|
1921
|
+
break;
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
if (!found)
|
|
1925
|
+
added.push(obj);
|
|
1887
1926
|
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1927
|
+
const removed = oldList.filter((_2, i) => !oldListRemains[i]);
|
|
1928
|
+
cb(newList, oldList, added, removed, onCleanup);
|
|
1929
|
+
oldList = [...newList];
|
|
1930
|
+
}, options);
|
|
1931
|
+
}
|
|
1932
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
1933
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
1934
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
1935
|
+
var __objRest$5 = (source, exclude) => {
|
|
1936
|
+
var target = {};
|
|
1937
|
+
for (var prop in source)
|
|
1938
|
+
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1939
|
+
target[prop] = source[prop];
|
|
1940
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
1941
|
+
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
1942
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
1943
|
+
target[prop] = source[prop];
|
|
1893
1944
|
}
|
|
1894
|
-
|
|
1895
|
-
};
|
|
1896
|
-
var LewBreadcrumb_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
1897
|
-
const _withScopeId$7 = (n) => (pushScopeId("data-v-5303b0ef"), n = n(), popScopeId(), n);
|
|
1898
|
-
const _hoisted_1$r = { class: "lew-breadcrumb" };
|
|
1899
|
-
const _hoisted_2$n = ["onClick"];
|
|
1900
|
-
const _hoisted_3$e = {
|
|
1901
|
-
key: 0,
|
|
1902
|
-
class: "lew-breadcrumb-parting"
|
|
1945
|
+
return target;
|
|
1903
1946
|
};
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1947
|
+
function watchWithFilter(source, cb, options = {}) {
|
|
1948
|
+
const _a2 = options, {
|
|
1949
|
+
eventFilter = bypassFilter
|
|
1950
|
+
} = _a2, watchOptions = __objRest$5(_a2, [
|
|
1951
|
+
"eventFilter"
|
|
1952
|
+
]);
|
|
1953
|
+
return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
|
|
1954
|
+
}
|
|
1955
|
+
var __defProp$4 = Object.defineProperty;
|
|
1956
|
+
var __defProps$4 = Object.defineProperties;
|
|
1957
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
1958
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
1959
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
1960
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
1961
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1962
|
+
var __spreadValues$4 = (a, b) => {
|
|
1963
|
+
for (var prop in b || (b = {}))
|
|
1964
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
1965
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1966
|
+
if (__getOwnPropSymbols$4)
|
|
1967
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
1968
|
+
if (__propIsEnum$4.call(b, prop))
|
|
1969
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1970
|
+
}
|
|
1971
|
+
return a;
|
|
1913
1972
|
};
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
"stroke-linejoin": "miter"
|
|
1973
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
1974
|
+
var __objRest$3 = (source, exclude) => {
|
|
1975
|
+
var target = {};
|
|
1976
|
+
for (var prop in source)
|
|
1977
|
+
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1978
|
+
target[prop] = source[prop];
|
|
1979
|
+
if (source != null && __getOwnPropSymbols$4)
|
|
1980
|
+
for (var prop of __getOwnPropSymbols$4(source)) {
|
|
1981
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
|
|
1982
|
+
target[prop] = source[prop];
|
|
1983
|
+
}
|
|
1984
|
+
return target;
|
|
1927
1985
|
};
|
|
1928
|
-
|
|
1929
|
-
const
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1986
|
+
function watchDebounced(source, cb, options = {}) {
|
|
1987
|
+
const _a2 = options, {
|
|
1988
|
+
debounce: debounce2 = 0,
|
|
1989
|
+
maxWait = void 0
|
|
1990
|
+
} = _a2, watchOptions = __objRest$3(_a2, [
|
|
1991
|
+
"debounce",
|
|
1992
|
+
"maxWait"
|
|
1993
|
+
]);
|
|
1994
|
+
return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {
|
|
1995
|
+
eventFilter: debounceFilter(debounce2, { maxWait })
|
|
1996
|
+
}));
|
|
1997
|
+
}
|
|
1998
|
+
function unrefElement$1(elRef) {
|
|
1999
|
+
var _a2;
|
|
2000
|
+
const plain = resolveUnref(elRef);
|
|
2001
|
+
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
|
|
2002
|
+
}
|
|
2003
|
+
const defaultWindow$1 = isClient ? window : void 0;
|
|
2004
|
+
function useAsyncState(promise, initialState, options) {
|
|
2005
|
+
const {
|
|
2006
|
+
immediate = true,
|
|
2007
|
+
delay = 0,
|
|
2008
|
+
onError = noop,
|
|
2009
|
+
onSuccess = noop,
|
|
2010
|
+
resetOnExecute = true,
|
|
2011
|
+
shallow = true,
|
|
2012
|
+
throwError
|
|
2013
|
+
} = options != null ? options : {};
|
|
2014
|
+
const state = shallow ? shallowRef(initialState) : ref(initialState);
|
|
2015
|
+
const isReady = ref(false);
|
|
2016
|
+
const isLoading = ref(false);
|
|
2017
|
+
const error2 = ref(void 0);
|
|
2018
|
+
async function execute(delay2 = 0, ...args) {
|
|
2019
|
+
if (resetOnExecute)
|
|
2020
|
+
state.value = initialState;
|
|
2021
|
+
error2.value = void 0;
|
|
2022
|
+
isReady.value = false;
|
|
2023
|
+
isLoading.value = true;
|
|
2024
|
+
if (delay2 > 0)
|
|
2025
|
+
await promiseTimeout(delay2);
|
|
2026
|
+
const _promise = typeof promise === "function" ? promise(...args) : promise;
|
|
2027
|
+
try {
|
|
2028
|
+
const data = await _promise;
|
|
2029
|
+
state.value = data;
|
|
2030
|
+
isReady.value = true;
|
|
2031
|
+
onSuccess(data);
|
|
2032
|
+
} catch (e) {
|
|
2033
|
+
error2.value = e;
|
|
2034
|
+
onError(e);
|
|
2035
|
+
if (throwError)
|
|
2036
|
+
throw error2;
|
|
2037
|
+
} finally {
|
|
2038
|
+
isLoading.value = false;
|
|
1968
2039
|
}
|
|
1969
|
-
|
|
1970
|
-
trigger: {
|
|
1971
|
-
type: String,
|
|
1972
|
-
default: "hover"
|
|
1973
|
-
},
|
|
1974
|
-
placement: {
|
|
1975
|
-
type: String,
|
|
1976
|
-
default: "bottom"
|
|
1977
|
-
},
|
|
1978
|
-
width: {
|
|
1979
|
-
type: String,
|
|
1980
|
-
default: ""
|
|
1981
|
-
},
|
|
1982
|
-
maxHeight: {
|
|
1983
|
-
type: String,
|
|
1984
|
-
default: "300px"
|
|
1985
|
-
},
|
|
1986
|
-
align: {
|
|
1987
|
-
type: String,
|
|
1988
|
-
default: "left"
|
|
2040
|
+
return state.value;
|
|
1989
2041
|
}
|
|
2042
|
+
if (immediate)
|
|
2043
|
+
execute(delay);
|
|
2044
|
+
return {
|
|
2045
|
+
state,
|
|
2046
|
+
isReady,
|
|
2047
|
+
isLoading,
|
|
2048
|
+
error: error2,
|
|
2049
|
+
execute
|
|
2050
|
+
};
|
|
2051
|
+
}
|
|
2052
|
+
function useSupported(callback, sync = false) {
|
|
2053
|
+
const isSupported = ref();
|
|
2054
|
+
const update = () => isSupported.value = Boolean(callback());
|
|
2055
|
+
update();
|
|
2056
|
+
tryOnMounted(update, sync);
|
|
2057
|
+
return isSupported;
|
|
2058
|
+
}
|
|
2059
|
+
function cloneFnJSON(source) {
|
|
2060
|
+
return JSON.parse(JSON.stringify(source));
|
|
2061
|
+
}
|
|
2062
|
+
const _global$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2063
|
+
const globalKey$1 = "__vueuse_ssr_handlers__";
|
|
2064
|
+
_global$1[globalKey$1] = _global$1[globalKey$1] || {};
|
|
2065
|
+
_global$1[globalKey$1];
|
|
2066
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
2067
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
2068
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
2069
|
+
var __objRest$2 = (source, exclude) => {
|
|
2070
|
+
var target = {};
|
|
2071
|
+
for (var prop in source)
|
|
2072
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2073
|
+
target[prop] = source[prop];
|
|
2074
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
2075
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
2076
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
2077
|
+
target[prop] = source[prop];
|
|
2078
|
+
}
|
|
2079
|
+
return target;
|
|
1990
2080
|
};
|
|
1991
|
-
|
|
1992
|
-
const
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
const show = () => {
|
|
2000
|
-
lewPopoverRef.value.show();
|
|
2001
|
-
};
|
|
2002
|
-
const hide2 = () => {
|
|
2003
|
-
lewPopoverRef.value.hide();
|
|
2004
|
-
};
|
|
2005
|
-
const change = (item) => {
|
|
2006
|
-
emit("change", item, { show, hide: hide2 });
|
|
2007
|
-
};
|
|
2008
|
-
expose({ show, hide: hide2 });
|
|
2009
|
-
return (_ctx, _cache) => {
|
|
2010
|
-
const _component_lew_popover = resolveComponent("lew-popover");
|
|
2011
|
-
return openBlock(), createBlock(_component_lew_popover, {
|
|
2012
|
-
ref_key: "lewPopoverRef",
|
|
2013
|
-
ref: lewPopoverRef,
|
|
2014
|
-
trigger: _ctx.trigger,
|
|
2015
|
-
placement: _ctx.placement
|
|
2016
|
-
}, {
|
|
2017
|
-
trigger: withCtx(() => [
|
|
2018
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2019
|
-
]),
|
|
2020
|
-
"popover-body": withCtx(() => [
|
|
2021
|
-
_ctx.options.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
2022
|
-
key: 0,
|
|
2023
|
-
class: "lew-dropdown-body",
|
|
2024
|
-
style: normalizeStyle(`width:${_ctx.width};max-height:${_ctx.maxHeight}`)
|
|
2025
|
-
}, [
|
|
2026
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index2) => {
|
|
2027
|
-
return openBlock(), createElementBlock("div", {
|
|
2028
|
-
key: index2,
|
|
2029
|
-
class: "lew-dropdown-option",
|
|
2030
|
-
style: normalizeStyle(`text-align:${_ctx.align}`),
|
|
2031
|
-
onClick: ($event) => change(item)
|
|
2032
|
-
}, toDisplayString(item.label), 13, _hoisted_1$q);
|
|
2033
|
-
}), 128))
|
|
2034
|
-
], 4)) : createCommentVNode("v-if", true)
|
|
2035
|
-
]),
|
|
2036
|
-
_: 3
|
|
2037
|
-
}, 8, ["trigger", "placement"]);
|
|
2038
|
-
};
|
|
2039
|
-
}
|
|
2040
|
-
});
|
|
2041
|
-
var LewDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-9869e96a"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/dropdown/src/LewDropdown.vue"]]);
|
|
2042
|
-
const inputProps = {
|
|
2043
|
-
type: {
|
|
2044
|
-
type: String,
|
|
2045
|
-
default: ""
|
|
2046
|
-
},
|
|
2047
|
-
modelValue: {
|
|
2048
|
-
type: String,
|
|
2049
|
-
default: ""
|
|
2050
|
-
},
|
|
2051
|
-
size: {
|
|
2052
|
-
type: String,
|
|
2053
|
-
default: "medium"
|
|
2054
|
-
},
|
|
2055
|
-
focusSelect: {
|
|
2056
|
-
type: Boolean,
|
|
2057
|
-
default: false
|
|
2058
|
-
},
|
|
2059
|
-
align: {
|
|
2060
|
-
type: String,
|
|
2061
|
-
default: "left"
|
|
2062
|
-
},
|
|
2063
|
-
disabled: {
|
|
2064
|
-
type: Boolean,
|
|
2065
|
-
default: false
|
|
2066
|
-
},
|
|
2067
|
-
clearable: {
|
|
2068
|
-
type: Boolean,
|
|
2069
|
-
default: () => false
|
|
2070
|
-
},
|
|
2071
|
-
placeholder: {
|
|
2072
|
-
type: String,
|
|
2073
|
-
default: "\u8BF7\u8F93\u5165"
|
|
2074
|
-
},
|
|
2075
|
-
readonly: {
|
|
2076
|
-
type: Boolean,
|
|
2077
|
-
default: false
|
|
2078
|
-
},
|
|
2079
|
-
showPassword: {
|
|
2080
|
-
type: Boolean,
|
|
2081
|
-
default: false
|
|
2082
|
-
},
|
|
2083
|
-
resize: {
|
|
2084
|
-
type: String,
|
|
2085
|
-
default: "none"
|
|
2086
|
-
},
|
|
2087
|
-
autoWidth: {
|
|
2088
|
-
type: Boolean,
|
|
2089
|
-
default: false
|
|
2090
|
-
},
|
|
2091
|
-
maxLength: {
|
|
2092
|
-
type: Number,
|
|
2093
|
-
default: null
|
|
2094
|
-
},
|
|
2095
|
-
showCount: {
|
|
2096
|
-
type: Boolean,
|
|
2097
|
-
default: false
|
|
2098
|
-
},
|
|
2099
|
-
niceCount: {
|
|
2100
|
-
type: Boolean,
|
|
2101
|
-
default: false
|
|
2102
|
-
}
|
|
2103
|
-
};
|
|
2104
|
-
var LewInput_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2105
|
-
const _hoisted_1$p = ["disabled", "readonly", "placeholder"];
|
|
2106
|
-
const _hoisted_2$m = ["disabled", "placeholder", "type", "readonly"];
|
|
2107
|
-
const _hoisted_3$d = {
|
|
2108
|
-
key: 2,
|
|
2109
|
-
class: "input-auto-width"
|
|
2110
|
-
};
|
|
2111
|
-
const _hoisted_4$c = {
|
|
2112
|
-
key: 0,
|
|
2113
|
-
class: "lew-input-show-count"
|
|
2114
|
-
};
|
|
2115
|
-
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
2116
|
-
__name: "LewInput",
|
|
2117
|
-
props: inputProps,
|
|
2118
|
-
emits: [
|
|
2119
|
-
"update:modelValue",
|
|
2120
|
-
"clear",
|
|
2121
|
-
"blur",
|
|
2122
|
-
"focus",
|
|
2123
|
-
"change",
|
|
2124
|
-
"input"
|
|
2125
|
-
],
|
|
2126
|
-
setup(__props, { expose, emit }) {
|
|
2127
|
-
const props = __props;
|
|
2128
|
-
const v = ref(props.modelValue);
|
|
2129
|
-
const lewInputRef = ref();
|
|
2130
|
-
const lewTextareaRef = ref();
|
|
2131
|
-
watch(
|
|
2132
|
-
() => props.modelValue,
|
|
2133
|
-
() => {
|
|
2134
|
-
v.value = props.modelValue;
|
|
2135
|
-
}
|
|
2136
|
-
);
|
|
2137
|
-
const input = () => {
|
|
2138
|
-
if (props.maxLength) {
|
|
2139
|
-
for (let i = 0; i <= v.value.length - 1; i++) {
|
|
2140
|
-
if (getTextLength(v.value.slice(0, i)) >= props.maxLength) {
|
|
2141
|
-
v.value = v.value.slice(0, i);
|
|
2142
|
-
}
|
|
2143
|
-
}
|
|
2144
|
-
}
|
|
2145
|
-
emit("update:modelValue", v.value);
|
|
2146
|
-
emit("input", v.value);
|
|
2147
|
-
};
|
|
2148
|
-
const clear2 = () => {
|
|
2149
|
-
emit("clear", v.value);
|
|
2150
|
-
v.value = "";
|
|
2151
|
-
emit("update:modelValue", v.value);
|
|
2152
|
-
};
|
|
2153
|
-
const focusFn = () => {
|
|
2154
|
-
var _a2, _b;
|
|
2155
|
-
if (props.type === "textarea") {
|
|
2156
|
-
(_a2 = lewTextareaRef.value) == null ? void 0 : _a2.focus();
|
|
2157
|
-
} else {
|
|
2158
|
-
(_b = lewInputRef.value) == null ? void 0 : _b.focus();
|
|
2159
|
-
}
|
|
2160
|
-
};
|
|
2161
|
-
const _type = ref(props.type);
|
|
2162
|
-
const showPasswordFn = () => {
|
|
2163
|
-
_type.value === "text" ? _type.value = "password" : _type.value = "text";
|
|
2164
|
-
};
|
|
2165
|
-
const getCheckNumStr = computed(() => {
|
|
2166
|
-
if (props.showCount && props.maxLength) {
|
|
2167
|
-
return `${getTextLength(v.value)} / ${props.maxLength}`;
|
|
2168
|
-
}
|
|
2169
|
-
if (props.showCount) {
|
|
2170
|
-
return getTextLength(v.value);
|
|
2171
|
-
}
|
|
2172
|
-
return false;
|
|
2173
|
-
});
|
|
2174
|
-
const getTextLength = (val) => {
|
|
2175
|
-
if (!props.niceCount) {
|
|
2176
|
-
return val.length;
|
|
2177
|
-
}
|
|
2178
|
-
let len = 0;
|
|
2179
|
-
for (let i = 0; i <= val.length - 1; i++) {
|
|
2180
|
-
const length = val.charCodeAt(i);
|
|
2181
|
-
if (length >= 0 && length <= 128) {
|
|
2182
|
-
len += 0.5;
|
|
2183
|
-
} else {
|
|
2184
|
-
len += 1;
|
|
2185
|
-
}
|
|
2186
|
-
}
|
|
2187
|
-
return Math.trunc(len);
|
|
2188
|
-
};
|
|
2189
|
-
const getEl = () => {
|
|
2190
|
-
if (props.type === "textarea") {
|
|
2191
|
-
return lewTextareaRef.value;
|
|
2192
|
-
}
|
|
2193
|
-
return lewInputRef.value;
|
|
2194
|
-
};
|
|
2195
|
-
const focus = (e) => {
|
|
2196
|
-
var _a2;
|
|
2197
|
-
if (props.focusSelect) {
|
|
2198
|
-
(_a2 = e == null ? void 0 : e.currentTarget) == null ? void 0 : _a2.select();
|
|
2199
|
-
}
|
|
2200
|
-
emit("focus");
|
|
2201
|
-
};
|
|
2202
|
-
expose({ getEl, focusFn, lewInputRef });
|
|
2203
|
-
return (_ctx, _cache) => {
|
|
2204
|
-
const _component_lew_icon = resolveComponent("lew-icon");
|
|
2205
|
-
return openBlock(), createElementBlock("div", {
|
|
2206
|
-
class: normalizeClass(["lew-input-view", `
|
|
2207
|
-
lew-input-view-${_ctx.size}
|
|
2208
|
-
${_type.value === "textarea" ? "lew-input-view-textarea" : ""}
|
|
2209
|
-
${_ctx.readonly ? "lew-input-view-readonly" : ""}
|
|
2210
|
-
${_ctx.disabled ? "lew-input-view-disabled" : ""}
|
|
2211
|
-
${_ctx.align ? "lew-input-view-align-" + _ctx.align : ""}
|
|
2212
|
-
${_ctx.autoWidth ? "lew-input-view-auto-width" : ""}
|
|
2213
|
-
`])
|
|
2214
|
-
}, [
|
|
2215
|
-
_type.value === "textarea" ? withDirectives((openBlock(), createElementBlock("textarea", {
|
|
2216
|
-
key: 0,
|
|
2217
|
-
ref_key: "lewTextareaRef",
|
|
2218
|
-
ref: lewTextareaRef,
|
|
2219
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => v.value = $event),
|
|
2220
|
-
class: normalizeClass(["btf-scrollbar", `lew-textarea-resize-${_ctx.resize}`]),
|
|
2221
|
-
rows: "3",
|
|
2222
|
-
cols: "3",
|
|
2223
|
-
disabled: _ctx.disabled,
|
|
2224
|
-
readonly: _ctx.readonly,
|
|
2225
|
-
placeholder: _ctx.placeholder,
|
|
2226
|
-
onInput: input,
|
|
2227
|
-
onChange: _cache[1] || (_cache[1] = ($event) => emit("change", v.value)),
|
|
2228
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => emit("blur", v.value)),
|
|
2229
|
-
onFocus: focus
|
|
2230
|
-
}, null, 42, _hoisted_1$p)), [
|
|
2231
|
-
[vModelText, v.value]
|
|
2232
|
-
]) : withDirectives((openBlock(), createElementBlock("input", {
|
|
2233
|
-
key: 1,
|
|
2234
|
-
ref_key: "lewInputRef",
|
|
2235
|
-
ref: lewInputRef,
|
|
2236
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => v.value = $event),
|
|
2237
|
-
disabled: _ctx.disabled,
|
|
2238
|
-
placeholder: _ctx.placeholder,
|
|
2239
|
-
type: _type.value,
|
|
2240
|
-
readonly: _ctx.readonly,
|
|
2241
|
-
onkeypress: "if(window.event.keyCode==13) this.blur()",
|
|
2242
|
-
onInput: input,
|
|
2243
|
-
onChange: _cache[4] || (_cache[4] = ($event) => emit("change", v.value)),
|
|
2244
|
-
onBlur: _cache[5] || (_cache[5] = ($event) => emit("blur", v.value)),
|
|
2245
|
-
onFocus: focus
|
|
2246
|
-
}, null, 40, _hoisted_2$m)), [
|
|
2247
|
-
[vModelDynamic, v.value]
|
|
2248
|
-
]),
|
|
2249
|
-
_ctx.autoWidth ? (openBlock(), createElementBlock("label", _hoisted_3$d, toDisplayString(v.value), 1)) : createCommentVNode("v-if", true),
|
|
2250
|
-
_ctx.showPassword || _ctx.clearable || _ctx.showCount ? (openBlock(), createElementBlock("div", {
|
|
2251
|
-
key: 3,
|
|
2252
|
-
class: normalizeClass(["lew-input-controls", {
|
|
2253
|
-
"lew-input-controls-show": v.value && _ctx.showPassword || v.value && _ctx.clearable || _ctx.showCount && !_ctx.clearable && !_ctx.showPassword,
|
|
2254
|
-
"lew-input-controls-count": _ctx.showCount && _ctx.clearable && _ctx.maxLength && !v.value,
|
|
2255
|
-
"lew-input-controls-count-show": _ctx.showCount && _ctx.clearable && _ctx.maxLength && v.value
|
|
2256
|
-
}])
|
|
2257
|
-
}, [
|
|
2258
|
-
unref(getCheckNumStr) ? (openBlock(), createElementBlock("div", _hoisted_4$c, toDisplayString(unref(getCheckNumStr)), 1)) : createCommentVNode("v-if", true),
|
|
2259
|
-
_ctx.showPassword ? (openBlock(), createElementBlock("div", {
|
|
2260
|
-
key: 1,
|
|
2261
|
-
class: "lew-input-show-password",
|
|
2262
|
-
onMousedown: _cache[6] || (_cache[6] = withModifiers(() => {
|
|
2263
|
-
}, ["prevent"])),
|
|
2264
|
-
onClick: showPasswordFn
|
|
2265
|
-
}, [
|
|
2266
|
-
withDirectives(createVNode(_component_lew_icon, {
|
|
2267
|
-
size: "16",
|
|
2268
|
-
type: "eye"
|
|
2269
|
-
}, null, 512), [
|
|
2270
|
-
[vShow, _type.value === "text"]
|
|
2271
|
-
]),
|
|
2272
|
-
withDirectives(createVNode(_component_lew_icon, {
|
|
2273
|
-
size: "16",
|
|
2274
|
-
type: "eye-off"
|
|
2275
|
-
}, null, 512), [
|
|
2276
|
-
[vShow, _type.value === "password"]
|
|
2277
|
-
])
|
|
2278
|
-
], 32)) : createCommentVNode("v-if", true),
|
|
2279
|
-
_ctx.clearable ? (openBlock(), createElementBlock("div", {
|
|
2280
|
-
key: 2,
|
|
2281
|
-
class: "lew-input-clear",
|
|
2282
|
-
onMousedown: _cache[7] || (_cache[7] = withModifiers(() => {
|
|
2283
|
-
}, ["prevent"])),
|
|
2284
|
-
onClick: clear2
|
|
2285
|
-
}, [
|
|
2286
|
-
createVNode(_component_lew_icon, {
|
|
2287
|
-
size: "16",
|
|
2288
|
-
type: "x-circle"
|
|
2289
|
-
})
|
|
2290
|
-
], 32)) : createCommentVNode("v-if", true)
|
|
2291
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
2292
|
-
], 2);
|
|
2293
|
-
};
|
|
2294
|
-
}
|
|
2295
|
-
});
|
|
2296
|
-
var LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-156ce1e1"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input/src/LewInput.vue"]]);
|
|
2297
|
-
const _props$6 = {
|
|
2298
|
-
type: {
|
|
2299
|
-
type: String,
|
|
2300
|
-
default: ""
|
|
2301
|
-
},
|
|
2302
|
-
modelValue: {
|
|
2303
|
-
type: String,
|
|
2304
|
-
default: ""
|
|
2305
|
-
},
|
|
2306
|
-
autoWidth: {
|
|
2307
|
-
type: Boolean,
|
|
2308
|
-
default: false
|
|
2309
|
-
},
|
|
2310
|
-
options: {
|
|
2311
|
-
type: Array,
|
|
2312
|
-
default() {
|
|
2313
|
-
return [];
|
|
2314
|
-
}
|
|
2315
|
-
},
|
|
2316
|
-
align: {
|
|
2317
|
-
type: String,
|
|
2318
|
-
default: "left"
|
|
2319
|
-
},
|
|
2320
|
-
disabled: {
|
|
2321
|
-
type: Boolean,
|
|
2322
|
-
default: false
|
|
2323
|
-
},
|
|
2324
|
-
clearable: {
|
|
2325
|
-
type: Boolean,
|
|
2326
|
-
default: false
|
|
2327
|
-
},
|
|
2328
|
-
placeholder: {
|
|
2329
|
-
type: String,
|
|
2330
|
-
default: "\u8BF7\u8F93\u5165"
|
|
2331
|
-
},
|
|
2332
|
-
readonly: {
|
|
2333
|
-
type: Boolean,
|
|
2334
|
-
default: false
|
|
2335
|
-
},
|
|
2336
|
-
showPassword: {
|
|
2337
|
-
type: Boolean,
|
|
2338
|
-
default: false
|
|
2339
|
-
},
|
|
2340
|
-
maxLength: {
|
|
2341
|
-
type: Number,
|
|
2342
|
-
default: null
|
|
2343
|
-
},
|
|
2344
|
-
showCount: {
|
|
2345
|
-
type: Boolean,
|
|
2346
|
-
default: false
|
|
2347
|
-
},
|
|
2348
|
-
niceCount: {
|
|
2349
|
-
type: Boolean,
|
|
2350
|
-
default: false
|
|
2351
|
-
},
|
|
2352
|
-
size: {
|
|
2353
|
-
type: String,
|
|
2354
|
-
default: "medium"
|
|
2355
|
-
},
|
|
2356
|
-
popoverWidth: {
|
|
2357
|
-
type: String,
|
|
2358
|
-
default: "auto"
|
|
2359
|
-
},
|
|
2360
|
-
trigger: {
|
|
2361
|
-
type: String,
|
|
2362
|
-
default: "click"
|
|
2363
|
-
},
|
|
2364
|
-
placement: {
|
|
2365
|
-
type: String,
|
|
2366
|
-
default: "bottom-start"
|
|
2367
|
-
}
|
|
2368
|
-
};
|
|
2369
|
-
var LewInputPro_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2370
|
-
const _hoisted_1$o = { class: "lew-input-pro" };
|
|
2371
|
-
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
2372
|
-
__name: "LewInputPro",
|
|
2373
|
-
props: _props$6,
|
|
2374
|
-
emits: [
|
|
2375
|
-
"update:modelValue",
|
|
2376
|
-
"clear",
|
|
2377
|
-
"blur",
|
|
2378
|
-
"focus",
|
|
2379
|
-
"change",
|
|
2380
|
-
"input"
|
|
2381
|
-
],
|
|
2382
|
-
setup(__props, { emit }) {
|
|
2383
|
-
const props = __props;
|
|
2384
|
-
const v = ref(props.modelValue);
|
|
2385
|
-
watch(
|
|
2386
|
-
() => props.modelValue,
|
|
2387
|
-
() => {
|
|
2388
|
-
v.value = props.modelValue;
|
|
2389
|
-
}
|
|
2390
|
-
);
|
|
2391
|
-
const lewDropdownRef = ref();
|
|
2392
|
-
const input = (value) => {
|
|
2393
|
-
emit("update:modelValue", value);
|
|
2394
|
-
emit("input", value);
|
|
2395
|
-
};
|
|
2396
|
-
const clear2 = () => {
|
|
2397
|
-
emit("clear", v.value);
|
|
2398
|
-
v.value = "";
|
|
2399
|
-
emit("update:modelValue", v.value);
|
|
2400
|
-
};
|
|
2401
|
-
const selectFn = (e) => {
|
|
2402
|
-
v.value = e.value;
|
|
2403
|
-
emit("update:modelValue", v.value);
|
|
2404
|
-
emit("input", v.value);
|
|
2405
|
-
emit("change", v.value);
|
|
2406
|
-
hide2();
|
|
2407
|
-
};
|
|
2408
|
-
const open = () => {
|
|
2409
|
-
if (props.options.length === 0)
|
|
2410
|
-
return;
|
|
2411
|
-
lewDropdownRef.value.show();
|
|
2412
|
-
};
|
|
2413
|
-
const hide2 = () => {
|
|
2414
|
-
lewDropdownRef.value.hide();
|
|
2415
|
-
};
|
|
2416
|
-
const width = ref(0);
|
|
2417
|
-
const focus = (e) => {
|
|
2418
|
-
var _a2;
|
|
2419
|
-
width.value = lewDropdownRef.value.$el.clientWidth - 14;
|
|
2420
|
-
open();
|
|
2421
|
-
(_a2 = e == null ? void 0 : e.currentTarget) == null ? void 0 : _a2.select();
|
|
2422
|
-
emit("focus", v);
|
|
2423
|
-
};
|
|
2424
|
-
return (_ctx, _cache) => {
|
|
2425
|
-
const _component_lew_input = resolveComponent("lew-input");
|
|
2426
|
-
const _component_lew_dropdown = resolveComponent("lew-dropdown");
|
|
2427
|
-
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
2428
|
-
renderSlot(_ctx.$slots, "left", {}, void 0, true),
|
|
2429
|
-
createVNode(_component_lew_dropdown, {
|
|
2430
|
-
ref_key: "lewDropdownRef",
|
|
2431
|
-
ref: lewDropdownRef,
|
|
2432
|
-
style: { "width": "100%" },
|
|
2433
|
-
trigger: _ctx.trigger,
|
|
2434
|
-
placement: _ctx.placement,
|
|
2435
|
-
align: _ctx.align,
|
|
2436
|
-
width: `${width.value}px`,
|
|
2437
|
-
options: _ctx.options,
|
|
2438
|
-
onChange: selectFn
|
|
2439
|
-
}, {
|
|
2440
|
-
default: withCtx(() => [
|
|
2441
|
-
createVNode(_component_lew_input, {
|
|
2442
|
-
modelValue: v.value,
|
|
2443
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => v.value = $event),
|
|
2444
|
-
type: _ctx.type,
|
|
2445
|
-
"auto-width": _ctx.autoWidth,
|
|
2446
|
-
size: _ctx.size,
|
|
2447
|
-
align: _ctx.align,
|
|
2448
|
-
placeholder: _ctx.placeholder,
|
|
2449
|
-
clearable: _ctx.clearable,
|
|
2450
|
-
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
2451
|
-
}, ["stop"])),
|
|
2452
|
-
onInput: input,
|
|
2453
|
-
onChange: _cache[2] || (_cache[2] = ($event) => emit("change", v.value)),
|
|
2454
|
-
onBlur: _cache[3] || (_cache[3] = ($event) => emit("blur", v.value)),
|
|
2455
|
-
onFocus: focus,
|
|
2456
|
-
onClear: clear2
|
|
2457
|
-
}, null, 8, ["modelValue", "type", "auto-width", "size", "align", "placeholder", "clearable"])
|
|
2458
|
-
]),
|
|
2459
|
-
_: 1
|
|
2460
|
-
}, 8, ["trigger", "placement", "align", "width", "options"]),
|
|
2461
|
-
renderSlot(_ctx.$slots, "right", {}, void 0, true)
|
|
2462
|
-
]);
|
|
2463
|
-
};
|
|
2464
|
-
}
|
|
2465
|
-
});
|
|
2466
|
-
var LewInputPro = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-1e1e8f9c"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input-pro/src/LewInputPro.vue"]]);
|
|
2467
|
-
const inputTagProps = {
|
|
2468
|
-
modelValue: {
|
|
2469
|
-
type: Array,
|
|
2470
|
-
default: () => {
|
|
2471
|
-
return [];
|
|
2472
|
-
}
|
|
2473
|
-
},
|
|
2474
|
-
type: {
|
|
2475
|
-
type: String,
|
|
2476
|
-
default: "normal"
|
|
2477
|
-
}
|
|
2478
|
-
};
|
|
2479
|
-
var LewInputTag_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2480
|
-
const _withScopeId$6 = (n) => (pushScopeId("data-v-ad3c9b14"), n = n(), popScopeId(), n);
|
|
2481
|
-
const _hoisted_1$n = { class: "lew-input-tag-view" };
|
|
2482
|
-
const _hoisted_2$l = /* @__PURE__ */ _withScopeId$6(() => /* @__PURE__ */ createElementVNode("div", { style: { "margin-left": "-10px", "height": "26px" } }, null, -1));
|
|
2483
|
-
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
2484
|
-
__name: "LewInputTag",
|
|
2485
|
-
props: inputTagProps,
|
|
2486
|
-
setup(__props) {
|
|
2487
|
-
const props = __props;
|
|
2488
|
-
const inputValue = ref();
|
|
2489
|
-
const tagsValue = ref(props.modelValue);
|
|
2490
|
-
const isInput = ref(false);
|
|
2491
|
-
const lewInputRef = ref();
|
|
2492
|
-
let isEnter = false;
|
|
2493
|
-
let delDownTimer;
|
|
2494
|
-
let delDownCheck = 0;
|
|
2495
|
-
watch(
|
|
2496
|
-
() => props.modelValue,
|
|
2497
|
-
() => {
|
|
2498
|
-
tagsValue.value = props.modelValue;
|
|
2499
|
-
}
|
|
2500
|
-
);
|
|
2501
|
-
const openInput = () => {
|
|
2502
|
-
isInput.value = true;
|
|
2503
|
-
nextTick(() => {
|
|
2504
|
-
lewInputRef.value.focusFn();
|
|
2505
|
-
});
|
|
2506
|
-
document.onkeydown = function(event) {
|
|
2507
|
-
if (inputValue.value === "") {
|
|
2508
|
-
if (event.keyCode === 8 || event.keyCode === 46) {
|
|
2509
|
-
clearTimeout(delDownTimer);
|
|
2510
|
-
delDownTimer = setTimeout(() => {
|
|
2511
|
-
delDownCheck = 0;
|
|
2512
|
-
}, 500);
|
|
2513
|
-
delDownCheck += 1;
|
|
2514
|
-
if (delDownCheck >= 2) {
|
|
2515
|
-
tagsValue.value.splice(tagsValue.value.length - 1, 1);
|
|
2516
|
-
delDownCheck = 0;
|
|
2517
|
-
}
|
|
2518
|
-
}
|
|
2519
|
-
} else if (event.keyCode === 13) {
|
|
2520
|
-
isEnter = true;
|
|
2521
|
-
}
|
|
2522
|
-
};
|
|
2523
|
-
};
|
|
2524
|
-
const blurFn = (e) => {
|
|
2525
|
-
isInput.value = false;
|
|
2526
|
-
document.onkeydown = null;
|
|
2527
|
-
addTag();
|
|
2528
|
-
if (isEnter) {
|
|
2529
|
-
openInput();
|
|
2530
|
-
}
|
|
2531
|
-
isEnter = false;
|
|
2532
|
-
};
|
|
2533
|
-
const addTag = () => {
|
|
2534
|
-
if (inputValue.value) {
|
|
2535
|
-
tagsValue.value.push(inputValue.value);
|
|
2536
|
-
}
|
|
2537
|
-
inputValue.value = "";
|
|
2538
|
-
};
|
|
2539
|
-
const delTag = (index2) => {
|
|
2540
|
-
tagsValue.value.splice(index2, 1);
|
|
2541
|
-
};
|
|
2542
|
-
return (_ctx, _cache) => {
|
|
2543
|
-
const _component_lew_tag = resolveComponent("lew-tag");
|
|
2544
|
-
const _component_lew_icon = resolveComponent("lew-icon");
|
|
2545
|
-
const _component_lew_input = resolveComponent("lew-input");
|
|
2546
|
-
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
2547
|
-
_hoisted_2$l,
|
|
2548
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(tagsValue.value, (item, index2) => {
|
|
2549
|
-
return openBlock(), createBlock(_component_lew_tag, {
|
|
2550
|
-
key: index2,
|
|
2551
|
-
closable: "",
|
|
2552
|
-
type: _ctx.type,
|
|
2553
|
-
onClose: ($event) => delTag(index2)
|
|
2554
|
-
}, {
|
|
2555
|
-
default: withCtx(() => [
|
|
2556
|
-
createTextVNode(toDisplayString(item), 1)
|
|
2557
|
-
]),
|
|
2558
|
-
_: 2
|
|
2559
|
-
}, 1032, ["type", "onClose"]);
|
|
2560
|
-
}), 128)),
|
|
2561
|
-
withDirectives(createElementVNode("label", {
|
|
2562
|
-
class: "lew-input-tag-button",
|
|
2563
|
-
onClick: openInput
|
|
2564
|
-
}, [
|
|
2565
|
-
createVNode(_component_lew_icon, {
|
|
2566
|
-
size: "16",
|
|
2567
|
-
type: "plus"
|
|
2568
|
-
})
|
|
2569
|
-
], 512), [
|
|
2570
|
-
[vShow, !isInput.value]
|
|
2571
|
-
]),
|
|
2572
|
-
withDirectives(createVNode(_component_lew_input, {
|
|
2573
|
-
ref_key: "lewInputRef",
|
|
2574
|
-
ref: lewInputRef,
|
|
2575
|
-
modelValue: inputValue.value,
|
|
2576
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
2577
|
-
class: "lew-input-tag",
|
|
2578
|
-
size: "small",
|
|
2579
|
-
"auto-width": "",
|
|
2580
|
-
placeholder: "",
|
|
2581
|
-
onBlur: blurFn,
|
|
2582
|
-
onFocus: addTag
|
|
2583
|
-
}, null, 8, ["modelValue"]), [
|
|
2584
|
-
[vShow, isInput.value]
|
|
2585
|
-
])
|
|
2586
|
-
]);
|
|
2587
|
-
};
|
|
2588
|
-
}
|
|
2589
|
-
});
|
|
2590
|
-
var LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-ad3c9b14"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input-tag/src/LewInputTag.vue"]]);
|
|
2591
|
-
const formProps = {
|
|
2592
|
-
width: {
|
|
2593
|
-
type: String,
|
|
2594
|
-
default: ""
|
|
2595
|
-
},
|
|
2596
|
-
labelWidth: {
|
|
2597
|
-
type: String,
|
|
2598
|
-
default: "auto"
|
|
2599
|
-
},
|
|
2600
|
-
labelAlign: {
|
|
2601
|
-
type: String,
|
|
2602
|
-
default: "end"
|
|
2603
|
-
},
|
|
2604
|
-
direction: {
|
|
2605
|
-
type: String,
|
|
2606
|
-
default: "x"
|
|
2607
|
-
}
|
|
2608
|
-
};
|
|
2609
|
-
var LewForm_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2610
|
-
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
2611
|
-
__name: "LewForm",
|
|
2612
|
-
props: formProps,
|
|
2613
|
-
setup(__props) {
|
|
2614
|
-
return (_ctx, _cache) => {
|
|
2615
|
-
return openBlock(), createElementBlock("div", {
|
|
2616
|
-
class: "lew-form",
|
|
2617
|
-
style: normalizeStyle(`width:${_ctx.width}`)
|
|
2618
|
-
}, [
|
|
2619
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2620
|
-
], 4);
|
|
2621
|
-
};
|
|
2622
|
-
}
|
|
2623
|
-
});
|
|
2624
|
-
var LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-a827f69e"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/form/src/LewForm.vue"]]);
|
|
2625
|
-
var LewFormItem_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2626
|
-
const _hoisted_1$m = { class: "lew-form-item-view" };
|
|
2627
|
-
const _hoisted_2$k = { class: "lew-form-item-tips" };
|
|
2628
|
-
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
2629
|
-
__name: "LewFormItem",
|
|
2630
|
-
props: {
|
|
2631
|
-
label: {
|
|
2632
|
-
type: String,
|
|
2633
|
-
default: "\u6807\u9898"
|
|
2634
|
-
},
|
|
2635
|
-
labelWidth: {
|
|
2636
|
-
type: String,
|
|
2637
|
-
default: ""
|
|
2638
|
-
},
|
|
2639
|
-
labelAlign: {
|
|
2640
|
-
type: String,
|
|
2641
|
-
default: ""
|
|
2642
|
-
},
|
|
2643
|
-
direction: {
|
|
2644
|
-
type: String,
|
|
2645
|
-
default: ""
|
|
2646
|
-
},
|
|
2647
|
-
labelSize: {
|
|
2648
|
-
type: String,
|
|
2649
|
-
default: "medium"
|
|
2081
|
+
function useResizeObserver(target, callback, options = {}) {
|
|
2082
|
+
const _a2 = options, { window: window2 = defaultWindow$1 } = _a2, observerOptions = __objRest$2(_a2, ["window"]);
|
|
2083
|
+
let observer;
|
|
2084
|
+
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
|
|
2085
|
+
const cleanup = () => {
|
|
2086
|
+
if (observer) {
|
|
2087
|
+
observer.disconnect();
|
|
2088
|
+
observer = void 0;
|
|
2650
2089
|
}
|
|
2651
|
-
},
|
|
2652
|
-
setup(__props) {
|
|
2653
|
-
var _a2, _b;
|
|
2654
|
-
const props = __props;
|
|
2655
|
-
const parentProps = (_b = (_a2 = getCurrentInstance()) == null ? void 0 : _a2.parent) == null ? void 0 : _b.props;
|
|
2656
|
-
const { labelWidth, direction, labelAlign } = parentProps;
|
|
2657
|
-
const _labelWidth = ref(props.labelWidth || labelWidth || "auto");
|
|
2658
|
-
const _direction = ref(props.direction || direction || "x");
|
|
2659
|
-
const _labelAlign = ref(props.labelAlign || labelAlign || "end");
|
|
2660
|
-
return (_ctx, _cache) => {
|
|
2661
|
-
return openBlock(), createElementBlock("div", {
|
|
2662
|
-
class: normalizeClass(["lew-form-item", `lew-form-item-${_direction.value} lew-form-item-${_labelAlign.value}`])
|
|
2663
|
-
}, [
|
|
2664
|
-
createElementVNode("div", {
|
|
2665
|
-
class: "lew-form-item-label",
|
|
2666
|
-
style: normalizeStyle(`width: ${_labelWidth.value};height:${__props.labelSize}px;`)
|
|
2667
|
-
}, toDisplayString(props.label), 5),
|
|
2668
|
-
createElementVNode("div", _hoisted_1$m, [
|
|
2669
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
2670
|
-
withDirectives(createElementVNode("div", _hoisted_2$k, "\u8F93\u5165\u683C\u5F0F\u9519\u8BEF", 512), [
|
|
2671
|
-
[vShow, false]
|
|
2672
|
-
])
|
|
2673
|
-
])
|
|
2674
|
-
], 2);
|
|
2675
|
-
};
|
|
2676
|
-
}
|
|
2677
|
-
});
|
|
2678
|
-
var LewFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-ef952438"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/form/src/LewFormItem.vue"]]);
|
|
2679
|
-
var _a;
|
|
2680
|
-
const isClient = typeof window !== "undefined";
|
|
2681
|
-
const isDef = (val) => typeof val !== "undefined";
|
|
2682
|
-
const isFunction$1 = (val) => typeof val === "function";
|
|
2683
|
-
const isString$1 = (val) => typeof val === "string";
|
|
2684
|
-
const noop = () => {
|
|
2685
|
-
};
|
|
2686
|
-
const isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
2687
|
-
function resolveUnref(r) {
|
|
2688
|
-
return typeof r === "function" ? r() : unref(r);
|
|
2689
|
-
}
|
|
2690
|
-
function createFilterWrapper(filter, fn2) {
|
|
2691
|
-
function wrapper(...args) {
|
|
2692
|
-
return new Promise((resolve, reject) => {
|
|
2693
|
-
Promise.resolve(filter(() => fn2.apply(this, args), { fn: fn2, thisArg: this, args })).then(resolve).catch(reject);
|
|
2694
|
-
});
|
|
2695
|
-
}
|
|
2696
|
-
return wrapper;
|
|
2697
|
-
}
|
|
2698
|
-
const bypassFilter = (invoke) => {
|
|
2699
|
-
return invoke();
|
|
2700
|
-
};
|
|
2701
|
-
function debounceFilter(ms, options = {}) {
|
|
2702
|
-
let timer2;
|
|
2703
|
-
let maxTimer;
|
|
2704
|
-
let lastRejector = noop;
|
|
2705
|
-
const _clearTimeout = (timer22) => {
|
|
2706
|
-
clearTimeout(timer22);
|
|
2707
|
-
lastRejector();
|
|
2708
|
-
lastRejector = noop;
|
|
2709
2090
|
};
|
|
2710
|
-
const
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
|
2716
|
-
if (maxTimer) {
|
|
2717
|
-
_clearTimeout(maxTimer);
|
|
2718
|
-
maxTimer = null;
|
|
2719
|
-
}
|
|
2720
|
-
return Promise.resolve(invoke());
|
|
2091
|
+
const stopWatch = watch(() => unrefElement$1(target), (el) => {
|
|
2092
|
+
cleanup();
|
|
2093
|
+
if (isSupported.value && window2 && el) {
|
|
2094
|
+
observer = new ResizeObserver(callback);
|
|
2095
|
+
observer.observe(el, observerOptions);
|
|
2721
2096
|
}
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
if (timer2)
|
|
2727
|
-
_clearTimeout(timer2);
|
|
2728
|
-
maxTimer = null;
|
|
2729
|
-
resolve(invoke());
|
|
2730
|
-
}, maxDuration);
|
|
2731
|
-
}
|
|
2732
|
-
timer2 = setTimeout(() => {
|
|
2733
|
-
if (maxTimer)
|
|
2734
|
-
_clearTimeout(maxTimer);
|
|
2735
|
-
maxTimer = null;
|
|
2736
|
-
resolve(invoke());
|
|
2737
|
-
}, duration);
|
|
2738
|
-
});
|
|
2097
|
+
}, { immediate: true, flush: "post" });
|
|
2098
|
+
const stop = () => {
|
|
2099
|
+
cleanup();
|
|
2100
|
+
stopWatch();
|
|
2739
2101
|
};
|
|
2740
|
-
return filter;
|
|
2741
|
-
}
|
|
2742
|
-
function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
|
|
2743
|
-
return new Promise((resolve, reject) => {
|
|
2744
|
-
if (throwOnTimeout)
|
|
2745
|
-
setTimeout(() => reject(reason), ms);
|
|
2746
|
-
else
|
|
2747
|
-
setTimeout(resolve, ms);
|
|
2748
|
-
});
|
|
2749
|
-
}
|
|
2750
|
-
function identity(arg) {
|
|
2751
|
-
return arg;
|
|
2752
|
-
}
|
|
2753
|
-
function tryOnScopeDispose(fn2) {
|
|
2754
|
-
if (getCurrentScope()) {
|
|
2755
|
-
onScopeDispose(fn2);
|
|
2756
|
-
return true;
|
|
2757
|
-
}
|
|
2758
|
-
return false;
|
|
2759
|
-
}
|
|
2760
|
-
function useDebounceFn(fn2, ms = 200, options = {}) {
|
|
2761
|
-
return createFilterWrapper(debounceFilter(ms, options), fn2);
|
|
2762
|
-
}
|
|
2763
|
-
function resolveRef(r) {
|
|
2764
|
-
return typeof r === "function" ? computed(r) : ref(r);
|
|
2765
|
-
}
|
|
2766
|
-
function tryOnMounted(fn2, sync = true) {
|
|
2767
|
-
if (getCurrentInstance())
|
|
2768
|
-
onMounted(fn2);
|
|
2769
|
-
else if (sync)
|
|
2770
|
-
fn2();
|
|
2771
|
-
else
|
|
2772
|
-
nextTick(fn2);
|
|
2773
|
-
}
|
|
2774
|
-
function useTimeoutFn(cb, interval, options = {}) {
|
|
2775
|
-
const {
|
|
2776
|
-
immediate = true
|
|
2777
|
-
} = options;
|
|
2778
|
-
const isPending = ref(false);
|
|
2779
|
-
let timer2 = null;
|
|
2780
|
-
function clear2() {
|
|
2781
|
-
if (timer2) {
|
|
2782
|
-
clearTimeout(timer2);
|
|
2783
|
-
timer2 = null;
|
|
2784
|
-
}
|
|
2785
|
-
}
|
|
2786
|
-
function stop() {
|
|
2787
|
-
isPending.value = false;
|
|
2788
|
-
clear2();
|
|
2789
|
-
}
|
|
2790
|
-
function start2(...args) {
|
|
2791
|
-
clear2();
|
|
2792
|
-
isPending.value = true;
|
|
2793
|
-
timer2 = setTimeout(() => {
|
|
2794
|
-
isPending.value = false;
|
|
2795
|
-
timer2 = null;
|
|
2796
|
-
cb(...args);
|
|
2797
|
-
}, resolveUnref(interval));
|
|
2798
|
-
}
|
|
2799
|
-
if (immediate) {
|
|
2800
|
-
isPending.value = true;
|
|
2801
|
-
if (isClient)
|
|
2802
|
-
start2();
|
|
2803
|
-
}
|
|
2804
2102
|
tryOnScopeDispose(stop);
|
|
2805
2103
|
return {
|
|
2806
|
-
|
|
2807
|
-
start: start2,
|
|
2104
|
+
isSupported,
|
|
2808
2105
|
stop
|
|
2809
2106
|
};
|
|
2810
2107
|
}
|
|
2811
|
-
function
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2108
|
+
function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {
|
|
2109
|
+
const { window: window2 = defaultWindow$1, box = "content-box" } = options;
|
|
2110
|
+
const isSVG = computed(() => {
|
|
2111
|
+
var _a2, _b;
|
|
2112
|
+
return (_b = (_a2 = unrefElement$1(target)) == null ? void 0 : _a2.namespaceURI) == null ? void 0 : _b.includes("svg");
|
|
2113
|
+
});
|
|
2114
|
+
const width = ref(initialSize.width);
|
|
2115
|
+
const height = ref(initialSize.height);
|
|
2116
|
+
useResizeObserver(target, ([entry]) => {
|
|
2117
|
+
const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
|
|
2118
|
+
if (window2 && isSVG.value) {
|
|
2119
|
+
const $elem = unrefElement$1(target);
|
|
2120
|
+
if ($elem) {
|
|
2121
|
+
const styles = window2.getComputedStyle($elem);
|
|
2122
|
+
width.value = parseFloat(styles.width);
|
|
2123
|
+
height.value = parseFloat(styles.height);
|
|
2124
|
+
}
|
|
2125
|
+
} else {
|
|
2126
|
+
if (boxSize) {
|
|
2127
|
+
const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];
|
|
2128
|
+
width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
|
|
2129
|
+
height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
|
|
2130
|
+
} else {
|
|
2131
|
+
width.value = entry.contentRect.width;
|
|
2132
|
+
height.value = entry.contentRect.height;
|
|
2826
2133
|
}
|
|
2827
|
-
if (!found)
|
|
2828
|
-
added.push(obj);
|
|
2829
2134
|
}
|
|
2830
|
-
const removed = oldList.filter((_2, i) => !oldListRemains[i]);
|
|
2831
|
-
cb(newList, oldList, added, removed, onCleanup);
|
|
2832
|
-
oldList = [...newList];
|
|
2833
2135
|
}, options);
|
|
2136
|
+
watch(() => unrefElement$1(target), (ele) => {
|
|
2137
|
+
width.value = ele ? initialSize.width : 0;
|
|
2138
|
+
height.value = ele ? initialSize.height : 0;
|
|
2139
|
+
});
|
|
2140
|
+
return {
|
|
2141
|
+
width,
|
|
2142
|
+
height
|
|
2143
|
+
};
|
|
2834
2144
|
}
|
|
2835
|
-
var
|
|
2836
|
-
var
|
|
2837
|
-
var
|
|
2838
|
-
var
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2145
|
+
var __defProp$a = Object.defineProperty;
|
|
2146
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
2147
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
2148
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
2149
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2150
|
+
var __spreadValues$a = (a, b) => {
|
|
2151
|
+
for (var prop in b || (b = {}))
|
|
2152
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
2153
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
2154
|
+
if (__getOwnPropSymbols$b)
|
|
2155
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
2156
|
+
if (__propIsEnum$b.call(b, prop))
|
|
2157
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
2847
2158
|
}
|
|
2848
|
-
return
|
|
2159
|
+
return a;
|
|
2849
2160
|
};
|
|
2850
|
-
function
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2161
|
+
async function loadImage(options) {
|
|
2162
|
+
return new Promise((resolve, reject) => {
|
|
2163
|
+
const img = new Image();
|
|
2164
|
+
const { src, srcset, sizes } = options;
|
|
2165
|
+
img.src = src;
|
|
2166
|
+
if (srcset)
|
|
2167
|
+
img.srcset = srcset;
|
|
2168
|
+
if (sizes)
|
|
2169
|
+
img.sizes = sizes;
|
|
2170
|
+
img.onload = () => resolve(img);
|
|
2171
|
+
img.onerror = reject;
|
|
2172
|
+
});
|
|
2857
2173
|
}
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
var
|
|
2174
|
+
const useImage = (options, asyncStateOptions = {}) => {
|
|
2175
|
+
const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$a({
|
|
2176
|
+
resetOnExecute: true
|
|
2177
|
+
}, asyncStateOptions));
|
|
2178
|
+
watch(() => resolveUnref(options), () => state.execute(asyncStateOptions.delay), { deep: true });
|
|
2179
|
+
return state;
|
|
2180
|
+
};
|
|
2181
|
+
var SwipeDirection;
|
|
2182
|
+
(function(SwipeDirection2) {
|
|
2183
|
+
SwipeDirection2["UP"] = "UP";
|
|
2184
|
+
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
2185
|
+
SwipeDirection2["DOWN"] = "DOWN";
|
|
2186
|
+
SwipeDirection2["LEFT"] = "LEFT";
|
|
2187
|
+
SwipeDirection2["NONE"] = "NONE";
|
|
2188
|
+
})(SwipeDirection || (SwipeDirection = {}));
|
|
2189
|
+
var __defProp$1 = Object.defineProperty;
|
|
2190
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
2191
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
2192
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
2193
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2194
|
+
var __spreadValues$1 = (a, b) => {
|
|
2866
2195
|
for (var prop in b || (b = {}))
|
|
2867
|
-
if (__hasOwnProp$
|
|
2868
|
-
__defNormalProp$
|
|
2869
|
-
if (__getOwnPropSymbols$
|
|
2870
|
-
for (var prop of __getOwnPropSymbols$
|
|
2871
|
-
if (__propIsEnum$
|
|
2872
|
-
__defNormalProp$
|
|
2196
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
2197
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2198
|
+
if (__getOwnPropSymbols$1)
|
|
2199
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
2200
|
+
if (__propIsEnum$1.call(b, prop))
|
|
2201
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2873
2202
|
}
|
|
2874
2203
|
return a;
|
|
2875
2204
|
};
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2205
|
+
const _TransitionPresets = {
|
|
2206
|
+
easeInSine: [0.12, 0, 0.39, 0],
|
|
2207
|
+
easeOutSine: [0.61, 1, 0.88, 1],
|
|
2208
|
+
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
2209
|
+
easeInQuad: [0.11, 0, 0.5, 0],
|
|
2210
|
+
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
2211
|
+
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
2212
|
+
easeInCubic: [0.32, 0, 0.67, 0],
|
|
2213
|
+
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
2214
|
+
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
2215
|
+
easeInQuart: [0.5, 0, 0.75, 0],
|
|
2216
|
+
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
2217
|
+
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
2218
|
+
easeInQuint: [0.64, 0, 0.78, 0],
|
|
2219
|
+
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
2220
|
+
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
2221
|
+
easeInExpo: [0.7, 0, 0.84, 0],
|
|
2222
|
+
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
2223
|
+
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
2224
|
+
easeInCirc: [0.55, 0, 1, 0.45],
|
|
2225
|
+
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
2226
|
+
easeInOutCirc: [0.85, 0, 0.15, 1],
|
|
2227
|
+
easeInBack: [0.36, 0, 0.66, -0.56],
|
|
2228
|
+
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
2229
|
+
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
2888
2230
|
};
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2231
|
+
__spreadValues$1({
|
|
2232
|
+
linear: identity
|
|
2233
|
+
}, _TransitionPresets);
|
|
2234
|
+
function useVModel(props, key, emit, options = {}) {
|
|
2235
|
+
var _a2, _b, _c;
|
|
2236
|
+
const {
|
|
2237
|
+
clone: clone2 = false,
|
|
2238
|
+
passive: passive2 = false,
|
|
2239
|
+
eventName,
|
|
2240
|
+
deep = false,
|
|
2241
|
+
defaultValue
|
|
2242
|
+
} = options;
|
|
2243
|
+
const vm = getCurrentInstance();
|
|
2244
|
+
const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a2 = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a2.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
|
|
2245
|
+
let event = eventName;
|
|
2246
|
+
if (!key) {
|
|
2247
|
+
{
|
|
2248
|
+
key = "modelValue";
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
event = eventName || event || `update:${key.toString()}`;
|
|
2252
|
+
const cloneFn = (val) => !clone2 ? val : isFunction$1(clone2) ? clone2(val) : cloneFnJSON(val);
|
|
2253
|
+
const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
|
|
2254
|
+
if (passive2) {
|
|
2255
|
+
const initialValue = getValue();
|
|
2256
|
+
const proxy = ref(initialValue);
|
|
2257
|
+
watch(() => props[key], (v) => proxy.value = cloneFn(v));
|
|
2258
|
+
watch(proxy, (v) => {
|
|
2259
|
+
if (v !== props[key] || deep)
|
|
2260
|
+
_emit(event, v);
|
|
2261
|
+
}, { deep });
|
|
2262
|
+
return proxy;
|
|
2263
|
+
} else {
|
|
2264
|
+
return computed({
|
|
2265
|
+
get() {
|
|
2266
|
+
return getValue();
|
|
2267
|
+
},
|
|
2268
|
+
set(value) {
|
|
2269
|
+
_emit(event, value);
|
|
2270
|
+
}
|
|
2271
|
+
});
|
|
2272
|
+
}
|
|
2900
2273
|
}
|
|
2901
|
-
function
|
|
2902
|
-
|
|
2903
|
-
const
|
|
2904
|
-
|
|
2274
|
+
function useVModels(props, emit, options = {}) {
|
|
2275
|
+
const ret = {};
|
|
2276
|
+
for (const key in props)
|
|
2277
|
+
ret[key] = useVModel(props, key, emit, options);
|
|
2278
|
+
return ret;
|
|
2905
2279
|
}
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2280
|
+
function useVirtualList(list, options) {
|
|
2281
|
+
const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = "itemHeight" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);
|
|
2282
|
+
return {
|
|
2283
|
+
list: currentList,
|
|
2284
|
+
scrollTo,
|
|
2285
|
+
containerProps: {
|
|
2286
|
+
ref: containerRef,
|
|
2287
|
+
onScroll: () => {
|
|
2288
|
+
calculateRange();
|
|
2289
|
+
},
|
|
2290
|
+
style: containerStyle
|
|
2291
|
+
},
|
|
2292
|
+
wrapperProps
|
|
2293
|
+
};
|
|
2294
|
+
}
|
|
2295
|
+
function useVirtualListResources(list) {
|
|
2296
|
+
const containerRef = ref(null);
|
|
2297
|
+
const size = useElementSize(containerRef);
|
|
2298
|
+
const currentList = ref([]);
|
|
2299
|
+
const source = shallowRef(list);
|
|
2300
|
+
const state = ref({ start: 0, end: 10 });
|
|
2301
|
+
return { state, source, currentList, size, containerRef };
|
|
2302
|
+
}
|
|
2303
|
+
function createGetViewCapacity(state, source, itemSize) {
|
|
2304
|
+
return (containerSize) => {
|
|
2305
|
+
if (typeof itemSize === "number")
|
|
2306
|
+
return Math.ceil(containerSize / itemSize);
|
|
2307
|
+
const { start: start2 = 0 } = state.value;
|
|
2308
|
+
let sum = 0;
|
|
2309
|
+
let capacity = 0;
|
|
2310
|
+
for (let i = start2; i < source.value.length; i++) {
|
|
2311
|
+
const size = itemSize(i);
|
|
2312
|
+
sum += size;
|
|
2313
|
+
capacity = i;
|
|
2314
|
+
if (sum > containerSize)
|
|
2315
|
+
break;
|
|
2942
2316
|
}
|
|
2943
|
-
return
|
|
2944
|
-
}
|
|
2945
|
-
if (immediate)
|
|
2946
|
-
execute(delay);
|
|
2947
|
-
return {
|
|
2948
|
-
state,
|
|
2949
|
-
isReady,
|
|
2950
|
-
isLoading,
|
|
2951
|
-
error: error2,
|
|
2952
|
-
execute
|
|
2317
|
+
return capacity - start2;
|
|
2953
2318
|
};
|
|
2954
2319
|
}
|
|
2955
|
-
function
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2320
|
+
function createGetOffset(source, itemSize) {
|
|
2321
|
+
return (scrollDirection) => {
|
|
2322
|
+
if (typeof itemSize === "number")
|
|
2323
|
+
return Math.floor(scrollDirection / itemSize) + 1;
|
|
2324
|
+
let sum = 0;
|
|
2325
|
+
let offset2 = 0;
|
|
2326
|
+
for (let i = 0; i < source.value.length; i++) {
|
|
2327
|
+
const size = itemSize(i);
|
|
2328
|
+
sum += size;
|
|
2329
|
+
if (sum >= scrollDirection) {
|
|
2330
|
+
offset2 = i;
|
|
2331
|
+
break;
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
return offset2 + 1;
|
|
2335
|
+
};
|
|
2964
2336
|
}
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2337
|
+
function createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {
|
|
2338
|
+
return () => {
|
|
2339
|
+
const element = containerRef.value;
|
|
2340
|
+
if (element) {
|
|
2341
|
+
const offset2 = getOffset(type === "vertical" ? element.scrollTop : element.scrollLeft);
|
|
2342
|
+
const viewCapacity = getViewCapacity(type === "vertical" ? element.clientHeight : element.clientWidth);
|
|
2343
|
+
const from2 = offset2 - overscan;
|
|
2344
|
+
const to2 = offset2 + viewCapacity + overscan;
|
|
2345
|
+
state.value = {
|
|
2346
|
+
start: from2 < 0 ? 0 : from2,
|
|
2347
|
+
end: to2 > source.value.length ? source.value.length : to2
|
|
2348
|
+
};
|
|
2349
|
+
currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index2) => ({
|
|
2350
|
+
data: ele,
|
|
2351
|
+
index: index2 + state.value.start
|
|
2352
|
+
}));
|
|
2981
2353
|
}
|
|
2982
|
-
|
|
2983
|
-
}
|
|
2984
|
-
function
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
if (observer) {
|
|
2990
|
-
observer.disconnect();
|
|
2991
|
-
observer = void 0;
|
|
2354
|
+
};
|
|
2355
|
+
}
|
|
2356
|
+
function createGetDistance(itemSize, source) {
|
|
2357
|
+
return (index2) => {
|
|
2358
|
+
if (typeof itemSize === "number") {
|
|
2359
|
+
const size2 = index2 * itemSize;
|
|
2360
|
+
return size2;
|
|
2992
2361
|
}
|
|
2362
|
+
const size = source.value.slice(0, index2).reduce((sum, _, i) => sum + itemSize(i), 0);
|
|
2363
|
+
return size;
|
|
2993
2364
|
};
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2365
|
+
}
|
|
2366
|
+
function useWatchForSizes(size, list, calculateRange) {
|
|
2367
|
+
watch([size.width, size.height, list], () => {
|
|
2368
|
+
calculateRange();
|
|
2369
|
+
});
|
|
2370
|
+
}
|
|
2371
|
+
function createComputedTotalSize(itemSize, source) {
|
|
2372
|
+
return computed(() => {
|
|
2373
|
+
if (typeof itemSize === "number")
|
|
2374
|
+
return source.value.length * itemSize;
|
|
2375
|
+
return source.value.reduce((sum, _, index2) => sum + itemSize(index2), 0);
|
|
2376
|
+
});
|
|
2377
|
+
}
|
|
2378
|
+
const scrollToDictionaryForElementScrollKey = {
|
|
2379
|
+
horizontal: "scrollLeft",
|
|
2380
|
+
vertical: "scrollTop"
|
|
2381
|
+
};
|
|
2382
|
+
function createScrollTo(type, calculateRange, getDistance, containerRef) {
|
|
2383
|
+
return (index2) => {
|
|
2384
|
+
if (containerRef.value) {
|
|
2385
|
+
containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index2);
|
|
2386
|
+
calculateRange();
|
|
2999
2387
|
}
|
|
3000
|
-
}, { immediate: true, flush: "post" });
|
|
3001
|
-
const stop = () => {
|
|
3002
|
-
cleanup();
|
|
3003
|
-
stopWatch();
|
|
3004
2388
|
};
|
|
3005
|
-
|
|
2389
|
+
}
|
|
2390
|
+
function useHorizontalVirtualList(options, list) {
|
|
2391
|
+
const resources = useVirtualListResources(list);
|
|
2392
|
+
const { state, source, currentList, size, containerRef } = resources;
|
|
2393
|
+
const containerStyle = { overflowX: "auto" };
|
|
2394
|
+
const { itemWidth, overscan = 5 } = options;
|
|
2395
|
+
const getViewCapacity = createGetViewCapacity(state, source, itemWidth);
|
|
2396
|
+
const getOffset = createGetOffset(source, itemWidth);
|
|
2397
|
+
const calculateRange = createCalculateRange("horizontal", overscan, getOffset, getViewCapacity, resources);
|
|
2398
|
+
const getDistanceLeft = createGetDistance(itemWidth, source);
|
|
2399
|
+
const offsetLeft = computed(() => getDistanceLeft(state.value.start));
|
|
2400
|
+
const totalWidth = createComputedTotalSize(itemWidth, source);
|
|
2401
|
+
useWatchForSizes(size, list, calculateRange);
|
|
2402
|
+
const scrollTo = createScrollTo("horizontal", calculateRange, getDistanceLeft, containerRef);
|
|
2403
|
+
const wrapperProps = computed(() => {
|
|
2404
|
+
return {
|
|
2405
|
+
style: {
|
|
2406
|
+
height: "100%",
|
|
2407
|
+
width: `${totalWidth.value - offsetLeft.value}px`,
|
|
2408
|
+
marginLeft: `${offsetLeft.value}px`,
|
|
2409
|
+
display: "flex"
|
|
2410
|
+
}
|
|
2411
|
+
};
|
|
2412
|
+
});
|
|
3006
2413
|
return {
|
|
3007
|
-
|
|
3008
|
-
|
|
2414
|
+
scrollTo,
|
|
2415
|
+
calculateRange,
|
|
2416
|
+
wrapperProps,
|
|
2417
|
+
containerStyle,
|
|
2418
|
+
currentList,
|
|
2419
|
+
containerRef
|
|
3009
2420
|
};
|
|
3010
2421
|
}
|
|
3011
|
-
function
|
|
3012
|
-
const
|
|
3013
|
-
const
|
|
3014
|
-
|
|
3015
|
-
|
|
2422
|
+
function useVerticalVirtualList(options, list) {
|
|
2423
|
+
const resources = useVirtualListResources(list);
|
|
2424
|
+
const { state, source, currentList, size, containerRef } = resources;
|
|
2425
|
+
const containerStyle = { overflowY: "auto" };
|
|
2426
|
+
const { itemHeight, overscan = 5 } = options;
|
|
2427
|
+
const getViewCapacity = createGetViewCapacity(state, source, itemHeight);
|
|
2428
|
+
const getOffset = createGetOffset(source, itemHeight);
|
|
2429
|
+
const calculateRange = createCalculateRange("vertical", overscan, getOffset, getViewCapacity, resources);
|
|
2430
|
+
const getDistanceTop = createGetDistance(itemHeight, source);
|
|
2431
|
+
const offsetTop = computed(() => getDistanceTop(state.value.start));
|
|
2432
|
+
const totalHeight = createComputedTotalSize(itemHeight, source);
|
|
2433
|
+
useWatchForSizes(size, list, calculateRange);
|
|
2434
|
+
const scrollTo = createScrollTo("vertical", calculateRange, getDistanceTop, containerRef);
|
|
2435
|
+
const wrapperProps = computed(() => {
|
|
2436
|
+
return {
|
|
2437
|
+
style: {
|
|
2438
|
+
width: "100%",
|
|
2439
|
+
height: `${totalHeight.value - offsetTop.value}px`,
|
|
2440
|
+
marginTop: `${offsetTop.value}px`
|
|
2441
|
+
}
|
|
2442
|
+
};
|
|
3016
2443
|
});
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
2444
|
+
return {
|
|
2445
|
+
calculateRange,
|
|
2446
|
+
scrollTo,
|
|
2447
|
+
containerStyle,
|
|
2448
|
+
wrapperProps,
|
|
2449
|
+
currentList,
|
|
2450
|
+
containerRef
|
|
2451
|
+
};
|
|
2452
|
+
}
|
|
2453
|
+
const getIconType = (type) => {
|
|
2454
|
+
const map2 = {
|
|
2455
|
+
normal: "info",
|
|
2456
|
+
warning: "alert-triangle",
|
|
2457
|
+
success: "check",
|
|
2458
|
+
error: "alert-circle",
|
|
2459
|
+
info: "bell"
|
|
2460
|
+
};
|
|
2461
|
+
return map2[type] || "info";
|
|
2462
|
+
};
|
|
2463
|
+
const getClass$1 = (prefix, props) => {
|
|
2464
|
+
let className = "";
|
|
2465
|
+
for (const [key, value] of Object.entries(props)) {
|
|
2466
|
+
if (typeof value === "boolean" && value) {
|
|
2467
|
+
className += ` ${prefix}-${key}`;
|
|
2468
|
+
} else if (typeof value === "string") {
|
|
2469
|
+
className += ` ${prefix}-${key}-${value}`;
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
return className;
|
|
2473
|
+
};
|
|
2474
|
+
const numFormat = (num) => {
|
|
2475
|
+
const str = num.toString().split(".");
|
|
2476
|
+
let integerPart = str[0];
|
|
2477
|
+
const decimalPart = str[1] ? `.${str[1]}` : "";
|
|
2478
|
+
const reg = /(\d+)(\d{3})/;
|
|
2479
|
+
while (reg.test(integerPart)) {
|
|
2480
|
+
integerPart = integerPart.replace(reg, "$1,$2");
|
|
2481
|
+
}
|
|
2482
|
+
return integerPart + decimalPart;
|
|
2483
|
+
};
|
|
2484
|
+
var LewTabs_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2485
|
+
const _hoisted_1$u = ["onClick"];
|
|
2486
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
2487
|
+
__name: "LewTabs",
|
|
2488
|
+
props: tabsProps,
|
|
2489
|
+
emits: ["change", "update:modelValue"],
|
|
2490
|
+
setup(__props, { emit }) {
|
|
2491
|
+
const props = __props;
|
|
2492
|
+
const tabsValue = useVModel(props, "modelValue", emit);
|
|
2493
|
+
const tabsRef = ref();
|
|
2494
|
+
const itemRef = ref([]);
|
|
2495
|
+
const state = reactive({
|
|
2496
|
+
activeItemStyle: "",
|
|
2497
|
+
curIndex: props.options.findIndex((e) => tabsValue.value === e.value),
|
|
2498
|
+
hidLine: ""
|
|
2499
|
+
});
|
|
2500
|
+
watch(
|
|
2501
|
+
() => tabsValue.value,
|
|
2502
|
+
(v) => {
|
|
2503
|
+
selectItem(v);
|
|
2504
|
+
}
|
|
2505
|
+
);
|
|
2506
|
+
const init = () => {
|
|
2507
|
+
let index2 = props.options.findIndex((e) => e.value === tabsValue.value);
|
|
2508
|
+
if (index2 < 0)
|
|
2509
|
+
index2 = 0;
|
|
2510
|
+
state.activeItemStyle = `width:${itemRef.value[index2].offsetWidth}px;transform: translateX(${itemRef.value[index2].offsetLeft}px);`;
|
|
2511
|
+
tabsScroll();
|
|
2512
|
+
};
|
|
2513
|
+
const selectItem = (value) => {
|
|
2514
|
+
const index2 = props.options.findIndex((e) => value === e.value);
|
|
2515
|
+
if (state.curIndex != index2) {
|
|
2516
|
+
const _item = props.options[index2];
|
|
2517
|
+
if (tabsValue.value != _item.value) {
|
|
2518
|
+
tabsValue.value = _item.value;
|
|
2519
|
+
}
|
|
2520
|
+
const activeRef = itemRef.value[index2];
|
|
2521
|
+
if (tabsRef.value.scrollWidth > tabsRef.value.clientWidth) {
|
|
2522
|
+
tabsRef.value.scrollLeft = activeRef.offsetLeft - tabsRef.value.clientWidth / 2 + activeRef.offsetWidth / 2;
|
|
2523
|
+
}
|
|
2524
|
+
state.activeItemStyle = `width:${activeRef.offsetWidth}px;transform: translate(${activeRef.offsetLeft}px);`;
|
|
2525
|
+
if (tabsValue.value !== props.modelValue) {
|
|
2526
|
+
emit("change", {
|
|
2527
|
+
label: _item.label,
|
|
2528
|
+
value: _item.value,
|
|
2529
|
+
activeIndex: index2
|
|
2530
|
+
});
|
|
2531
|
+
emit("update:modelValue", tabsValue.value);
|
|
2532
|
+
}
|
|
2533
|
+
state.curIndex = index2;
|
|
3027
2534
|
}
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
2535
|
+
};
|
|
2536
|
+
let timer2;
|
|
2537
|
+
const debounce2 = () => {
|
|
2538
|
+
clearTimeout(timer2);
|
|
2539
|
+
timer2 = setTimeout(() => {
|
|
2540
|
+
init();
|
|
2541
|
+
}, 250);
|
|
2542
|
+
};
|
|
2543
|
+
const getTabsWrapperClassName = computed(() => {
|
|
2544
|
+
const { type, round: round2 } = props;
|
|
2545
|
+
return getClass$1("lew-tabs-wrapper", {
|
|
2546
|
+
type,
|
|
2547
|
+
round: round2,
|
|
2548
|
+
hidLine: state.hidLine
|
|
2549
|
+
});
|
|
2550
|
+
});
|
|
2551
|
+
const getTabsClassName = computed(() => {
|
|
2552
|
+
const { type, round: round2 } = props;
|
|
2553
|
+
return getClass$1("lew-tabs", {
|
|
2554
|
+
type,
|
|
2555
|
+
round: round2
|
|
2556
|
+
});
|
|
2557
|
+
});
|
|
2558
|
+
const tabsScroll = () => {
|
|
2559
|
+
if (tabsRef.value.scrollWidth > tabsRef.value.clientWidth) {
|
|
2560
|
+
if (tabsRef.value.scrollLeft > 0) {
|
|
2561
|
+
if (tabsRef.value.scrollLeft >= tabsRef.value.scrollWidth - tabsRef.value.clientWidth - 10) {
|
|
2562
|
+
state.hidLine = "right";
|
|
2563
|
+
} else {
|
|
2564
|
+
state.hidLine = "";
|
|
2565
|
+
}
|
|
2566
|
+
} else {
|
|
2567
|
+
state.hidLine = "left";
|
|
2568
|
+
}
|
|
3033
2569
|
} else {
|
|
3034
|
-
|
|
3035
|
-
|
|
2570
|
+
state.hidLine = "all";
|
|
2571
|
+
}
|
|
2572
|
+
};
|
|
2573
|
+
onMounted(() => {
|
|
2574
|
+
if (props.modelValue === "") {
|
|
2575
|
+
tabsValue.value = props.options[0].value;
|
|
3036
2576
|
}
|
|
2577
|
+
init();
|
|
2578
|
+
window.addEventListener("resize", debounce2, false);
|
|
2579
|
+
});
|
|
2580
|
+
onUnmounted(() => {
|
|
2581
|
+
window.removeEventListener("resize", debounce2);
|
|
2582
|
+
});
|
|
2583
|
+
return (_ctx, _cache) => {
|
|
2584
|
+
return openBlock(), createElementBlock("div", {
|
|
2585
|
+
class: normalizeClass(["lew-tabs-wrapper", unref(getTabsWrapperClassName)])
|
|
2586
|
+
}, [
|
|
2587
|
+
createElementVNode("div", {
|
|
2588
|
+
style: normalizeStyle(`width:${_ctx.width}`),
|
|
2589
|
+
class: normalizeClass(["lew-tabs hidden-scrollbar", unref(getTabsClassName)]),
|
|
2590
|
+
ref_key: "tabsRef",
|
|
2591
|
+
ref: tabsRef,
|
|
2592
|
+
onScroll: tabsScroll
|
|
2593
|
+
}, [
|
|
2594
|
+
createElementVNode("div", {
|
|
2595
|
+
style: normalizeStyle(state.activeItemStyle),
|
|
2596
|
+
class: "lew-tabs-item-animation-active"
|
|
2597
|
+
}, null, 4),
|
|
2598
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item) => {
|
|
2599
|
+
return openBlock(), createElementBlock("div", {
|
|
2600
|
+
key: String(item.value),
|
|
2601
|
+
ref_for: true,
|
|
2602
|
+
ref: (el) => itemRef.value.push(el),
|
|
2603
|
+
class: normalizeClass(["lew-tabs-item", { "lew-tabs-item-active": unref(tabsValue) === item.value }]),
|
|
2604
|
+
style: normalizeStyle(`width:${_ctx.itemWidth}px`),
|
|
2605
|
+
onClick: ($event) => selectItem(item.value)
|
|
2606
|
+
}, toDisplayString(item.label), 15, _hoisted_1$u);
|
|
2607
|
+
}), 128))
|
|
2608
|
+
], 38)
|
|
2609
|
+
], 2);
|
|
2610
|
+
};
|
|
2611
|
+
}
|
|
2612
|
+
});
|
|
2613
|
+
var LewTabs = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-6111b125"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/tabs/src/LewTabs.vue"]]);
|
|
2614
|
+
var LewSteps_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2615
|
+
const _hoisted_1$t = { class: "lew-breadcrumb" };
|
|
2616
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
2617
|
+
__name: "LewSteps",
|
|
2618
|
+
props: {},
|
|
2619
|
+
setup(__props) {
|
|
2620
|
+
return (_ctx, _cache) => {
|
|
2621
|
+
return openBlock(), createElementBlock("div", _hoisted_1$t);
|
|
2622
|
+
};
|
|
2623
|
+
}
|
|
2624
|
+
});
|
|
2625
|
+
var LewSteps = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-5e4b1dfe"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/steps/src/LewSteps.vue"]]);
|
|
2626
|
+
const breadcrumbProps = {
|
|
2627
|
+
options: {
|
|
2628
|
+
type: Array,
|
|
2629
|
+
default() {
|
|
2630
|
+
return [];
|
|
3037
2631
|
}
|
|
3038
|
-
},
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
return {
|
|
3044
|
-
width,
|
|
3045
|
-
height
|
|
3046
|
-
};
|
|
3047
|
-
}
|
|
3048
|
-
var __defProp$a = Object.defineProperty;
|
|
3049
|
-
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
3050
|
-
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
3051
|
-
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
3052
|
-
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3053
|
-
var __spreadValues$a = (a, b) => {
|
|
3054
|
-
for (var prop in b || (b = {}))
|
|
3055
|
-
if (__hasOwnProp$b.call(b, prop))
|
|
3056
|
-
__defNormalProp$a(a, prop, b[prop]);
|
|
3057
|
-
if (__getOwnPropSymbols$b)
|
|
3058
|
-
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
3059
|
-
if (__propIsEnum$b.call(b, prop))
|
|
3060
|
-
__defNormalProp$a(a, prop, b[prop]);
|
|
2632
|
+
},
|
|
2633
|
+
iconType: {
|
|
2634
|
+
type: String,
|
|
2635
|
+
default() {
|
|
2636
|
+
return "sprit";
|
|
3061
2637
|
}
|
|
3062
|
-
|
|
2638
|
+
}
|
|
3063
2639
|
};
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
2640
|
+
var LewBreadcrumb_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2641
|
+
const _withScopeId$7 = (n) => (pushScopeId("data-v-5303b0ef"), n = n(), popScopeId(), n);
|
|
2642
|
+
const _hoisted_1$s = { class: "lew-breadcrumb" };
|
|
2643
|
+
const _hoisted_2$n = ["onClick"];
|
|
2644
|
+
const _hoisted_3$e = {
|
|
2645
|
+
key: 0,
|
|
2646
|
+
class: "lew-breadcrumb-parting"
|
|
2647
|
+
};
|
|
2648
|
+
const _hoisted_4$d = {
|
|
2649
|
+
key: 0,
|
|
2650
|
+
viewBox: "0 0 48 48",
|
|
2651
|
+
fill: "none",
|
|
2652
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2653
|
+
stroke: "currentColor",
|
|
2654
|
+
"stroke-width": "4",
|
|
2655
|
+
"stroke-linecap": "butt",
|
|
2656
|
+
"stroke-linejoin": "miter"
|
|
2657
|
+
};
|
|
2658
|
+
const _hoisted_5$b = /* @__PURE__ */ _withScopeId$7(() => /* @__PURE__ */ createElementVNode("path", { d: "M29.506 6.502 18.493 41.498" }, null, -1));
|
|
2659
|
+
const _hoisted_6$5 = [
|
|
2660
|
+
_hoisted_5$b
|
|
2661
|
+
];
|
|
2662
|
+
const _hoisted_7$3 = {
|
|
2663
|
+
key: 1,
|
|
2664
|
+
viewBox: "0 0 48 48",
|
|
2665
|
+
fill: "none",
|
|
2666
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2667
|
+
stroke: "currentColor",
|
|
2668
|
+
"stroke-width": "4",
|
|
2669
|
+
"stroke-linecap": "butt",
|
|
2670
|
+
"stroke-linejoin": "miter"
|
|
2671
|
+
};
|
|
2672
|
+
const _hoisted_8$3 = /* @__PURE__ */ _withScopeId$7(() => /* @__PURE__ */ createElementVNode("path", { d: "m16 39.513 15.556-15.557L16 8.4" }, null, -1));
|
|
2673
|
+
const _hoisted_9$2 = [
|
|
2674
|
+
_hoisted_8$3
|
|
2675
|
+
];
|
|
2676
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
2677
|
+
__name: "LewBreadcrumb",
|
|
2678
|
+
props: breadcrumbProps,
|
|
2679
|
+
setup(__props) {
|
|
2680
|
+
const { lewTo } = useLewTo();
|
|
2681
|
+
return (_ctx, _cache) => {
|
|
2682
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
2683
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index2) => {
|
|
2684
|
+
return openBlock(), createElementBlock("div", {
|
|
2685
|
+
key: index2,
|
|
2686
|
+
class: normalizeClass(["lew-breadcrumb-item", { "lew-breadcrumb-active": item.active }])
|
|
2687
|
+
}, [
|
|
2688
|
+
createElementVNode("span", {
|
|
2689
|
+
class: normalizeClass({ "lew-breadcrumb-isPath": !!item.to }),
|
|
2690
|
+
onClick: ($event) => unref(lewTo)(item.to)
|
|
2691
|
+
}, toDisplayString(item.label), 11, _hoisted_2$n),
|
|
2692
|
+
index2 != _ctx.options.length - 1 ? (openBlock(), createElementBlock("div", _hoisted_3$e, [
|
|
2693
|
+
_ctx.iconType === "sprit" ? (openBlock(), createElementBlock("svg", _hoisted_4$d, _hoisted_6$5)) : createCommentVNode("v-if", true),
|
|
2694
|
+
_ctx.iconType === "shoulder" ? (openBlock(), createElementBlock("svg", _hoisted_7$3, _hoisted_9$2)) : createCommentVNode("v-if", true)
|
|
2695
|
+
])) : createCommentVNode("v-if", true)
|
|
2696
|
+
], 2);
|
|
2697
|
+
}), 128))
|
|
2698
|
+
]);
|
|
2699
|
+
};
|
|
2700
|
+
}
|
|
2701
|
+
});
|
|
2702
|
+
var LewBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-5303b0ef"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/breadcrumb/src/LewBreadcrumb.vue"]]);
|
|
2703
|
+
const dropdownProps = {
|
|
2704
|
+
options: {
|
|
2705
|
+
type: Array,
|
|
2706
|
+
default() {
|
|
2707
|
+
return [];
|
|
2708
|
+
},
|
|
2709
|
+
required: true,
|
|
2710
|
+
validator(value) {
|
|
2711
|
+
return value.length >= 0;
|
|
2712
|
+
}
|
|
2713
|
+
},
|
|
2714
|
+
trigger: {
|
|
2715
|
+
type: String,
|
|
2716
|
+
default: "hover"
|
|
2717
|
+
},
|
|
2718
|
+
placement: {
|
|
2719
|
+
type: String,
|
|
2720
|
+
default: "bottom"
|
|
2721
|
+
},
|
|
2722
|
+
width: {
|
|
2723
|
+
type: String,
|
|
2724
|
+
default: ""
|
|
2725
|
+
},
|
|
2726
|
+
maxHeight: {
|
|
2727
|
+
type: String,
|
|
2728
|
+
default: "300px"
|
|
2729
|
+
},
|
|
2730
|
+
align: {
|
|
2731
|
+
type: String,
|
|
2732
|
+
default: "left"
|
|
2733
|
+
}
|
|
2734
|
+
};
|
|
2735
|
+
var LewDropdown_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2736
|
+
const _hoisted_1$r = ["onClick"];
|
|
2737
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
2738
|
+
__name: "LewDropdown",
|
|
2739
|
+
props: dropdownProps,
|
|
2740
|
+
emits: ["change"],
|
|
2741
|
+
setup(__props, { expose, emit }) {
|
|
2742
|
+
const lewPopoverRef = ref();
|
|
2743
|
+
const show = () => {
|
|
2744
|
+
lewPopoverRef.value.show();
|
|
2745
|
+
};
|
|
2746
|
+
const hide2 = () => {
|
|
2747
|
+
lewPopoverRef.value.hide();
|
|
2748
|
+
};
|
|
2749
|
+
const change = (item) => {
|
|
2750
|
+
emit("change", item, { show, hide: hide2 });
|
|
2751
|
+
};
|
|
2752
|
+
expose({ show, hide: hide2 });
|
|
2753
|
+
return (_ctx, _cache) => {
|
|
2754
|
+
const _component_lew_popover = resolveComponent("lew-popover");
|
|
2755
|
+
return openBlock(), createBlock(_component_lew_popover, {
|
|
2756
|
+
ref_key: "lewPopoverRef",
|
|
2757
|
+
ref: lewPopoverRef,
|
|
2758
|
+
trigger: _ctx.trigger,
|
|
2759
|
+
placement: _ctx.placement
|
|
2760
|
+
}, {
|
|
2761
|
+
trigger: withCtx(() => [
|
|
2762
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2763
|
+
]),
|
|
2764
|
+
"popover-body": withCtx(() => [
|
|
2765
|
+
_ctx.options.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
2766
|
+
key: 0,
|
|
2767
|
+
class: "lew-dropdown-body",
|
|
2768
|
+
style: normalizeStyle(`width:${_ctx.width};max-height:${_ctx.maxHeight}`)
|
|
2769
|
+
}, [
|
|
2770
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index2) => {
|
|
2771
|
+
return openBlock(), createElementBlock("div", {
|
|
2772
|
+
key: index2,
|
|
2773
|
+
class: "lew-dropdown-option",
|
|
2774
|
+
style: normalizeStyle(`text-align:${_ctx.align}`),
|
|
2775
|
+
onClick: ($event) => change(item)
|
|
2776
|
+
}, toDisplayString(item.label), 13, _hoisted_1$r);
|
|
2777
|
+
}), 128))
|
|
2778
|
+
], 4)) : createCommentVNode("v-if", true)
|
|
2779
|
+
]),
|
|
2780
|
+
_: 3
|
|
2781
|
+
}, 8, ["trigger", "placement"]);
|
|
2782
|
+
};
|
|
2783
|
+
}
|
|
2784
|
+
});
|
|
2785
|
+
var LewDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-9869e96a"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/dropdown/src/LewDropdown.vue"]]);
|
|
2786
|
+
const inputProps = {
|
|
2787
|
+
type: {
|
|
2788
|
+
type: String,
|
|
2789
|
+
default: ""
|
|
2790
|
+
},
|
|
2791
|
+
modelValue: {
|
|
2792
|
+
type: String,
|
|
2793
|
+
default: ""
|
|
2794
|
+
},
|
|
2795
|
+
size: {
|
|
2796
|
+
type: String,
|
|
2797
|
+
default: "medium"
|
|
2798
|
+
},
|
|
2799
|
+
focusSelect: {
|
|
2800
|
+
type: Boolean,
|
|
2801
|
+
default: false
|
|
2802
|
+
},
|
|
2803
|
+
align: {
|
|
2804
|
+
type: String,
|
|
2805
|
+
default: "left"
|
|
2806
|
+
},
|
|
2807
|
+
disabled: {
|
|
2808
|
+
type: Boolean,
|
|
2809
|
+
default: false
|
|
2810
|
+
},
|
|
2811
|
+
clearable: {
|
|
2812
|
+
type: Boolean,
|
|
2813
|
+
default: () => false
|
|
2814
|
+
},
|
|
2815
|
+
placeholder: {
|
|
2816
|
+
type: String,
|
|
2817
|
+
default: "\u8BF7\u8F93\u5165"
|
|
2818
|
+
},
|
|
2819
|
+
readonly: {
|
|
2820
|
+
type: Boolean,
|
|
2821
|
+
default: false
|
|
2822
|
+
},
|
|
2823
|
+
showPassword: {
|
|
2824
|
+
type: Boolean,
|
|
2825
|
+
default: false
|
|
2826
|
+
},
|
|
2827
|
+
resize: {
|
|
2828
|
+
type: String,
|
|
2829
|
+
default: "none"
|
|
2830
|
+
},
|
|
2831
|
+
autoWidth: {
|
|
2832
|
+
type: Boolean,
|
|
2833
|
+
default: false
|
|
2834
|
+
},
|
|
2835
|
+
maxLength: {
|
|
2836
|
+
type: Number,
|
|
2837
|
+
default: null
|
|
2838
|
+
},
|
|
2839
|
+
showCount: {
|
|
2840
|
+
type: Boolean,
|
|
2841
|
+
default: false
|
|
2842
|
+
},
|
|
2843
|
+
niceCount: {
|
|
2844
|
+
type: Boolean,
|
|
2845
|
+
default: false
|
|
2846
|
+
}
|
|
3083
2847
|
};
|
|
3084
|
-
var
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
SwipeDirection2["NONE"] = "NONE";
|
|
3091
|
-
})(SwipeDirection || (SwipeDirection = {}));
|
|
3092
|
-
var __defProp$1 = Object.defineProperty;
|
|
3093
|
-
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
3094
|
-
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
3095
|
-
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
3096
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3097
|
-
var __spreadValues$1 = (a, b) => {
|
|
3098
|
-
for (var prop in b || (b = {}))
|
|
3099
|
-
if (__hasOwnProp$1.call(b, prop))
|
|
3100
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
3101
|
-
if (__getOwnPropSymbols$1)
|
|
3102
|
-
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
3103
|
-
if (__propIsEnum$1.call(b, prop))
|
|
3104
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
3105
|
-
}
|
|
3106
|
-
return a;
|
|
2848
|
+
var LewInput_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2849
|
+
const _hoisted_1$q = ["disabled", "readonly", "placeholder"];
|
|
2850
|
+
const _hoisted_2$m = ["disabled", "placeholder", "type", "readonly"];
|
|
2851
|
+
const _hoisted_3$d = {
|
|
2852
|
+
key: 2,
|
|
2853
|
+
class: "input-auto-width"
|
|
3107
2854
|
};
|
|
3108
|
-
const
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
3112
|
-
easeInQuad: [0.11, 0, 0.5, 0],
|
|
3113
|
-
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
3114
|
-
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
3115
|
-
easeInCubic: [0.32, 0, 0.67, 0],
|
|
3116
|
-
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
3117
|
-
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
3118
|
-
easeInQuart: [0.5, 0, 0.75, 0],
|
|
3119
|
-
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
3120
|
-
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
3121
|
-
easeInQuint: [0.64, 0, 0.78, 0],
|
|
3122
|
-
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
3123
|
-
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
3124
|
-
easeInExpo: [0.7, 0, 0.84, 0],
|
|
3125
|
-
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
3126
|
-
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
3127
|
-
easeInCirc: [0.55, 0, 1, 0.45],
|
|
3128
|
-
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
3129
|
-
easeInOutCirc: [0.85, 0, 0.15, 1],
|
|
3130
|
-
easeInBack: [0.36, 0, 0.66, -0.56],
|
|
3131
|
-
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
3132
|
-
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
2855
|
+
const _hoisted_4$c = {
|
|
2856
|
+
key: 0,
|
|
2857
|
+
class: "lew-input-show-count"
|
|
3133
2858
|
};
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
}
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
2859
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
2860
|
+
__name: "LewInput",
|
|
2861
|
+
props: inputProps,
|
|
2862
|
+
emits: [
|
|
2863
|
+
"update:modelValue",
|
|
2864
|
+
"clear",
|
|
2865
|
+
"blur",
|
|
2866
|
+
"focus",
|
|
2867
|
+
"change",
|
|
2868
|
+
"input"
|
|
2869
|
+
],
|
|
2870
|
+
setup(__props, { expose, emit }) {
|
|
2871
|
+
const props = __props;
|
|
2872
|
+
const v = ref(props.modelValue);
|
|
2873
|
+
const lewInputRef = ref();
|
|
2874
|
+
const lewTextareaRef = ref();
|
|
2875
|
+
watch(
|
|
2876
|
+
() => props.modelValue,
|
|
2877
|
+
() => {
|
|
2878
|
+
v.value = props.modelValue;
|
|
2879
|
+
}
|
|
2880
|
+
);
|
|
2881
|
+
const input = () => {
|
|
2882
|
+
if (props.maxLength) {
|
|
2883
|
+
for (let i = 0; i <= v.value.length - 1; i++) {
|
|
2884
|
+
if (getTextLength(v.value.slice(0, i)) >= props.maxLength) {
|
|
2885
|
+
v.value = v.value.slice(0, i);
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
emit("update:modelValue", v.value);
|
|
2890
|
+
emit("input", v.value);
|
|
2891
|
+
};
|
|
2892
|
+
const clear2 = () => {
|
|
2893
|
+
emit("clear", v.value);
|
|
2894
|
+
v.value = "";
|
|
2895
|
+
emit("update:modelValue", v.value);
|
|
2896
|
+
};
|
|
2897
|
+
const focusFn = () => {
|
|
2898
|
+
var _a2, _b;
|
|
2899
|
+
if (props.type === "textarea") {
|
|
2900
|
+
(_a2 = lewTextareaRef.value) == null ? void 0 : _a2.focus();
|
|
2901
|
+
} else {
|
|
2902
|
+
(_b = lewInputRef.value) == null ? void 0 : _b.focus();
|
|
2903
|
+
}
|
|
2904
|
+
};
|
|
2905
|
+
const _type = ref(props.type);
|
|
2906
|
+
const showPasswordFn = () => {
|
|
2907
|
+
_type.value === "text" ? _type.value = "password" : _type.value = "text";
|
|
2908
|
+
};
|
|
2909
|
+
const getCheckNumStr = computed(() => {
|
|
2910
|
+
if (props.showCount && props.maxLength) {
|
|
2911
|
+
return `${getTextLength(v.value)} / ${props.maxLength}`;
|
|
2912
|
+
}
|
|
2913
|
+
if (props.showCount) {
|
|
2914
|
+
return getTextLength(v.value);
|
|
2915
|
+
}
|
|
2916
|
+
return false;
|
|
2917
|
+
});
|
|
2918
|
+
const getTextLength = (val) => {
|
|
2919
|
+
if (!props.niceCount) {
|
|
2920
|
+
return val.length;
|
|
2921
|
+
}
|
|
2922
|
+
let len = 0;
|
|
2923
|
+
for (let i = 0; i <= val.length - 1; i++) {
|
|
2924
|
+
const length = val.charCodeAt(i);
|
|
2925
|
+
if (length >= 0 && length <= 128) {
|
|
2926
|
+
len += 0.5;
|
|
2927
|
+
} else {
|
|
2928
|
+
len += 1;
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
return Math.trunc(len);
|
|
2932
|
+
};
|
|
2933
|
+
const getEl = () => {
|
|
2934
|
+
if (props.type === "textarea") {
|
|
2935
|
+
return lewTextareaRef.value;
|
|
2936
|
+
}
|
|
2937
|
+
return lewInputRef.value;
|
|
2938
|
+
};
|
|
2939
|
+
const focus = (e) => {
|
|
2940
|
+
var _a2;
|
|
2941
|
+
if (props.focusSelect) {
|
|
2942
|
+
(_a2 = e == null ? void 0 : e.currentTarget) == null ? void 0 : _a2.select();
|
|
2943
|
+
}
|
|
2944
|
+
emit("focus");
|
|
2945
|
+
};
|
|
2946
|
+
expose({ getEl, focusFn, lewInputRef });
|
|
2947
|
+
return (_ctx, _cache) => {
|
|
2948
|
+
const _component_lew_icon = resolveComponent("lew-icon");
|
|
2949
|
+
return openBlock(), createElementBlock("div", {
|
|
2950
|
+
class: normalizeClass(["lew-input-view", `
|
|
2951
|
+
lew-input-view-${_ctx.size}
|
|
2952
|
+
${_type.value === "textarea" ? "lew-input-view-textarea" : ""}
|
|
2953
|
+
${_ctx.readonly ? "lew-input-view-readonly" : ""}
|
|
2954
|
+
${_ctx.disabled ? "lew-input-view-disabled" : ""}
|
|
2955
|
+
${_ctx.align ? "lew-input-view-align-" + _ctx.align : ""}
|
|
2956
|
+
${_ctx.autoWidth ? "lew-input-view-auto-width" : ""}
|
|
2957
|
+
`])
|
|
2958
|
+
}, [
|
|
2959
|
+
_type.value === "textarea" ? withDirectives((openBlock(), createElementBlock("textarea", {
|
|
2960
|
+
key: 0,
|
|
2961
|
+
ref_key: "lewTextareaRef",
|
|
2962
|
+
ref: lewTextareaRef,
|
|
2963
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => v.value = $event),
|
|
2964
|
+
class: normalizeClass(["btf-scrollbar", `lew-textarea-resize-${_ctx.resize}`]),
|
|
2965
|
+
rows: "3",
|
|
2966
|
+
cols: "3",
|
|
2967
|
+
disabled: _ctx.disabled,
|
|
2968
|
+
readonly: _ctx.readonly,
|
|
2969
|
+
placeholder: _ctx.placeholder,
|
|
2970
|
+
onInput: input,
|
|
2971
|
+
onChange: _cache[1] || (_cache[1] = ($event) => emit("change", v.value)),
|
|
2972
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => emit("blur", v.value)),
|
|
2973
|
+
onFocus: focus
|
|
2974
|
+
}, null, 42, _hoisted_1$q)), [
|
|
2975
|
+
[vModelText, v.value]
|
|
2976
|
+
]) : withDirectives((openBlock(), createElementBlock("input", {
|
|
2977
|
+
key: 1,
|
|
2978
|
+
ref_key: "lewInputRef",
|
|
2979
|
+
ref: lewInputRef,
|
|
2980
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => v.value = $event),
|
|
2981
|
+
disabled: _ctx.disabled,
|
|
2982
|
+
placeholder: _ctx.placeholder,
|
|
2983
|
+
type: _type.value,
|
|
2984
|
+
readonly: _ctx.readonly,
|
|
2985
|
+
onkeypress: "if(window.event.keyCode==13) this.blur()",
|
|
2986
|
+
onInput: input,
|
|
2987
|
+
onChange: _cache[4] || (_cache[4] = ($event) => emit("change", v.value)),
|
|
2988
|
+
onBlur: _cache[5] || (_cache[5] = ($event) => emit("blur", v.value)),
|
|
2989
|
+
onFocus: focus
|
|
2990
|
+
}, null, 40, _hoisted_2$m)), [
|
|
2991
|
+
[vModelDynamic, v.value]
|
|
2992
|
+
]),
|
|
2993
|
+
_ctx.autoWidth ? (openBlock(), createElementBlock("label", _hoisted_3$d, toDisplayString(v.value), 1)) : createCommentVNode("v-if", true),
|
|
2994
|
+
_ctx.showPassword || _ctx.clearable || _ctx.showCount ? (openBlock(), createElementBlock("div", {
|
|
2995
|
+
key: 3,
|
|
2996
|
+
class: normalizeClass(["lew-input-controls", {
|
|
2997
|
+
"lew-input-controls-show": v.value && _ctx.showPassword || v.value && _ctx.clearable || _ctx.showCount && !_ctx.clearable && !_ctx.showPassword,
|
|
2998
|
+
"lew-input-controls-count": _ctx.showCount && _ctx.clearable && _ctx.maxLength && !v.value,
|
|
2999
|
+
"lew-input-controls-count-show": _ctx.showCount && _ctx.clearable && _ctx.maxLength && v.value
|
|
3000
|
+
}])
|
|
3001
|
+
}, [
|
|
3002
|
+
unref(getCheckNumStr) ? (openBlock(), createElementBlock("div", _hoisted_4$c, toDisplayString(unref(getCheckNumStr)), 1)) : createCommentVNode("v-if", true),
|
|
3003
|
+
_ctx.showPassword ? (openBlock(), createElementBlock("div", {
|
|
3004
|
+
key: 1,
|
|
3005
|
+
class: "lew-input-show-password",
|
|
3006
|
+
onMousedown: _cache[6] || (_cache[6] = withModifiers(() => {
|
|
3007
|
+
}, ["prevent"])),
|
|
3008
|
+
onClick: showPasswordFn
|
|
3009
|
+
}, [
|
|
3010
|
+
withDirectives(createVNode(_component_lew_icon, {
|
|
3011
|
+
size: 16,
|
|
3012
|
+
type: "eye"
|
|
3013
|
+
}, null, 512), [
|
|
3014
|
+
[vShow, _type.value === "text"]
|
|
3015
|
+
]),
|
|
3016
|
+
withDirectives(createVNode(_component_lew_icon, {
|
|
3017
|
+
size: 16,
|
|
3018
|
+
type: "eye-off"
|
|
3019
|
+
}, null, 512), [
|
|
3020
|
+
[vShow, _type.value === "password"]
|
|
3021
|
+
])
|
|
3022
|
+
], 32)) : createCommentVNode("v-if", true),
|
|
3023
|
+
_ctx.clearable ? (openBlock(), createElementBlock("div", {
|
|
3024
|
+
key: 2,
|
|
3025
|
+
class: "lew-input-clear",
|
|
3026
|
+
onMousedown: _cache[7] || (_cache[7] = withModifiers(() => {
|
|
3027
|
+
}, ["prevent"])),
|
|
3028
|
+
onClick: clear2
|
|
3029
|
+
}, [
|
|
3030
|
+
createVNode(_component_lew_icon, {
|
|
3031
|
+
size: 16,
|
|
3032
|
+
type: "x-circle"
|
|
3033
|
+
})
|
|
3034
|
+
], 32)) : createCommentVNode("v-if", true)
|
|
3035
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
3036
|
+
], 2);
|
|
3037
|
+
};
|
|
3038
|
+
}
|
|
3039
|
+
});
|
|
3040
|
+
var LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-156ce1e1"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input/src/LewInput.vue"]]);
|
|
3041
|
+
const _props$5 = {
|
|
3042
|
+
type: {
|
|
3043
|
+
type: String,
|
|
3044
|
+
default: ""
|
|
3045
|
+
},
|
|
3046
|
+
modelValue: {
|
|
3047
|
+
type: String,
|
|
3048
|
+
default: ""
|
|
3049
|
+
},
|
|
3050
|
+
autoWidth: {
|
|
3051
|
+
type: Boolean,
|
|
3052
|
+
default: false
|
|
3053
|
+
},
|
|
3054
|
+
options: {
|
|
3055
|
+
type: Array,
|
|
3056
|
+
default() {
|
|
3057
|
+
return [];
|
|
3152
3058
|
}
|
|
3059
|
+
},
|
|
3060
|
+
align: {
|
|
3061
|
+
type: String,
|
|
3062
|
+
default: "left"
|
|
3063
|
+
},
|
|
3064
|
+
disabled: {
|
|
3065
|
+
type: Boolean,
|
|
3066
|
+
default: false
|
|
3067
|
+
},
|
|
3068
|
+
clearable: {
|
|
3069
|
+
type: Boolean,
|
|
3070
|
+
default: false
|
|
3071
|
+
},
|
|
3072
|
+
placeholder: {
|
|
3073
|
+
type: String,
|
|
3074
|
+
default: "\u8BF7\u8F93\u5165"
|
|
3075
|
+
},
|
|
3076
|
+
readonly: {
|
|
3077
|
+
type: Boolean,
|
|
3078
|
+
default: false
|
|
3079
|
+
},
|
|
3080
|
+
showPassword: {
|
|
3081
|
+
type: Boolean,
|
|
3082
|
+
default: false
|
|
3083
|
+
},
|
|
3084
|
+
maxLength: {
|
|
3085
|
+
type: Number,
|
|
3086
|
+
default: null
|
|
3087
|
+
},
|
|
3088
|
+
showCount: {
|
|
3089
|
+
type: Boolean,
|
|
3090
|
+
default: false
|
|
3091
|
+
},
|
|
3092
|
+
niceCount: {
|
|
3093
|
+
type: Boolean,
|
|
3094
|
+
default: false
|
|
3095
|
+
},
|
|
3096
|
+
size: {
|
|
3097
|
+
type: String,
|
|
3098
|
+
default: "medium"
|
|
3099
|
+
},
|
|
3100
|
+
popoverWidth: {
|
|
3101
|
+
type: String,
|
|
3102
|
+
default: "auto"
|
|
3103
|
+
},
|
|
3104
|
+
trigger: {
|
|
3105
|
+
type: String,
|
|
3106
|
+
default: "click"
|
|
3107
|
+
},
|
|
3108
|
+
placement: {
|
|
3109
|
+
type: String,
|
|
3110
|
+
default: "bottom-start"
|
|
3153
3111
|
}
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3112
|
+
};
|
|
3113
|
+
var LewInputPro_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
3114
|
+
const _hoisted_1$p = { class: "lew-input-pro" };
|
|
3115
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
3116
|
+
__name: "LewInputPro",
|
|
3117
|
+
props: _props$5,
|
|
3118
|
+
emits: [
|
|
3119
|
+
"update:modelValue",
|
|
3120
|
+
"clear",
|
|
3121
|
+
"blur",
|
|
3122
|
+
"focus",
|
|
3123
|
+
"change",
|
|
3124
|
+
"input"
|
|
3125
|
+
],
|
|
3126
|
+
setup(__props, { emit }) {
|
|
3127
|
+
const props = __props;
|
|
3128
|
+
const v = ref(props.modelValue);
|
|
3129
|
+
watch(
|
|
3130
|
+
() => props.modelValue,
|
|
3131
|
+
() => {
|
|
3132
|
+
v.value = props.modelValue;
|
|
3173
3133
|
}
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3134
|
+
);
|
|
3135
|
+
const lewDropdownRef = ref();
|
|
3136
|
+
const input = (value) => {
|
|
3137
|
+
emit("update:modelValue", value);
|
|
3138
|
+
emit("input", value);
|
|
3139
|
+
};
|
|
3140
|
+
const clear2 = () => {
|
|
3141
|
+
emit("clear", v.value);
|
|
3142
|
+
v.value = "";
|
|
3143
|
+
emit("update:modelValue", v.value);
|
|
3144
|
+
};
|
|
3145
|
+
const selectFn = (e) => {
|
|
3146
|
+
v.value = e.value;
|
|
3147
|
+
emit("update:modelValue", v.value);
|
|
3148
|
+
emit("input", v.value);
|
|
3149
|
+
emit("change", v.value);
|
|
3150
|
+
hide2();
|
|
3151
|
+
};
|
|
3152
|
+
const open = () => {
|
|
3153
|
+
if (props.options.length === 0)
|
|
3154
|
+
return;
|
|
3155
|
+
lewDropdownRef.value.show();
|
|
3156
|
+
};
|
|
3157
|
+
const hide2 = () => {
|
|
3158
|
+
lewDropdownRef.value.hide();
|
|
3159
|
+
};
|
|
3160
|
+
const width = ref(0);
|
|
3161
|
+
const focus = (e) => {
|
|
3162
|
+
var _a2;
|
|
3163
|
+
width.value = lewDropdownRef.value.$el.clientWidth - 14;
|
|
3164
|
+
open();
|
|
3165
|
+
(_a2 = e == null ? void 0 : e.currentTarget) == null ? void 0 : _a2.select();
|
|
3166
|
+
emit("focus", v);
|
|
3167
|
+
};
|
|
3168
|
+
return (_ctx, _cache) => {
|
|
3169
|
+
const _component_lew_input = resolveComponent("lew-input");
|
|
3170
|
+
const _component_lew_dropdown = resolveComponent("lew-dropdown");
|
|
3171
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
3172
|
+
renderSlot(_ctx.$slots, "left", {}, void 0, true),
|
|
3173
|
+
createVNode(_component_lew_dropdown, {
|
|
3174
|
+
ref_key: "lewDropdownRef",
|
|
3175
|
+
ref: lewDropdownRef,
|
|
3176
|
+
style: { "width": "100%" },
|
|
3177
|
+
trigger: _ctx.trigger,
|
|
3178
|
+
placement: _ctx.placement,
|
|
3179
|
+
align: _ctx.align,
|
|
3180
|
+
width: `${width.value}px`,
|
|
3181
|
+
options: _ctx.options,
|
|
3182
|
+
onChange: selectFn
|
|
3183
|
+
}, {
|
|
3184
|
+
default: withCtx(() => [
|
|
3185
|
+
createVNode(_component_lew_input, {
|
|
3186
|
+
modelValue: v.value,
|
|
3187
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => v.value = $event),
|
|
3188
|
+
type: _ctx.type,
|
|
3189
|
+
"auto-width": _ctx.autoWidth,
|
|
3190
|
+
size: _ctx.size,
|
|
3191
|
+
align: _ctx.align,
|
|
3192
|
+
placeholder: _ctx.placeholder,
|
|
3193
|
+
clearable: _ctx.clearable,
|
|
3194
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
3195
|
+
}, ["stop"])),
|
|
3196
|
+
onInput: input,
|
|
3197
|
+
onChange: _cache[2] || (_cache[2] = ($event) => emit("change", v.value)),
|
|
3198
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => emit("blur", v.value)),
|
|
3199
|
+
onFocus: focus,
|
|
3200
|
+
onClear: clear2
|
|
3201
|
+
}, null, 8, ["modelValue", "type", "auto-width", "size", "align", "placeholder", "clearable"])
|
|
3202
|
+
]),
|
|
3203
|
+
_: 1
|
|
3204
|
+
}, 8, ["trigger", "placement", "align", "width", "options"]),
|
|
3205
|
+
renderSlot(_ctx.$slots, "right", {}, void 0, true)
|
|
3206
|
+
]);
|
|
3207
|
+
};
|
|
3208
|
+
}
|
|
3209
|
+
});
|
|
3210
|
+
var LewInputPro = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-1e1e8f9c"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input-pro/src/LewInputPro.vue"]]);
|
|
3211
|
+
const inputTagProps = {
|
|
3212
|
+
modelValue: {
|
|
3213
|
+
type: Array,
|
|
3214
|
+
default: () => {
|
|
3215
|
+
return [];
|
|
3219
3216
|
}
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3217
|
+
},
|
|
3218
|
+
type: {
|
|
3219
|
+
type: String,
|
|
3220
|
+
default: "normal"
|
|
3221
|
+
}
|
|
3222
|
+
};
|
|
3223
|
+
var LewInputTag_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
3224
|
+
const _withScopeId$6 = (n) => (pushScopeId("data-v-ad3c9b14"), n = n(), popScopeId(), n);
|
|
3225
|
+
const _hoisted_1$o = { class: "lew-input-tag-view" };
|
|
3226
|
+
const _hoisted_2$l = /* @__PURE__ */ _withScopeId$6(() => /* @__PURE__ */ createElementVNode("div", { style: { "margin-left": "-10px", "height": "26px" } }, null, -1));
|
|
3227
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
3228
|
+
__name: "LewInputTag",
|
|
3229
|
+
props: inputTagProps,
|
|
3230
|
+
setup(__props) {
|
|
3231
|
+
const props = __props;
|
|
3232
|
+
const inputValue = ref();
|
|
3233
|
+
const tagsValue = ref(props.modelValue);
|
|
3234
|
+
const isInput = ref(false);
|
|
3235
|
+
const lewInputRef = ref();
|
|
3236
|
+
let isEnter = false;
|
|
3237
|
+
let delDownTimer;
|
|
3238
|
+
let delDownCheck = 0;
|
|
3239
|
+
watch(
|
|
3240
|
+
() => props.modelValue,
|
|
3241
|
+
() => {
|
|
3242
|
+
tagsValue.value = props.modelValue;
|
|
3235
3243
|
}
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3244
|
+
);
|
|
3245
|
+
const openInput = () => {
|
|
3246
|
+
isInput.value = true;
|
|
3247
|
+
nextTick(() => {
|
|
3248
|
+
lewInputRef.value.focusFn();
|
|
3249
|
+
});
|
|
3250
|
+
document.onkeydown = function(event) {
|
|
3251
|
+
if (inputValue.value === "") {
|
|
3252
|
+
if (event.keyCode === 8 || event.keyCode === 46) {
|
|
3253
|
+
clearTimeout(delDownTimer);
|
|
3254
|
+
delDownTimer = setTimeout(() => {
|
|
3255
|
+
delDownCheck = 0;
|
|
3256
|
+
}, 500);
|
|
3257
|
+
delDownCheck += 1;
|
|
3258
|
+
if (delDownCheck >= 2) {
|
|
3259
|
+
tagsValue.value.splice(tagsValue.value.length - 1, 1);
|
|
3260
|
+
delDownCheck = 0;
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
} else if (event.keyCode === 13) {
|
|
3264
|
+
isEnter = true;
|
|
3265
|
+
}
|
|
3251
3266
|
};
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
function createGetDistance(itemSize, source) {
|
|
3260
|
-
return (index2) => {
|
|
3261
|
-
if (typeof itemSize === "number") {
|
|
3262
|
-
const size2 = index2 * itemSize;
|
|
3263
|
-
return size2;
|
|
3264
|
-
}
|
|
3265
|
-
const size = source.value.slice(0, index2).reduce((sum, _, i) => sum + itemSize(i), 0);
|
|
3266
|
-
return size;
|
|
3267
|
-
};
|
|
3268
|
-
}
|
|
3269
|
-
function useWatchForSizes(size, list, calculateRange) {
|
|
3270
|
-
watch([size.width, size.height, list], () => {
|
|
3271
|
-
calculateRange();
|
|
3272
|
-
});
|
|
3273
|
-
}
|
|
3274
|
-
function createComputedTotalSize(itemSize, source) {
|
|
3275
|
-
return computed(() => {
|
|
3276
|
-
if (typeof itemSize === "number")
|
|
3277
|
-
return source.value.length * itemSize;
|
|
3278
|
-
return source.value.reduce((sum, _, index2) => sum + itemSize(index2), 0);
|
|
3279
|
-
});
|
|
3280
|
-
}
|
|
3281
|
-
const scrollToDictionaryForElementScrollKey = {
|
|
3282
|
-
horizontal: "scrollLeft",
|
|
3283
|
-
vertical: "scrollTop"
|
|
3284
|
-
};
|
|
3285
|
-
function createScrollTo(type, calculateRange, getDistance, containerRef) {
|
|
3286
|
-
return (index2) => {
|
|
3287
|
-
if (containerRef.value) {
|
|
3288
|
-
containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index2);
|
|
3289
|
-
calculateRange();
|
|
3290
|
-
}
|
|
3291
|
-
};
|
|
3292
|
-
}
|
|
3293
|
-
function useHorizontalVirtualList(options, list) {
|
|
3294
|
-
const resources = useVirtualListResources(list);
|
|
3295
|
-
const { state, source, currentList, size, containerRef } = resources;
|
|
3296
|
-
const containerStyle = { overflowX: "auto" };
|
|
3297
|
-
const { itemWidth, overscan = 5 } = options;
|
|
3298
|
-
const getViewCapacity = createGetViewCapacity(state, source, itemWidth);
|
|
3299
|
-
const getOffset = createGetOffset(source, itemWidth);
|
|
3300
|
-
const calculateRange = createCalculateRange("horizontal", overscan, getOffset, getViewCapacity, resources);
|
|
3301
|
-
const getDistanceLeft = createGetDistance(itemWidth, source);
|
|
3302
|
-
const offsetLeft = computed(() => getDistanceLeft(state.value.start));
|
|
3303
|
-
const totalWidth = createComputedTotalSize(itemWidth, source);
|
|
3304
|
-
useWatchForSizes(size, list, calculateRange);
|
|
3305
|
-
const scrollTo = createScrollTo("horizontal", calculateRange, getDistanceLeft, containerRef);
|
|
3306
|
-
const wrapperProps = computed(() => {
|
|
3307
|
-
return {
|
|
3308
|
-
style: {
|
|
3309
|
-
height: "100%",
|
|
3310
|
-
width: `${totalWidth.value - offsetLeft.value}px`,
|
|
3311
|
-
marginLeft: `${offsetLeft.value}px`,
|
|
3312
|
-
display: "flex"
|
|
3267
|
+
};
|
|
3268
|
+
const blurFn = (e) => {
|
|
3269
|
+
isInput.value = false;
|
|
3270
|
+
document.onkeydown = null;
|
|
3271
|
+
addTag();
|
|
3272
|
+
if (isEnter) {
|
|
3273
|
+
openInput();
|
|
3313
3274
|
}
|
|
3275
|
+
isEnter = false;
|
|
3314
3276
|
};
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
calculateRange,
|
|
3319
|
-
wrapperProps,
|
|
3320
|
-
containerStyle,
|
|
3321
|
-
currentList,
|
|
3322
|
-
containerRef
|
|
3323
|
-
};
|
|
3324
|
-
}
|
|
3325
|
-
function useVerticalVirtualList(options, list) {
|
|
3326
|
-
const resources = useVirtualListResources(list);
|
|
3327
|
-
const { state, source, currentList, size, containerRef } = resources;
|
|
3328
|
-
const containerStyle = { overflowY: "auto" };
|
|
3329
|
-
const { itemHeight, overscan = 5 } = options;
|
|
3330
|
-
const getViewCapacity = createGetViewCapacity(state, source, itemHeight);
|
|
3331
|
-
const getOffset = createGetOffset(source, itemHeight);
|
|
3332
|
-
const calculateRange = createCalculateRange("vertical", overscan, getOffset, getViewCapacity, resources);
|
|
3333
|
-
const getDistanceTop = createGetDistance(itemHeight, source);
|
|
3334
|
-
const offsetTop = computed(() => getDistanceTop(state.value.start));
|
|
3335
|
-
const totalHeight = createComputedTotalSize(itemHeight, source);
|
|
3336
|
-
useWatchForSizes(size, list, calculateRange);
|
|
3337
|
-
const scrollTo = createScrollTo("vertical", calculateRange, getDistanceTop, containerRef);
|
|
3338
|
-
const wrapperProps = computed(() => {
|
|
3339
|
-
return {
|
|
3340
|
-
style: {
|
|
3341
|
-
width: "100%",
|
|
3342
|
-
height: `${totalHeight.value - offsetTop.value}px`,
|
|
3343
|
-
marginTop: `${offsetTop.value}px`
|
|
3277
|
+
const addTag = () => {
|
|
3278
|
+
if (inputValue.value) {
|
|
3279
|
+
tagsValue.value.push(inputValue.value);
|
|
3344
3280
|
}
|
|
3281
|
+
inputValue.value = "";
|
|
3282
|
+
};
|
|
3283
|
+
const delTag = (index2) => {
|
|
3284
|
+
tagsValue.value.splice(index2, 1);
|
|
3285
|
+
};
|
|
3286
|
+
return (_ctx, _cache) => {
|
|
3287
|
+
const _component_lew_tag = resolveComponent("lew-tag");
|
|
3288
|
+
const _component_lew_icon = resolveComponent("lew-icon");
|
|
3289
|
+
const _component_lew_input = resolveComponent("lew-input");
|
|
3290
|
+
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
3291
|
+
_hoisted_2$l,
|
|
3292
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(tagsValue.value, (item, index2) => {
|
|
3293
|
+
return openBlock(), createBlock(_component_lew_tag, {
|
|
3294
|
+
key: index2,
|
|
3295
|
+
closable: "",
|
|
3296
|
+
type: _ctx.type,
|
|
3297
|
+
onClose: ($event) => delTag(index2)
|
|
3298
|
+
}, {
|
|
3299
|
+
default: withCtx(() => [
|
|
3300
|
+
createTextVNode(toDisplayString(item), 1)
|
|
3301
|
+
]),
|
|
3302
|
+
_: 2
|
|
3303
|
+
}, 1032, ["type", "onClose"]);
|
|
3304
|
+
}), 128)),
|
|
3305
|
+
withDirectives(createElementVNode("label", {
|
|
3306
|
+
class: "lew-input-tag-button",
|
|
3307
|
+
onClick: openInput
|
|
3308
|
+
}, [
|
|
3309
|
+
createVNode(_component_lew_icon, {
|
|
3310
|
+
size: 16,
|
|
3311
|
+
type: "plus"
|
|
3312
|
+
})
|
|
3313
|
+
], 512), [
|
|
3314
|
+
[vShow, !isInput.value]
|
|
3315
|
+
]),
|
|
3316
|
+
withDirectives(createVNode(_component_lew_input, {
|
|
3317
|
+
ref_key: "lewInputRef",
|
|
3318
|
+
ref: lewInputRef,
|
|
3319
|
+
modelValue: inputValue.value,
|
|
3320
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
3321
|
+
class: "lew-input-tag",
|
|
3322
|
+
size: "small",
|
|
3323
|
+
"auto-width": "",
|
|
3324
|
+
placeholder: "",
|
|
3325
|
+
onBlur: blurFn,
|
|
3326
|
+
onFocus: addTag
|
|
3327
|
+
}, null, 8, ["modelValue"]), [
|
|
3328
|
+
[vShow, isInput.value]
|
|
3329
|
+
])
|
|
3330
|
+
]);
|
|
3345
3331
|
};
|
|
3346
|
-
});
|
|
3347
|
-
return {
|
|
3348
|
-
calculateRange,
|
|
3349
|
-
scrollTo,
|
|
3350
|
-
containerStyle,
|
|
3351
|
-
wrapperProps,
|
|
3352
|
-
currentList,
|
|
3353
|
-
containerRef
|
|
3354
|
-
};
|
|
3355
|
-
}
|
|
3356
|
-
const getIconType = (type) => {
|
|
3357
|
-
const map2 = {
|
|
3358
|
-
normal: "info",
|
|
3359
|
-
warning: "alert-triangle",
|
|
3360
|
-
success: "check",
|
|
3361
|
-
error: "alert-circle",
|
|
3362
|
-
info: "bell"
|
|
3363
|
-
};
|
|
3364
|
-
return map2[type] || "info";
|
|
3365
|
-
};
|
|
3366
|
-
const getClass$1 = (prefix, props) => {
|
|
3367
|
-
let className = "";
|
|
3368
|
-
for (const [key, value] of Object.entries(props)) {
|
|
3369
|
-
if (typeof value === "boolean" && value) {
|
|
3370
|
-
className += ` ${prefix}-${key}`;
|
|
3371
|
-
} else if (typeof value === "string") {
|
|
3372
|
-
className += ` ${prefix}-${key}-${value}`;
|
|
3373
|
-
}
|
|
3374
3332
|
}
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
const
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3333
|
+
});
|
|
3334
|
+
var LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-ad3c9b14"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input-tag/src/LewInputTag.vue"]]);
|
|
3335
|
+
const formProps = {
|
|
3336
|
+
width: {
|
|
3337
|
+
type: String,
|
|
3338
|
+
default: ""
|
|
3339
|
+
},
|
|
3340
|
+
labelWidth: {
|
|
3341
|
+
type: String,
|
|
3342
|
+
default: "auto"
|
|
3343
|
+
},
|
|
3344
|
+
labelAlign: {
|
|
3345
|
+
type: String,
|
|
3346
|
+
default: "end"
|
|
3347
|
+
},
|
|
3348
|
+
direction: {
|
|
3349
|
+
type: String,
|
|
3350
|
+
default: "x"
|
|
3384
3351
|
}
|
|
3385
|
-
return integerPart + decimalPart;
|
|
3386
3352
|
};
|
|
3353
|
+
var LewForm_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
3354
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
3355
|
+
__name: "LewForm",
|
|
3356
|
+
props: formProps,
|
|
3357
|
+
setup(__props) {
|
|
3358
|
+
return (_ctx, _cache) => {
|
|
3359
|
+
return openBlock(), createElementBlock("div", {
|
|
3360
|
+
class: "lew-form",
|
|
3361
|
+
style: normalizeStyle(`width:${_ctx.width}`)
|
|
3362
|
+
}, [
|
|
3363
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3364
|
+
], 4);
|
|
3365
|
+
};
|
|
3366
|
+
}
|
|
3367
|
+
});
|
|
3368
|
+
var LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-a827f69e"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/form/src/LewForm.vue"]]);
|
|
3369
|
+
var LewFormItem_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
3370
|
+
const _hoisted_1$n = { class: "lew-form-item-view" };
|
|
3371
|
+
const _hoisted_2$k = { class: "lew-form-item-tips" };
|
|
3372
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
3373
|
+
__name: "LewFormItem",
|
|
3374
|
+
props: {
|
|
3375
|
+
label: {
|
|
3376
|
+
type: String,
|
|
3377
|
+
default: "\u6807\u9898"
|
|
3378
|
+
},
|
|
3379
|
+
labelWidth: {
|
|
3380
|
+
type: String,
|
|
3381
|
+
default: ""
|
|
3382
|
+
},
|
|
3383
|
+
labelAlign: {
|
|
3384
|
+
type: String,
|
|
3385
|
+
default: ""
|
|
3386
|
+
},
|
|
3387
|
+
direction: {
|
|
3388
|
+
type: String,
|
|
3389
|
+
default: ""
|
|
3390
|
+
},
|
|
3391
|
+
labelSize: {
|
|
3392
|
+
type: String,
|
|
3393
|
+
default: "medium"
|
|
3394
|
+
}
|
|
3395
|
+
},
|
|
3396
|
+
setup(__props) {
|
|
3397
|
+
var _a2, _b;
|
|
3398
|
+
const props = __props;
|
|
3399
|
+
const parentProps = (_b = (_a2 = getCurrentInstance()) == null ? void 0 : _a2.parent) == null ? void 0 : _b.props;
|
|
3400
|
+
const { labelWidth, direction, labelAlign } = parentProps;
|
|
3401
|
+
const _labelWidth = ref(props.labelWidth || labelWidth || "auto");
|
|
3402
|
+
const _direction = ref(props.direction || direction || "x");
|
|
3403
|
+
const _labelAlign = ref(props.labelAlign || labelAlign || "end");
|
|
3404
|
+
return (_ctx, _cache) => {
|
|
3405
|
+
return openBlock(), createElementBlock("div", {
|
|
3406
|
+
class: normalizeClass(["lew-form-item", `lew-form-item-${_direction.value} lew-form-item-${_labelAlign.value}`])
|
|
3407
|
+
}, [
|
|
3408
|
+
createElementVNode("div", {
|
|
3409
|
+
class: "lew-form-item-label",
|
|
3410
|
+
style: normalizeStyle(`width: ${_labelWidth.value};height:${__props.labelSize}px;`)
|
|
3411
|
+
}, toDisplayString(props.label), 5),
|
|
3412
|
+
createElementVNode("div", _hoisted_1$n, [
|
|
3413
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
3414
|
+
withDirectives(createElementVNode("div", _hoisted_2$k, "\u8F93\u5165\u683C\u5F0F\u9519\u8BEF", 512), [
|
|
3415
|
+
[vShow, false]
|
|
3416
|
+
])
|
|
3417
|
+
])
|
|
3418
|
+
], 2);
|
|
3419
|
+
};
|
|
3420
|
+
}
|
|
3421
|
+
});
|
|
3422
|
+
var LewFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-ef952438"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/form/src/LewFormItem.vue"]]);
|
|
3387
3423
|
const checkboxProps = {
|
|
3388
3424
|
modelValue: {
|
|
3389
3425
|
type: Boolean,
|
|
@@ -3473,7 +3509,7 @@ const checkboxGroupProps = {
|
|
|
3473
3509
|
};
|
|
3474
3510
|
var LewCheckbox_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
3475
3511
|
const _withScopeId$5 = (n) => (pushScopeId("data-v-5594c4af"), n = n(), popScopeId(), n);
|
|
3476
|
-
const _hoisted_1$
|
|
3512
|
+
const _hoisted_1$m = {
|
|
3477
3513
|
key: 0,
|
|
3478
3514
|
class: "icon-checkbox-box"
|
|
3479
3515
|
};
|
|
@@ -3498,7 +3534,7 @@ const _hoisted_5$a = {
|
|
|
3498
3534
|
key: 1,
|
|
3499
3535
|
class: "lew-checkbox-label"
|
|
3500
3536
|
};
|
|
3501
|
-
const _sfc_main$
|
|
3537
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
3502
3538
|
__name: "LewCheckbox",
|
|
3503
3539
|
props: checkboxProps,
|
|
3504
3540
|
emits: ["change", "update:modelValue"],
|
|
@@ -3530,7 +3566,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3530
3566
|
return openBlock(), createElementBlock("label", {
|
|
3531
3567
|
class: normalizeClass(["lew-checkbox", unref(getCheckboxClassName)])
|
|
3532
3568
|
}, [
|
|
3533
|
-
_ctx.iconable ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3569
|
+
_ctx.iconable ? (openBlock(), createElementBlock("div", _hoisted_1$m, _hoisted_3$c)) : createCommentVNode("v-if", true),
|
|
3534
3570
|
withDirectives(createElementVNode("input", {
|
|
3535
3571
|
type: "checkbox",
|
|
3536
3572
|
checked: unref(modelValue),
|
|
@@ -3543,9 +3579,9 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3543
3579
|
};
|
|
3544
3580
|
}
|
|
3545
3581
|
});
|
|
3546
|
-
var LewCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3582
|
+
var LewCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-5594c4af"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/checkbox/src/LewCheckbox.vue"]]);
|
|
3547
3583
|
var LewCheckboxGroup_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
3548
|
-
const _sfc_main$
|
|
3584
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
3549
3585
|
__name: "LewCheckboxGroup",
|
|
3550
3586
|
props: checkboxGroupProps,
|
|
3551
3587
|
emits: ["change", "update:modelValue"],
|
|
@@ -3608,7 +3644,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3608
3644
|
};
|
|
3609
3645
|
}
|
|
3610
3646
|
});
|
|
3611
|
-
var LewCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3647
|
+
var LewCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-66b915c0"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/checkbox/src/LewCheckboxGroup.vue"]]);
|
|
3612
3648
|
const radioProps = {
|
|
3613
3649
|
checked: {
|
|
3614
3650
|
type: Boolean,
|
|
@@ -3695,7 +3731,7 @@ const radioGroupProps = {
|
|
|
3695
3731
|
};
|
|
3696
3732
|
var LewRadio_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
3697
3733
|
const _withScopeId$4 = (n) => (pushScopeId("data-v-365d2981"), n = n(), popScopeId(), n);
|
|
3698
|
-
const _hoisted_1$
|
|
3734
|
+
const _hoisted_1$l = {
|
|
3699
3735
|
key: 0,
|
|
3700
3736
|
class: "icon-radio-box"
|
|
3701
3737
|
};
|
|
@@ -3708,7 +3744,7 @@ const _hoisted_5$9 = {
|
|
|
3708
3744
|
key: 1,
|
|
3709
3745
|
class: "lew-radio-label"
|
|
3710
3746
|
};
|
|
3711
|
-
const _sfc_main$
|
|
3747
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
3712
3748
|
__name: "LewRadio",
|
|
3713
3749
|
props: radioProps,
|
|
3714
3750
|
emits: ["update:checked"],
|
|
@@ -3732,7 +3768,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
3732
3768
|
return openBlock(), createElementBlock("label", {
|
|
3733
3769
|
class: normalizeClass(["lew-radio", unref(getRadioClassName)])
|
|
3734
3770
|
}, [
|
|
3735
|
-
_ctx.iconable ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3771
|
+
_ctx.iconable ? (openBlock(), createElementBlock("div", _hoisted_1$l, _hoisted_3$b)) : createCommentVNode("v-if", true),
|
|
3736
3772
|
withDirectives(createElementVNode("input", {
|
|
3737
3773
|
type: "radio",
|
|
3738
3774
|
checked: _ctx.checked,
|
|
@@ -3745,9 +3781,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
3745
3781
|
};
|
|
3746
3782
|
}
|
|
3747
3783
|
});
|
|
3748
|
-
var LewRadio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3784
|
+
var LewRadio = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-365d2981"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/radio/src/LewRadio.vue"]]);
|
|
3749
3785
|
var LewRadioGroup_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
3750
|
-
const _sfc_main$
|
|
3786
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
3751
3787
|
__name: "LewRadioGroup",
|
|
3752
3788
|
props: radioGroupProps,
|
|
3753
3789
|
emits: ["change", "update:modelValue"],
|
|
@@ -3787,7 +3823,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
3787
3823
|
};
|
|
3788
3824
|
}
|
|
3789
3825
|
});
|
|
3790
|
-
var LewRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3826
|
+
var LewRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-642e37a4"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/radio/src/LewRadioGroup.vue"]]);
|
|
3791
3827
|
function unrefElement(elRef) {
|
|
3792
3828
|
var _a2;
|
|
3793
3829
|
const plain = resolveUnref(elRef);
|
|
@@ -4037,7 +4073,7 @@ const selectProps = {
|
|
|
4037
4073
|
var LewSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
4038
4074
|
var LewSelect_vue_vue_type_style_index_1_lang = "";
|
|
4039
4075
|
const _withScopeId$3 = (n) => (pushScopeId("data-v-326752a1"), n = n(), popScopeId(), n);
|
|
4040
|
-
const _hoisted_1$
|
|
4076
|
+
const _hoisted_1$k = {
|
|
4041
4077
|
key: 0,
|
|
4042
4078
|
class: "search-input"
|
|
4043
4079
|
};
|
|
@@ -4049,7 +4085,7 @@ const _hoisted_4$9 = {
|
|
|
4049
4085
|
};
|
|
4050
4086
|
const _hoisted_5$8 = ["onClick"];
|
|
4051
4087
|
const _hoisted_6$4 = { class: "lew-select-label" };
|
|
4052
|
-
const _sfc_main$
|
|
4088
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
4053
4089
|
__name: "LewSelect",
|
|
4054
4090
|
props: selectProps,
|
|
4055
4091
|
emits: ["update:modelValue", "change"],
|
|
@@ -4192,13 +4228,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4192
4228
|
class: normalizeClass(["lew-select", unref(getSelectClassName)])
|
|
4193
4229
|
}, [
|
|
4194
4230
|
createVNode(_component_lew_icon, {
|
|
4195
|
-
size:
|
|
4231
|
+
size: 16,
|
|
4196
4232
|
type: "chevron-down",
|
|
4197
4233
|
class: normalizeClass(["icon-select", { "icon-select-hide": _ctx.clearable && unref(getLabel) }])
|
|
4198
4234
|
}, null, 8, ["class"]),
|
|
4199
4235
|
_ctx.clearable ? (openBlock(), createBlock(_component_lew_icon, {
|
|
4200
4236
|
key: 0,
|
|
4201
|
-
size:
|
|
4237
|
+
size: 16,
|
|
4202
4238
|
type: "x-circle",
|
|
4203
4239
|
class: normalizeClass(["icon-clear", { "icon-clear-show": _ctx.clearable && unref(getLabel) }]),
|
|
4204
4240
|
onClick: withModifiers(clearHandle, ["stop"])
|
|
@@ -4220,7 +4256,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4220
4256
|
style: normalizeStyle(`width:${state.selectWidth}px`)
|
|
4221
4257
|
}, [
|
|
4222
4258
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
4223
|
-
_ctx.searchable ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4259
|
+
_ctx.searchable ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
4224
4260
|
withDirectives(createElementVNode("input", {
|
|
4225
4261
|
ref_key: "searchInputRef",
|
|
4226
4262
|
ref: searchInputRef,
|
|
@@ -4297,7 +4333,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4297
4333
|
};
|
|
4298
4334
|
}
|
|
4299
4335
|
});
|
|
4300
|
-
var LewSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4336
|
+
var LewSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-326752a1"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/select/src/LewSelect.vue"]]);
|
|
4301
4337
|
const selectMultipleProps = {
|
|
4302
4338
|
modelValue: {
|
|
4303
4339
|
type: Array,
|
|
@@ -4381,7 +4417,7 @@ const selectMultipleProps = {
|
|
|
4381
4417
|
var LewSelectMultiple_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
4382
4418
|
var LewSelectMultiple_vue_vue_type_style_index_1_lang = "";
|
|
4383
4419
|
const _withScopeId$2 = (n) => (pushScopeId("data-v-2ee3af9c"), n = n(), popScopeId(), n);
|
|
4384
|
-
const _hoisted_1$
|
|
4420
|
+
const _hoisted_1$j = {
|
|
4385
4421
|
key: 0,
|
|
4386
4422
|
class: "search-input"
|
|
4387
4423
|
};
|
|
@@ -4393,7 +4429,7 @@ const _hoisted_4$8 = {
|
|
|
4393
4429
|
};
|
|
4394
4430
|
const _hoisted_5$7 = ["onClick"];
|
|
4395
4431
|
const _hoisted_6$3 = { class: "lew-select-label" };
|
|
4396
|
-
const _sfc_main$
|
|
4432
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
4397
4433
|
__name: "LewSelectMultiple",
|
|
4398
4434
|
props: selectMultipleProps,
|
|
4399
4435
|
emits: ["update:modelValue", "change"],
|
|
@@ -4551,7 +4587,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
4551
4587
|
class: normalizeClass(["lew-select", unref(getSelectClassName)])
|
|
4552
4588
|
}, [
|
|
4553
4589
|
createVNode(_component_lew_icon, {
|
|
4554
|
-
size:
|
|
4590
|
+
size: 16,
|
|
4555
4591
|
type: "chevron-down",
|
|
4556
4592
|
class: normalizeClass(["icon-select", {
|
|
4557
4593
|
"icon-select-hide": _ctx.clearable && unref(getLabels) && unref(getLabels).length > 0
|
|
@@ -4559,7 +4595,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
4559
4595
|
}, null, 8, ["class"]),
|
|
4560
4596
|
_ctx.clearable ? (openBlock(), createBlock(_component_lew_icon, {
|
|
4561
4597
|
key: 0,
|
|
4562
|
-
size:
|
|
4598
|
+
size: 16,
|
|
4563
4599
|
type: "x-circle",
|
|
4564
4600
|
class: normalizeClass(["icon-clear", {
|
|
4565
4601
|
"icon-clear-show": _ctx.clearable && unref(getLabels) && unref(getLabels).length > 0
|
|
@@ -4604,7 +4640,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
4604
4640
|
style: normalizeStyle(`width:${state.selectWidth}px`)
|
|
4605
4641
|
}, [
|
|
4606
4642
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
4607
|
-
_ctx.searchable ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4643
|
+
_ctx.searchable ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
4608
4644
|
withDirectives(createElementVNode("input", {
|
|
4609
4645
|
ref_key: "searchInputRef",
|
|
4610
4646
|
ref: searchInputRef,
|
|
@@ -4681,8 +4717,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
4681
4717
|
};
|
|
4682
4718
|
}
|
|
4683
4719
|
});
|
|
4684
|
-
var LewSelectMultiple = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4685
|
-
const _props$
|
|
4720
|
+
var LewSelectMultiple = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-2ee3af9c"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/select-multiple/src/LewSelectMultiple.vue"]]);
|
|
4721
|
+
const _props$4 = {
|
|
4686
4722
|
modelValue: {
|
|
4687
4723
|
type: Boolean,
|
|
4688
4724
|
default: () => {
|
|
@@ -4707,11 +4743,11 @@ const _props$5 = {
|
|
|
4707
4743
|
};
|
|
4708
4744
|
var LewSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
4709
4745
|
const _withScopeId$1 = (n) => (pushScopeId("data-v-3d4d5d11"), n = n(), popScopeId(), n);
|
|
4710
|
-
const _hoisted_1$
|
|
4746
|
+
const _hoisted_1$i = ["disabled"];
|
|
4711
4747
|
const _hoisted_2$f = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "lew-switch-dot" }, null, -1));
|
|
4712
|
-
const _sfc_main$
|
|
4748
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
4713
4749
|
__name: "LewSwitch",
|
|
4714
|
-
props: _props$
|
|
4750
|
+
props: _props$4,
|
|
4715
4751
|
emits: ["update:modelValue", "click", "change"],
|
|
4716
4752
|
setup(__props, { emit }) {
|
|
4717
4753
|
const props = __props;
|
|
@@ -4758,7 +4794,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4758
4794
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => v.value = $event),
|
|
4759
4795
|
type: "checkbox",
|
|
4760
4796
|
disabled: _ctx.disabled
|
|
4761
|
-
}, null, 8, _hoisted_1$
|
|
4797
|
+
}, null, 8, _hoisted_1$i), [
|
|
4762
4798
|
[vShow, false],
|
|
4763
4799
|
[vModelCheckbox, v.value]
|
|
4764
4800
|
]),
|
|
@@ -4767,7 +4803,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4767
4803
|
};
|
|
4768
4804
|
}
|
|
4769
4805
|
});
|
|
4770
|
-
var LewSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4806
|
+
var LewSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-3d4d5d11"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/switch/src/LewSwitch.vue"]]);
|
|
4771
4807
|
//! moment.js
|
|
4772
4808
|
//! version : 2.29.4
|
|
4773
4809
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
@@ -8771,7 +8807,7 @@ const dateProps = {
|
|
|
8771
8807
|
}
|
|
8772
8808
|
};
|
|
8773
8809
|
var LewDate_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
8774
|
-
const _hoisted_1$
|
|
8810
|
+
const _hoisted_1$h = { class: "lew-date" };
|
|
8775
8811
|
const _hoisted_2$e = { class: "lew-date-control-left" };
|
|
8776
8812
|
const _hoisted_3$8 = { class: "cur-date" };
|
|
8777
8813
|
const _hoisted_4$7 = { class: "lew-date-control-right" };
|
|
@@ -8784,7 +8820,7 @@ const _hoisted_9$1 = {
|
|
|
8784
8820
|
class: "lew-date-item-cur"
|
|
8785
8821
|
};
|
|
8786
8822
|
const _hoisted_10$1 = { class: "lew-date-value" };
|
|
8787
|
-
const _sfc_main$
|
|
8823
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
8788
8824
|
__name: "LewDate",
|
|
8789
8825
|
props: dateProps,
|
|
8790
8826
|
emits: ["change", "update:modelValue"],
|
|
@@ -8856,7 +8892,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8856
8892
|
return (_ctx, _cache) => {
|
|
8857
8893
|
const _component_lew_button = resolveComponent("lew-button");
|
|
8858
8894
|
const _component_lew_flex = resolveComponent("lew-flex");
|
|
8859
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8895
|
+
return openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
8860
8896
|
createVNode(_component_lew_flex, {
|
|
8861
8897
|
x: "start",
|
|
8862
8898
|
mode: "between",
|
|
@@ -8927,9 +8963,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8927
8963
|
};
|
|
8928
8964
|
}
|
|
8929
8965
|
});
|
|
8930
|
-
var LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
8966
|
+
var LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-29f4866a"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/date-picker/src/LewDate.vue"]]);
|
|
8931
8967
|
var LewDateRange_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
8932
|
-
const _hoisted_1$
|
|
8968
|
+
const _hoisted_1$g = { class: "lew-date-range" };
|
|
8933
8969
|
const _hoisted_2$d = { class: "lew-date" };
|
|
8934
8970
|
const _hoisted_3$7 = { class: "lew-date-control-left" };
|
|
8935
8971
|
const _hoisted_4$6 = { class: "cur-date" };
|
|
@@ -8952,7 +8988,7 @@ const _hoisted_17 = {
|
|
|
8952
8988
|
key: 0,
|
|
8953
8989
|
class: "lew-date-item-cur"
|
|
8954
8990
|
};
|
|
8955
|
-
const _sfc_main$
|
|
8991
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
8956
8992
|
__name: "LewDateRange",
|
|
8957
8993
|
props: dateRangeProps,
|
|
8958
8994
|
emits: ["change", "update:modelValue"],
|
|
@@ -9226,7 +9262,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9226
9262
|
return (_ctx, _cache) => {
|
|
9227
9263
|
const _component_lew_button = resolveComponent("lew-button");
|
|
9228
9264
|
const _component_lew_flex = resolveComponent("lew-flex");
|
|
9229
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9265
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
9230
9266
|
createElementVNode("div", _hoisted_2$d, [
|
|
9231
9267
|
createVNode(_component_lew_flex, {
|
|
9232
9268
|
x: "start",
|
|
@@ -9371,11 +9407,11 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9371
9407
|
};
|
|
9372
9408
|
}
|
|
9373
9409
|
});
|
|
9374
|
-
var LewDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
9410
|
+
var LewDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-37bbe4a3"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/date-picker/src/LewDateRange.vue"]]);
|
|
9375
9411
|
var LewDatePicker_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
9376
|
-
const _hoisted_1$
|
|
9412
|
+
const _hoisted_1$f = { class: "lew-date-picker-input" };
|
|
9377
9413
|
const _hoisted_2$c = { class: "lew-date-picker-placeholder" };
|
|
9378
|
-
const _sfc_main$
|
|
9414
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
9379
9415
|
__name: "LewDatePicker",
|
|
9380
9416
|
props: datePickerProps,
|
|
9381
9417
|
emits: ["change", "update:modelValue"],
|
|
@@ -9426,7 +9462,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
9426
9462
|
createElementVNode("div", {
|
|
9427
9463
|
class: normalizeClass(["lew-date-picker-view", unref(classObject)])
|
|
9428
9464
|
}, [
|
|
9429
|
-
createElementVNode("div", _hoisted_1$
|
|
9465
|
+
createElementVNode("div", _hoisted_1$f, [
|
|
9430
9466
|
withDirectives(createElementVNode("div", _hoisted_2$c, " \u8BF7\u9009\u62E9\u65E5\u671F ", 512), [
|
|
9431
9467
|
[vShow, !dateValue.value]
|
|
9432
9468
|
]),
|
|
@@ -9435,7 +9471,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
9435
9471
|
]),
|
|
9436
9472
|
createVNode(_component_lew_icon, {
|
|
9437
9473
|
class: "lew-date-picker-icon",
|
|
9438
|
-
size:
|
|
9474
|
+
size: 16,
|
|
9439
9475
|
type: "calendar"
|
|
9440
9476
|
})
|
|
9441
9477
|
])
|
|
@@ -9454,15 +9490,15 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
9454
9490
|
};
|
|
9455
9491
|
}
|
|
9456
9492
|
});
|
|
9457
|
-
var LewDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
9493
|
+
var LewDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-4c4a62d0"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/date-picker/src/LewDatePicker.vue"]]);
|
|
9458
9494
|
var LewDateRangePicker_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
9459
9495
|
const _withScopeId = (n) => (pushScopeId("data-v-f13243de"), n = n(), popScopeId(), n);
|
|
9460
|
-
const _hoisted_1$
|
|
9496
|
+
const _hoisted_1$e = { class: "lew-date-picker-input" };
|
|
9461
9497
|
const _hoisted_2$b = { class: "lew-date-picker-placeholder" };
|
|
9462
9498
|
const _hoisted_3$6 = { class: "lew-date-picker-dateValue lew-date-picker-start" };
|
|
9463
9499
|
const _hoisted_4$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "lew-date-picker-mid" }, "-", -1));
|
|
9464
9500
|
const _hoisted_5$4 = { class: "lew-date-picker-dateValue lew-date-picker-end" };
|
|
9465
|
-
const _sfc_main$
|
|
9501
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
9466
9502
|
__name: "LewDateRangePicker",
|
|
9467
9503
|
props: dateRangePickerProps,
|
|
9468
9504
|
emits: ["change", "update:modelValue"],
|
|
@@ -9513,7 +9549,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
9513
9549
|
createElementVNode("div", {
|
|
9514
9550
|
class: normalizeClass(["lew-date-picker-view", unref(classObject)])
|
|
9515
9551
|
}, [
|
|
9516
|
-
createElementVNode("div", _hoisted_1$
|
|
9552
|
+
createElementVNode("div", _hoisted_1$e, [
|
|
9517
9553
|
withDirectives(createElementVNode("div", _hoisted_2$b, " \u8BF7\u9009\u62E9\u65E5\u671F ", 512), [
|
|
9518
9554
|
[vShow, !dateValue.value]
|
|
9519
9555
|
]),
|
|
@@ -9522,7 +9558,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
9522
9558
|
createElementVNode("div", _hoisted_5$4, toDisplayString(dateValue.value[1]), 1),
|
|
9523
9559
|
createVNode(_component_lew_icon, {
|
|
9524
9560
|
class: "lew-date-picker-icon",
|
|
9525
|
-
size:
|
|
9561
|
+
size: 16,
|
|
9526
9562
|
type: "calendar"
|
|
9527
9563
|
})
|
|
9528
9564
|
])
|
|
@@ -9541,7 +9577,75 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
9541
9577
|
};
|
|
9542
9578
|
}
|
|
9543
9579
|
});
|
|
9544
|
-
var LewDateRangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
9580
|
+
var LewDateRangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-f13243de"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/date-picker/src/LewDateRangePicker.vue"]]);
|
|
9581
|
+
const magicNumberProps = {
|
|
9582
|
+
value: {
|
|
9583
|
+
type: Number,
|
|
9584
|
+
default: 999.99
|
|
9585
|
+
},
|
|
9586
|
+
size: {
|
|
9587
|
+
type: Number,
|
|
9588
|
+
default: 16
|
|
9589
|
+
}
|
|
9590
|
+
};
|
|
9591
|
+
var LewMagicNumber_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
9592
|
+
const _hoisted_1$d = ["textContent"];
|
|
9593
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
9594
|
+
__name: "LewMagicNumber",
|
|
9595
|
+
props: magicNumberProps,
|
|
9596
|
+
setup(__props) {
|
|
9597
|
+
const props = __props;
|
|
9598
|
+
let state = reactive({
|
|
9599
|
+
numberArr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
9600
|
+
});
|
|
9601
|
+
const getValueArr = computed(() => {
|
|
9602
|
+
if (typeof props.value !== "number") {
|
|
9603
|
+
throw new Error("LewMagicNumber props value \u5FC5\u987B\u4E3Anumber\u7C7B\u578B\uFF01");
|
|
9604
|
+
}
|
|
9605
|
+
return numFormat(props.value).split("");
|
|
9606
|
+
});
|
|
9607
|
+
const getMagicNumberStyle = computed(() => {
|
|
9608
|
+
const { size } = props;
|
|
9609
|
+
return `height:${size}px;`;
|
|
9610
|
+
});
|
|
9611
|
+
const getItemStyle = computed(() => (item) => {
|
|
9612
|
+
const { size } = props;
|
|
9613
|
+
let index2 = parseInt(item);
|
|
9614
|
+
return `transform: translateY(-${size * index2}px)`;
|
|
9615
|
+
});
|
|
9616
|
+
const getNumStyle = computed(() => {
|
|
9617
|
+
const { size } = props;
|
|
9618
|
+
return `font-size:${size}px; line-height:${size}px; height:${size}px;`;
|
|
9619
|
+
});
|
|
9620
|
+
return (_ctx, _cache) => {
|
|
9621
|
+
return openBlock(), createElementBlock("div", {
|
|
9622
|
+
class: "lew-magic-number",
|
|
9623
|
+
style: normalizeStyle(unref(getMagicNumberStyle))
|
|
9624
|
+
}, [
|
|
9625
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getValueArr), (item, index2) => {
|
|
9626
|
+
return openBlock(), createElementBlock("div", {
|
|
9627
|
+
style: normalizeStyle(unref(getItemStyle)(item)),
|
|
9628
|
+
class: "lew-magic-number-item",
|
|
9629
|
+
key: index2
|
|
9630
|
+
}, [
|
|
9631
|
+
item === "." || item === "," ? (openBlock(), createElementBlock("span", {
|
|
9632
|
+
key: 0,
|
|
9633
|
+
style: normalizeStyle(unref(getNumStyle))
|
|
9634
|
+
}, toDisplayString(item), 5)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(state).numberArr, (n, index22) => {
|
|
9635
|
+
return openBlock(), createElementBlock("span", {
|
|
9636
|
+
class: "lew-magic-number-num",
|
|
9637
|
+
style: normalizeStyle(unref(getNumStyle)),
|
|
9638
|
+
key: index22,
|
|
9639
|
+
textContent: toDisplayString(n)
|
|
9640
|
+
}, null, 12, _hoisted_1$d);
|
|
9641
|
+
}), 128))
|
|
9642
|
+
], 4);
|
|
9643
|
+
}), 128))
|
|
9644
|
+
], 4);
|
|
9645
|
+
};
|
|
9646
|
+
}
|
|
9647
|
+
});
|
|
9648
|
+
var LewMagicNumber = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-d80c7a98"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/magic-number/src/LewMagicNumber.vue"]]);
|
|
9545
9649
|
const tableProps = {
|
|
9546
9650
|
selectedKey: {
|
|
9547
9651
|
type: Array,
|
|
@@ -9712,6 +9816,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
9712
9816
|
selectedKey.value.splice(index2, 1);
|
|
9713
9817
|
}
|
|
9714
9818
|
}
|
|
9819
|
+
initCheckAll();
|
|
9820
|
+
};
|
|
9821
|
+
const initCheckAll = () => {
|
|
9715
9822
|
const isAll = selectedKey.value.length > 0 && selectedKey.value.length === props.dataSource.length;
|
|
9716
9823
|
if (isAll) {
|
|
9717
9824
|
state.checkAll = true;
|
|
@@ -9730,6 +9837,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
9730
9837
|
initCheckbox();
|
|
9731
9838
|
watchArray(selectedKey, () => {
|
|
9732
9839
|
initCheckbox();
|
|
9840
|
+
initCheckAll();
|
|
9733
9841
|
});
|
|
9734
9842
|
onMounted(() => {
|
|
9735
9843
|
tableObserve();
|
|
@@ -10013,7 +10121,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
10013
10121
|
}
|
|
10014
10122
|
});
|
|
10015
10123
|
var LewTable = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/table/src/LewTable.vue"]]);
|
|
10016
|
-
const _props$
|
|
10124
|
+
const _props$3 = {
|
|
10017
10125
|
total: {
|
|
10018
10126
|
type: Number,
|
|
10019
10127
|
default: 100
|
|
@@ -10064,7 +10172,7 @@ const _hoisted_1$b = { class: "lew-pagination" };
|
|
|
10064
10172
|
const _hoisted_2$9 = ["onClick"];
|
|
10065
10173
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
10066
10174
|
__name: "LewPagination",
|
|
10067
|
-
props: _props$
|
|
10175
|
+
props: _props$3,
|
|
10068
10176
|
emits: [
|
|
10069
10177
|
"update:currentPage",
|
|
10070
10178
|
"update:total",
|
|
@@ -10341,24 +10449,30 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
10341
10449
|
}
|
|
10342
10450
|
});
|
|
10343
10451
|
var LewAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-3ce1779b"], ["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/avatar/src/LewAvatar.vue"]]);
|
|
10452
|
+
const titleProps = {
|
|
10453
|
+
bold: {
|
|
10454
|
+
type: Number,
|
|
10455
|
+
default: 500
|
|
10456
|
+
},
|
|
10457
|
+
size: {
|
|
10458
|
+
type: Number,
|
|
10459
|
+
default: 24
|
|
10460
|
+
}
|
|
10461
|
+
};
|
|
10344
10462
|
var LewTitle_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
10345
10463
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
10346
10464
|
__name: "LewTitle",
|
|
10347
|
-
props:
|
|
10348
|
-
bold: {
|
|
10349
|
-
type: Number,
|
|
10350
|
-
default: 500
|
|
10351
|
-
},
|
|
10352
|
-
size: {
|
|
10353
|
-
type: String,
|
|
10354
|
-
default: "24px"
|
|
10355
|
-
}
|
|
10356
|
-
},
|
|
10465
|
+
props: titleProps,
|
|
10357
10466
|
setup(__props) {
|
|
10467
|
+
const props = __props;
|
|
10468
|
+
const titleStyle = computed(() => {
|
|
10469
|
+
const { bold, size } = props;
|
|
10470
|
+
return `font-weight:${bold};font-size:${size}px`;
|
|
10471
|
+
});
|
|
10358
10472
|
return (_ctx, _cache) => {
|
|
10359
10473
|
return openBlock(), createElementBlock("div", {
|
|
10360
10474
|
class: "lew-title",
|
|
10361
|
-
style: normalizeStyle(
|
|
10475
|
+
style: normalizeStyle(unref(titleStyle))
|
|
10362
10476
|
}, [
|
|
10363
10477
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
10364
10478
|
], 4);
|
|
@@ -10404,7 +10518,7 @@ const buttonProps = {
|
|
|
10404
10518
|
var LewButton_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
10405
10519
|
const _hoisted_1$9 = ["disabled"];
|
|
10406
10520
|
const _hoisted_2$7 = {
|
|
10407
|
-
key:
|
|
10521
|
+
key: 2,
|
|
10408
10522
|
class: "lew-button-text"
|
|
10409
10523
|
};
|
|
10410
10524
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
@@ -10458,13 +10572,17 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
10458
10572
|
size: unref(getIconSize),
|
|
10459
10573
|
type: _ctx.icon
|
|
10460
10574
|
}, null, 8, ["size", "type"])) : createCommentVNode("v-if", true),
|
|
10461
|
-
_ctx.
|
|
10462
|
-
|
|
10463
|
-
key: 2,
|
|
10575
|
+
_ctx.loading || _loading.value ? (openBlock(), createBlock(unref(script), {
|
|
10576
|
+
key: 1,
|
|
10464
10577
|
class: normalizeClass(["lew-loading-icon", {
|
|
10465
10578
|
"lew-loading-icon-show": (_loading.value || _ctx.loading) && !_ctx.disabled
|
|
10466
|
-
}])
|
|
10467
|
-
|
|
10579
|
+
}]),
|
|
10580
|
+
size: unref(getIconSize),
|
|
10581
|
+
animation: "spin",
|
|
10582
|
+
"animation-speed": "fast",
|
|
10583
|
+
type: "loader"
|
|
10584
|
+
}, null, 8, ["size", "class"])) : createCommentVNode("v-if", true),
|
|
10585
|
+
_ctx.text ? (openBlock(), createElementBlock("span", _hoisted_2$7, toDisplayString(_ctx.text), 1)) : createCommentVNode("v-if", true)
|
|
10468
10586
|
], 10, _hoisted_1$9);
|
|
10469
10587
|
};
|
|
10470
10588
|
}
|
|
@@ -10497,9 +10615,17 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
10497
10615
|
__name: "LewBadge",
|
|
10498
10616
|
props: badgeProps,
|
|
10499
10617
|
setup(__props) {
|
|
10618
|
+
const props = __props;
|
|
10619
|
+
const badgeClassName = computed(() => {
|
|
10620
|
+
const { round: round2, type } = props;
|
|
10621
|
+
return getClass$1("lew-badge", {
|
|
10622
|
+
round: round2,
|
|
10623
|
+
type
|
|
10624
|
+
});
|
|
10625
|
+
});
|
|
10500
10626
|
return (_ctx, _cache) => {
|
|
10501
10627
|
return openBlock(), createElementBlock("div", {
|
|
10502
|
-
class: normalizeClass(["lew-badge",
|
|
10628
|
+
class: normalizeClass(["lew-badge", unref(badgeClassName)])
|
|
10503
10629
|
}, [
|
|
10504
10630
|
_ctx.value ? (openBlock(), createElementBlock("div", _hoisted_1$8, toDisplayString(_ctx.value), 1)) : createCommentVNode("v-if", true),
|
|
10505
10631
|
!_ctx.value ? (openBlock(), createElementBlock("div", _hoisted_2$6)) : createCommentVNode("v-if", true),
|
|
@@ -10509,26 +10635,18 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
10509
10635
|
}
|
|
10510
10636
|
});
|
|
10511
10637
|
var LewBadge = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/badge/src/LewBadge.vue"]]);
|
|
10512
|
-
const
|
|
10513
|
-
const typeRules = ["primary", "info", "success", "error", "warning", "normal"];
|
|
10514
|
-
const _props$3 = {
|
|
10638
|
+
const tagProps = {
|
|
10515
10639
|
type: {
|
|
10516
10640
|
type: String,
|
|
10517
|
-
default: "normal"
|
|
10518
|
-
validator(value) {
|
|
10519
|
-
return typeRules.includes(value);
|
|
10520
|
-
}
|
|
10641
|
+
default: "normal"
|
|
10521
10642
|
},
|
|
10522
10643
|
size: {
|
|
10523
10644
|
type: String,
|
|
10524
|
-
default: "medium"
|
|
10525
|
-
validator(value) {
|
|
10526
|
-
return sizeRules.includes(value);
|
|
10527
|
-
}
|
|
10645
|
+
default: "medium"
|
|
10528
10646
|
},
|
|
10529
10647
|
maxWidth: {
|
|
10530
|
-
type:
|
|
10531
|
-
default:
|
|
10648
|
+
type: Number,
|
|
10649
|
+
default: 220
|
|
10532
10650
|
},
|
|
10533
10651
|
round: {
|
|
10534
10652
|
type: Boolean,
|
|
@@ -10541,14 +10659,6 @@ const _props$3 = {
|
|
|
10541
10659
|
disabled: {
|
|
10542
10660
|
type: Boolean,
|
|
10543
10661
|
default: false
|
|
10544
|
-
},
|
|
10545
|
-
to: {
|
|
10546
|
-
type: String,
|
|
10547
|
-
default: ""
|
|
10548
|
-
},
|
|
10549
|
-
bold: {
|
|
10550
|
-
type: Boolean,
|
|
10551
|
-
default: false
|
|
10552
10662
|
}
|
|
10553
10663
|
};
|
|
10554
10664
|
var LewTag_vue_vue_type_style_index_0_lang = "";
|
|
@@ -10558,11 +10668,10 @@ const _hoisted_3$4 = { class: "lew-tag-right" };
|
|
|
10558
10668
|
const _hoisted_4$3 = ["onClick"];
|
|
10559
10669
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
10560
10670
|
__name: "LewTag",
|
|
10561
|
-
props:
|
|
10671
|
+
props: tagProps,
|
|
10562
10672
|
emits: ["close"],
|
|
10563
10673
|
setup(__props, { emit }) {
|
|
10564
10674
|
const props = __props;
|
|
10565
|
-
const { lewTo } = useLewTo();
|
|
10566
10675
|
const close = () => {
|
|
10567
10676
|
if (props.disabled) {
|
|
10568
10677
|
return;
|
|
@@ -10572,25 +10681,24 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10572
10681
|
const getSize = computed(() => {
|
|
10573
10682
|
switch (props.size) {
|
|
10574
10683
|
case "small":
|
|
10575
|
-
return
|
|
10684
|
+
return 12;
|
|
10576
10685
|
case "medium":
|
|
10577
|
-
return
|
|
10686
|
+
return 14;
|
|
10578
10687
|
case "large":
|
|
10579
|
-
return
|
|
10688
|
+
return 16;
|
|
10580
10689
|
default:
|
|
10581
|
-
return
|
|
10690
|
+
return 14;
|
|
10582
10691
|
}
|
|
10583
10692
|
});
|
|
10693
|
+
const tagClassName = computed(() => {
|
|
10694
|
+
const { size, type, round: round2, disabled } = props;
|
|
10695
|
+
return getClass$1("lew-tag", { size, type, round: round2, disabled });
|
|
10696
|
+
});
|
|
10584
10697
|
return (_ctx, _cache) => {
|
|
10585
10698
|
const _component_lew_icon = resolveComponent("lew-icon");
|
|
10586
10699
|
return openBlock(), createElementBlock("div", {
|
|
10587
|
-
class: normalizeClass(["lew-tag",
|
|
10588
|
-
|
|
10589
|
-
${_ctx.round ? "lew-tag-round" : ""}
|
|
10590
|
-
${_ctx.bold ? "lew-tag-bold" : ""}
|
|
10591
|
-
${_ctx.disabled ? "lew-tag-disabled" : ""} ${_ctx.to ? "lew-tag-to" : ""}`]),
|
|
10592
|
-
style: normalizeStyle(`max-width:${_ctx.maxWidth}`),
|
|
10593
|
-
onClick: _cache[0] || (_cache[0] = ($event) => unref(lewTo)(_ctx.to))
|
|
10700
|
+
class: normalizeClass(["lew-tag", unref(tagClassName)]),
|
|
10701
|
+
style: normalizeStyle(`max-width:${_ctx.maxWidth}px`)
|
|
10594
10702
|
}, [
|
|
10595
10703
|
createElementVNode("div", _hoisted_1$7, [
|
|
10596
10704
|
renderSlot(_ctx.$slots, "left")
|
|
@@ -10646,7 +10754,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
10646
10754
|
}, [
|
|
10647
10755
|
createElementVNode("div", _hoisted_2$4, [
|
|
10648
10756
|
createVNode(_component_lew_icon, {
|
|
10649
|
-
size:
|
|
10757
|
+
size: 16,
|
|
10650
10758
|
type: unref(getIconType)(item.type)
|
|
10651
10759
|
}, null, 8, ["type"])
|
|
10652
10760
|
]),
|
|
@@ -10658,7 +10766,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
10658
10766
|
]),
|
|
10659
10767
|
item.closeable ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
10660
10768
|
createVNode(_component_lew_icon, {
|
|
10661
|
-
size:
|
|
10769
|
+
size: 16,
|
|
10662
10770
|
class: "btn-close",
|
|
10663
10771
|
type: "x",
|
|
10664
10772
|
onClick: ($event) => emit("close", i)
|
|
@@ -13963,14 +14071,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13963
14071
|
},
|
|
13964
14072
|
setup(__props) {
|
|
13965
14073
|
const isShowCode = ref(false);
|
|
13966
|
-
const outCodeRef = shallowRef(null);
|
|
13967
14074
|
const style = computed(() => {
|
|
13968
|
-
var _a2, _b;
|
|
13969
14075
|
if (isShowCode.value) {
|
|
13970
|
-
|
|
13971
|
-
return { height: height ? `${height}px` : "auto" };
|
|
14076
|
+
return { maxHeight: `400px` };
|
|
13972
14077
|
}
|
|
13973
|
-
return {
|
|
14078
|
+
return { maxHeight: 0 };
|
|
13974
14079
|
});
|
|
13975
14080
|
return (_ctx, _cache) => {
|
|
13976
14081
|
const _component_lew_tag = resolveComponent("lew-tag");
|
|
@@ -13978,7 +14083,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13978
14083
|
const _component_lew_icon = resolveComponent("lew-icon");
|
|
13979
14084
|
const _directive_highlight = resolveDirective("highlight");
|
|
13980
14085
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
13981
|
-
createVNode(_component_lew_title, { size:
|
|
14086
|
+
createVNode(_component_lew_title, { size: 16 }, {
|
|
13982
14087
|
default: withCtx(() => [
|
|
13983
14088
|
createTextVNode(toDisplayString(__props.title) + " ", 1),
|
|
13984
14089
|
__props.tag ? (openBlock(), createBlock(_component_lew_tag, {
|
|
@@ -13999,8 +14104,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13999
14104
|
renderSlot(_ctx.$slots, "default")
|
|
14000
14105
|
]),
|
|
14001
14106
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
14002
|
-
ref_key: "outCodeRef",
|
|
14003
|
-
ref: outCodeRef,
|
|
14004
14107
|
class: "hl-pre",
|
|
14005
14108
|
style: normalizeStyle(unref(style))
|
|
14006
14109
|
}, [
|
|
@@ -14020,11 +14123,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
14020
14123
|
createElementVNode("div", _hoisted_5, [
|
|
14021
14124
|
!isShowCode.value ? (openBlock(), createBlock(_component_lew_icon, {
|
|
14022
14125
|
key: 0,
|
|
14023
|
-
size:
|
|
14126
|
+
size: 16,
|
|
14024
14127
|
type: "chevron-down"
|
|
14025
14128
|
})) : (openBlock(), createBlock(_component_lew_icon, {
|
|
14026
14129
|
key: 1,
|
|
14027
|
-
size:
|
|
14130
|
+
size: 16,
|
|
14028
14131
|
type: "chevron-up"
|
|
14029
14132
|
}))
|
|
14030
14133
|
]),
|
|
@@ -14465,6 +14568,7 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
14465
14568
|
LewDateRange,
|
|
14466
14569
|
LewDatePicker,
|
|
14467
14570
|
LewDateRangePicker,
|
|
14571
|
+
LewMagicNumber,
|
|
14468
14572
|
LewTable,
|
|
14469
14573
|
LewPagination,
|
|
14470
14574
|
LewAvatar,
|
|
@@ -14694,7 +14798,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14694
14798
|
}
|
|
14695
14799
|
};
|
|
14696
14800
|
return (_ctx, _cache) => {
|
|
14697
|
-
const _component_lew_flex = resolveComponent("lew-flex");
|
|
14698
14801
|
return openBlock(), createElementBlock("div", null, [
|
|
14699
14802
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
14700
14803
|
_visible.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -14772,12 +14875,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14772
14875
|
}, null, 8, ["type"])
|
|
14773
14876
|
], 2)
|
|
14774
14877
|
]),
|
|
14775
|
-
createVNode(
|
|
14878
|
+
createVNode(unref(LewFlex), {
|
|
14879
|
+
class: "right",
|
|
14880
|
+
y: "start"
|
|
14881
|
+
}, {
|
|
14776
14882
|
default: withCtx(() => [
|
|
14777
14883
|
createElementVNode("main", null, [
|
|
14778
14884
|
renderSlot(_ctx.$slots, "content", {}, void 0, true)
|
|
14779
14885
|
]),
|
|
14780
|
-
createVNode(
|
|
14886
|
+
createVNode(unref(LewFlex), { x: "end" }, {
|
|
14781
14887
|
default: withCtx(() => [
|
|
14782
14888
|
_ctx.cancelText ? (openBlock(), createBlock(unref(LewButton), {
|
|
14783
14889
|
key: 0,
|
|
@@ -15128,4 +15234,4 @@ const install = function(Vue) {
|
|
|
15128
15234
|
var index = {
|
|
15129
15235
|
install
|
|
15130
15236
|
};
|
|
15131
|
-
export { LewAlert, LewAvatar, LewBackTop, LewBadge, LewBreadcrumb, LewButton, LewCheckbox, LewCheckboxGroup, LewDate, LewDatePicker, LewDateRange, LewDateRangePicker, LewDemoBox, index$7 as LewDialog, LewDrawer, LewDropdown, LewFlex, LewForm, LewFormItem, script as LewIcon, LewInput, LewInputPro, LewInputTag, LewLayout, index$1 as LewLoading, LewMark, index$8 as LewMessage, LewModal, index$3 as LewNotification, LewPagination, LewPopok, LewPopover, LewRadioGroup, LewResult, LewSelect, LewSelectMultiple, LewSpace, LewSteps, LewSwitch, LewTable, LewTabs, LewTag, LewTextTrim, LewTitle, index$5 as LewVBacktop, index$6 as LewVTooltip, index as default };
|
|
15237
|
+
export { LewAlert, LewAvatar, LewBackTop, LewBadge, LewBreadcrumb, LewButton, LewCheckbox, LewCheckboxGroup, LewDate, LewDatePicker, LewDateRange, LewDateRangePicker, LewDemoBox, index$7 as LewDialog, LewDrawer, LewDropdown, LewFlex, LewForm, LewFormItem, script as LewIcon, LewInput, LewInputPro, LewInputTag, LewLayout, index$1 as LewLoading, LewMagicNumber, LewMark, index$8 as LewMessage, LewModal, index$3 as LewNotification, LewPagination, LewPopok, LewPopover, LewRadioGroup, LewResult, LewSelect, LewSelectMultiple, LewSpace, LewSteps, LewSwitch, LewTable, LewTabs, LewTag, LewTextTrim, LewTitle, index$5 as LewVBacktop, index$6 as LewVTooltip, index as default };
|