@@ -28,7 +28,7 @@ defineOptions({ name: "ArticleShare" })
2828
2929const copied = ref (false )
3030const isClient =
31- typeof window !== " undefined" && typeof document !== " undefined"
31+ typeof window !== " undefined" && typeof document !== " undefined"
3232
3333const shareLink = computed (() => {
3434 if (! isClient ) return " "
@@ -87,28 +87,27 @@ onMounted(() => {
8787 </script >
8888
8989<template >
90- <div class = " article-share " >
91- <button
92- :class =" ['article-share__button', { copied: copied }]"
93- :aria-label =" copied ? props.copiedText : props.shareText"
94- aria-live = " polite "
95- @click = " copyToClipboard " >
96- < div v-if = " !copied " class = " content-wrapper " >
97- <span class = " icon " v-html = " shareIconSvg " ></ span >
98- {{ props.shareText }}
99- </ div >
100-
101- < div v-else class = " content-wrapper " >
102- <span class = " icon " v-html = " copiedIconSvg " ></ span >
103- {{ props.copiedText }}
104- </div >
105- </ button >
90+ <div style = " display : flex ; justify-content : center ; align-items : center ; " >
91+ <div class = " article-share " >
92+ < button :class =" ['article-share__button', { copied: copied }]"
93+ :aria-label =" copied ? props.copiedText : props.shareText" aria-live = " polite " @click = " copyToClipboard " >
94+ < div v-if = " !copied " class = " content-wrapper " >
95+ < span class = " icon " v-html = " shareIconSvg " ></ span >
96+ {{ props.shareText }}
97+ </ div >
98+
99+ < div v-else class = " content-wrapper " >
100+ < span class = " icon " v-html = " copiedIconSvg " ></ span >
101+ {{ props.copiedText }}
102+ </ div >
103+ </ button >
104+ </div >
105+ <div class = " wwads-cn wwads-vertical sponsors " data-id = " 380 " style = " max-width : 180 px " ></ div >
106106 </div >
107- < div class = " wwads-cn wwads-vertical sponsors " data-id = " 380 " style = " max-width : 180 px " ></ div >
107+
108108</template >
109109
110110<style scoped>
111-
112111.article-share {
113112 padding : 14px 0 ;
114113}
@@ -157,7 +156,8 @@ onMounted(() => {
157156}
158157
159158.article-share__button.copied {
160- color : var (--vp-c-brand-1 , #007acc ); /* 增加了备用颜色 */
159+ color : var (--vp-c-brand-1 , #007acc );
160+ /* 增加了备用颜色 */
161161 background-color : var (--vp-c-brand-soft , #ddf4ff );
162162}
163163
0 commit comments