From 38b2ebcdd71d5f59b79c2e9db9f6a857fef34c63 Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期四, 04 七月 2024 12:00:33 +0800 Subject: [PATCH] 艺术戏剧(文本框样式修改) --- src/books/artAndDrama/view/components/chapter001.vue | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/books/artAndDrama/view/components/chapter001.vue b/src/books/artAndDrama/view/components/chapter001.vue index c097982..77e18ae 100644 --- a/src/books/artAndDrama/view/components/chapter001.vue +++ b/src/books/artAndDrama/view/components/chapter001.vue @@ -202,11 +202,11 @@ </p> <p class="text t-l">姝d箟闃熼暱锛� <textarea v-model="questionData.reading.one" placeholder="璇疯緭鍏ュ唴瀹�" rows="6" - style="margin-left: 40px; width: 92%" class="fz-16 fm-son" @change="setBookQuestion"></textarea> + style="margin-left: 40px; width: 92%" class="" @change="setBookQuestion" :class="{ 'textarea-focused': isFocused === 'one' }" @focus="handleFocus('one')" @blur="handleBlur('one')" ></textarea> </p> <p class="text t-l">榛戞殫闃熼暱锛� <textarea v-model="questionData.reading.two" placeholder="璇疯緭鍏ュ唴瀹�" rows="6" - style="margin-left: 40px; width: 92%" class="fz-16 fm-son" @change="setBookQuestion"></textarea> + style="margin-left: 40px; width: 92%" class="" @change="setBookQuestion" :class="{ 'textarea-focused': isFocused === 'two' }" @focus="handleFocus('two')" @blur="handleBlur('two')"></textarea> </p> </div> <!-- 姝ゆ涓洪〉鑴氶儴鍒嗭紙闇�瑕佽缃〉鐮侊級 --> @@ -426,6 +426,7 @@ auidoPathNine: "", accentColor: "", color: "#fff", + isFocused: null, // 鐢ㄤ簬璺熻釜textarea鐨勮仛鐒︾姸鎬� chapterData: { isCollectImg: false, isCollectVideo: false, @@ -733,6 +734,12 @@ "3729175530def1b0baca68e0bd344862" ); }, + handleFocus(id) { + this.isFocused = id; // 褰搕extarea鑱氱劍鏃讹紝璁剧疆涓簍rue + }, + handleBlur(id) { + this.isFocused = null; // 褰搕extarea澶卞幓鐒︾偣鏃讹紝璁剧疆涓篺alse + }, setBookQuestion() { console.log("淇濆瓨"); localStorage.setItem( -- Gitblit v1.9.1