From df3ae297017812d35856e211daa3c8e803890249 Mon Sep 17 00:00:00 2001 From: winter_born <2264596049@qq.com> Date: Mon, 13 Apr 2026 00:20:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86b=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=9A=84=E7=AC=AC=E4=BA=8C=E5=9D=97=EF=BC=8C=E8=BF=98=E6=9C=89?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E7=BB=84=E4=BB=B6=E6=B2=A1=E6=9C=89=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/part.vue | 123 +++++++++++++++++++---- components/student_write.vue | 13 +++ pages.json | 8 +- pages/index/index.vue | 53 ++++++---- pages/index/student.vue | 184 +++++++++++++++++++++++++++++++++-- 5 files changed, 332 insertions(+), 49 deletions(-) create mode 100644 components/student_write.vue diff --git a/components/part.vue b/components/part.vue index 1301d5c..fe7a9a6 100644 --- a/components/part.vue +++ b/components/part.vue @@ -1,9 +1,14 @@ @@ -11,31 +16,113 @@ export default { props: { part_title: {}, - part_content: {} + part_content: {}, + index: Number }, data() { - return {} + return { + startX: 0, + startOffset: 0, + offsetx: 0, + rightoffsetx: 20, + movemax: 100, + isopen: false + } }, methods: { + part_start(e) { + this.startX = e.touches[0].clientX; + this.startOffset = this.offsetx; + }, + part_move(e) { + this.isopen = true; + let moveX = e.touches[0].clientX - this.startX; + let newOffset = this.startOffset + moveX; + if (newOffset > 0) { + newOffset = 0; + } else if (newOffset < -this.movemax) { + newOffset = -this.movemax; + + } + this.rightoffsetx = newOffset; + this.offsetx = newOffset; + }, + part_end(e) { + if (this.offsetx < -this.movemax / 2) { + this.offsetx = -this.movemax; + this.isopen = true; + } else { + this.offsetx = 0; + this.rightoffsetx = 20; + this.isopen = false; + } + }, + deleteItem() { + this.$emit('delete', this.index); + } } } - + margin-bottom: 10px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .part p:nth-child(2) { + font-size: 0.8rem; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; + } + + .detele { + text-align: center; + background-color:#C2050F; + position: absolute; + top: 0; + right: 0px; + bottom: 0; + width: 100px; + z-index: 1; + transform: translateX(100px); + display: flex; + align-items: center; + justify-content: center; + color: #fff; + } + \ No newline at end of file diff --git a/components/student_write.vue b/components/student_write.vue new file mode 100644 index 0000000..ddadfea --- /dev/null +++ b/components/student_write.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/pages.json b/pages.json index 745b56f..23d8288 100644 --- a/pages.json +++ b/pages.json @@ -21,7 +21,13 @@ "enablePullDownRefresh": false } - } + }, + { + "path": "components/student_write", + "style": { + "navigationBarTitleText": "" + } + } ], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/pages/index/index.vue b/pages/index/index.vue index 3947f20..3baac42 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -16,7 +16,7 @@

2021年河北省“最美基层高校毕业生”先进事迹发布

-

河北省委宣传部、省人社局在“最美河北.....

+

河北省委宣传部、省人社局在“最美河北最美河北最美河北最美河北最美河北最美河北最美河北最美河北

> @@ -30,9 +30,9 @@ -

中宣部授予肖文儒“时代楷模”...

+

中宣部授予肖文儒“时代楷模”楷模楷模楷模楷模楷模楷模楷模楷模楷模楷模楷模楷模楷模楷模

模特姓名:肖文儒

-

38年来,国家安全生产应急救援中心副主任兼工程师肖文儒参与过多次重...

+

38年来,国家安全生产应急救援中心副主任兼工程师肖文儒参与过多次重大建设工程重大建设工程重大建设工程重大建设工程重大建设工程重大建设工程重大建设工程

@@ -60,7 +60,7 @@ return this.isRed ? 'red' : 'black' }, imagepaths() { - const base_url = "http://124.93.196.45:10091/Neusoft/times-model/appStudy/app/historyList" + let Path = Array.from({ length: 6 }, (_, x) => `../../static/c${x+1}.png`); @@ -68,17 +68,7 @@ // length: 6 // }, (_, x) => `英雄故事`); let value = ["楷模列表", "英雄故事", "身边英雄", "物资捐赠", "数据分析", "更多"] - async function text() { - const text = await fetch(base_url, { - method: "GET", - headers: { - "Content-Type": "application/json", - "Authorization": "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImIyOGYwYjkzLTU0ZTktNDM3MC05NTczLWUzMWE5MDA2OGM5MyJ9.Gqqt22q3ZxXWZ04gHq5F0tTKPypHRqjGOhCe1NcUjvSplv6GschoZW_3xc_MOI-T38u_81kTXX7LAt7PXemM3w" - } - }) - return await text.json() - } - text().then(data => console.log(data)); + return Path.map((path, index) => ({ path: path, value: value[index] @@ -89,14 +79,13 @@ toggleColor() { this.isRed = !this.isRed } - } - } + }} + + \ No newline at end of file diff --git a/pages/index/student.vue b/pages/index/student.vue index 94574d7..f61a7e4 100644 --- a/pages/index/student.vue +++ b/pages/index/student.vue @@ -7,10 +7,42 @@ activeColor="red"> - + + + + 新建感言 + - 选项卡2的内容 + + +

中宣部授予肖文儒“时代楷模”称号

+

2022-04-15 08:00

+

为了贯彻落实习近平总书记在中央人才工作会议上的重要讲话精神,大力倡导尊重知识尊重人才理念,中央宣传部以云计算工程的算工程的算工程的算工程的

+
+ + + +

学习笔记

+

删除

+
+ + {{useInput}} + +
+ + +

添加笔记

+
+
+
+
+ + + + + +

{{path_image[1]}}

@@ -19,15 +51,25 @@ - \ No newline at end of file