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