Skip to content

doc: calendar 文档修改 #1410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c805a21
feat: 添加range组件、calendar组件在线文档
Jan 20, 2022
55c6e33
fix: 文档调整
Jan 21, 2022
bad287f
fix: 重构calendar组件
Feb 18, 2022
bffc56e
Merge branch 'upstream_next' into next
Feb 18, 2022
24a9967
Merge branch 'next' into lk-nutui
Feb 18, 2022
86140ef
feat: 日历组件重构,文档修改,功能完善
Feb 23, 2022
455d613
Merge branch 'lk-nutui' of ssh://github.com/lkjh3214/nutui into lk-nutui
Feb 23, 2022
097935f
fix: 格式化
Feb 23, 2022
cc8eac2
Merge branch 'next' of ssh://github.com/lkjh3214/nutui into next
Feb 23, 2022
5c26c3f
fix: 代码格式化调整。
Feb 23, 2022
64a74bd
fix: 去除无用代码
Feb 23, 2022
261674e
Merge branch 'lk-nutui' into next
Feb 23, 2022
34e7f5a
fix: 文档调整
Feb 23, 2022
83c3252
fix: 文档调整
Feb 23, 2022
246c7ef
fix: taro demo 样式修改
Feb 23, 2022
13a64e3
Merge branch 'upstream_next' into lk-nutui
Feb 23, 2022
6ca304c
Merge branch 'upstream_next' into lk-nutui
Mar 22, 2022
06bfbd7
Merge branch 'upstream_next' into lk-nutui
Mar 22, 2022
8af99db
feat: range组件功能完善,新增 竖向操作,刻度展示。
Mar 22, 2022
32920b1
Merge branch 'upstream_next' into lk-nutui
Mar 22, 2022
d5cb5d0
fix: 冲突解决
Mar 22, 2022
d096a28
feat: taro功能新增,兼容处理,文档修改
Mar 22, 2022
fc48524
Merge branch 'upstream_next' into lk-nutui
Mar 22, 2022
967affa
Merge branch 'next' into lk-nutui
szg2008 Mar 25, 2022
b20666e
Merge branch 'upstream_next' into lk-nutui
Mar 25, 2022
7721d7b
feat: 添加range组件,jdt主题色
Mar 25, 2022
170a777
Merge branch 'upstream_next' into lk-nutui
Mar 30, 2022
6aa79b4
Merge branch 'upstream_next' into lk-nutui
Apr 6, 2022
3a18252
Merge branch 'upstream_next' into lk-nutui
Apr 21, 2022
cc0ec20
fix: 修改组件初始化逻辑
Apr 24, 2022
e41e7df
Merge branch 'upstream_next' into lk-nutui
Apr 24, 2022
5fa9702
feat: 新增h5 日期多选功能
May 9, 2022
8fcd6ff
Merge branch 'lk-nutui' into lk-dev-calendar
May 20, 2022
fa6f570
feat: taro版本添加 日期多选功能
May 20, 2022
58e8f79
fix: 修复多选,无法选中开头结尾日期问题
Jun 21, 2022
7e99775
Merge branch 'upstream_next' into lk-dev-calendar
Jun 21, 2022
5089372
fix: 文档修改,添加en-US 文档
Jun 21, 2022
3078dca
Merge branch 'upstream_next' into lk-dev-calendar
Jun 21, 2022
b8c28eb
fix: 文档完善
Jun 23, 2022
b27a36d
Merge branch 'upstream_next' into lk-dev-calendar
Jun 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/packages/__VUE/animate/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}

/* Animation css */
[class*="nut-animate-"] {
[class*='nut-animate-'] {
animation-duration: 0.5s;
animation-timing-function: ease-out;
animation-fill-mode: both;
Expand Down Expand Up @@ -235,7 +235,7 @@
&::before {
width: 60 * 1px;
height: 60 * 1px;
content: "";
content: '';
box-sizing: border-box;
border: 4 * 1px solid rgba(255, 255, 255, 0.6);
position: absolute;
Expand Down Expand Up @@ -279,7 +279,7 @@
left: 0;
top: 0;
opacity: 0.73;
content: "";
content: '';
background-image: linear-gradient(106deg, rgba(232, 224, 255, 0) 24%, #e8e0ff 91%);
animation: flicker 1.5s linear infinite;
transform: skewX(-20deg);
Expand All @@ -296,4 +296,4 @@
transform: translateX(150 * 1px) skewX(-20deg);
}
}
}
}
11 changes: 5 additions & 6 deletions src/packages/__VUE/animate/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<view class="nut-animate">
<view :class='classes' @click='handleClick'>
<view :class="classes" @click="handleClick">
<slot></slot>
</view>
</view>
Expand Down Expand Up @@ -38,19 +38,18 @@ export default create({
return {
'nut-ani-container': true,
[`${prefixCls}-${type.value}`]: action.value === 'initial' || state.clicked ? type.value : false,
'loop': loop.value,
loop: loop.value
};
});

