Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
69be262b
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6373
Star
108
Fork
184
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
24
列表
看板
标记
里程碑
合并请求
2
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
24
Issue
24
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
69be262b
编写于
5月 30, 2025
作者:
DCloud-yinjiacheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新rich-text示例
# Conflicts: # pages/component/rich-text/rich-text-complex.uvue
上级
b5a41cac
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
17 deletion
+17
-17
pages/component/rich-text/rich-text-complex.uvue
pages/component/rich-text/rich-text-complex.uvue
+8
-8
pages/component/rich-text/rich-text-tags.uvue
pages/component/rich-text/rich-text-tags.uvue
+8
-8
pages/component/rich-text/rich-text.uvue
pages/component/rich-text/rich-text.uvue
+1
-1
未找到文件。
pages/component/rich-text/rich-text-complex.uvue
浏览文件 @
69be262b
...
...
@@ -5,10 +5,10 @@
<view>
<page-head title="rich-text-complex"></page-head>
<!-- #ifdef APP-ANDROID -->
<enum-data title="设置
type(仅Android平台支持,默认值为web)" :items="typeItemTypes" @change="onTyp
eChange"></enum-data>
<enum-data title="设置
mode(仅Android平台支持,默认值为web)" :items="modeItemTypes" @change="onMod
eChange"></enum-data>
<!-- #endif -->
<view class="uni-padding-wrap uni-common-mt" @click="fViewClick('触发父 view click 事件')">
<rich-text :nodes="htmlString" :selectable="true" @itemclick="itemClick" @click="selfClick('触发 richtext click 事件')" :
type="typ
e"></rich-text>
<rich-text :nodes="htmlString" :selectable="true" @itemclick="itemClick" @click="selfClick('触发 richtext click 事件')" :
mode="mod
e"></rich-text>
</view>
</view>
<!-- #ifdef APP -->
...
...
@@ -25,13 +25,13 @@
fViewClicked: false,
selfClicked: false,
htmlString: '<p><a href="https://www.dcloud.io/hbuilderx.html">HBuilderX</a><br/><img src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni@2x.png"></img><h1>HBuilderX,轻巧、极速,极客编辑器</h1><p style="color:red;"><small>HBuilderX,轻巧、极速,极客编辑器 </small><big>HBuilderX,轻巧、极速,极客编辑器</big><strong>HBuilderX,轻巧、极速,极客编辑器</strong><i>HBuilderX,轻巧、极速,极客编辑器 </i><u>HBuilderX,轻巧、极速,极客编辑器</u><del>HBuilderX,轻巧、极速,极客编辑器</del></p><h2>uni-app x,终极跨平台方案</h2>、<p style="background-color: yellow;"><small>uni-app x,终极跨平台方案 </small><big>uni-app x,终极跨平台方案</big><strong>uni-appx,终极跨平台方案 </strong><i>uni-app x,终极跨平台方案 </i><u>uni-app x,终极跨平台方案 </u><del>uni-appx,终极跨平台方案</del></p><h3>uniCloud,js serverless云服务</h3><p style="text-decoration: line-through;"><small>uniCloud,js serverless云服务 </small><big>uniCloud,jsserverless云服务</big><strong>uniCloud,js serverless云服务 </strong><i>uniCloud,js serverless云服务 </i><u>uniCloud,jsserverless云服务</u><del>uniCloud,js serverless云服务</del></p><h4>uts,大一统语言</h4><p style="text-align: center;"><small>uts,大一统语言 </small><big>uts,大一统语言 </big><strong>uts,大一统语言</strong><i>uts,大一统语言</i><u>uts,大一统语言 </u><del>uts,大一统语言</del></p><h5>uniMPSdk,让你的App具备小程序能力</h5><h6>uni-admin,开源、现成的全端管理后台</h6><ul><li style="color: red; text-align: left;">uni-app x,终极跨平台方案</li><li style="color: green; text-align: center;">uni-app x,终极跨平台方案</li><li style="color: blue; text-align: right;">uni-app x,终极跨平台方案</li></ul><a href="https://uniapp.dcloud.net.cn">uni-app</a><br/><img src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni@2x.png"></img></p>',
typ
e: 'web',
typ
eItems: ['web', 'native'],
typ
eItemTypes: [{ 'value': 0, 'name': 'web' }, { 'value': 1, 'name': 'native' }] as ItemType[]
mod
e: 'web',
mod
eItems: ['web', 'native'],
mod
eItemTypes: [{ 'value': 0, 'name': 'web' }, { 'value': 1, 'name': 'native' }] as ItemType[]
}
},
methods: {
itemClick(e : RichTextItemClickEvent) {
itemClick(e :
Uni
RichTextItemClickEvent) {
console.log(JSON.stringify(e.detail));
let clicktext = '';
if (e.detail.src != null) {
...
...
@@ -53,8 +53,8 @@
console.log(e)
this.selfClicked = true
},
on
Typ
eChange: function (value : number) {
this.
type = this.typ
eItems[value];
on
Mod
eChange: function (value : number) {
this.
mode = this.mod
eItems[value];
}
}
}
...
...
pages/component/rich-text/rich-text-tags.uvue
浏览文件 @
69be262b
...
...
@@ -4,7 +4,7 @@
<!-- #endif -->
<page-head title="rich-text-tags"></page-head>
<!-- #ifdef APP-ANDROID -->
<enum-data title="设置
type(仅Android平台支持,默认值为web)" :items="typeItemTypes" @change="onTyp
eChange"></enum-data>
<enum-data title="设置
mode(仅Android平台支持,默认值为web)" :items="modeItemTypes" @change="onMod
eChange"></enum-data>
<!-- #endif -->
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-title">
...
...
@@ -13,7 +13,7 @@
<view class="uni-common-mt" v-for="(item,index) in data" :key="index">
<text class="uni-subtitle-text">{{item.name}}</text>
<view style="background:#FFFFFF;">
<rich-text :nodes="item.html" @itemclick="itemClick" :
type="typ
e"></rich-text>
<rich-text :nodes="item.html" @itemclick="itemClick" :
mode="mod
e"></rich-text>
</view>
</view>
</view>
...
...
@@ -301,13 +301,13 @@
] as Array<UTSJSONObject>
}
] as Array<TagInfo>,
typ
e: 'web',
typ
eItems: ['web', 'native'],
typ
eItemTypes: [{ 'value': 0, 'name': 'web' }, { 'value': 1, 'name': 'native' }] as ItemType[]
mod
e: 'web',
mod
eItems: ['web', 'native'],
mod
eItemTypes: [{ 'value': 0, 'name': 'web' }, { 'value': 1, 'name': 'native' }] as ItemType[]
}
},
methods: {
itemClick(e : RichTextItemClickEvent) {
itemClick(e :
Uni
RichTextItemClickEvent) {
console.log(JSON.stringify(e.detail));
let clicktext = '';
if (e.detail.src != null) {
...
...
@@ -320,8 +320,8 @@
showCancel: false
});
},
on
Typ
eChange: function (value : number) {
this.
type = this.typ
eItems[value];
on
Mod
eChange: function (value : number) {
this.
mode = this.mod
eItems[value];
}
}
}
...
...
pages/component/rich-text/rich-text.uvue
浏览文件 @
69be262b
...
...
@@ -74,7 +74,7 @@
}
},
// 自动化测试
itemClickForTest(_ : RichTextItemClickEvent) {
itemClickForTest(_ :
Uni
RichTextItemClickEvent) {
this.isItemClickTrigger = true;
},
getBoundingClientRectForTest() : DOMRect {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录