|
@@ -61,7 +61,10 @@ const NodeDetailModal = defineComponent({
|
|
|
const { t } = useI18n()
|
|
|
const state = reactive({
|
|
|
saving: false,
|
|
|
- detailRef: ref()
|
|
|
+ detailRef: ref(),
|
|
|
+ linkEventShowRef: ref(),
|
|
|
+ linkEventTextRef: ref(),
|
|
|
+ linkUrlRef: ref(),
|
|
|
})
|
|
|
|
|
|
const onConfirm = async () => {
|
|
@@ -72,6 +75,16 @@ const NodeDetailModal = defineComponent({
|
|
|
emit('cancel')
|
|
|
}
|
|
|
|
|
|
+ const onJumpLink = () => {
|
|
|
+ // TODO: onJumpLink
|
|
|
+ }
|
|
|
+
|
|
|
+ const getLinkEventText = (status: boolean, text: string, url: 'string') => {
|
|
|
+ state.linkEventShowRef = status
|
|
|
+ state.linkEventTextRef = text
|
|
|
+ state.linkUrlRef = url
|
|
|
+ }
|
|
|
+
|
|
|
watch(
|
|
|
() => props.data,
|
|
|
async () => {
|
|
@@ -83,12 +96,14 @@ const NodeDetailModal = defineComponent({
|
|
|
return {
|
|
|
t,
|
|
|
...toRefs(state),
|
|
|
+ getLinkEventText,
|
|
|
onConfirm,
|
|
|
- onCancel
|
|
|
+ onCancel,
|
|
|
+ onJumpLink
|
|
|
}
|
|
|
},
|
|
|
render() {
|
|
|
- const { t, show, onConfirm, onCancel, projectCode, data, readonly, from } =
|
|
|
+ const { t, show, onConfirm, onCancel, projectCode, data, readonly, from, onJumpLink } =
|
|
|
this
|
|
|
return (
|
|
|
<Modal
|
|
@@ -98,6 +113,9 @@ const NodeDetailModal = defineComponent({
|
|
|
confirmLoading={false}
|
|
|
confirmDisabled={readonly}
|
|
|
onCancel={onCancel}
|
|
|
+ linkEventShow={this.linkEventShowRef}
|
|
|
+ linkEventText={this.linkEventTextRef}
|
|
|
+ onJumpLink={onJumpLink}
|
|
|
>
|
|
|
<Detail
|
|
|
ref='detailRef'
|
|
@@ -105,6 +123,7 @@ const NodeDetailModal = defineComponent({
|
|
|
projectCode={projectCode}
|
|
|
readonly={readonly}
|
|
|
from={from}
|
|
|
+ onLinkEventText={this.getLinkEventText}
|
|
|
/>
|
|
|
</Modal>
|
|
|
)
|