@xjw_/vue3-npm-system 1.1.0 → 1.2.0
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/index.es.js +6 -80
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -80
- package/dist/index.umd.js.map +1 -1
- package/dist/types/components/XSearchBar.vue.d.ts +0 -2
- package/dist/vue3-npm-system.css +31 -34
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1759,7 +1759,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1759
1759
|
const slots = useSlots();
|
|
1760
1760
|
const showMore = ref(false);
|
|
1761
1761
|
const queryFormRef = ref();
|
|
1762
|
-
const vxeFormRef = ref();
|
|
1763
1762
|
const dynamicFormRef = ref();
|
|
1764
1763
|
const componentMap = {
|
|
1765
1764
|
"el-input": ElInput,
|
|
@@ -1783,7 +1782,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1783
1782
|
}
|
|
1784
1783
|
});
|
|
1785
1784
|
const hasFormSlot = computed(() => !!slots.form);
|
|
1786
|
-
const hasVxeFormSlot = computed(() => !!slots.vxeForm);
|
|
1787
1785
|
const hasDynamicFields = computed(() => parsedSearchList.value.length > 0);
|
|
1788
1786
|
const vxeFormSpan = computed(() => Math.floor(24 / props.columns));
|
|
1789
1787
|
const formContainerStyle = computed(() => ({
|
|
@@ -1874,9 +1872,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1874
1872
|
dynamicFormRef.value.resetFields();
|
|
1875
1873
|
});
|
|
1876
1874
|
}
|
|
1877
|
-
if (hasVxeFormSlot.value && vxeFormRef.value && typeof vxeFormRef.value.reset === "function") {
|
|
1878
|
-
vxeFormRef.value.reset();
|
|
1879
|
-
}
|
|
1880
1875
|
if (props.queryForm && Object.keys(props.queryForm).length > 0) {
|
|
1881
1876
|
const emptyForm = {};
|
|
1882
1877
|
Object.keys(props.queryForm).forEach((key) => {
|
|
@@ -1896,25 +1891,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1896
1891
|
}
|
|
1897
1892
|
function searchParentList() {
|
|
1898
1893
|
if (props.rules && Object.keys(props.rules).length > 0) {
|
|
1899
|
-
if (hasVxeFormSlot.value && vxeFormRef.value) {
|
|
1900
|
-
return new Promise((resolve, reject) => {
|
|
1901
|
-
if (typeof vxeFormRef.value.validate === "function") {
|
|
1902
|
-
vxeFormRef.value.validate((valid) => {
|
|
1903
|
-
if (valid) {
|
|
1904
|
-
showMore.value = true;
|
|
1905
|
-
reject(false);
|
|
1906
|
-
} else {
|
|
1907
|
-
showMore.value = false;
|
|
1908
|
-
emit("list-update", 1);
|
|
1909
|
-
resolve(true);
|
|
1910
|
-
}
|
|
1911
|
-
});
|
|
1912
|
-
} else {
|
|
1913
|
-
emit("list-update", 1);
|
|
1914
|
-
resolve(true);
|
|
1915
|
-
}
|
|
1916
|
-
});
|
|
1917
|
-
}
|
|
1918
1894
|
if (hasFormSlot.value && queryFormRef.value && typeof queryFormRef.value.validate === "function") {
|
|
1919
1895
|
return new Promise((resolve, reject) => {
|
|
1920
1896
|
queryFormRef.value.validate((valid) => {
|
|
@@ -1957,13 +1933,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1957
1933
|
}, { deep: true });
|
|
1958
1934
|
__expose({
|
|
1959
1935
|
queryFormRef,
|
|
1960
|
-
vxeFormRef,
|
|
1961
1936
|
dynamicFormRef
|
|
1962
1937
|
});
|
|
1963
1938
|
return (_ctx, _cache) => {
|
|
1964
1939
|
const _component_el_button = resolveComponent("el-button");
|
|
1965
|
-
const _component_vxe_form_item = resolveComponent("vxe-form-item");
|
|
1966
|
-
const _component_vxe_form = resolveComponent("vxe-form");
|
|
1967
1940
|
return openBlock(), createElementBlock("div", {
|
|
1968
1941
|
class: "search",
|
|
1969
1942
|
style: normalizeStyle({ paddingBottom: __props.paddingBottom })
|
|
@@ -2101,55 +2074,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2101
2074
|
]),
|
|
2102
2075
|
_: 3
|
|
2103
2076
|
}, 8, ["rules", "model", "span", "label-width"])) : createCommentVNode("", true),
|
|
2104
|
-
hasVxeFormSlot.value ? (openBlock(), createBlock(_component_vxe_form, {
|
|
2105
|
-
key: 1,
|
|
2106
|
-
data: __props.queryForm,
|
|
2107
|
-
rules: __props.rules,
|
|
2108
|
-
span: vxeFormSpan.value,
|
|
2109
|
-
titleColon: "",
|
|
2110
|
-
vertical: "",
|
|
2111
|
-
"title-align": "right",
|
|
2112
|
-
"title-width": __props.titleWidth,
|
|
2113
|
-
size: "medium",
|
|
2114
|
-
ref_key: "vxeFormRef",
|
|
2115
|
-
ref: vxeFormRef
|
|
2116
|
-
}, {
|
|
2117
|
-
default: withCtx(() => [
|
|
2118
|
-
renderSlot(_ctx.$slots, "vxeForm", {}, void 0, true),
|
|
2119
|
-
!__props.showSearch ? (openBlock(), createBlock(_component_vxe_form_item, {
|
|
2120
|
-
key: 0,
|
|
2121
|
-
span: buttonItemSpan.value,
|
|
2122
|
-
align: "right"
|
|
2123
|
-
}, {
|
|
2124
|
-
default: withCtx(() => [
|
|
2125
|
-
createVNode(_component_el_button, {
|
|
2126
|
-
plain: "",
|
|
2127
|
-
onClick: reset
|
|
2128
|
-
}, {
|
|
2129
|
-
default: withCtx(() => _cache[7] || (_cache[7] = [
|
|
2130
|
-
createTextVNode("重 置")
|
|
2131
|
-
])),
|
|
2132
|
-
_: 1,
|
|
2133
|
-
__: [7]
|
|
2134
|
-
}),
|
|
2135
|
-
createVNode(_component_el_button, {
|
|
2136
|
-
type: "primary",
|
|
2137
|
-
onClick: searchParentList
|
|
2138
|
-
}, {
|
|
2139
|
-
default: withCtx(() => _cache[8] || (_cache[8] = [
|
|
2140
|
-
createTextVNode("查 询")
|
|
2141
|
-
])),
|
|
2142
|
-
_: 1,
|
|
2143
|
-
__: [8]
|
|
2144
|
-
})
|
|
2145
|
-
]),
|
|
2146
|
-
_: 1
|
|
2147
|
-
}, 8, ["span"])) : createCommentVNode("", true)
|
|
2148
|
-
]),
|
|
2149
|
-
_: 3
|
|
2150
|
-
}, 8, ["data", "rules", "span", "title-width"])) : createCommentVNode("", true),
|
|
2151
2077
|
hasDynamicFields.value ? (openBlock(), createBlock(XElForm, {
|
|
2152
|
-
key:
|
|
2078
|
+
key: 1,
|
|
2153
2079
|
rules: dynamicRules.value,
|
|
2154
2080
|
model: __props.queryForm,
|
|
2155
2081
|
ref_key: "dynamicFormRef",
|
|
@@ -2199,21 +2125,21 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2199
2125
|
plain: "",
|
|
2200
2126
|
onClick: reset
|
|
2201
2127
|
}, {
|
|
2202
|
-
default: withCtx(() => _cache[
|
|
2128
|
+
default: withCtx(() => _cache[7] || (_cache[7] = [
|
|
2203
2129
|
createTextVNode("重 置")
|
|
2204
2130
|
])),
|
|
2205
2131
|
_: 1,
|
|
2206
|
-
__: [
|
|
2132
|
+
__: [7]
|
|
2207
2133
|
}),
|
|
2208
2134
|
createVNode(_component_el_button, {
|
|
2209
2135
|
type: "primary",
|
|
2210
2136
|
onClick: searchParentList
|
|
2211
2137
|
}, {
|
|
2212
|
-
default: withCtx(() => _cache[
|
|
2138
|
+
default: withCtx(() => _cache[8] || (_cache[8] = [
|
|
2213
2139
|
createTextVNode("查 询")
|
|
2214
2140
|
])),
|
|
2215
2141
|
_: 1,
|
|
2216
|
-
__: [
|
|
2142
|
+
__: [8]
|
|
2217
2143
|
})
|
|
2218
2144
|
])
|
|
2219
2145
|
]),
|
|
@@ -2230,7 +2156,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2230
2156
|
};
|
|
2231
2157
|
}
|
|
2232
2158
|
});
|
|
2233
|
-
const XSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
2159
|
+
const XSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-0c479461"]]);
|
|
2234
2160
|
const _hoisted_1 = { class: "x-split-layout__sidebar-menu" };
|
|
2235
2161
|
const _hoisted_2 = ["onClick"];
|
|
2236
2162
|
const _hoisted_3 = { class: "x-split-layout__menu-icon" };
|