qidian-vue-ui 1.0.70 → 1.0.71
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/components/config-provider/index.d.ts +3 -0
- package/dist/components/config-provider/types.d.ts +1 -0
- package/dist/components/config-provider/useConfig.d.ts +4 -0
- package/dist/components/crud/define.d.ts +2 -1
- package/dist/components/crud/index.d.ts +3 -2
- package/dist/components/crud/list.vue.d.ts +27 -0
- package/dist/components/crud/props.d.ts +5 -1
- package/dist/components/crud/types.d.ts +7 -3
- package/dist/components/dialog/form.vue.d.ts +20 -46
- package/dist/components/dialog/index.vue.d.ts +5 -1
- package/dist/components/dialog/props.d.ts +3 -1
- package/dist/components/dialog/types.d.ts +9 -1
- package/dist/components/form/props.d.ts +1 -1
- package/dist/components/form/types.d.ts +1 -1
- package/dist/components/service/index.d.ts +2 -1
- package/dist/components/service/list.vue.d.ts +26 -0
- package/dist/components/service/props.d.ts +3 -0
- package/dist/components/service/types.d.ts +6 -1
- package/dist/{en-US-BR5-O75H.mjs → en-US--HDweqEV.mjs} +3 -2
- package/dist/{en-US-BR5-O75H.mjs.map → en-US--HDweqEV.mjs.map} +1 -1
- package/dist/{en-US-QRsMT0B0.js → en-US-D38N0yWa.js} +3 -2
- package/dist/{en-US-QRsMT0B0.js.map → en-US-D38N0yWa.js.map} +1 -1
- package/dist/{index-DMFOdSjS.mjs → index-120nQHhl.mjs} +463 -101
- package/dist/index-120nQHhl.mjs.map +1 -0
- package/dist/{index-BhiVTQHR.js → index-4e1YS15f.js} +438 -76
- package/dist/index-4e1YS15f.js.map +1 -0
- package/dist/locales/en-US.d.ts +1 -0
- package/dist/locales/zh-CN.d.ts +1 -0
- package/dist/locales/zh-TW.d.ts +1 -0
- package/dist/qidian-vue-ui.css +52 -13
- package/dist/qidian-vue-ui.js +4 -1
- package/dist/qidian-vue-ui.js.map +1 -1
- package/dist/qidian-vue-ui.mjs +31 -28
- package/dist/{zh-TW-B2ihPdJF.js → zh-TW-CMO2pPWS.js} +3 -2
- package/dist/{zh-TW-B2ihPdJF.js.map → zh-TW-CMO2pPWS.js.map} +1 -1
- package/dist/{zh-TW-H8f1Xj1a.mjs → zh-TW-OwICebAE.mjs} +3 -2
- package/dist/{zh-TW-H8f1Xj1a.mjs.map → zh-TW-OwICebAE.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/index-BhiVTQHR.js.map +0 -1
- package/dist/index-DMFOdSjS.mjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent, useCssVars, useTemplateRef, ref, watch, nextTick, resolveDirective, createElementBlock, openBlock, createVNode, renderSlot, unref, withCtx, withDirectives, normalizeClass, createTextVNode, toDisplayString, Fragment, mergeDefaults, computed, createBlock, normalizeProps, guardReactiveProps, createSlots, renderList, onActivated, onDeactivated, onBeforeUnmount, inject, shallowRef, onUnmounted, watchEffect, isRef, provide, h, resolveComponent, createCommentVNode, resolveDynamicComponent, mergeProps, vShow, getCurrentInstance, onMounted, normalizeStyle, toRefs, reactive, createElementVNode, withModifiers, triggerRef, toRef } from "vue";
|
|
2
|
-
import { Tooltip, Card, ConfigProvider, EnhancedTable, Select, Loading, Dialog, FormItem, DialogPlugin, NotifyPlugin, MessagePlugin, Form, LoadingDirective, Button, Space, Link, Divider, RadioGroup, CheckboxGroup, Tag, Upload, Popup, Badge } from "tdesign-vue-next";
|
|
2
|
+
import { Tooltip, Card, ConfigProvider, EnhancedTable, Empty, List, Select, Loading, Dialog, FormItem, DialogPlugin, NotifyPlugin, MessagePlugin, Form, LoadingDirective, Button, Space, Link, Divider, RadioGroup, CheckboxGroup, Tag, Upload, Popup, Badge } from "tdesign-vue-next";
|
|
3
3
|
import { LoadingIcon, AddRectangleIcon, MinusRectangleIcon, SearchIcon, RefreshIcon, UnfoldLessIcon, UnfoldMoreIcon, SettingIcon, AddIcon, UploadIcon, BrowseIcon } from "tdesign-icons-vue-next";
|
|
4
|
-
const _hoisted_1$
|
|
5
|
-
const _hoisted_2$
|
|
4
|
+
const _hoisted_1$3 = { class: "qd-auto-tooltip" };
|
|
5
|
+
const _hoisted_2$2 = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "pre-wrap"
|
|
8
8
|
};
|
|
9
|
-
const _sfc_main$
|
|
9
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
10
10
|
...{
|
|
11
11
|
name: "QdAutoTooltip"
|
|
12
12
|
},
|
|
@@ -38,7 +38,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
);
|
|
39
39
|
return (_ctx, _cache) => {
|
|
40
40
|
const _directive_resize = resolveDirective("resize");
|
|
41
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
41
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
42
42
|
createVNode(unref(Tooltip), {
|
|
43
43
|
attach: __props.attach,
|
|
44
44
|
placement: __props.placement,
|
|
@@ -47,7 +47,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
}, {
|
|
48
48
|
content: withCtx(() => [
|
|
49
49
|
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
50
|
-
__props.preWrap ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
50
|
+
__props.preWrap ? (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(__props.content), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
51
51
|
createTextVNode(toDisplayString(__props.content), 1)
|
|
52
52
|
], 64))
|
|
53
53
|
], true)
|
|
@@ -78,11 +78,11 @@ const _export_sfc = (sfc, props) => {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
};
|
|
81
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
81
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-75d8db87"]]);
|
|
82
82
|
const qdCardProps = {
|
|
83
83
|
bordered: false
|
|
84
84
|
};
|
|
85
|
-
const _sfc_main$
|
|
85
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
86
86
|
__name: "index",
|
|
87
87
|
props: /* @__PURE__ */ mergeDefaults({
|
|
88
88
|
actions: {},
|
|
@@ -1390,6 +1390,14 @@ function extractSlotsWithoutPrefix(slots, prefix) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
return res;
|
|
1392
1392
|
}
|
|
1393
|
+
function filterSlots(slots, filterName) {
|
|
1394
|
+
const res = [];
|
|
1395
|
+
for (const key in slots) {
|
|
1396
|
+
if (filterName.includes(key)) continue;
|
|
1397
|
+
res.push(key);
|
|
1398
|
+
}
|
|
1399
|
+
return res;
|
|
1400
|
+
}
|
|
1393
1401
|
function easyCopy(data) {
|
|
1394
1402
|
return JSON.parse(JSON.stringify(data));
|
|
1395
1403
|
}
|
|
@@ -12013,8 +12021,8 @@ const QdConfigProvider = defineComponent({
|
|
|
12013
12021
|
watchEffect(async () => {
|
|
12014
12022
|
const localeMap = {
|
|
12015
12023
|
"zh-CN": () => Promise.resolve().then(() => zhCN$1),
|
|
12016
|
-
"zh-TW": () => import("./zh-TW-
|
|
12017
|
-
"en-US": () => import("./en-US
|
|
12024
|
+
"zh-TW": () => import("./zh-TW-OwICebAE.mjs"),
|
|
12025
|
+
"en-US": () => import("./en-US--HDweqEV.mjs")
|
|
12018
12026
|
};
|
|
12019
12027
|
const loadLocale = localeMap[props.locale] || localeMap["zh-CN"];
|
|
12020
12028
|
const [err, res] = await to(
|
|
@@ -13217,7 +13225,7 @@ function resolveVModelBinding(context, vModel, defaultValue) {
|
|
|
13217
13225
|
}
|
|
13218
13226
|
return bindings;
|
|
13219
13227
|
}
|
|
13220
|
-
const _sfc_main$
|
|
13228
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
13221
13229
|
...{
|
|
13222
13230
|
name: "QdConfigRenderer"
|
|
13223
13231
|
},
|
|
@@ -13319,7 +13327,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
13319
13327
|
return {
|
|
13320
13328
|
name: slotName,
|
|
13321
13329
|
fn: withCtx((slotProps) => [
|
|
13322
|
-
slotConfig ? (openBlock(), createBlock(_sfc_main$
|
|
13330
|
+
slotConfig ? (openBlock(), createBlock(_sfc_main$h, mergeProps({
|
|
13323
13331
|
key: 0,
|
|
13324
13332
|
config: slotConfig,
|
|
13325
13333
|
context: slotConfig.context || currentContext.value
|
|
@@ -13397,6 +13405,7 @@ const qdFormGrid = {
|
|
|
13397
13405
|
const qdFormProps = {
|
|
13398
13406
|
gutter: () => qdFormGutter,
|
|
13399
13407
|
grid: () => qdFormGrid,
|
|
13408
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13400
13409
|
data: () => ({}),
|
|
13401
13410
|
disabled: void 0,
|
|
13402
13411
|
readonly: void 0,
|
|
@@ -13467,6 +13476,9 @@ const qdServiceSelectProps = {
|
|
|
13467
13476
|
const qdServiceSelectKeys = {
|
|
13468
13477
|
value: "value"
|
|
13469
13478
|
};
|
|
13479
|
+
const qdServiceListProps = {
|
|
13480
|
+
data: () => []
|
|
13481
|
+
};
|
|
13470
13482
|
const qdCrudSearchProps = {
|
|
13471
13483
|
...qdFormProps,
|
|
13472
13484
|
defaultClearable: true,
|
|
@@ -13492,6 +13504,10 @@ const qdCrudTableProps = {
|
|
|
13492
13504
|
del: void 0,
|
|
13493
13505
|
rowActions: void 0
|
|
13494
13506
|
};
|
|
13507
|
+
const qdCrudListProps = {
|
|
13508
|
+
...qdServiceListProps,
|
|
13509
|
+
searchData: () => ({})
|
|
13510
|
+
};
|
|
13495
13511
|
function authPermission(permission) {
|
|
13496
13512
|
const allPermission = "*:*:*";
|
|
13497
13513
|
const user = window.__QIDIAN_USER__;
|
|
@@ -14259,6 +14275,7 @@ const zhCN = {
|
|
|
14259
14275
|
text: "加载中"
|
|
14260
14276
|
},
|
|
14261
14277
|
crud: {
|
|
14278
|
+
emptyText: "暂无数据",
|
|
14262
14279
|
searchText: "搜索",
|
|
14263
14280
|
resetText: "重置",
|
|
14264
14281
|
addText: "新增",
|
|
@@ -14313,7 +14330,7 @@ function useConfig(key, componentLocale) {
|
|
|
14313
14330
|
global: globalConfig
|
|
14314
14331
|
};
|
|
14315
14332
|
}
|
|
14316
|
-
const _sfc_main$
|
|
14333
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
14317
14334
|
...{
|
|
14318
14335
|
name: "QdServiceTable"
|
|
14319
14336
|
},
|
|
@@ -14617,6 +14634,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14617
14634
|
} = /* @__PURE__ */ useVModels(props, emit, {
|
|
14618
14635
|
passive: true
|
|
14619
14636
|
});
|
|
14637
|
+
const {
|
|
14638
|
+
t
|
|
14639
|
+
} = useConfig("crud");
|
|
14620
14640
|
const tableRef = useTemplateRef("table");
|
|
14621
14641
|
const treeLoadIds = ref([]);
|
|
14622
14642
|
const reProps = computed(() => {
|
|
@@ -14905,6 +14925,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14905
14925
|
data: unref(data),
|
|
14906
14926
|
pagination: rePagination.value
|
|
14907
14927
|
}), createSlots({
|
|
14928
|
+
empty: withCtx(() => [createVNode(unref(Empty), {
|
|
14929
|
+
title: unref(t)("emptyText")
|
|
14930
|
+
}, null, 8, ["title"])]),
|
|
14908
14931
|
_: 2
|
|
14909
14932
|
}, [renderList(_ctx.$slots, (_, name) => {
|
|
14910
14933
|
return {
|
|
@@ -14915,7 +14938,150 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14915
14938
|
};
|
|
14916
14939
|
}
|
|
14917
14940
|
});
|
|
14918
|
-
const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
14941
|
+
const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-adef2cbe"]]);
|
|
14942
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
14943
|
+
...{
|
|
14944
|
+
name: "QdServiceList"
|
|
14945
|
+
},
|
|
14946
|
+
__name: "list",
|
|
14947
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
14948
|
+
data: {},
|
|
14949
|
+
asyncLoading: {},
|
|
14950
|
+
footer: {},
|
|
14951
|
+
header: {},
|
|
14952
|
+
layout: {},
|
|
14953
|
+
scroll: {},
|
|
14954
|
+
size: {},
|
|
14955
|
+
split: { type: Boolean },
|
|
14956
|
+
stripe: { type: Boolean },
|
|
14957
|
+
onBefore: { type: Function },
|
|
14958
|
+
onAfter: { type: Function },
|
|
14959
|
+
onSuccess: { type: Function },
|
|
14960
|
+
onError: { type: Function },
|
|
14961
|
+
service: { type: Function },
|
|
14962
|
+
manual: { type: Boolean },
|
|
14963
|
+
transformParams: { type: Function },
|
|
14964
|
+
transformRes: { type: Function },
|
|
14965
|
+
pagination: {}
|
|
14966
|
+
}, qdServiceListProps),
|
|
14967
|
+
emits: ["update:data"],
|
|
14968
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
14969
|
+
const props = __props;
|
|
14970
|
+
const emit = __emit;
|
|
14971
|
+
const { data } = /* @__PURE__ */ useVModels(props, emit, { passive: true });
|
|
14972
|
+
const { t } = useConfig("crud");
|
|
14973
|
+
const listRef = useTemplateRef("list");
|
|
14974
|
+
const reProps = computed(() => {
|
|
14975
|
+
const {
|
|
14976
|
+
service,
|
|
14977
|
+
manual,
|
|
14978
|
+
transformParams,
|
|
14979
|
+
transformRes,
|
|
14980
|
+
pagination,
|
|
14981
|
+
onBefore,
|
|
14982
|
+
onAfter,
|
|
14983
|
+
onSuccess,
|
|
14984
|
+
onError,
|
|
14985
|
+
data: data2,
|
|
14986
|
+
asyncLoading: externalAsyncLoad,
|
|
14987
|
+
...listOptions
|
|
14988
|
+
} = props;
|
|
14989
|
+
return {
|
|
14990
|
+
externalAsyncLoad,
|
|
14991
|
+
listOptions,
|
|
14992
|
+
serviceOptions: {
|
|
14993
|
+
service,
|
|
14994
|
+
manual,
|
|
14995
|
+
transformParams,
|
|
14996
|
+
transformRes,
|
|
14997
|
+
pagination,
|
|
14998
|
+
onBefore,
|
|
14999
|
+
onAfter,
|
|
15000
|
+
onSuccess,
|
|
15001
|
+
onError
|
|
15002
|
+
},
|
|
15003
|
+
models: {
|
|
15004
|
+
data: data2
|
|
15005
|
+
}
|
|
15006
|
+
};
|
|
15007
|
+
});
|
|
15008
|
+
const {
|
|
15009
|
+
data: serviceData,
|
|
15010
|
+
firstLoad,
|
|
15011
|
+
manualTriggerLoad,
|
|
15012
|
+
loading,
|
|
15013
|
+
loadingMore,
|
|
15014
|
+
noMore,
|
|
15015
|
+
error,
|
|
15016
|
+
refresh,
|
|
15017
|
+
refreshAsync,
|
|
15018
|
+
cancel,
|
|
15019
|
+
loadMore,
|
|
15020
|
+
loadMoreAsync,
|
|
15021
|
+
mutate
|
|
15022
|
+
} = useServiceLoadMore({
|
|
15023
|
+
...reProps.value.serviceOptions,
|
|
15024
|
+
onSuccess: (res) => {
|
|
15025
|
+
reProps.value.serviceOptions.onSuccess?.(res);
|
|
15026
|
+
data.value = serviceData.value?.list || [];
|
|
15027
|
+
}
|
|
15028
|
+
});
|
|
15029
|
+
const empty = computed(() => noMore.value && !data.value.length);
|
|
15030
|
+
function onScroll({
|
|
15031
|
+
scrollBottom
|
|
15032
|
+
}) {
|
|
15033
|
+
if (loading.value || noMore.value || scrollBottom > (reProps.value.listOptions.scroll?.rowHeight ?? 100)) {
|
|
15034
|
+
return;
|
|
15035
|
+
}
|
|
15036
|
+
loadMore();
|
|
15037
|
+
}
|
|
15038
|
+
const expose = {
|
|
15039
|
+
data: serviceData,
|
|
15040
|
+
firstLoad,
|
|
15041
|
+
manualTriggerLoad,
|
|
15042
|
+
loading,
|
|
15043
|
+
loadingMore,
|
|
15044
|
+
noMore,
|
|
15045
|
+
error,
|
|
15046
|
+
refresh,
|
|
15047
|
+
refreshAsync,
|
|
15048
|
+
cancel,
|
|
15049
|
+
loadMore,
|
|
15050
|
+
loadMoreAsync,
|
|
15051
|
+
mutate
|
|
15052
|
+
};
|
|
15053
|
+
onMounted(() => {
|
|
15054
|
+
Object.assign(expose, listRef.value);
|
|
15055
|
+
});
|
|
15056
|
+
__expose(expose);
|
|
15057
|
+
return (_ctx, _cache) => {
|
|
15058
|
+
return openBlock(), createBlock(unref(List), mergeProps({
|
|
15059
|
+
ref: "list",
|
|
15060
|
+
class: "qd-service-list"
|
|
15061
|
+
}, reProps.value.listOptions, { onScroll }), createSlots({
|
|
15062
|
+
default: withCtx(() => [
|
|
15063
|
+
empty.value ? renderSlot(_ctx.$slots, "empty", { key: 0 }, () => [
|
|
15064
|
+
createVNode(unref(Empty), {
|
|
15065
|
+
title: unref(t)("emptyText")
|
|
15066
|
+
}, null, 8, ["title"])
|
|
15067
|
+
], true) : createCommentVNode("", true),
|
|
15068
|
+
renderSlot(_ctx.$slots, "default", { data: unref(data) }, void 0, true)
|
|
15069
|
+
]),
|
|
15070
|
+
_: 2
|
|
15071
|
+
}, [
|
|
15072
|
+
renderList(unref(filterSlots)(_ctx.$slots, ["default", "empty"]), (name) => {
|
|
15073
|
+
return {
|
|
15074
|
+
name,
|
|
15075
|
+
fn: withCtx((slotProps) => [
|
|
15076
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)), void 0, true)
|
|
15077
|
+
])
|
|
15078
|
+
};
|
|
15079
|
+
})
|
|
15080
|
+
]), 1040);
|
|
15081
|
+
};
|
|
15082
|
+
}
|
|
15083
|
+
});
|
|
15084
|
+
const QdServiceList = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-21c3df5d"]]);
|
|
14919
15085
|
const qdDictConvStrSeparator = ",";
|
|
14920
15086
|
const qdDictSelectProps = {
|
|
14921
15087
|
showArrow: true,
|
|
@@ -14948,7 +15114,7 @@ const qdDictTagProps = {
|
|
|
14948
15114
|
options: void 0,
|
|
14949
15115
|
strict: false
|
|
14950
15116
|
};
|
|
14951
|
-
const _sfc_main$
|
|
15117
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
14952
15118
|
...{
|
|
14953
15119
|
name: "QdServiceSelect"
|
|
14954
15120
|
},
|
|
@@ -15188,16 +15354,16 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
15188
15354
|
},
|
|
15189
15355
|
onSuccess: (res) => {
|
|
15190
15356
|
reProps.value.serviceOptions.onSuccess?.(res);
|
|
15191
|
-
const
|
|
15357
|
+
const list2 = data.value?.list || [];
|
|
15192
15358
|
if (!triggerServiceMerged && reProps.value.fillOptions?.length) {
|
|
15193
15359
|
const map = /* @__PURE__ */ new Map();
|
|
15194
|
-
[...reProps.value.fillOptions, ...
|
|
15360
|
+
[...reProps.value.fillOptions, ...list2].forEach((item) => {
|
|
15195
15361
|
const k = item[reProps.value.selectOptions.keys?.value || qdServiceSelectKeys.value];
|
|
15196
15362
|
map.set(k, item);
|
|
15197
15363
|
});
|
|
15198
15364
|
options.value = Array.from(map.values());
|
|
15199
15365
|
} else {
|
|
15200
|
-
options.value =
|
|
15366
|
+
options.value = list2;
|
|
15201
15367
|
}
|
|
15202
15368
|
triggerServiceMerged = true;
|
|
15203
15369
|
if (!hasAutoSelected && reProps.value.defaultSelectFirst && isEmpty(reModelValue.value) && res.list.length) {
|
|
@@ -15289,8 +15455,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
15289
15455
|
};
|
|
15290
15456
|
}
|
|
15291
15457
|
});
|
|
15292
|
-
const select = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15458
|
+
const select = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-a9450c1a"]]);
|
|
15293
15459
|
const qdDialogProps = {
|
|
15460
|
+
visible: false,
|
|
15294
15461
|
width: "min(960px, 100%)",
|
|
15295
15462
|
theme: "default",
|
|
15296
15463
|
attach: "body",
|
|
@@ -15310,7 +15477,7 @@ const qdDialogFormProps = {
|
|
|
15310
15477
|
...qdFormProps,
|
|
15311
15478
|
wrapper: () => qdDialogProps
|
|
15312
15479
|
};
|
|
15313
|
-
const _sfc_main$
|
|
15480
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
15314
15481
|
...{
|
|
15315
15482
|
name: "QdDialog"
|
|
15316
15483
|
},
|
|
@@ -15355,7 +15522,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15355
15522
|
onOverlayClick: { type: Function }
|
|
15356
15523
|
}, qdDialogProps),
|
|
15357
15524
|
emits: ["update:visible"],
|
|
15358
|
-
setup(__props, { emit: __emit }) {
|
|
15525
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15359
15526
|
const props = __props;
|
|
15360
15527
|
const emit = __emit;
|
|
15361
15528
|
const { visible } = /* @__PURE__ */ useVModels(props, emit, { passive: true });
|
|
@@ -15386,6 +15553,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15386
15553
|
models: { visible: inVisible }
|
|
15387
15554
|
};
|
|
15388
15555
|
});
|
|
15556
|
+
function show() {
|
|
15557
|
+
visible.value = true;
|
|
15558
|
+
}
|
|
15559
|
+
function hide() {
|
|
15560
|
+
visible.value = false;
|
|
15561
|
+
}
|
|
15562
|
+
const expose = { show, hide };
|
|
15563
|
+
__expose(expose);
|
|
15389
15564
|
return (_ctx, _cache) => {
|
|
15390
15565
|
return openBlock(), createBlock(unref(Dialog), mergeProps({
|
|
15391
15566
|
visible: unref(visible),
|
|
@@ -15422,7 +15597,7 @@ const DEFAULT_BREAKPOINTS = {
|
|
|
15422
15597
|
};
|
|
15423
15598
|
const DEFAULT_COL = 1;
|
|
15424
15599
|
const DEFAULT_ROW = 1;
|
|
15425
|
-
const _sfc_main$
|
|
15600
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
15426
15601
|
...{
|
|
15427
15602
|
name: "QdGrid"
|
|
15428
15603
|
},
|
|
@@ -15473,8 +15648,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
15473
15648
|
};
|
|
15474
15649
|
}
|
|
15475
15650
|
});
|
|
15476
|
-
const QdGrid = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15477
|
-
const _sfc_main$
|
|
15651
|
+
const QdGrid = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-f53624a2"]]);
|
|
15652
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
15478
15653
|
...{
|
|
15479
15654
|
name: "QdGridItem"
|
|
15480
15655
|
},
|
|
@@ -15540,8 +15715,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
15540
15715
|
};
|
|
15541
15716
|
}
|
|
15542
15717
|
});
|
|
15543
|
-
const QdGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15544
|
-
const _sfc_main$
|
|
15718
|
+
const QdGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-274b234a"]]);
|
|
15719
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
15545
15720
|
...{
|
|
15546
15721
|
name: "QdFormItem"
|
|
15547
15722
|
},
|
|
@@ -15605,7 +15780,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
15605
15780
|
crudMode: reProps.value.formItemOptions.crudMode,
|
|
15606
15781
|
context: __props.context
|
|
15607
15782
|
}, () => [
|
|
15608
|
-
reProps.value.configRendererOptions.config ? (openBlock(), createBlock(unref(_sfc_main$
|
|
15783
|
+
reProps.value.configRendererOptions.config ? (openBlock(), createBlock(unref(_sfc_main$h), mergeProps({
|
|
15609
15784
|
key: 0,
|
|
15610
15785
|
class: "qd-form-item__component"
|
|
15611
15786
|
}, reProps.value.configRendererOptions), null, 16)) : createCommentVNode("", true)
|
|
@@ -15619,7 +15794,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
15619
15794
|
};
|
|
15620
15795
|
}
|
|
15621
15796
|
});
|
|
15622
|
-
const QdFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15797
|
+
const QdFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-0a78416c"]]);
|
|
15623
15798
|
const PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE = Symbol("QdFormAddBeforeSubmitQueue");
|
|
15624
15799
|
function useModal() {
|
|
15625
15800
|
const { t } = useConfig("modal");
|
|
@@ -15789,7 +15964,7 @@ function useModal() {
|
|
|
15789
15964
|
confirm
|
|
15790
15965
|
};
|
|
15791
15966
|
}
|
|
15792
|
-
const _sfc_main$
|
|
15967
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
15793
15968
|
...{
|
|
15794
15969
|
name: "QdForm"
|
|
15795
15970
|
},
|
|
@@ -15841,10 +16016,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
15841
16016
|
});
|
|
15842
16017
|
});
|
|
15843
16018
|
const formRef = useTemplateRef("form");
|
|
16019
|
+
const submitShowErrorMessage = ref();
|
|
15844
16020
|
const reProps = computed(() => {
|
|
15845
|
-
const { grid, gutter, items, onSubmit, data: data2, ...formOptions } = props;
|
|
16021
|
+
const { grid, gutter, items, onSubmit, data: data2, scrollToFirstError, ...formOptions } = props;
|
|
15846
16022
|
return {
|
|
15847
|
-
formOptions
|
|
16023
|
+
formOptions: {
|
|
16024
|
+
...formOptions,
|
|
16025
|
+
scrollToFirstError: submitShowErrorMessage.value === false ? "" : scrollToFirstError
|
|
16026
|
+
},
|
|
15848
16027
|
formItems: items,
|
|
15849
16028
|
gridOptions: {
|
|
15850
16029
|
grid,
|
|
@@ -15854,7 +16033,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
15854
16033
|
models: { data: data2 }
|
|
15855
16034
|
};
|
|
15856
16035
|
});
|
|
15857
|
-
let submitShowErrorMessage;
|
|
15858
16036
|
const submitLoad = ref(false);
|
|
15859
16037
|
const formLoad = computed(() => {
|
|
15860
16038
|
return {
|
|
@@ -15864,7 +16042,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
15864
16042
|
};
|
|
15865
16043
|
});
|
|
15866
16044
|
async function handleSubmit(context) {
|
|
15867
|
-
const showErrorMessage = submitShowErrorMessage ?? props.showErrorMessage;
|
|
16045
|
+
const showErrorMessage = submitShowErrorMessage.value ?? props.showErrorMessage;
|
|
15868
16046
|
if (showErrorMessage && context.firstError) {
|
|
15869
16047
|
msgError(context.firstError);
|
|
15870
16048
|
}
|
|
@@ -15892,7 +16070,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
15892
16070
|
}
|
|
15893
16071
|
});
|
|
15894
16072
|
if (reQueueRes.success === false) {
|
|
15895
|
-
if (reQueueRes.message
|
|
16073
|
+
if (showErrorMessage && reQueueRes.message) {
|
|
15896
16074
|
msgError(reQueueRes.message);
|
|
15897
16075
|
}
|
|
15898
16076
|
return;
|
|
@@ -15908,7 +16086,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
15908
16086
|
const expose = {};
|
|
15909
16087
|
onMounted(() => {
|
|
15910
16088
|
const submit = async (params) => {
|
|
15911
|
-
submitShowErrorMessage = params?.showErrorMessage;
|
|
16089
|
+
submitShowErrorMessage.value = params?.showErrorMessage;
|
|
15912
16090
|
formRef.value?.submit(params);
|
|
15913
16091
|
};
|
|
15914
16092
|
Object.assign(expose, formRef.value, { submit });
|
|
@@ -15948,7 +16126,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
15948
16126
|
};
|
|
15949
16127
|
}
|
|
15950
16128
|
});
|
|
15951
|
-
const _sfc_main$
|
|
16129
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
15952
16130
|
__name: "form",
|
|
15953
16131
|
props: /* @__PURE__ */ mergeDefaults({
|
|
15954
16132
|
onSubmit: { type: Function },
|
|
@@ -15985,7 +16163,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
15985
16163
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15986
16164
|
const props = __props;
|
|
15987
16165
|
const emit = __emit;
|
|
15988
|
-
const { visible, data } = /* @__PURE__ */ useVModels(props, emit, {
|
|
16166
|
+
const { visible, data } = /* @__PURE__ */ useVModels(props, emit, {
|
|
16167
|
+
passive: true
|
|
16168
|
+
});
|
|
15989
16169
|
const { t } = useConfig("crud");
|
|
15990
16170
|
const formSubmitLoad = ref(false);
|
|
15991
16171
|
const reProps = computed(() => {
|
|
@@ -16035,21 +16215,31 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
16035
16215
|
};
|
|
16036
16216
|
});
|
|
16037
16217
|
const formRef = useTemplateRef("form");
|
|
16038
|
-
|
|
16218
|
+
function show(newData) {
|
|
16219
|
+
if (newData != void 0) data.value = newData;
|
|
16220
|
+
visible.value = true;
|
|
16221
|
+
}
|
|
16222
|
+
function hide() {
|
|
16223
|
+
visible.value = false;
|
|
16224
|
+
}
|
|
16225
|
+
const expose = {
|
|
16226
|
+
show,
|
|
16227
|
+
hide
|
|
16228
|
+
};
|
|
16039
16229
|
onMounted(() => {
|
|
16040
16230
|
Object.assign(expose, formRef.value);
|
|
16041
16231
|
});
|
|
16042
16232
|
__expose(expose);
|
|
16043
16233
|
return (_ctx, _cache) => {
|
|
16044
|
-
return openBlock(), createBlock(_sfc_main$
|
|
16234
|
+
return openBlock(), createBlock(_sfc_main$d, mergeProps({
|
|
16045
16235
|
visible: unref(visible),
|
|
16046
|
-
"onUpdate:visible": _cache[
|
|
16236
|
+
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => isRef(visible) ? visible.value = $event : null)
|
|
16047
16237
|
}, reProps.value.qdDialogOptions), createSlots({
|
|
16048
16238
|
default: withCtx(() => [
|
|
16049
|
-
createVNode(unref(_sfc_main$
|
|
16239
|
+
createVNode(unref(_sfc_main$9), mergeProps({
|
|
16050
16240
|
ref: "form",
|
|
16051
16241
|
data: unref(data),
|
|
16052
|
-
"onUpdate:data": _cache[
|
|
16242
|
+
"onUpdate:data": _cache[0] || (_cache[0] = ($event) => isRef(data) ? data.value = $event : null)
|
|
16053
16243
|
}, reProps.value.qdFormOptions), createSlots({ _: 2 }, [
|
|
16054
16244
|
renderList(unref(extractSlotsWithPrefix)(_ctx.$slots, "form"), (item) => {
|
|
16055
16245
|
return {
|
|
@@ -16068,7 +16258,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
16068
16258
|
fn: withCtx(() => [
|
|
16069
16259
|
createVNode(unref(Button), {
|
|
16070
16260
|
theme: "default",
|
|
16071
|
-
onClick:
|
|
16261
|
+
onClick: hide
|
|
16072
16262
|
}, {
|
|
16073
16263
|
default: withCtx(() => [
|
|
16074
16264
|
createTextVNode(toDisplayString(unref(t)("closeText")), 1)
|
|
@@ -16090,7 +16280,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
16090
16280
|
};
|
|
16091
16281
|
}
|
|
16092
16282
|
});
|
|
16093
|
-
const _sfc_main$
|
|
16283
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
16094
16284
|
...{
|
|
16095
16285
|
name: "QdCrudSearch"
|
|
16096
16286
|
},
|
|
@@ -16143,9 +16333,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
16143
16333
|
});
|
|
16144
16334
|
__expose(expose);
|
|
16145
16335
|
return (_ctx, _cache) => {
|
|
16146
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
16336
|
+
return openBlock(), createBlock(unref(_sfc_main$i), { class: "qd-crud-search" }, {
|
|
16147
16337
|
default: withCtx(() => [
|
|
16148
|
-
createVNode(unref(_sfc_main$
|
|
16338
|
+
createVNode(unref(_sfc_main$9), mergeProps({
|
|
16149
16339
|
ref: "form",
|
|
16150
16340
|
data: unref(data),
|
|
16151
16341
|
"onUpdate:data": _cache[0] || (_cache[0] = ($event) => isRef(data) ? data.value = $event : null)
|
|
@@ -16165,7 +16355,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
16165
16355
|
};
|
|
16166
16356
|
}
|
|
16167
16357
|
});
|
|
16168
|
-
const QdCrudSearch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16358
|
+
const QdCrudSearch = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-13ddedb2"]]);
|
|
16169
16359
|
const dictCache = /* @__PURE__ */ new Map();
|
|
16170
16360
|
const dictPromiseCache = /* @__PURE__ */ new Map();
|
|
16171
16361
|
function useDict(...args) {
|
|
@@ -16296,13 +16486,13 @@ function useDisabled(context) {
|
|
|
16296
16486
|
return false;
|
|
16297
16487
|
});
|
|
16298
16488
|
}
|
|
16299
|
-
const _hoisted_1$
|
|
16489
|
+
const _hoisted_1$2 = {
|
|
16300
16490
|
class: "qd-crud-table"
|
|
16301
16491
|
};
|
|
16302
|
-
const _hoisted_2 = {
|
|
16492
|
+
const _hoisted_2$1 = {
|
|
16303
16493
|
class: "qd-crud-table__toolbar"
|
|
16304
16494
|
};
|
|
16305
|
-
const _sfc_main$
|
|
16495
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
16306
16496
|
...{
|
|
16307
16497
|
name: "QdCrudTable"
|
|
16308
16498
|
},
|
|
@@ -16642,6 +16832,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
16642
16832
|
const reProps = computed(() => {
|
|
16643
16833
|
const {
|
|
16644
16834
|
data: data2,
|
|
16835
|
+
searchData: inSearchData,
|
|
16645
16836
|
selectedRowKeys: selectedRowKeys2,
|
|
16646
16837
|
activeRowKeys: activeRowKeys2,
|
|
16647
16838
|
columnControllerVisible: columnControllerVisible2,
|
|
@@ -16751,6 +16942,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
16751
16942
|
rowActions: reRowActions,
|
|
16752
16943
|
models: {
|
|
16753
16944
|
data: data2,
|
|
16945
|
+
searchData: inSearchData,
|
|
16754
16946
|
selectedRowKeys: selectedRowKeys2,
|
|
16755
16947
|
activeRowKeys: activeRowKeys2,
|
|
16756
16948
|
columnControllerVisible: columnControllerVisible2,
|
|
@@ -16768,12 +16960,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
16768
16960
|
let searchMode = "refresh";
|
|
16769
16961
|
function handleSearch() {
|
|
16770
16962
|
searchMode = "changeCurrent";
|
|
16771
|
-
searchRef.value?.submit();
|
|
16772
16963
|
}
|
|
16773
16964
|
function handleResetSearch() {
|
|
16774
16965
|
searchMode = "changeCurrent";
|
|
16775
16966
|
searchRef.value?.reset();
|
|
16776
|
-
|
|
16967
|
+
searchRef.value?.submit();
|
|
16777
16968
|
}
|
|
16778
16969
|
function triggerSearch({
|
|
16779
16970
|
validateResult
|
|
@@ -17062,7 +17253,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
17062
17253
|
});
|
|
17063
17254
|
__expose(expose);
|
|
17064
17255
|
return (_ctx, _cache) => {
|
|
17065
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
17256
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [reProps.value.searchOptions?.items?.length ? withDirectives((openBlock(), createBlock(QdCrudSearch, mergeProps({
|
|
17066
17257
|
key: 0,
|
|
17067
17258
|
ref: "search",
|
|
17068
17259
|
data: unref(searchData),
|
|
@@ -17091,15 +17282,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
17091
17282
|
_: 1
|
|
17092
17283
|
})]),
|
|
17093
17284
|
_: 1
|
|
17094
|
-
}, 16, ["data", "class"])), [[vShow, searchVisible.value]]) : createCommentVNode("", true), createVNode(unref(_sfc_main$
|
|
17285
|
+
}, 16, ["data", "class"])), [[vShow, searchVisible.value]]) : createCommentVNode("", true), createVNode(unref(_sfc_main$i), {
|
|
17095
17286
|
class: "qd-crud-table__body"
|
|
17096
17287
|
}, {
|
|
17097
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_2, [createVNode(unref(Space), {
|
|
17288
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_2$1, [createVNode(unref(Space), {
|
|
17098
17289
|
align: "center",
|
|
17099
17290
|
size: "small"
|
|
17100
17291
|
}, {
|
|
17101
17292
|
default: withCtx(() => [renderSlot(_ctx.$slots, "actions", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(reProps.value.actions, (item, index2) => {
|
|
17102
|
-
return withDirectives((openBlock(), createBlock(unref(_sfc_main$
|
|
17293
|
+
return withDirectives((openBlock(), createBlock(unref(_sfc_main$h), {
|
|
17103
17294
|
key: item.uid || index2,
|
|
17104
17295
|
context: getConfigRendererCtx(item),
|
|
17105
17296
|
config: {
|
|
@@ -17205,7 +17396,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
17205
17396
|
layout: "vertical"
|
|
17206
17397
|
})]),
|
|
17207
17398
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(reProps.value.rowActions, (item, index2) => {
|
|
17208
|
-
return withDirectives((openBlock(), createBlock(unref(_sfc_main$
|
|
17399
|
+
return withDirectives((openBlock(), createBlock(unref(_sfc_main$h), {
|
|
17209
17400
|
key: item.uid || index2,
|
|
17210
17401
|
context: getConfigRendererCtx(item, slotProps),
|
|
17211
17402
|
config: {
|
|
@@ -17226,10 +17417,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
17226
17417
|
})]), 1040, ["data", "selected-row-keys", "active-row-keys", "column-controller-visible", "display-columns", "expanded-row-keys", "filter-value", "sort", "expanded-tree-nodes"])]),
|
|
17227
17418
|
_: 3
|
|
17228
17419
|
}), (openBlock(true), createElementBlock(Fragment, null, renderList(dialogFormMap, (dialogForm, uid) => {
|
|
17229
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
17420
|
+
return openBlock(), createBlock(unref(_sfc_main$h), {
|
|
17230
17421
|
key: uid,
|
|
17231
17422
|
config: {
|
|
17232
|
-
is: unref(_sfc_main$
|
|
17423
|
+
is: unref(_sfc_main$8),
|
|
17233
17424
|
...dialogForm.form,
|
|
17234
17425
|
vModelVisible: "self.visible",
|
|
17235
17426
|
vModelData: "self.data",
|
|
@@ -17241,10 +17432,185 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
17241
17432
|
};
|
|
17242
17433
|
}
|
|
17243
17434
|
});
|
|
17244
|
-
const table = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17435
|
+
const table = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-bdb9c97a"]]);
|
|
17436
|
+
const _hoisted_1$1 = {
|
|
17437
|
+
class: "qd-crud-list"
|
|
17438
|
+
};
|
|
17439
|
+
const _hoisted_2 = {
|
|
17440
|
+
class: "qd-crud-list__body"
|
|
17441
|
+
};
|
|
17442
|
+
const _hoisted_3 = {
|
|
17443
|
+
key: 0,
|
|
17444
|
+
class: "qd-crud-list__toolbar"
|
|
17445
|
+
};
|
|
17446
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
17447
|
+
__name: "list",
|
|
17448
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
17449
|
+
search: {},
|
|
17450
|
+
searchData: {},
|
|
17451
|
+
data: {},
|
|
17452
|
+
asyncLoading: {},
|
|
17453
|
+
footer: {},
|
|
17454
|
+
header: {},
|
|
17455
|
+
layout: {},
|
|
17456
|
+
scroll: {},
|
|
17457
|
+
size: {},
|
|
17458
|
+
split: {
|
|
17459
|
+
type: Boolean
|
|
17460
|
+
},
|
|
17461
|
+
stripe: {
|
|
17462
|
+
type: Boolean
|
|
17463
|
+
},
|
|
17464
|
+
onBefore: {
|
|
17465
|
+
type: Function
|
|
17466
|
+
},
|
|
17467
|
+
onAfter: {
|
|
17468
|
+
type: Function
|
|
17469
|
+
},
|
|
17470
|
+
onSuccess: {
|
|
17471
|
+
type: Function
|
|
17472
|
+
},
|
|
17473
|
+
onError: {
|
|
17474
|
+
type: Function
|
|
17475
|
+
},
|
|
17476
|
+
service: {
|
|
17477
|
+
type: Function
|
|
17478
|
+
},
|
|
17479
|
+
manual: {
|
|
17480
|
+
type: Boolean
|
|
17481
|
+
},
|
|
17482
|
+
transformParams: {
|
|
17483
|
+
type: Function
|
|
17484
|
+
},
|
|
17485
|
+
transformRes: {
|
|
17486
|
+
type: Function
|
|
17487
|
+
},
|
|
17488
|
+
pagination: {}
|
|
17489
|
+
}, qdCrudListProps),
|
|
17490
|
+
emits: ["update:searchData", "update:data"],
|
|
17491
|
+
setup(__props, {
|
|
17492
|
+
expose: __expose,
|
|
17493
|
+
emit: __emit
|
|
17494
|
+
}) {
|
|
17495
|
+
const props = __props;
|
|
17496
|
+
const emit = __emit;
|
|
17497
|
+
const {
|
|
17498
|
+
data,
|
|
17499
|
+
searchData
|
|
17500
|
+
} = /* @__PURE__ */ useVModels(props, emit, {
|
|
17501
|
+
passive: true
|
|
17502
|
+
});
|
|
17503
|
+
const {
|
|
17504
|
+
t
|
|
17505
|
+
} = useConfig("crud");
|
|
17506
|
+
const reProps = computed(() => {
|
|
17507
|
+
const {
|
|
17508
|
+
data: data2,
|
|
17509
|
+
searchData: inSearchData,
|
|
17510
|
+
search,
|
|
17511
|
+
transformParams,
|
|
17512
|
+
...serviceListOptions
|
|
17513
|
+
} = props;
|
|
17514
|
+
const mergedTransformParams = (params) => {
|
|
17515
|
+
const merged = {
|
|
17516
|
+
...params,
|
|
17517
|
+
...searchData.value
|
|
17518
|
+
};
|
|
17519
|
+
if (transformParams) return transformParams(merged);
|
|
17520
|
+
return merged;
|
|
17521
|
+
};
|
|
17522
|
+
return {
|
|
17523
|
+
searchOptions: search,
|
|
17524
|
+
serviceListOptions: {
|
|
17525
|
+
...serviceListOptions,
|
|
17526
|
+
transformParams: mergedTransformParams
|
|
17527
|
+
},
|
|
17528
|
+
models: {
|
|
17529
|
+
data: data2,
|
|
17530
|
+
searchData: inSearchData
|
|
17531
|
+
}
|
|
17532
|
+
};
|
|
17533
|
+
});
|
|
17534
|
+
const searchRef = useTemplateRef("search");
|
|
17535
|
+
const listRef = useTemplateRef("list");
|
|
17536
|
+
function handleSearch() {
|
|
17537
|
+
}
|
|
17538
|
+
function handleResetSearch() {
|
|
17539
|
+
searchRef.value?.reset();
|
|
17540
|
+
searchRef.value?.submit();
|
|
17541
|
+
}
|
|
17542
|
+
function triggerSearch({
|
|
17543
|
+
validateResult
|
|
17544
|
+
}) {
|
|
17545
|
+
if (validateResult !== true) return;
|
|
17546
|
+
listRef.value?.refresh();
|
|
17547
|
+
}
|
|
17548
|
+
const expose = {};
|
|
17549
|
+
onMounted(() => {
|
|
17550
|
+
Object.assign(expose, listRef.value);
|
|
17551
|
+
});
|
|
17552
|
+
__expose(expose);
|
|
17553
|
+
return (_ctx, _cache) => {
|
|
17554
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [reProps.value.searchOptions?.items?.length ? (openBlock(), createBlock(QdCrudSearch, mergeProps({
|
|
17555
|
+
key: 0,
|
|
17556
|
+
ref: "search",
|
|
17557
|
+
data: unref(searchData),
|
|
17558
|
+
"onUpdate:data": _cache[0] || (_cache[0] = ($event) => isRef(searchData) ? searchData.value = $event : null)
|
|
17559
|
+
}, reProps.value.searchOptions, {
|
|
17560
|
+
"on-submit": triggerSearch
|
|
17561
|
+
}), {
|
|
17562
|
+
footer: withCtx(() => [createVNode(unref(Space), {
|
|
17563
|
+
align: "center",
|
|
17564
|
+
size: "small"
|
|
17565
|
+
}, {
|
|
17566
|
+
default: withCtx(() => [createVNode(unref(Button), {
|
|
17567
|
+
type: "submit",
|
|
17568
|
+
onClick: handleSearch
|
|
17569
|
+
}, {
|
|
17570
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("searchText")), 1)]),
|
|
17571
|
+
_: 1
|
|
17572
|
+
}), createVNode(unref(Button), {
|
|
17573
|
+
variant: "outline",
|
|
17574
|
+
onClick: handleResetSearch
|
|
17575
|
+
}, {
|
|
17576
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("resetText")), 1)]),
|
|
17577
|
+
_: 1
|
|
17578
|
+
})]),
|
|
17579
|
+
_: 1
|
|
17580
|
+
})]),
|
|
17581
|
+
_: 1
|
|
17582
|
+
}, 16, ["data"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_2, [_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(unref(Space), {
|
|
17583
|
+
align: "center",
|
|
17584
|
+
size: "small"
|
|
17585
|
+
}, {
|
|
17586
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "actions", {}, void 0, true)]),
|
|
17587
|
+
_: 3
|
|
17588
|
+
})])) : createCommentVNode("", true), createVNode(unref(QdServiceList), mergeProps({
|
|
17589
|
+
ref: "list",
|
|
17590
|
+
data: unref(data),
|
|
17591
|
+
"onUpdate:data": _cache[1] || (_cache[1] = ($event) => isRef(data) ? data.value = $event : null)
|
|
17592
|
+
}, reProps.value.serviceListOptions), createSlots({
|
|
17593
|
+
_: 2
|
|
17594
|
+
}, [_ctx.$slots.default ? {
|
|
17595
|
+
name: "default",
|
|
17596
|
+
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps)), void 0, true)]),
|
|
17597
|
+
key: "0"
|
|
17598
|
+
} : void 0, renderList(unref(extractSlotsWithPrefix)(_ctx.$slots, "list"), (item) => {
|
|
17599
|
+
return {
|
|
17600
|
+
name: item.filterName,
|
|
17601
|
+
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, item.originalName, normalizeProps(guardReactiveProps(slotProps)), void 0, true)])
|
|
17602
|
+
};
|
|
17603
|
+
})]), 1040, ["data"])])]);
|
|
17604
|
+
};
|
|
17605
|
+
}
|
|
17606
|
+
});
|
|
17607
|
+
const list = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-13f38849"]]);
|
|
17245
17608
|
function defineQdCrudTable(config) {
|
|
17246
17609
|
return config;
|
|
17247
17610
|
}
|
|
17611
|
+
function defineQdCrudList(config) {
|
|
17612
|
+
return config;
|
|
17613
|
+
}
|
|
17248
17614
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
17249
17615
|
...{
|
|
17250
17616
|
name: "QdDictSelect"
|
|
@@ -18311,17 +18677,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18311
18677
|
async (newVal, oldVal) => {
|
|
18312
18678
|
if (!newVal.length || checkSameObject(newVal, oldVal) || fileList.value.length) return;
|
|
18313
18679
|
const { valueMode } = reProps.value;
|
|
18314
|
-
|
|
18315
|
-
|
|
18316
|
-
|
|
18317
|
-
|
|
18318
|
-
ossList = res;
|
|
18319
|
-
} else {
|
|
18320
|
-
const [err, res] = await to(getOssByIds(newVal));
|
|
18321
|
-
if (err) return;
|
|
18322
|
-
ossList = res;
|
|
18323
|
-
}
|
|
18324
|
-
fileList.value = ossList.map((item) => {
|
|
18680
|
+
const apiFn = valueMode === "url" ? getOssByUrls : getOssByIds;
|
|
18681
|
+
const [err, res] = await to(apiFn(newVal));
|
|
18682
|
+
if (err) return;
|
|
18683
|
+
fileList.value = res.map((item) => {
|
|
18325
18684
|
const { url, ossId, originalName, size, createTime } = item;
|
|
18326
18685
|
return {
|
|
18327
18686
|
url,
|
|
@@ -18418,26 +18777,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18418
18777
|
}
|
|
18419
18778
|
});
|
|
18420
18779
|
export {
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18425
|
-
|
|
18426
|
-
|
|
18427
|
-
|
|
18428
|
-
|
|
18429
|
-
|
|
18430
|
-
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
|
|
18780
|
+
QdGrid as A,
|
|
18781
|
+
QdGridItem as B,
|
|
18782
|
+
PROVIDE_GRID_WIDTH_KEY as C,
|
|
18783
|
+
PROVIDE_GRID_ITEM_PROPS_KEY as D,
|
|
18784
|
+
QdServiceTable as E,
|
|
18785
|
+
QdServiceList as F,
|
|
18786
|
+
select as G,
|
|
18787
|
+
_sfc_main as H,
|
|
18788
|
+
hasPermiDirective as I,
|
|
18789
|
+
hasPermi as J,
|
|
18790
|
+
hasRoleDirective as K,
|
|
18791
|
+
hasRole as L,
|
|
18792
|
+
useModal as M,
|
|
18793
|
+
useDict as N,
|
|
18794
|
+
useDictDynamic as O,
|
|
18436
18795
|
PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE as P,
|
|
18437
18796
|
QdConfigProvider as Q,
|
|
18797
|
+
useReadonly as R,
|
|
18798
|
+
useDisabled as S,
|
|
18799
|
+
auth as T,
|
|
18438
18800
|
_typeof as _,
|
|
18439
|
-
_sfc_main$
|
|
18440
|
-
_sfc_main$
|
|
18801
|
+
_sfc_main$i as a,
|
|
18802
|
+
_sfc_main$h as b,
|
|
18441
18803
|
commonjsGlobal as c,
|
|
18442
18804
|
dayjs_minExports$1 as d,
|
|
18443
18805
|
qdAsyncCompute as e,
|
|
@@ -18445,22 +18807,22 @@ export {
|
|
|
18445
18807
|
getValueByPath as g,
|
|
18446
18808
|
defineQdCrudTable as h,
|
|
18447
18809
|
index as i,
|
|
18448
|
-
|
|
18449
|
-
_sfc_main$
|
|
18450
|
-
|
|
18451
|
-
|
|
18452
|
-
|
|
18453
|
-
|
|
18810
|
+
defineQdCrudList as j,
|
|
18811
|
+
_sfc_main$d as k,
|
|
18812
|
+
list as l,
|
|
18813
|
+
_sfc_main$8 as m,
|
|
18814
|
+
_sfc_main$4 as n,
|
|
18815
|
+
radioGroup as o,
|
|
18454
18816
|
parseVModelPath as p,
|
|
18455
18817
|
qdCompute as q,
|
|
18456
18818
|
resolveVModelBinding as r,
|
|
18457
18819
|
setValueByPath as s,
|
|
18458
18820
|
table as t,
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
18462
|
-
|
|
18463
|
-
|
|
18464
|
-
|
|
18821
|
+
checkboxGroup as u,
|
|
18822
|
+
_sfc_main$1 as v,
|
|
18823
|
+
_sfc_main$9 as w,
|
|
18824
|
+
QdFormItem as x,
|
|
18825
|
+
qdFormGutter as y,
|
|
18826
|
+
qdFormGrid as z
|
|
18465
18827
|
};
|
|
18466
|
-
//# sourceMappingURL=index-
|
|
18828
|
+
//# sourceMappingURL=index-120nQHhl.mjs.map
|