@ibiz-template/vue3-components 0.7.16 → 0.7.17-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,7 +37,7 @@ const UserAction = /* @__PURE__ */ defineComponent({
37
37
  sysImage = imgConfig[predefinedType];
38
38
  }
39
39
  }
40
- const onClick = async () => {
40
+ const onClick = async (event) => {
41
41
  const id = props.modelData.id;
42
42
  const menuC = c.panel.view.getController("appmenu");
43
43
  if (menuC) {
@@ -54,7 +54,9 @@ const UserAction = /* @__PURE__ */ defineComponent({
54
54
  const tempContext = c.panel.context.clone();
55
55
  const tempParam = c.panel.params;
56
56
  tempContext.srfappid = targetMenu.appId || ibiz.env.appId;
57
- await ibiz.commands.execute(AppFuncCommand.TAG, targetMenu.appFuncId, tempContext, tempParam, {});
57
+ await ibiz.commands.execute(AppFuncCommand.TAG, targetMenu.appFuncId, tempContext, tempParam, {
58
+ event
59
+ });
58
60
  }
59
61
  }
60
62
  };
@@ -68,7 +70,7 @@ const UserAction = /* @__PURE__ */ defineComponent({
68
70
  render() {
69
71
  return createVNode("div", {
70
72
  "class": this.ns.b(),
71
- "onClick": this.onClick,
73
+ "onClick": (event) => this.onClick(event),
72
74
  "title": this.modelData.caption
73
75
  }, [createVNode(resolveComponent("i-biz-icon"), {
74
76
  "class": [this.ns.e("image")],
@@ -1,5 +1,5 @@
1
1
  import { Router } from 'vue-router';
2
- import { IAppUtil } from '@ibiz-template/runtime';
2
+ import { IAppUtil, IAuthResult } from '@ibiz-template/runtime';
3
3
  export declare class AppUtil implements IAppUtil {
4
4
  protected router: Router;
5
5
  /**
@@ -41,7 +41,7 @@ export declare class AppUtil implements IAppUtil {
41
41
  * @param {(IData | undefined)} [opts]
42
42
  * @return {*} {Promise<boolean>}
43
43
  */
44
- changePwd(oldPwd: string, newPwd: string, opts?: IData | undefined): Promise<boolean>;
44
+ changePwd(oldPwd: string, newPwd: string, opts?: IData | undefined): Promise<IAuthResult>;
45
45
  /**
46
46
  * 切换组织
47
47
  *
@@ -47,9 +47,10 @@ class AppUtil {
47
47
  window.history.replaceState({}, "", href);
48
48
  }
49
49
  await this.router.push(
50
- "/login?ru=".concat(encodeURIComponent(
51
- window.location.hash.replace("#/", "/")
52
- ))
50
+ // `/login?ru=${encodeURIComponent(
51
+ // window.location.hash.replace('#/', '/'),
52
+ // )}`,
53
+ "/login"
53
54
  );
54
55
  ibiz.util.showAppLoading();
55
56
  window.location.reload();
@@ -67,11 +68,11 @@ class AppUtil {
67
68
  * @return {*} {Promise<boolean>}
68
69
  */
69
70
  async changePwd(oldPwd, newPwd, opts) {
70
- let bol = this.validatePwd(oldPwd, newPwd, opts);
71
- if (bol) {
72
- bol = await ibiz.auth.changePwd(oldPwd, newPwd);
71
+ if (this.validatePwd(oldPwd, newPwd, opts)) {
72
+ const result = await ibiz.auth.changePwd(oldPwd, newPwd);
73
+ return result;
73
74
  }
74
- return bol;
75
+ return { ok: false, result: {} };
75
76
  }
76
77
  /**
77
78
  * 切换组织