const handleClick = (event: Event) => {

state.clicked = true
state.clicked = true;

//如果不是无限循环,清除类名
if (!loop.value) {
setTimeout(() => {
state.clicked = false
}, 1000)
state.clicked = false;
}, 1000);
}

emit('click', event);
Expand Down
11 changes: 5 additions & 6 deletions src/packages/__VUE/animate/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<view class="nut-animate">
<view :class='classes' @click='handleClick'>
<view :class="classes" @click="handleClick">
<slot></slot>
</view>
</view>
Expand Down Expand Up @@ -38,19 +38,18 @@ export default create({
return {
'nut-ani-container': true,
[`${prefixCls}-${type.value}`]: action.value === 'initial' || state.clicked ? type.value : false,
'loop': loop.value,
loop: loop.value
};
});

const handleClick = (event: Event) => {

state.clicked = true
state.clicked = true;

//如果不是无限循环,清除类名
if (!loop.value) {
setTimeout(() => {
state.clicked = false
}, 1000)
state.clicked = false;
}, 1000);
}

emit('click', event);
Expand Down
13 changes: 12 additions & 1 deletion src/packages/__VUE/animate/type.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
export type AnimateType = 'shake' | 'ripple' | 'breath' | 'float' | 'slide-right' | 'slide-left' | 'slide-top' | 'slide-bottom' | 'jump' | 'twinkle' | 'flicker';
export type AnimateType =
| 'shake'
| 'ripple'
| 'breath'
| 'float'
| 'slide-right'
| 'slide-left'
| 'slide-top'
| 'slide-bottom'
| 'jump'
| 'twinkle'
| 'flicker';
export type AnimateAction = 'initial' | 'click';
1 change: 1 addition & 0 deletions src/packages/__VUE/calendar/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ export default {
| confirm-text | Bottom confirm button text | String | ’Confirm‘ |
| show-title | Whether to show the calendar title | Boolean | true |
| show-sub-title | Whether to display the date title | Boolean | true |
| to-date-animation | Whether to use scroll animation | Boolean | true |

### Events

Expand Down
1 change: 1 addition & 0 deletions src/packages/__VUE/calendar/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ export default {
| confirm-text | 底部确认按钮文案 | String | ’确认‘ |
| show-title | 是否在展示日历标题 | Boolean | true |
| show-sub-title | 是否展示日期标题 | Boolean | true |
| to-date-animation | 是否启动滚动动画 | Boolean | true |

### Events

Expand Down
1 change: 0 additions & 1 deletion src/packages/__VUE/calendar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ export default create({
// element refs
const calendarRef = ref<null | HTMLElement>(null);
const scrollToDate = (date: string) => {
console.log(calendarRef.value);
calendarRef.value?.scrollToDate(date);
};
useExpose({
Expand Down
6 changes: 0 additions & 6 deletions src/packages/__VUE/calendaritem/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -622,12 +622,9 @@ export default create({
} else if (!Utils.compareDate(date, state.propEndDate)) {
date = state.propEndDate;
}
console.log(date);
let dateArr = splitDate(date);
state.monthsData.forEach((item, index) => {
if (item.title == translate('monthTitle', dateArr[0], dateArr[1])) {
// if (months.value) {

if (props.toDateAnimation) {
Taro.createSelectorQuery()
.select('.nut-calendar-content')
Expand All @@ -639,8 +636,6 @@ export default create({
flag++;
if (months.value) {
let offset = distance / 10;
console.log('scrolltodate ', distance, offset);

state.scrollTop = state.scrollTop + offset;
}
if (flag >= 10) {
Expand All @@ -655,7 +650,6 @@ export default create({
} else {
state.scrollTop = state.monthsData[index].cssScrollHeight;
}
// }
}
});
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default { navigationBarTitleText: 'Animate' }
export default { navigationBarTitleText: 'Animate' };
73 changes: 35 additions & 38 deletions src/sites/mobile-taro/vue/src/exhibition/pages/animate/index.vue
Original file line number Diff line number Diff line change
@@ -1,77 +1,74 @@
<template>
<div class='demo'>

<div class="demo">
<h2>点击触发</h2>

<div class='ani-demo-div'>
<nut-animate type='slide-right' action='click'>
<nut-button type='primary'>由右向左划入</nut-button>
<div class="ani-demo-div">
<nut-animate type="slide-right" action="click">
<nut-button type="primary">由右向左划入</nut-button>
</nut-animate>
</div>

<div class='ani-demo-div'>
<nut-animate type='slide-left' action='click'>
<nut-button type='primary'>由左向右划入</nut-button>
<div class="ani-demo-div">
<nut-animate type="slide-left" action="click">
<nut-button type="primary">由左向右划入</nut-button>
</nut-animate>
</div>

<div class='ani-demo-div'>
<nut-animate type='slide-top' action='click'>
<nut-button type='primary'>由上至下划入</nut-button>
<div class="ani-demo-div">
<nut-animate type="slide-top" action="click">
<nut-button type="primary">由上至下划入</nut-button>
</nut-animate>
</div>

<div class='ani-demo-div'>
<nut-animate type='slide-bottom' action='click'>
<nut-button type='primary'>由下至上划入</nut-button>
<div class="ani-demo-div">
<nut-animate type="slide-bottom" action="click">
<nut-button type="primary">由下至上划入</nut-button>
</nut-animate>
</div>

<h2>循环动画</h2>

<div class='ani-demo-div'>
<nut-animate type='shake' :loop='true'>
<nut-button type='primary'>shake-抖动</nut-button>
<div class="ani-demo-div">
<nut-animate type="shake" :loop="true">
<nut-button type="primary">shake-抖动</nut-button>
</nut-animate>
</div>

<div class='ani-demo-div'>
<nut-animate type='ripple' :loop='true'>
<nut-button type='primary'>ripple-心跳</nut-button>
<div class="ani-demo-div">
<nut-animate type="ripple" :loop="true">
<nut-button type="primary">ripple-心跳</nut-button>
</nut-animate>
</div>

<div class='ani-demo-div'>
<nut-animate type='breath' :loop='true'>
<nut-button type='primary'>breath-呼吸灯</nut-button>
<div class="ani-demo-div">
<nut-animate type="breath" :loop="true">
<nut-button type="primary">breath-呼吸灯</nut-button>
</nut-animate>
</div>

<div class='ani-demo-div'>
<nut-animate type='twinkle' :loop='true'>
<nut-button type='primary'>twinkle-水波</nut-button>
<div class="ani-demo-div">
<nut-animate type="twinkle" :loop="true">
<nut-button type="primary">twinkle-水波</nut-button>
</nut-animate>
</div>

<div class='ani-demo-div'>
<nut-animate type='flicker' :loop='true'>
<nut-button type='primary'>flicker-擦亮</nut-button>
<div class="ani-demo-div">
<nut-animate type="flicker" :loop="true">
<nut-button type="primary">flicker-擦亮</nut-button>
</nut-animate>
</div>

<div class='ani-demo-div'>
<nut-animate type='jump' :loop='true'>
<nut-button type='primary'>jump-跳跃</nut-button>
<div class="ani-demo-div">
<nut-animate type="jump" :loop="true">
<nut-button type="primary">jump-跳跃</nut-button>
</nut-animate>
</div>

<div class='ani-demo-div'>
<nut-animate type='float' :loop='true'>
<nut-button type='primary'>float-漂浮</nut-button>
<div class="ani-demo-div">
<nut-animate type="float" :loop="true">
<nut-button type="primary">float-漂浮</nut-button>
</nut-animate>
</div>


</div>
</template>
<script lang="ts">
Expand All @@ -83,7 +80,7 @@ export default defineComponent({
}
});
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.demo {
}

Expand Down