From 369f28128b4bdb0391f3cedd3afa73dc9bef27a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=80=A1=E6=9E=97?= Date: Tue, 27 Feb 2024 10:05:01 +0800 Subject: [PATCH] docs(steps): optimize demo (#1415) --- .../app/steps/advanced-steps-composition-api.vue | 2 +- .../sites/demos/pc/app/steps/advanced-steps.vue | 2 +- .../demos/pc/app/steps/click-composition-api.vue | 11 ++--------- examples/sites/demos/pc/app/steps/click.vue | 16 ++++------------ .../time-line/show-divider-composition-api.vue | 2 +- .../demos/pc/app/time-line/show-divider.vue | 2 +- 6 files changed, 10 insertions(+), 25 deletions(-) diff --git a/examples/sites/demos/pc/app/steps/advanced-steps-composition-api.vue b/examples/sites/demos/pc/app/steps/advanced-steps-composition-api.vue index 88042c8c2..abc7bc535 100644 --- a/examples/sites/demos/pc/app/steps/advanced-steps-composition-api.vue +++ b/examples/sites/demos/pc/app/steps/advanced-steps-composition-api.vue @@ -23,6 +23,6 @@ const data = ref([ const advancedClick = (index, node) => { advancedActive.value = index - Modal.message(`节点index: ${index}; 节点信息: ${JSON.stringify(node)}.`) + Modal.message({ message: `节点 index: ${index}; 节点信息: ${JSON.stringify(node)}`, status: 'info' }) } diff --git a/examples/sites/demos/pc/app/steps/advanced-steps.vue b/examples/sites/demos/pc/app/steps/advanced-steps.vue index 59ddf15eb..db03829ea 100644 --- a/examples/sites/demos/pc/app/steps/advanced-steps.vue +++ b/examples/sites/demos/pc/app/steps/advanced-steps.vue @@ -30,7 +30,7 @@ export default { advancedClick(index, node) { this.advancedActive = index - Modal.message(`节点index: ${index}; 节点信息: ${JSON.stringify(node)}.`) + Modal.message({ message: `节点 index: ${index}; 节点信息: ${JSON.stringify(node)}`, status: 'info' }) } } } diff --git a/examples/sites/demos/pc/app/steps/click-composition-api.vue b/examples/sites/demos/pc/app/steps/click-composition-api.vue index ff1fc0f35..666c3d70f 100644 --- a/examples/sites/demos/pc/app/steps/click-composition-api.vue +++ b/examples/sites/demos/pc/app/steps/click-composition-api.vue @@ -1,10 +1,6 @@ @@ -35,14 +31,11 @@ const stepsData = ref([ } ]) const defaultActive = ref(1) -const currentNode = ref(null) const normalClick = (index, node) => { defaultActive.value = index - currentNode.value = { - index, - node: JSON.stringify(node) - } + + Modal.message({ message: `节点 index:${index};节点信息: ${JSON.stringify(node)}`, status: 'info' }) } diff --git a/examples/sites/demos/pc/app/steps/click.vue b/examples/sites/demos/pc/app/steps/click.vue index 567c3243f..a9f6caaa4 100644 --- a/examples/sites/demos/pc/app/steps/click.vue +++ b/examples/sites/demos/pc/app/steps/click.vue @@ -1,16 +1,11 @@ diff --git a/examples/sites/demos/pc/app/time-line/show-divider.vue b/examples/sites/demos/pc/app/time-line/show-divider.vue index 5b1f2958c..c22328b9b 100644 --- a/examples/sites/demos/pc/app/time-line/show-divider.vue +++ b/examples/sites/demos/pc/app/time-line/show-divider.vue @@ -20,7 +20,7 @@ export default { normalClick(index, node) { this.normalActive = index - Modal.message(`节点index: ${index}; 节点信息: ${JSON.stringify(node)}.`) + Modal.message({ message: `节点 index: ${index}; 节点信息: ${JSON.stringify(node)}`, status: 'info' }) } } }