super-page-runtime 2.3.35-cdnTmp1 → 2.3.35-cdnTmp2
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.
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as P, ref as s, computed as h, onMounted as j, nextTick as q, resolveComponent as f, createBlock as V, openBlock as d, normalizeStyle as T, normalizeClass as A, unref as n, withCtx as p, createVNode as _, createCommentVNode as R, createTextVNode as F, toDisplayString as S, createElementBlock as J } from "vue";
|
|
2
2
|
import { getFormModelFields as M } from "../../../../utils/page-init-util.mjs";
|
|
3
3
|
import { getVariableValue as w } from "../../../../utils/page-helper-util.mjs";
|
|
4
4
|
import { handleAfterInitEvent as W, handleEvent as G } from "../../../../utils/events/event-util.mjs";
|
|
5
5
|
import { $t as H } from "../../../../utils/i18n-util.mjs";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const te = N({ __name: "link-runtime", props: { pageContext: {}, configure: {} }, setup(I) {
|
|
6
|
+
import { analysisValue as K, SuperIcon as L } from "agilebuilder-ui";
|
|
7
|
+
const ee = P({ __name: "link-runtime", props: { pageContext: {}, configure: {} }, setup(I) {
|
|
9
8
|
var b;
|
|
10
|
-
const t = I, m = M(t.pageContext, t.configure), o = t.configure.runtime ? t.configure.runtime : {}, B = o.style, $ = o.class,
|
|
9
|
+
const t = I, m = M(t.pageContext, t.configure), o = t.configure.runtime ? t.configure.runtime : {}, B = o.style, $ = o.class, z = o.headerStyle, a = s(o.props ? o.props : {});
|
|
11
10
|
a.value;
|
|
12
11
|
const l = s();
|
|
13
12
|
(b = t.configure.props) != null && b.linkPage && (l.value = t.configure.props.linkPage);
|
|
@@ -17,7 +16,7 @@ const te = N({ __name: "link-runtime", props: { pageContext: {}, configure: {} }
|
|
|
17
16
|
let e = w(i, m);
|
|
18
17
|
if (e = e == null || e == null ? "" : e, g) e = g.replace(/\${value}/g, e);
|
|
19
18
|
else if (l.value && l.value.displayTextJudge && ((r = l.value.dynamicTags) == null ? void 0 : r.length) > 0) {
|
|
20
|
-
const u =
|
|
19
|
+
const u = K(l.value.dynamicTags.join("-#-#"), i.data, i.request, i.context, t.pageContext);
|
|
21
20
|
if (u) return u;
|
|
22
21
|
}
|
|
23
22
|
return e;
|
|
@@ -28,16 +27,16 @@ const te = N({ __name: "link-runtime", props: { pageContext: {}, configure: {} }
|
|
|
28
27
|
return e = e == null || e == null ? "" : e, y.replace(/\${value}/g, e);
|
|
29
28
|
}));
|
|
30
29
|
const k = s(null), x = s(null), C = s(null);
|
|
31
|
-
return
|
|
30
|
+
return j(() => {
|
|
32
31
|
q(() => {
|
|
33
32
|
const e = v.value;
|
|
34
33
|
W(e, t.pageContext, t.configure, { formItemRef: k.value, componentRef: x.value, titleRef: C.value, value: e, entity: t.pageContext.entity.data, pageData: t.pageContext.entity.page });
|
|
35
34
|
});
|
|
36
35
|
}), (e, r) => {
|
|
37
|
-
const u = f("el-link"),
|
|
38
|
-
return d(), V(
|
|
36
|
+
const u = f("el-link"), D = f("el-tooltip"), E = f("el-form-item");
|
|
37
|
+
return d(), V(E, { ref_key: "formItemRef", ref: k, class: A(n($)), "label-width": a.value.labelWidth, style: T(n(B)) }, { label: p(() => [a.value.tittleShow ? (d(), J("div", { key: 0, ref_key: "titleRef", ref: C, style: T({ ...n(z) }) }, S(n(H)(a.value.title)), 5)) : R("", !0)]), default: p(() => [_(D, { disabled: !n(c), content: n(c) }, { default: p(() => [_(u, { ref_key: "componentRef", ref: x, disabled: a.value.state === "disabled", type: a.value.type, underline: a.value.underline, onClick: r[0] || (r[0] = (N) => n(G)(N, e.pageContext, e.configure, "click", { skipValidate: !0 })) }, { default: p(() => [l.value ? (d(), V(n(L), { key: 0, iconType: l.value.iconType, iconValue: l.value.icon }, null, 8, ["iconType", "iconValue"])) : R("", !0), F(" " + S(v.value), 1)]), _: 1 }, 8, ["disabled", "type", "underline"])]), _: 1 }, 8, ["disabled", "content"])]), _: 1 }, 8, ["class", "label-width", "style"]);
|
|
39
38
|
};
|
|
40
39
|
} });
|
|
41
40
|
export {
|
|
42
|
-
|
|
41
|
+
ee as default
|
|
43
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),S=require("../../../../utils/page-init-util.cjs"),C=require("../../../../utils/page-helper-util.cjs"),k=require("../../../../utils/events/event-util.cjs"),B=require("../../../../utils/i18n-util.cjs"),x=require("agilebuilder-ui"),R=e.defineComponent({__name:"link-runtime",props:{pageContext:{},configure:{}},setup(V){var y;const l=V,p=S.getFormModelFields(l.pageContext,l.configure),o=l.configure.runtime?l.configure.runtime:{},h=o.style,b=o.class,T=o.headerStyle,n=e.ref(o.props?o.props:{});n.value;const a=e.ref();(y=l.configure.props)!=null&&y.linkPage&&(a.value=l.configure.props.linkPage);let s=n.value.formatting;const r=l.pageContext.entity?l.pageContext.entity:{},f=e.computed(()=>{var u;let t=C.getVariableValue(r,p);if(t=t==null||t==null?"":t,s)t=s.replace(/\${value}/g,t);else if(a.value&&a.value.displayTextJudge&&((u=a.value.dynamicTags)==null?void 0:u.length)>0){const i=x.analysisValue(a.value.dynamicTags.join("-#-#"),r.data,r.request,r.context,l.pageContext);if(i)return i}return t});let d=n.value.tooltip,c=null;d&&(c=e.computed(()=>{let t=C.getVariableValue(r,p);return t=t==null||t==null?"":t,d.replace(/\${value}/g,t)}));const g=e.ref(null),v=e.ref(null),m=e.ref(null);return e.onMounted(()=>{e.nextTick(()=>{const t=f.value;k.handleAfterInitEvent(t,l.pageContext,l.configure,{formItemRef:g.value,componentRef:v.value,titleRef:m.value,value:t,entity:l.pageContext.entity.data,pageData:l.pageContext.entity.page})})}),(t,u)=>{const i=e.resolveComponent("el-link"),_=e.resolveComponent("el-tooltip"),q=e.resolveComponent("el-form-item");return e.openBlock(),e.createBlock(q,{ref_key:"formItemRef",ref:g,class:e.normalizeClass(e.unref(b)),"label-width":n.value.labelWidth,style:e.normalizeStyle(e.unref(h))},{label:e.withCtx(()=>[n.value.tittleShow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"titleRef",ref:m,style:e.normalizeStyle({...e.unref(T)})},e.toDisplayString(e.unref(B.$t)(n.value.title)),5)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(_,{disabled:!e.unref(c),content:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"componentRef",ref:v,disabled:n.value.state==="disabled",type:n.value.type,underline:n.value.underline,onClick:u[0]||(u[0]=w=>e.unref(k.handleEvent)(w,t.pageContext,t.configure,"click",{skipValidate:!0}))},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createBlock(e.unref(x.SuperIcon),{key:0,iconType:a.value.iconType,iconValue:a.value.icon},null,8,["iconType","iconValue"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(f.value),1)]),_:1},8,["disabled","type","underline"])]),_:1},8,["disabled","content"])]),_:1},8,["class","label-width","style"])}}});module.exports=R;
|