hzerojs-plugin-yqcloud-jssdk 1.0.18 → 1.0.20
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/lib/index.js +13 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -158,7 +158,19 @@ var src_default = (props) => {
|
|
|
158
158
|
function defaultIcon() {
|
|
159
159
|
return /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } });
|
|
160
160
|
}
|
|
161
|
-
const menu = /* @__PURE__ */ import_react.default.createElement(import_menu.default, null, (_a = appConfig == null ? void 0 : appConfig.openFunctions) == null ? void 0 : _a.map((openFunction) =>
|
|
161
|
+
const menu = /* @__PURE__ */ import_react.default.createElement(import_menu.default, null, (_a = appConfig == null ? void 0 : appConfig.openFunctions) == null ? void 0 : _a.map((openFunction) => {
|
|
162
|
+
if (openFunction.enabledFlag) {
|
|
163
|
+
return /* @__PURE__ */ import_react.default.createElement(import_menu.default.Item, { onClick: () => openModal(openFunction), key: openFunction.id }, openFunction.icon ? /* @__PURE__ */ import_react.default.createElement(
|
|
164
|
+
"img",
|
|
165
|
+
{
|
|
166
|
+
style: { width: 18, height: 18, marginRight: 10 },
|
|
167
|
+
src: `${apiHost}/hfle/yqc/v1/0/files/download-by-key?fileKey=${openFunction.icon}`,
|
|
168
|
+
alt: ""
|
|
169
|
+
}
|
|
170
|
+
) : defaultIcon(), openFunction.displayName);
|
|
171
|
+
}
|
|
172
|
+
return null;
|
|
173
|
+
}));
|
|
162
174
|
const onlyOneButton = /* @__PURE__ */ import_react.default.createElement("div", { className: "yq-hzero-jssdk-btn", style: { padding: 0 }, onClick: () => openModal(appConfig == null ? void 0 : appConfig.openFunctions[0]) }, appConfig.icon ? /* @__PURE__ */ import_react.default.createElement("img", { style: { width: 18, height: 18, marginRight: 10 }, src: `${apiHost}/hfle/yqc/v1/0/files/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name));
|
|
163
175
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "yqcloud-hzero-jssdk", ref: eleRef }, ((_b = appConfig == null ? void 0 : appConfig.openFunctions) == null ? void 0 : _b.length) === 1 ? onlyOneButton : /* @__PURE__ */ import_react.default.createElement(import_popover.default, { overlayClassName: "yqcloud-hzero-jssdk-popover", overlayStyle: { padding: 0 }, openClassName: "yqcloud-hzero-jssdk-popover", content: menu, placement: "left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "yq-hzero-jssdk-btn", style: { padding: 0 } }, appConfig.icon ? /* @__PURE__ */ import_react.default.createElement("img", { style: { width: 18, height: 18, marginRight: 10 }, src: `${apiHost}/hfle/yqc/v1/0/files/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name))));
|
|
164
176
|
};
|