Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
meihua-island-book
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-03-28 13:04:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9dc173728d288eeaf04b7d543da7f6c88d61ee49
9dc17372
1 parent
cd454e3a
fix 详情页富文本显示,给所有 img 标签添加 mode 缩放模式
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
src/pages/detail/index.vue
src/pages/detail/index.vue
View file @
9dc1737
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 202
3-12-28 11:28:30
* @LastEditTime: 202
4-03-28 13:00:53
* @FilePath: /meihuaApp/src/pages/detail/index.vue
* @Description: 房间详情页面
-->
...
...
@@ -184,6 +184,13 @@ onMounted(async () => {
})
});
}
// 给所有 img 标签添加 mode 缩放模式
Taro.options.html.transformElement = (el) => {
if (el.nodeName === 'image') {
el.setAttribute('mode', 'widthFix')
}
return el
}
}
});
...
...
Please
register
or
login
to post a comment