From 4f1521010a63e2e10e1fc96c6cb3a8def76c2383 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 26 Jan 2021 19:21:15 +0800 Subject: [PATCH] fix(Empty): linearGradient id conflict (#8013) --- src/empty/Network.tsx | 74 +++++++++++-------- .../test/__snapshots__/index.spec.js.snap | 60 +++++---------- 2 files changed, 60 insertions(+), 74 deletions(-) diff --git a/src/empty/Network.tsx b/src/empty/Network.tsx index ab821b25c..9ca71c648 100644 --- a/src/empty/Network.tsx +++ b/src/empty/Network.tsx @@ -1,3 +1,4 @@ +const prefix = 'van-empty-network-'; const renderStop = (color: string, offset: number, opacity?: number) => ( ); @@ -5,36 +6,50 @@ const renderStop = (color: string, offset: number, opacity?: number) => ( export const Network = ( - + {renderStop('#FFF', 0, 0.5)} {renderStop('#F2F3F5', 100)} - - {renderStop('#F2F3F5', 0, 0.3)} - {renderStop('#F2F3F5', 100)} - - + {renderStop('#EBEDF0', 0)} {renderStop('#DCDEE0', 100, 0)} - + {renderStop('#EAEDF0', 0)} {renderStop('#DCDEE0', 100)} - + {renderStop('#EAEDF0', 0)} {renderStop('#DCDEE0', 100)} - + {renderStop('#EAEDF0', 0)} {renderStop('#DCDEE0', 100)} - + {renderStop('#EAEDF0', 0)} {renderStop('#DCDEE0', 100)} - - - + - + - + diff --git a/src/empty/test/__snapshots__/index.spec.js.snap b/src/empty/test/__snapshots__/index.spec.js.snap index f528abc30..69866d96c 100644 --- a/src/empty/test/__snapshots__/index.spec.js.snap +++ b/src/empty/test/__snapshots__/index.spec.js.snap @@ -35,7 +35,7 @@ exports[`should render svg when image is network 1`] = `
- - - - - - - - - - - - - - - - - - @@ -202,22 +176,22 @@ exports[`should render svg when image is network 1`] = ` stroke-width="7" > @@ -225,7 +199,7 @@ exports[`should render svg when image is network 1`] = ` - -