Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
黄粱一梦--Y
hello uni-app x
提交
82616684
H
hello uni-app x
项目概览
黄粱一梦--Y
/
hello uni-app x
与 Fork 源项目一致
Fork自
DCloud / hello uni-app x
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
82616684
编写于
7月 08, 2023
作者:
DCloud_JSON
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitcode.net/dcloud/hello-uni-app-x
上级
6ceecc63
add636fc
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
936 addition
and
753 deletion
+936
-753
index.html
index.html
+1
-0
pages/API/modal/modal.uvue
pages/API/modal/modal.uvue
+1
-1
pages/API/page-lifecircle/page-lifecircle.uvue
pages/API/page-lifecircle/page-lifecircle.uvue
+40
-0
pages/API/page-scrollTo/page-scrollTo.test.js
pages/API/page-scrollTo/page-scrollTo.test.js
+7
-6
pages/API/pull-down-refresh/pull-down-refresh.uvue
pages/API/pull-down-refresh/pull-down-refresh.uvue
+83
-0
pages/component/image/image-large.uvue
pages/component/image/image-large.uvue
+41
-0
pages/component/image/image.uvue
pages/component/image/image.uvue
+8
-0
pages/component/input/input.uvue
pages/component/input/input.uvue
+2
-1
pages/tabBar/API.uvue
pages/tabBar/API.uvue
+475
-475
pages/tabBar/CSS.uvue
pages/tabBar/CSS.uvue
+2
-2
pages/tabBar/component.uvue
pages/tabBar/component.uvue
+260
-260
todo.md
todo.md
+16
-8
未找到文件。
index.html
浏览文件 @
82616684
<!DOCTYPE html>
<html
lang=
"en"
>
<!--本文件为编译到web专用文件-->
<head>
<meta
charset=
"UTF-8"
/>
<script>
...
...
pages/API/modal/modal.uvue
浏览文件 @
82616684
...
...
@@ -41,7 +41,7 @@
</view>
</template>
<script lang="ts">
<script lang="
u
ts">
type ItemType = {
value : string,
name : string,
...
...
pages/API/page-lifecircle/page-lifecircle.uvue
0 → 100644
浏览文件 @
82616684
<template>
<view>
<text>onLoad触发时间</text>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
// const d = Date.now();
// const s = d.toDateString()
console.log("onLoad");
},
onShow() {
console.log("onShow");
},
onReady() {
console.log("onReady");
},
onHide() {
console.log("onHide");
},
onUnload() {
console.log("onUnLoad");
},
methods: {
}
}
</script>
<style>
</style>
pages/API/page-scrollTo/page-scrollTo.test.js
浏览文件 @
82616684
...
...
@@ -7,13 +7,14 @@ describe('page-scrollTo', () => {
await
page
.
waitFor
(
500
)
})
// TODO
//
it('scrollTo', async () => {
//
const btnScrollTo = await page.$('.btn-scrollTo')
it
(
'
scrollTo
'
,
async
()
=>
{
const
btnScrollTo
=
await
page
.
$
(
'
.btn-scrollTo
'
)
// await toggle.tap()
// await page.waitFor(50)
// expect(await page.scrollTop).toBe(100)
// })
await
btnScrollTo
.
tap
()
await
page
.
waitFor
(
50
)
// const scrollTop = await page.scrollTop()
// expect(scrollTop).toBe(100)
})
// it('scrollToElement', async () => {
// const btnScrollTo = await page.$('.btn-scrollToElement')
// const scrollToElement = await page.$('.custom-element')
...
...
pages/API/pull-down-refresh/pull-down-refresh.uvue
0 → 100644
浏览文件 @
82616684
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view style="font-size: 12px; color: #666;">注:PC 不支持下拉刷新</view>
<view class="text" v-for="(num,index) in data" :key="index">list - {{num}}</view>
<view class="uni-loadmore" v-if="showLoadMore">{{loadMoreText}}</view>
</view>
</view>
</template>
<script lang="uts">
export default {
data() {
return {
title: '下拉刷新 + 加载更多',
data: [],
loadMoreText: "加载中...",
showLoadMore: false,
max: 0
}
},
onLoad() {
this.initData();
},
onUnload() {
this.max = 0,
this.data = [],
this.loadMoreText = "加载更多",
this.showLoadMore = false;
},
onReachBottom() {
console.log("onReachBottom");
if (this.max > 40) {
this.loadMoreText = "没有更多数据了!"
return;
}
this.showLoadMore = true;
setTimeout(() => {
this.setListData();
}, 300);
},
onPullDownRefresh() {
console.log('onPullDownRefresh');
this.initData();
},
methods: {
initData(){
setTimeout(() => {
this.max = 0;
this.data = [];
let data = [];
this.max += 20;
for (var i = this.max - 19; i < this.max + 1; i++) {
data.push(i)
}
this.data = this.data.concat(data);
uni.stopPullDownRefresh();
}, 300);
},
setListData() {
let data = [];
this.max += 10;
for (var i = this.max - 9; i < this.max + 1; i++) {
data.push(i)
}
this.data = this.data.concat(data);
}
}
}
</script>
<style>
.text {
margin: 16rpx 0;
width:100%;
background-color: #fff;
height: 120rpx;
line-height: 120rpx;
text-align: center;
color: #555;
border-radius: 8rpx;
}
</style>
pages/component/image/image-large.uvue
0 → 100644
浏览文件 @
82616684
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-title">
<text class="uni-title-text">大图示例</text>
</view>
<view class="uni-common-mt" v-for="_ in 10">
<text class="uni-subtitle-text">width={{width}}px height={{height}}px memory={{memory}}MB</text>
<image class="image" mode="widthFix" :src="src" @load="load"></image>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'image-large',
src: 'https://native-res.dcloud.net.cn/uni-app-x/static/img/building.jpg',
width: 0,
height: 0,
memory: 0
}
},
methods: {
load(event : ImageLoadEvent) {
this.width = event.detail.width;
this.height = event.detail.height;
this.memory = Math.round(this.width * this.height * 4 / 1024 / 1024 * 100) / 100;
}
}
}
</script>
<style>
.image {
width: 100%;
}
</style>
\ No newline at end of file
pages/component/image/image.uvue
浏览文件 @
82616684
...
...
@@ -14,6 +14,9 @@
</view>
<view class="uni-btn-v">
<button type="primary" @tap="imagePath">图片路径示例</button>
</view>
<view class="uni-btn-v">
<button type="primary" @tap="imageLarge">大图示例</button>
</view>
</view>
</view>
...
...
@@ -46,6 +49,11 @@
uni.navigateTo({
url: '/pages/component/image/image-path'
});
},
imageLarge() {
uni.navigateTo({
url: '/pages/component/image/image-large'
});
}
}
}
...
...
pages/component/input/input.uvue
浏览文件 @
82616684
...
...
@@ -116,7 +116,8 @@
}
},
onReady() {
(this.$refs['input'] as INode).focus();
// TODO auto focus
// (this.$refs['input'] as INode).focus();
},
methods: {
onKeyInput: function (event : InputEvent) {
...
...
pages/tabBar/API
/API
.uvue
→
pages/tabBar/API.uvue
浏览文件 @
82616684
此差异已折叠。
点击以展开。
pages/tabBar/CSS
/CSS
.uvue
→
pages/tabBar/CSS.uvue
浏览文件 @
82616684
<template>
A
<template>
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/extuiIndex.png"></image>
...
...
@@ -355,5 +355,5 @@
</script>
<style>
@import '../../
../
common/uni-uvue.css';
@import '../../common/uni-uvue.css';
</style>
\ No newline at end of file
pages/tabBar/component
/component
.uvue
→
pages/tabBar/component.uvue
浏览文件 @
82616684
<template>
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/componentIndex.png"></image>
</view>
<view class="uni-hello-text">
<text class="hello-text">uni-app内置组件,展示样式仅供参考,文档详见:</text>
<u-link :href="'https://uniapp.dcloud.io/component/'" :text="'https://uniapp.dcloud.io/component/'"
:inWhiteList="true"></u-link>
</view>
<view class="uni-panel" v-for="(item, index) in list" :key="item.id">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index, item)">
<text class="uni-panel-text" :class="item.enable == false ? 'text-disabled' : ''">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon"></image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)">
<text class="uni-navigate-text"
:class="page.enable != true ? 'text-disabled' : ''">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
type Page = {
name : string,
enable ?: boolean,
url ?: string
}
type ListItem = {
id : string,
name : string,
open : boolean,
pages : Page[],
url ?: string,
enable ?: boolean
}
export default {
data() {
return {
list: [{
id: 'view',
name: '视图容器',
open: false,
pages: [
{
name: 'view',
enable: true
},
{
name: 'scroll-view',
enable: true
},
{
name: 'swiper',
enable: true
},
// #ifndef MP-TOUTIAO || MP-LARK
{
name: 'movable-view',
enable: false
},
{
name: 'cover-view',
enable: false
},
<template>
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/componentIndex.png"></image>
</view>
<view class="uni-hello-text">
<text class="hello-text">uni-app内置组件,展示样式仅供参考,文档详见:</text>
<u-link :href="'https://uniapp.dcloud.io/component/'" :text="'https://uniapp.dcloud.io/component/'"
:inWhiteList="true"></u-link>
</view>
<view class="uni-panel" v-for="(item, index) in list" :key="item.id">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index, item)">
<text class="uni-panel-text" :class="item.enable == false ? 'text-disabled' : ''">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon"></image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)">
<text class="uni-navigate-text"
:class="page.enable != true ? 'text-disabled' : ''">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
type Page = {
name : string,
enable ?: boolean,
url ?: string
}
type ListItem = {
id : string,
name : string,
open : boolean,
pages : Page[],
url ?: string,
enable ?: boolean
}
export default {
data() {
return {
list: [{
id: 'view',
name: '视图容器',
open: false,
pages: [
{
name: 'view',
enable: true
},
{
name: 'scroll-view',
enable: true
},
{
name: 'swiper',
enable: true
},
// #ifndef MP-TOUTIAO || MP-LARK
{
name: 'movable-view',
enable: false
},
{
name: 'cover-view',
enable: false
},
// #endif
{
name:'list',
enable:true
}
] as Page[]
}, {
id: 'content',
name: '基础内容',
open: false,
pages: [
{
name: 'text',
enable: true
},
{
name: 'rich-text',
enable: false
},
{
name: 'progress',
enable: true
}
] as Page[]
}, {
id: 'form',
name: '表单组件',
open: false,
pages: [
{
name: 'button',
enable: true
},
{
name: 'checkbox',
enable: true
},
{
name: 'form',
enable: false
},
{
name: 'input',
enable: true
}, {
name: 'label',
enable: false
}, {
name: 'picker',
enable: false
}, {
name: 'picker-view',
enable: false
}, {
name: 'radio',
enable: true
}, {
name: 'slider',
enable: true
}, {
name: 'slider-100',
enable: true
},{
name: 'switch',
enable: true
}, {
name: 'textarea',
enable: true
},
// #ifdef APP-PLUS || MP-WEIXIN || H5 || MP-BAIDU
{
name: 'editor',
enable: false
},
// #endif
] as Page[]
}, {
id: 'nav',
name: '导航',
open: false,
pages: [{
name: 'navigator',
enable: false
}] as Page[]
}, {
id: 'media',
name: '媒体组件',
open: false,
pages: [{
name: 'image',
enable: true
}, {
name: 'video',
enable: false
}] as Page[]
},
// #ifndef MP-TOUTIAO || MP-KUAISHOU
{
id: 'map',
name: '地图',
open: false,
pages: [
{
name: 'map',
enable: false
}
] as Page[]
},
// #endif
// #ifndef QUICKAPP-WEBVIEW-UNION
{
id: 'canvas',
name: '画布',
open: false,
pages: [
{
name: 'canvas'
}
] as Page[]
},
// #endif
// #ifdef APP-PLUS || H5
{
id: 'web-view',
name: '网页',
open: false,
pages: [
{
name: '网络网页',
enable: true,
url: '/pages/component/web-view/web-view'
},
{
name: '本地网页',
enable: true,
url: '/pages/component/web-view-local/web-view-local'
}
] as Page[]
},
// #endif
// #ifndef H5 || MP-BAIDU || QUICKAPP-WEBVIEW || MP-LARK || MP-JD
{
id: 'ad',
url: 'ad',
name: 'AD组件',
enable: false,
open: false,
pages: [] as Page[]
}
// #endif
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index ?: number, item : ListItem) {
if (item.pages.length == 0) {
const page : Page = {
name: item.name,
enable: item.enable,
url: item.url
}
this.goDetailPage(page);
return;
}
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e : Page) {
if (e.enable != true) {
uni.showToast({
icon: 'none',
title: '暂不支持'
})
return
}
const url = e.url != null ? e.url! : `/pages/component/${e.name}/${e.name}`
uni.navigateTo({
url
})
}
}
}
</script>
<style>
@import '../../
../common/uni-uvue.css';
}
] as Page[]
}, {
id: 'content',
name: '基础内容',
open: false,
pages: [
{
name: 'text',
enable: true
},
{
name: 'rich-text',
enable: false
},
{
name: 'progress',
enable: true
}
] as Page[]
}, {
id: 'form',
name: '表单组件',
open: false,
pages: [
{
name: 'button',
enable: true
},
{
name: 'checkbox',
enable: true
},
{
name: 'form',
enable: false
},
{
name: 'input',
enable: true
}, {
name: 'label',
enable: false
}, {
name: 'picker',
enable: false
}, {
name: 'picker-view',
enable: false
}, {
name: 'radio',
enable: true
}, {
name: 'slider',
enable: true
}, {
name: 'slider-100',
enable: true
},{
name: 'switch',
enable: true
}, {
name: 'textarea',
enable: true
},
// #ifdef APP-PLUS || MP-WEIXIN || H5 || MP-BAIDU
{
name: 'editor',
enable: false
},
// #endif
] as Page[]
}, {
id: 'nav',
name: '导航',
open: false,
pages: [{
name: 'navigator',
enable: false
}] as Page[]
}, {
id: 'media',
name: '媒体组件',
open: false,
pages: [{
name: 'image',
enable: true
}, {
name: 'video',
enable: false
}] as Page[]
},
// #ifndef MP-TOUTIAO || MP-KUAISHOU
{
id: 'map',
name: '地图',
open: false,
pages: [
{
name: 'map',
enable: false
}
] as Page[]
},
// #endif
// #ifndef QUICKAPP-WEBVIEW-UNION
{
id: 'canvas',
name: '画布',
open: false,
pages: [
{
name: 'canvas'
}
] as Page[]
},
// #endif
// #ifdef APP-PLUS || H5
{
id: 'web-view',
name: '网页',
open: false,
pages: [
{
name: '网络网页',
enable: true,
url: '/pages/component/web-view/web-view'
},
{
name: '本地网页',
enable: true,
url: '/pages/component/web-view-local/web-view-local'
}
] as Page[]
},
// #endif
// #ifndef H5 || MP-BAIDU || QUICKAPP-WEBVIEW || MP-LARK || MP-JD
{
id: 'ad',
url: 'ad',
name: 'AD组件',
enable: false,
open: false,
pages: [] as Page[]
}
// #endif
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index ?: number, item : ListItem) {
if (item.pages.length == 0) {
const page : Page = {
name: item.name,
enable: item.enable,
url: item.url
}
this.goDetailPage(page);
return;
}
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e : Page) {
if (e.enable != true) {
uni.showToast({
icon: 'none',
title: '暂不支持'
})
return
}
const url = e.url != null ? e.url! : `/pages/component/${e.name}/${e.name}`
uni.navigateTo({
url
})
}
}
}
</script>
<style>
@import '../../
common/uni-uvue.css';
</style>
\ No newline at end of file
todo.md
浏览文件 @
82616684
很多组件和api的演示都没有
增加tab:模板 就是原来hello uni-app里的一些模板,有的要移植,有的要新增。 1. 自定义导航栏,从来没测过,没有navigationbar会不会有bug,也需要测试自己画一个back会不会有问题。 2. swiper-list,这个之前是谁做的,迁移过来,list里的数据量要大,1000条,item前要有图片,图片使用uni x的logo。 3. swiper-vertical-video,就是防抖音视频滑动。但这里不要用老hello uni-app里的那几个拍摄视频,用我们产品的录屏,比如uni-id、uni-pay、uni-im、uni-cms。视频来录。录像可以小一点,不占满屏幕,上下留出电影那种黑边,不然容易混淆。 4. drop-card,划走式卡片,也就是仿探探,这个已经做了例子,集成到hello uni-app x里,但注意不能使用美女照片,要使用uni-id、uni-pay、uni-im、uni-cms的截图。 5. sticky-view,这个目前支持吗? 6. 毛玻璃效果,这个目前支持吗?
二期:
-
下拉页面,顶部背景图缩放
-
翻书效果
-
自定义窗体动画:叠窗式、上浮卡片
-
全局置顶视图,global-cover-view。音乐播放app的悬浮播放bar;弹窗
\ No newline at end of file
很多组件和api的演示都没有
增加tab:模板
就是原来hello uni-app里的一些模板,有的要移植,有的要新增。
1.
自定义导航栏,从来没测过,没有navigationbar会不会有bug,也需要测试自己画一个back会不会有问题。
2.
swiper-list,list里的数据量要大,1000条,item前要有图片,图片使用uni x的logo。
3.
swiper-vertical-video,就是防抖音视频滑动。但这里不要用老hello uni-app里的那几个拍摄视频,用我们产品的录屏,比如uni-id、uni-pay、uni-im、uni-cms。视频来录。录像可以小一点,不占满屏幕,上下留出电影那种黑边,不然容易混淆。
4.
drop-card,划走式卡片,也就是仿探探,这个已经做了例子,集成到hello uni-app x里,但注意不能使用美女照片,要使用uni-id、uni-pay、uni-im、uni-cms的截图。
5.
sticky-view,这个目前支持吗?
二期:
-
下拉页面,顶部背景图缩放
-
翻书效果
-
毛玻璃效果
-
自定义窗体动画:叠窗式、上浮卡片
-
全局置顶视图,global-cover-view。音乐播放app的悬浮播放bar;弹窗
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录