qidian-vue-ui 1.1.8 → 1.1.10
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-renderer/index.vue.d.ts +2 -2
- package/dist/components/config-renderer/types.d.ts +1 -1
- package/dist/components/crud/types.d.ts +3 -3
- package/dist/components/dialog/props.d.ts +2 -2
- package/dist/components/form/item.vue.d.ts +1 -0
- package/dist/components/form/props.d.ts +1 -0
- package/dist/components/form/types.d.ts +2 -1
- package/dist/{en-US-BMj7fOeo.js → en-US-DUKL-S6j.js} +2 -2
- package/dist/{en-US-BMj7fOeo.js.map → en-US-DUKL-S6j.js.map} +1 -1
- package/dist/{en-US-9-1VVFlQ.mjs → en-US-f7wG5rQz.mjs} +2 -2
- package/dist/{en-US-9-1VVFlQ.mjs.map → en-US-f7wG5rQz.mjs.map} +1 -1
- package/dist/{index-BfKsdHZD.mjs → index-BA4q8-l9.mjs} +54 -42
- package/dist/{index-BfKsdHZD.mjs.map → index-BA4q8-l9.mjs.map} +1 -1
- package/dist/{index-DERmcLRl.js → index-Ca8Xj7w9.js} +55 -43
- package/dist/{index-DERmcLRl.js.map → index-Ca8Xj7w9.js.map} +1 -1
- package/dist/qidian-vue-ui.css +12 -12
- package/dist/qidian-vue-ui.js +1 -1
- package/dist/qidian-vue-ui.mjs +1 -1
- package/dist/{zh-TW-CaxM2cP6.mjs → zh-TW-8RAM5Jet.mjs} +2 -2
- package/dist/{zh-TW-CaxM2cP6.mjs.map → zh-TW-8RAM5Jet.mjs.map} +1 -1
- package/dist/{zh-TW-DDJbkEBG.js → zh-TW-qAgyPr5d.js} +2 -2
- package/dist/{zh-TW-DDJbkEBG.js.map → zh-TW-qAgyPr5d.js.map} +1 -1
- package/package.json +1 -1
|
@@ -12774,8 +12774,8 @@ const QdConfigProvider = vue.defineComponent({
|
|
|
12774
12774
|
vue.watchEffect(async () => {
|
|
12775
12775
|
const localeMap = {
|
|
12776
12776
|
"zh-CN": () => Promise.resolve().then(() => zhCN$1),
|
|
12777
|
-
"zh-TW": () => Promise.resolve().then(() => require("./zh-TW-
|
|
12778
|
-
"en-US": () => Promise.resolve().then(() => require("./en-US-
|
|
12777
|
+
"zh-TW": () => Promise.resolve().then(() => require("./zh-TW-qAgyPr5d.js")),
|
|
12778
|
+
"en-US": () => Promise.resolve().then(() => require("./en-US-DUKL-S6j.js"))
|
|
12779
12779
|
};
|
|
12780
12780
|
const loadLocale = localeMap[props.locale] || localeMap["zh-CN"];
|
|
12781
12781
|
const [err, res] = await to(
|
|
@@ -13982,26 +13982,22 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
13982
13982
|
context: {},
|
|
13983
13983
|
fnInjectCtx: { type: Boolean }
|
|
13984
13984
|
},
|
|
13985
|
-
emits: ["
|
|
13985
|
+
emits: ["ifRenderChange"],
|
|
13986
13986
|
setup(__props, { emit: __emit }) {
|
|
13987
13987
|
const props = __props;
|
|
13988
13988
|
const emit = __emit;
|
|
13989
13989
|
const currentContext = vue.computed(() => props.config.context || props.context || {});
|
|
13990
|
-
const
|
|
13991
|
-
const
|
|
13992
|
-
if (
|
|
13993
|
-
if (
|
|
13990
|
+
const reIfRender = vue.computed(() => {
|
|
13991
|
+
const ifRender = props.config.ifRender;
|
|
13992
|
+
if (isEmpty(ifRender)) return true;
|
|
13993
|
+
if (ifRender?.__qdCompute || ifRender?.__qdAsyncCompute) {
|
|
13994
13994
|
const { result } = qdUseComputeValue(
|
|
13995
|
-
|
|
13995
|
+
ifRender,
|
|
13996
13996
|
currentContext
|
|
13997
13997
|
);
|
|
13998
13998
|
return result.value;
|
|
13999
13999
|
}
|
|
14000
|
-
return
|
|
14001
|
-
});
|
|
14002
|
-
const shouldRender = vue.computed(() => {
|
|
14003
|
-
const value = vIfValue.value;
|
|
14004
|
-
return value !== false && value !== null && value !== void 0;
|
|
14000
|
+
return ifRender;
|
|
14005
14001
|
});
|
|
14006
14002
|
const resolvedComponent = vue.computed(() => {
|
|
14007
14003
|
const { is, render } = props.config;
|
|
@@ -14039,7 +14035,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
14039
14035
|
}
|
|
14040
14036
|
});
|
|
14041
14037
|
Object.entries(config).forEach(([key, value]) => {
|
|
14042
|
-
if (["is", "context", "slots", "
|
|
14038
|
+
if (["is", "context", "slots", "ifRender"].includes(key)) return;
|
|
14043
14039
|
if (key.startsWith("vModel")) return;
|
|
14044
14040
|
if (key.startsWith("default")) {
|
|
14045
14041
|
const propName = key.slice(7);
|
|
@@ -14063,15 +14059,15 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
14063
14059
|
return componentProps2;
|
|
14064
14060
|
});
|
|
14065
14061
|
vue.watch(
|
|
14066
|
-
|
|
14062
|
+
reIfRender,
|
|
14067
14063
|
(newV, oldV) => {
|
|
14068
14064
|
if (newV === oldV) return;
|
|
14069
|
-
emit("
|
|
14065
|
+
emit("ifRenderChange", newV);
|
|
14070
14066
|
},
|
|
14071
14067
|
{ immediate: true }
|
|
14072
14068
|
);
|
|
14073
14069
|
return (_ctx, _cache) => {
|
|
14074
|
-
return
|
|
14070
|
+
return reIfRender.value !== false ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(resolvedComponent.value), vue.normalizeProps(vue.mergeProps({ key: 0 }, componentProps.value)), vue.createSlots({ _: 2 }, [
|
|
14075
14071
|
vue.renderList(__props.config.slots, (slotConfig, slotName) => {
|
|
14076
14072
|
return {
|
|
14077
14073
|
name: slotName,
|
|
@@ -14208,7 +14204,6 @@ const qdFormGrid = {
|
|
|
14208
14204
|
const qdFormProps = {
|
|
14209
14205
|
gutter: () => qdFormGutter,
|
|
14210
14206
|
grid: () => qdFormGrid,
|
|
14211
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14212
14207
|
data: () => ({}),
|
|
14213
14208
|
disabled: void 0,
|
|
14214
14209
|
readonly: void 0,
|
|
@@ -14228,7 +14223,8 @@ const qdFormItemProps = {
|
|
|
14228
14223
|
showErrorMessage: void 0,
|
|
14229
14224
|
statusIcon: void 0,
|
|
14230
14225
|
successBorder: false,
|
|
14231
|
-
defaultClearable: void 0
|
|
14226
|
+
defaultClearable: void 0,
|
|
14227
|
+
ifRender: void 0
|
|
14232
14228
|
};
|
|
14233
14229
|
const qdServiceTableProps = {
|
|
14234
14230
|
data: () => [],
|
|
@@ -16485,7 +16481,7 @@ const qdDialogProps = {
|
|
|
16485
16481
|
closeOnEscKeydown: true,
|
|
16486
16482
|
closeOnOverlayClick: false,
|
|
16487
16483
|
confirmOnEnter: void 0,
|
|
16488
|
-
destroyOnClose:
|
|
16484
|
+
destroyOnClose: false,
|
|
16489
16485
|
lazy: true,
|
|
16490
16486
|
placement: "center",
|
|
16491
16487
|
preventScrollThrough: true,
|
|
@@ -16743,6 +16739,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
16743
16739
|
context: {},
|
|
16744
16740
|
component: {},
|
|
16745
16741
|
required: { type: [Boolean, String] },
|
|
16742
|
+
ifRender: { type: [Boolean, Function, Object] },
|
|
16746
16743
|
for: {},
|
|
16747
16744
|
help: {},
|
|
16748
16745
|
label: {},
|
|
@@ -16763,6 +16760,18 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
16763
16760
|
}, qdFormItemProps),
|
|
16764
16761
|
setup(__props) {
|
|
16765
16762
|
const props = __props;
|
|
16763
|
+
const reIfRender = vue.computed(() => {
|
|
16764
|
+
const ifRender = props.ifRender;
|
|
16765
|
+
if (isEmpty(ifRender)) return true;
|
|
16766
|
+
if (ifRender?.__qdCompute || ifRender?.__qdAsyncCompute) {
|
|
16767
|
+
const { result } = qdUseComputeValue(
|
|
16768
|
+
ifRender,
|
|
16769
|
+
vue.computed(() => props.context || {})
|
|
16770
|
+
);
|
|
16771
|
+
return result.value;
|
|
16772
|
+
}
|
|
16773
|
+
return ifRender;
|
|
16774
|
+
});
|
|
16766
16775
|
const reProps = vue.computed(() => {
|
|
16767
16776
|
const { col, row, context, component, required, rules, ...formItemOptions } = props;
|
|
16768
16777
|
const reRules = rules || [];
|
|
@@ -16790,7 +16799,10 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
16790
16799
|
};
|
|
16791
16800
|
});
|
|
16792
16801
|
return (_ctx, _cache) => {
|
|
16793
|
-
return vue.openBlock(), vue.createBlock(vue.unref(QdGridItem), vue.mergeProps({
|
|
16802
|
+
return reIfRender.value !== false ? (vue.openBlock(), vue.createBlock(vue.unref(QdGridItem), vue.mergeProps({
|
|
16803
|
+
key: 0,
|
|
16804
|
+
class: "qd-form-item"
|
|
16805
|
+
}, reProps.value.gridItemOptions), {
|
|
16794
16806
|
default: vue.withCtx(() => [
|
|
16795
16807
|
vue.createVNode(vue.unref(tdesignVueNext.FormItem), vue.normalizeProps(vue.guardReactiveProps(reProps.value.formItemOptions)), {
|
|
16796
16808
|
default: vue.withCtx(() => [
|
|
@@ -16808,11 +16820,11 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
16808
16820
|
}, 16)
|
|
16809
16821
|
]),
|
|
16810
16822
|
_: 3
|
|
16811
|
-
}, 16);
|
|
16823
|
+
}, 16)) : vue.createCommentVNode("", true);
|
|
16812
16824
|
};
|
|
16813
16825
|
}
|
|
16814
16826
|
});
|
|
16815
|
-
const QdFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
16827
|
+
const QdFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-a363e096"]]);
|
|
16816
16828
|
const PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE = Symbol("QdFormAddBeforeSubmitQueue");
|
|
16817
16829
|
function useModal() {
|
|
16818
16830
|
const { t } = useConfig("modal");
|
|
@@ -17231,12 +17243,12 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
17231
17243
|
qdDialogOptions: {
|
|
17232
17244
|
...wrapper,
|
|
17233
17245
|
onOpened: () => {
|
|
17234
|
-
wrapper.onOpened?.();
|
|
17235
17246
|
Object.assign(expose, formRef.value);
|
|
17247
|
+
wrapper.onOpened?.();
|
|
17236
17248
|
},
|
|
17237
|
-
|
|
17238
|
-
wrapper.onClose?.(context);
|
|
17249
|
+
onBeforeClose: () => {
|
|
17239
17250
|
formRef.value?.reset();
|
|
17251
|
+
wrapper.onBeforeClose?.();
|
|
17240
17252
|
},
|
|
17241
17253
|
confirmLoading: reConfirmLoading,
|
|
17242
17254
|
closeOnEscKeydown: loading || reConfirmLoading ? false : wrapper.closeOnEscKeydown,
|
|
@@ -18572,7 +18584,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
18572
18584
|
} = useModal();
|
|
18573
18585
|
const treeIsExpand = vue.computed(() => !!expandedTreeNodes.value?.length);
|
|
18574
18586
|
const dialogFormMap = vue.reactive({});
|
|
18575
|
-
const
|
|
18587
|
+
const rowActionsIfRenderMap = vue.reactive({});
|
|
18576
18588
|
const reProps = vue.computed(() => {
|
|
18577
18589
|
const {
|
|
18578
18590
|
data: data2,
|
|
@@ -18992,10 +19004,10 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
18992
19004
|
}
|
|
18993
19005
|
return res;
|
|
18994
19006
|
}
|
|
18995
|
-
function
|
|
18996
|
-
const
|
|
19007
|
+
function setActionIfRender(compIfRender, action, cellIndex) {
|
|
19008
|
+
const ifRender = compIfRender && hasPermiOr(action.permi, false);
|
|
18997
19009
|
if (!cellIndex) {
|
|
18998
|
-
action.
|
|
19010
|
+
action._ifRender = ifRender;
|
|
18999
19011
|
return;
|
|
19000
19012
|
}
|
|
19001
19013
|
const {
|
|
@@ -19003,7 +19015,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
19003
19015
|
rowIndex,
|
|
19004
19016
|
index: index2
|
|
19005
19017
|
} = cellIndex;
|
|
19006
|
-
|
|
19018
|
+
rowActionsIfRenderMap[`${colIndex}.${rowIndex}.${index2}`] = ifRender;
|
|
19007
19019
|
}
|
|
19008
19020
|
function getActionSeparator(action, cellIndex) {
|
|
19009
19021
|
const {
|
|
@@ -19013,17 +19025,17 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
19013
19025
|
} = cellIndex;
|
|
19014
19026
|
if (index2 <= 0) return false;
|
|
19015
19027
|
if (isEmpty(colIndex) && isEmpty(rowIndex)) {
|
|
19016
|
-
if (action.
|
|
19028
|
+
if (action._ifRender === false) return false;
|
|
19017
19029
|
for (let i = index2 - 1; i >= 0; i--) {
|
|
19018
19030
|
const previousAction = reProps.value.actions[i];
|
|
19019
|
-
if (previousAction.
|
|
19031
|
+
if (previousAction._ifRender !== false) return true;
|
|
19020
19032
|
}
|
|
19021
19033
|
return false;
|
|
19022
19034
|
}
|
|
19023
|
-
if (
|
|
19035
|
+
if (rowActionsIfRenderMap[`${colIndex}.${rowIndex}.${index2}`] === false) return false;
|
|
19024
19036
|
for (let i = index2 - 1; i >= 0; i--) {
|
|
19025
|
-
const
|
|
19026
|
-
if (
|
|
19037
|
+
const previousIfRender = rowActionsIfRenderMap[`${colIndex}.${rowIndex}.${i}`];
|
|
19038
|
+
if (previousIfRender !== false) return true;
|
|
19027
19039
|
}
|
|
19028
19040
|
return false;
|
|
19029
19041
|
}
|
|
@@ -19089,8 +19101,8 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
19089
19101
|
onClick: buildActionOnClick(item),
|
|
19090
19102
|
disabled: buildActionDisabled(item)
|
|
19091
19103
|
},
|
|
19092
|
-
|
|
19093
|
-
}, null, 8, ["context", "config", "
|
|
19104
|
+
onIfRenderChange: (ifRender) => setActionIfRender(ifRender, item)
|
|
19105
|
+
}, null, 8, ["context", "config", "onIfRenderChange"]), [[vue.unref(vHasPermi), item.permi]])], 64);
|
|
19094
19106
|
}), 128))], true)]),
|
|
19095
19107
|
_: 3
|
|
19096
19108
|
}), vue.createVNode(vue.unref(tdesignVueNext.Space), {
|
|
@@ -19199,12 +19211,12 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
19199
19211
|
...item,
|
|
19200
19212
|
onClick: buildActionOnClick(item, slotProps)
|
|
19201
19213
|
},
|
|
19202
|
-
|
|
19214
|
+
onIfRenderChange: (ifRender) => setActionIfRender(ifRender, item, {
|
|
19203
19215
|
colIndex: slotProps.colIndex,
|
|
19204
19216
|
rowIndex: slotProps.rowIndex,
|
|
19205
19217
|
index: index2
|
|
19206
19218
|
})
|
|
19207
|
-
}, null, 8, ["context", "config", "
|
|
19219
|
+
}, null, 8, ["context", "config", "onIfRenderChange"])), [[vue.unref(vHasPermi), item.permi]])], 64);
|
|
19208
19220
|
}), 256))]),
|
|
19209
19221
|
_: 2
|
|
19210
19222
|
}, 1024)) : vue.createCommentVNode("", true)], true)]),
|
|
@@ -19232,7 +19244,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
19232
19244
|
};
|
|
19233
19245
|
}
|
|
19234
19246
|
});
|
|
19235
|
-
const table = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
19247
|
+
const table = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-36533111"]]);
|
|
19236
19248
|
const _hoisted_1$3 = {
|
|
19237
19249
|
key: 0,
|
|
19238
19250
|
class: "qd-crud-list__header"
|
|
@@ -28431,7 +28443,7 @@ class NodeFilterFactory extends BaseFilterFactory {
|
|
|
28431
28443
|
}
|
|
28432
28444
|
class NodeCanvasFactory extends BaseCanvasFactory {
|
|
28433
28445
|
_createCanvas(width, height) {
|
|
28434
|
-
const require$1 = process.getBuiltinModule("module").createRequire(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index-
|
|
28446
|
+
const require$1 = process.getBuiltinModule("module").createRequire(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index-Ca8Xj7w9.js", document.baseURI).href);
|
|
28435
28447
|
const canvas = require$1("@napi-rs/canvas");
|
|
28436
28448
|
return canvas.createCanvas(width, height);
|
|
28437
28449
|
}
|
|
@@ -55784,4 +55796,4 @@ exports.useDictDynamic = useDictDynamic;
|
|
|
55784
55796
|
exports.useDisabled = useDisabled;
|
|
55785
55797
|
exports.useModal = useModal;
|
|
55786
55798
|
exports.useReadonly = useReadonly;
|
|
55787
|
-
//# sourceMappingURL=index-
|
|
55799
|
+
//# sourceMappingURL=index-Ca8Xj7w9.js.map
|