From 82062827e119b3f8c1140cc65bc1eba7ab6d70a4 Mon Sep 17 00:00:00 2001
From: wanganxp
Date: Tue, 5 Sep 2023 07:04:52 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 10 +-
pages/API/action-sheet/action-sheet.uvue | 286 +++++++---------
.../rich-text/rich-text-complex.uvue | 12 +-
pages/component/rich-text/rich-text-tags.uvue | 12 +-
pages/tabBar/API.uvue | 21 +-
pages/tabBar/component.uvue | 8 -
pages/tabBar/template.uvue | 27 +-
.../list-news/detail/detail.uvue | 156 ++++-----
.../list-news/list-news.uvue} | 308 +++++++++---------
9 files changed, 401 insertions(+), 439 deletions(-)
rename pages/{component => template}/list-news/detail/detail.uvue (95%)
rename pages/{component/list-news/list.uvue => template/list-news/list-news.uvue} (93%)
diff --git a/pages.json b/pages.json
index 0e909f74..b094fd5b 100644
--- a/pages.json
+++ b/pages.json
@@ -715,21 +715,21 @@
}
},
{
- "path": "pages/component/list-news/list",
+ "path": "pages/template/list-news/list-news",
"style": {
"navigationBarTitleText": "列表到详情示例"
}
},
{
- "path": "pages/API/get-network-type/get-network-type",
+ "path": "pages/template/list-news/detail/detail",
"style": {
- "navigationBarTitleText": ""
+ "navigationBarTitleText": "详情示例"
}
},
{
- "path": "pages/component/list-news/detail/detail",
+ "path": "pages/API/get-network-type/get-network-type",
"style": {
- "navigationBarTitleText": "详情示例"
+ "navigationBarTitleText": ""
}
},
{
diff --git a/pages/API/action-sheet/action-sheet.uvue b/pages/API/action-sheet/action-sheet.uvue
index 70f398eb..60e8adc8 100644
--- a/pages/API/action-sheet/action-sheet.uvue
+++ b/pages/API/action-sheet/action-sheet.uvue
@@ -1,173 +1,133 @@
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
- 自定义itemColor
-
-
-
- 超长列表文本
-
-
-
- 大量选项
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+ 自定义itemColor
+
+
+
+ 超长文本和空文本item
+
+
+
+ 超过6个item
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+ }
+
diff --git a/pages/component/rich-text/rich-text-complex.uvue b/pages/component/rich-text/rich-text-complex.uvue
index 73b1518c..d48f2cd1 100644
--- a/pages/component/rich-text/rich-text-complex.uvue
+++ b/pages/component/rich-text/rich-text-complex.uvue
@@ -3,7 +3,7 @@
-
+
@@ -17,21 +17,21 @@
export default {
data() {
return {
- title: 'rich-text-complex',
htmlString: 'HBuilderX
HBuilderX,轻巧、极速,极客编辑器
HBuilderX,轻巧、极速,极客编辑器 HBuilderX,轻巧、极速,极客编辑器HBuilderX,轻巧、极速,极客编辑器HBuilderX,轻巧、极速,极客编辑器 HBuilderX,轻巧、极速,极客编辑器HBuilderX,轻巧、极速,极客编辑器
uni-app x,终极跨平台方案
、uni-app x,终极跨平台方案 uni-app x,终极跨平台方案uni-appx,终极跨平台方案 uni-app x,终极跨平台方案 uni-app x,终极跨平台方案 uni-appx,终极跨平台方案
uniCloud,js serverless云服务
uniCloud,js serverless云服务 uniCloud,jsserverless云服务uniCloud,js serverless云服务 uniCloud,js serverless云服务 uniCloud,jsserverless云服务uniCloud,js serverless云服务
uts,大一统语言
uts,大一统语言 uts,大一统语言 uts,大一统语言uts,大一统语言uts,大一统语言 uts,大一统语言
uniMPSdk,让你的App具备小程序能力
uni-admin,开源、现成的全端管理后台
- uni-app x,终极跨平台方案
- uni-app x,终极跨平台方案
- uni-app x,终极跨平台方案
uni-app
'
}
},
methods: {
itemClick(e : RichTextItemClickEvent) {
console.log(JSON.stringify(e.detail));
- let title = '';
+ let clicktext = '';
if (e.detail.src != null) {
- title = '点击了图片,src = ' + e.detail.src;
+ clicktext = '点击了图片,src = ' + e.detail.src;
} else if (e.detail.href != null) {
- title = '点击了链接,href = ' + e.detail.href;
+ clicktext = '点击了链接,href = ' + e.detail.href;
}
uni.showModal({
- title: title
+ content:clicktext,
+ showCancel:false
});
}
}
diff --git a/pages/component/rich-text/rich-text-tags.uvue b/pages/component/rich-text/rich-text-tags.uvue
index 71221c39..fbbb30ab 100644
--- a/pages/component/rich-text/rich-text-tags.uvue
+++ b/pages/component/rich-text/rich-text-tags.uvue
@@ -2,7 +2,7 @@
-
+
支持的HTML标签
@@ -23,7 +23,6 @@
export default {
data() {
return {
- title: 'rich-text-tags',
data: [
{
name: '
',
@@ -301,14 +300,15 @@
methods: {
itemClick(e : RichTextItemClickEvent) {
console.log(JSON.stringify(e.detail));
- let title = '';
+ let clicktext = '';
if (e.detail.src != null) {
- title = '点击了图片,src = ' + e.detail.src;
+ clicktext = '点击了图片,src = ' + e.detail.src;
} else if (e.detail.href != null) {
- title = '点击了链接,href = ' + e.detail.href;
+ clicktext = '点击了链接,href = ' + e.detail.href;
}
uni.showModal({
- title: title
+ content:clicktext,
+ showCancel:false
});
}
}
diff --git a/pages/tabBar/API.uvue b/pages/tabBar/API.uvue
index 58b5562d..fa231d95 100644
--- a/pages/tabBar/API.uvue
+++ b/pages/tabBar/API.uvue
@@ -130,10 +130,9 @@
{
id: 'network',
name: '网络',
- open: false,
pages: [
{
- name: '发起一个请求',
+ name: '发起请求request',
url: 'request',
},
{
@@ -158,10 +157,6 @@
url: 'websocket-global',
api: ["connectSocket", "onSocketOpen", "onSocketError", "sendSocketMessage", "onSocketMessage", "closeSocket", "onSocketClose"]
},
- {
- name: '请求云函数',
- url: 'call-function',
- },
] as Page[],
},
{
@@ -348,7 +343,6 @@
{
id: 'location',
name: '位置',
- open: false,
pages: [
{
name: '获取当前位置',
@@ -375,7 +369,6 @@
{
id: 'storage',
name: '数据存储',
- open: false,
pages: [
{
name: 'storage(key-value存储)',
@@ -383,6 +376,16 @@
api: ["uni.getStorageInfo", "uni.getStorageInfoSync", "uni.getStorage", "uni.getStorageSync", "uni.setStorage", "uni.setStorageSync", "uni.removeStorage", "uni.removeStorageSync", "uni.clearStorage", "uni.clearStorageSync"]
},
] as Page[],
+ },
+ {
+ id: 'unicloud',
+ name: 'uniCloud',
+ pages: [
+ {
+ name: '云函数',
+ url: 'call-function',
+ },
+ ] as Page[],
},
/* {
id: "rewarded-video-ad",
@@ -521,4 +524,4 @@
.item {
margin-bottom: 12px;
}
-
\ No newline at end of file
+
diff --git a/pages/tabBar/component.uvue b/pages/tabBar/component.uvue
index 2a493b24..1466446c 100644
--- a/pages/tabBar/component.uvue
+++ b/pages/tabBar/component.uvue
@@ -87,14 +87,6 @@ export default {
enable: false
},
*/
- {
- name: 'list(新闻)',
- url: '/pages/component/list-news/list',
- },
- // {
- // name: 'list',
- // url: '/pages/component/long-list/long-list',
- // },
{
name: 'list-view',
},
diff --git a/pages/tabBar/template.uvue b/pages/tabBar/template.uvue
index 0e832aa2..50921bca 100644
--- a/pages/tabBar/template.uvue
+++ b/pages/tabBar/template.uvue
@@ -87,6 +87,13 @@ export default {
open: false,
enable: true,
pages: [] as Page[],
+ },
+ {
+ id: 'list-news',
+ url: 'list-news',
+ name: '列表到详情',
+ open: false,
+ pages: [] as Page[],
},
{
id: 'scroll-fold-nav',
@@ -100,17 +107,17 @@ export default {
url: 'swiper-list',
name: 'swiper-list',
open: false,
- enable: true,
- pages: [] as Page[],
+ pages: [
+ {
+ name: '下划线样式',
+ url:'swiper-list'
+ },
+ {
+ name: '字体放大样式',
+ url:'swiper-list2'
+ },
+ ] as Page[],
},
- {
- id: 'swiper-list2',
- url: 'swiper-list2',
- name: 'swiper-list2',
- open: false,
- enable: true,
- pages: [] as Page[],
- },
{
id: 'custom-refresher',
url: 'custom-refresher',
diff --git a/pages/component/list-news/detail/detail.uvue b/pages/template/list-news/detail/detail.uvue
similarity index 95%
rename from pages/component/list-news/detail/detail.uvue
rename to pages/template/list-news/detail/detail.uvue
index 4bff5ea3..09f151e7 100644
--- a/pages/component/list-news/detail/detail.uvue
+++ b/pages/template/list-news/detail/detail.uvue
@@ -1,81 +1,81 @@
-
-
-
-
-
-
- {{title}}
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/component/list-news/list.uvue b/pages/template/list-news/list-news.uvue
similarity index 93%
rename from pages/component/list-news/list.uvue
rename to pages/template/list-news/list-news.uvue
index ee7a12c1..d839d844 100644
--- a/pages/component/list-news/list.uvue
+++ b/pages/template/list-news/list-news.uvue
@@ -1,89 +1,89 @@
-
-
-
-
- {{ banner.title }}
-
-
+
+
+
+
+ {{ banner.title }}
+
+
-
-
-
-
- {{ value.title }}
-
- {{ value.author_name }}
- {{ value.published_at }}
-
-
-
-
+
+
+
+
+ {{ value.title }}
+
+ {{ value.author_name }}
+ {{ value.published_at }}
+
+
+
+
-
-
-
-
+
+
+
+
-
-
\ No newline at end of file
+ }
+
--
GitLab