Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
恪愚
yunUI
提交
29afcd05
Y
yunUI
项目概览
恪愚
/
yunUI
2022-11-02 05:11:01同步失败
通知
22
Star
9
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yunUI
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
29afcd05
编写于
10月 22, 2020
作者:
恪愚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复组件yPicker存在bug
上级
0cb014b9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
96 addition
and
4 deletion
+96
-4
components/yPicker/ypicker.js
components/yPicker/ypicker.js
+10
-2
pages/index/index.js
pages/index/index.js
+21
-1
pages/index/index.wxml
pages/index/index.wxml
+14
-0
pages/index/index.wxss
pages/index/index.wxss
+51
-1
未找到文件。
components/yPicker/ypicker.js
浏览文件 @
29afcd05
...
...
@@ -48,6 +48,7 @@ Component({
lifetimes
:{
// 这时节点树已创建完成,开始可以用setData渲染节点,但还无法操作节点
attached
:
function
(){
this
.
appd
()
//设置默认的年份
this
.
setData
({
choose_year
:
this
.
data
.
multiArray
[
0
][
0
]
...
...
@@ -80,14 +81,21 @@ Component({
*/
data
:
{
time
:
''
,
multiArray
:
(
!
Component
.
seo
==
1
)?[
years
,
months
,
days
,
hours
,
minutes
]:[
years
,
months
,
days
,
hours
,
minutes
,
seconds
],
multiIndex
:
(
!
Component
.
seo
==
1
)?[
10
,
meng_date
.
getMonth
(),
meng_date
.
getDate
()
-
1
,
meng_date
.
getHours
(),
meng_date
.
getMinutes
()]:[
10
,
meng_date
.
getMonth
(),
meng_date
.
getDate
()
-
1
,
meng_date
.
getHours
(),
meng_date
.
getMinutes
(),
meng_date
.
getSeconds
()
],
multiArray
:
[
],
multiIndex
:
[
],
choose_year
:
''
},
/**
* 组件的方法列表
*/
methods
:
{
appd
(){
console
.
log
(
this
.
properties
.
seo
)
this
.
setData
({
multiArray
:
(
!
this
.
properties
.
seo
==
1
)?[
years
,
months
,
days
,
hours
,
minutes
]:[
years
,
months
,
days
,
hours
,
minutes
,
seconds
],
multiIndex
:
(
!
this
.
properties
.
seo
==
1
)?[
10
,
meng_date
.
getMonth
(),
meng_date
.
getDate
()
-
1
,
meng_date
.
getHours
(),
meng_date
.
getMinutes
()]:[
10
,
meng_date
.
getMonth
(),
meng_date
.
getDate
()
-
1
,
meng_date
.
getHours
(),
meng_date
.
getMinutes
(),
meng_date
.
getSeconds
()],
})
},
//获取时间日期 - 点进picker组件而什么也不干 && 每次触发完成后 -> 每次点击“确定”时携带值
bindMultiPickerChange
:
function
(
e
)
{
// console.log('picker发送选择改变,携带值为', e.detail.value)
...
...
pages/index/index.js
浏览文件 @
29afcd05
...
...
@@ -5,7 +5,8 @@ Page({
* 页面的初始数据
*/
data
:
{
url_one
:
'
https://codechina.csdn.net/qq_43624878/yunUI
'
,
url_two
:
'
https://github.com/1314mxc/yunUI
'
},
gonotice
(){
...
...
@@ -32,6 +33,25 @@ Page({
})
},
clipone
(){
this
.
setclip
(
this
.
data
.
url_one
)
},
cliptwo
(){
this
.
setclip
(
this
.
data
.
url_two
)
},
setclip
(
data
){
wx
.
setClipboardData
({
//准备复制的数据内容
data
:
data
,
success
:
function
(
res
)
{
wx
.
showToast
({
title
:
'
链接复制成功
'
,
});
}
});
},
/**
* 生命周期函数--监听页面加载
*/
...
...
pages/index/index.wxml
浏览文件 @
29afcd05
...
...
@@ -9,4 +9,18 @@
</view>
<view class="mxc3" bindtap="alphabetshow">
<text>去康康“自定义侧边栏字母导航组件”吧!</text>
</view>
<view class="loaded">
<view class="typing">更多内容,敬请期待 ...</view>
</view>
<view class="navigator">
<text>项目开源地址:</text>
<text class="url" bindlongtap="clipone">{{url_one}}</text>
<text>或:</text>
<text class="url" bindlongtap="cliptwo">{{url_two}}</text>
<text>在其中你可以看到详细代码及注释以及使用方式(本小程序版本只展示其中一种应用方式)</text>
</view>
\ No newline at end of file
pages/index/index.wxss
浏览文件 @
29afcd05
...
...
@@ -4,11 +4,12 @@ Page{
display: flex;
flex-wrap: wrap;
justify-content: space-around;
overflow-y: auto;
}
view{
width: 46%;
min-height: 231
rpx;
height: 489
rpx;
background-color: rgba(0,0,0,.1);
overflow: hidden;
display: flex;
...
...
@@ -16,4 +17,53 @@ view{
align-items: center;
margin-top: 26rpx;
margin-bottom: 24rpx;
}
.loaded{
width: 96%;
height: 180rpx;
background-color: rgba(0,0,0,.04);
margin-top: 7rpx;
overflow: hidden;
}
.loaded .typing{
display: inline-block;
width: 17.5em;
height: 1.25em;
border-right: 1px solid transparent;
animation: typing 3.5s steps(28, end), blink-caret .75s step-end infinite;
font-family: Consolas, Monaco;
word-break: break-all;
overflow: hidden;
background-color: transparent;
letter-spacing: 14rpx;
}
/* 打印效果 */
@keyframes typing {
from { width: 0; }
to { width: 18.5em; }
}
/* 光标闪啊闪 */
@keyframes blink-caret {
from, to { box-shadow: 1px 0 0 0 transparent; }
50% { box-shadow: 1px 0 0 0; }
}
.navigator{
width: 96%;
height: 500rpx;
margin: 20rpx auto;
background-color: rgba(0,0,0,.1);
display: flex;
flex-wrap: wrap;
flex-direction: column;
justify-content: space-around;
align-items: center;
overflow: hidden;
letter-spacing: -0.01rpx;
}
.navigator .url{
padding: 6rpx 0;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录