nbb-component-ui 1.3.6 → 1.3.7

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/index.es.js CHANGED
@@ -1,11 +1,11 @@
1
- import { defineComponent as w, ref as o, watch as I, resolveComponent as b, openBlock as k, createBlock as C, withCtx as q, createTextVNode as x } from "vue";
2
- import { ElMessage as u } from "element-plus";
3
- const P = m(), T = async (s) => await P.get({
1
+ import { defineComponent as w, ref as n, watch as I, resolveComponent as k, openBlock as q, createBlock as C, withCtx as b, createTextVNode as x } from "vue";
2
+ import { ElMessage as i } from "element-plus";
3
+ const P = _(), T = async (s) => await P.get({
4
4
  url: "/system/bpm/process-instance/get-approval-detail",
5
5
  params: {
6
6
  processInstanceId: s
7
7
  }
8
- }), F = m(), h = async (s) => await F.get({
8
+ }), F = _(), h = async (s) => await F.get({
9
9
  url: "/system/bpm/task/list-by-process-instance-id",
10
10
  params: {
11
11
  processInstanceId: s
@@ -17,42 +17,42 @@ const P = m(), T = async (s) => await P.get({
17
17
  request: {}
18
18
  },
19
19
  setup(s) {
20
- const n = s, r = o(!1), l = o({}), p = o({}), f = o(""), _ = o([]), a = o(""), v = (t) => {
21
- a.value = t, d(), g();
22
- }, d = async () => {
23
- var t, c;
20
+ const t = s, r = n(!1), u = n({}), p = n({}), f = n(""), m = n([]), a = n(""), v = (o) => {
21
+ a.value = o, g(), d();
22
+ }, g = async () => {
23
+ var o, c;
24
24
  try {
25
25
  r.value = !0;
26
26
  const e = await T(a.value);
27
27
  if (!e) {
28
- u.error("查询不到审批详情信息!");
28
+ i.error("查询不到审批详情信息!");
29
29
  return;
30
30
  }
31
31
  if (!e.processDefinition || !e.processInstance) {
32
- u.error("查询不到流程信息!");
32
+ i.error("查询不到流程信息!");
33
33
  return;
34
34
  }
35
- l.value = e == null ? void 0 : e.processInstance, f.value = (c = (t = e == null ? void 0 : e.processInstance) == null ? void 0 : t.formVariables) == null ? void 0 : c.applicationPrefix, p.value = e == null ? void 0 : e.todoTask;
35
+ u.value = e == null ? void 0 : e.processInstance, f.value = (c = (o = e == null ? void 0 : e.processInstance) == null ? void 0 : o.formVariables) == null ? void 0 : c.applicationPrefix, p.value = e == null ? void 0 : e.todoTask;
36
36
  } finally {
37
37
  r.value = !1;
38
38
  }
39
- }, g = async () => {
40
- _.value = await h(a.value);
39
+ }, d = async () => {
40
+ m.value = await h(a.value);
41
41
  };
42
42
  I(
43
- () => n.processInstanceId,
44
- (t) => {
45
- t && t !== a.value && v(t);
43
+ () => t.processInstanceId,
44
+ (o) => {
45
+ o && o !== a.value && v(o);
46
46
  },
47
47
  { immediate: !0, deep: !0 }
48
48
  );
49
49
  const y = () => {
50
- u.success("aaa!");
50
+ i.success("aaa!");
51
51
  };
52
- return (t, c) => {
53
- const e = b("el-button");
54
- return k(), C(e, { onClick: y }, {
55
- default: q(() => [...c[0] || (c[0] = [
52
+ return (o, c) => {
53
+ const e = k("el-button");
54
+ return q(), C(e, { onClick: y }, {
55
+ default: b(() => [...c[0] || (c[0] = [
56
56
  x("测试按钮3", -1)
57
57
  ])]),
58
58
  _: 1
@@ -60,27 +60,27 @@ const P = m(), T = async (s) => await P.get({
60
60
  };
61
61
  }
62
62
  });
63
- const D = (s, n) => {
63
+ const D = (s, t) => {
64
64
  const r = s.__vccOpts || s;
65
- for (const [l, p] of n)
66
- r[l] = p;
65
+ for (const [u, p] of t)
66
+ r[u] = p;
67
67
  return r;
68
68
  }, E = /* @__PURE__ */ D(B, [["__scopeId", "data-v-e422ef37"]]);
69
- let i = null;
70
- const A = {
71
- install(s, n) {
72
- if (!(n != null && n.request))
69
+ let l = null;
70
+ const N = {
71
+ install(s, t) {
72
+ if (console.log(t), !(t != null && t.request))
73
73
  throw new Error("请在 app.use(NbbComponentUi) 时传入 { request }");
74
- i = n.request, s.component("CmcProcessFlow", E);
74
+ l = t.request, s.component("CmcProcessFlow", E);
75
75
  }
76
76
  };
77
- function m() {
78
- if (!i)
79
- throw new Error("请在 app.use(NbbComponentUi) 时传入 { request }");
80
- return i;
77
+ function _() {
78
+ if (console.log("getRequest", l), !l)
79
+ throw new Error("没有_request对象");
80
+ return l;
81
81
  }
82
82
  export {
83
83
  E as CmcProcessFlow,
84
- A as default,
85
- m as getRequest
84
+ N as default,
85
+ _ as getRequest
86
86
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.NbbComponentUi={},t.Vue,t.ElementPlus))})(this,function(t,e,l){"use strict";const d=u(),g=async n=>await d.get({url:"/system/bpm/process-instance/get-approval-detail",params:{processInstanceId:n}}),y=u(),b=async n=>await y.get({url:"/system/bpm/task/list-by-process-instance-id",params:{processInstanceId:n}}),w=e.defineComponent({__name:"CmcProcessFlow",props:{processInstanceId:{},request:{}},setup(n){const r=n,c=e.ref(!1),f=e.ref({}),_=e.ref({}),C=e.ref(""),I=e.ref([]),i=e.ref(""),v=o=>{i.value=o,k(),x()},k=async()=>{var o,a;try{c.value=!0;const s=await g(i.value);if(!s){l.ElMessage.error("查询不到审批详情信息!");return}if(!s.processDefinition||!s.processInstance){l.ElMessage.error("查询不到流程信息!");return}f.value=s==null?void 0:s.processInstance,C.value=(a=(o=s==null?void 0:s.processInstance)==null?void 0:o.formVariables)==null?void 0:a.applicationPrefix,_.value=s==null?void 0:s.todoTask}finally{c.value=!1}},x=async()=>{I.value=await b(i.value)};e.watch(()=>r.processInstanceId,o=>{o&&o!==i.value&&v(o)},{immediate:!0,deep:!0});const P=()=>{l.ElMessage.success("aaa!")};return(o,a)=>{const s=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(s,{onClick:P},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("测试按钮3",-1)])]),_:1})}}}),T="",m=((n,r)=>{const c=n.__vccOpts||n;for(const[f,_]of r)c[f]=_;return c})(w,[["__scopeId","data-v-e422ef37"]]);let p=null;const q={install(n,r){if(!(r!=null&&r.request))throw new Error("请在 app.use(NbbComponentUi) 时传入 { request }");p=r.request,n.component("CmcProcessFlow",m)}};function u(){if(!p)throw new Error("请在 app.use(NbbComponentUi) 时传入 { request }");return p}t.CmcProcessFlow=m,t.default=q,t.getRequest=u,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.NbbComponentUi={},t.Vue,t.ElementPlus))})(this,function(t,e,u){"use strict";const m=p(),g=async n=>await m.get({url:"/system/bpm/process-instance/get-approval-detail",params:{processInstanceId:n}}),y=p(),q=async n=>await y.get({url:"/system/bpm/task/list-by-process-instance-id",params:{processInstanceId:n}}),w=e.defineComponent({__name:"CmcProcessFlow",props:{processInstanceId:{},request:{}},setup(n){const o=n,c=e.ref(!1),f=e.ref({}),_=e.ref({}),b=e.ref(""),v=e.ref([]),i=e.ref(""),C=r=>{i.value=r,k(),x()},k=async()=>{var r,a;try{c.value=!0;const s=await g(i.value);if(!s){u.ElMessage.error("查询不到审批详情信息!");return}if(!s.processDefinition||!s.processInstance){u.ElMessage.error("查询不到流程信息!");return}f.value=s==null?void 0:s.processInstance,b.value=(a=(r=s==null?void 0:s.processInstance)==null?void 0:r.formVariables)==null?void 0:a.applicationPrefix,_.value=s==null?void 0:s.todoTask}finally{c.value=!1}},x=async()=>{v.value=await q(i.value)};e.watch(()=>o.processInstanceId,r=>{r&&r!==i.value&&C(r)},{immediate:!0,deep:!0});const P=()=>{u.ElMessage.success("aaa!")};return(r,a)=>{const s=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(s,{onClick:P},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("测试按钮3",-1)])]),_:1})}}}),T="",d=((n,o)=>{const c=n.__vccOpts||n;for(const[f,_]of o)c[f]=_;return c})(w,[["__scopeId","data-v-e422ef37"]]);let l=null;const I={install(n,o){if(console.log(o),!(o!=null&&o.request))throw new Error("请在 app.use(NbbComponentUi) 时传入 { request }");l=o.request,n.component("CmcProcessFlow",d)}};function p(){if(console.log("getRequest",l),!l)throw new Error("没有_request对象");return l}t.CmcProcessFlow=d,t.default=I,t.getRequest=p,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/index.ts CHANGED
@@ -12,6 +12,7 @@ let _request: any = null;
12
12
  // 定义插件对象,严格标注类型
13
13
  const plugin: Plugin<NbbComponentUiOptions> = {
14
14
  install(app: App, options: NbbComponentUiOptions) {
15
+ console.log(options)
15
16
  if (!options?.request) {
16
17
  throw new Error('请在 app.use(NbbComponentUi) 时传入 { request }')
17
18
  }
@@ -24,8 +25,9 @@ const plugin: Plugin<NbbComponentUiOptions> = {
24
25
  export {CmcProcessFlow }
25
26
 
26
27
  export function getRequest() {
28
+ console.log('getRequest', _request)
27
29
  if (!_request) {
28
- throw new Error('请在 app.use(NbbComponentUi) 时传入 { request }')
30
+ throw new Error('没有_request对象')
29
31
  }
30
32
  return _request
31
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nbb-component-ui",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",