求出给定范围区间子集异或和
定时内容 (vue-timed-content)
Shows or hides a content based on a given time range.
根据给定的时间范围显示或隐藏内容。
道具 (Props)
Prop | Description | Type | Required | Default |
---|---|---|---|---|
from | Initial date | Date | String | Number | true | |
to | End date | Date | String | Number | true | |
timezone | Timezone used to calculate if the dates are in range | String | false | America/Los_Angeles |
Struts | 描述 | 类型 | 需要 | 默认 |
---|---|---|---|---|
从 | 初始日期 | 日期 字串| 数 | 真正 | |
至 | 结束日期 | 日期 字串| 数 | 真正 | |
时区 | 用于计算日期是否在范围内的时区 | 串 | 假 | 美国/洛杉矶 |
大事记 (Events)
Event | Description |
---|---|
show | When content goes from being hidden to visible |
hide | When content goes from being visible to hidden |
事件 | 描述 |
---|---|
表演 | 当内容从隐藏变为可见 |
隐藏 | 当内容从可见变为隐藏 |
用法 (Usage)
<template>
<timed-content from="2019-04-01 00:00:00" to="2019-04-01 23:59:59" timezone="America/New_York">
<p>Some April Fools' Day joke</p>
</timed-content>
</template>
<script>
import TimedContent from "vue-timed-content";
export default {
components: {
TimedContent
}
};
</script>
项目设置 (Project setup)
npm install
编译和热重装以进行开发 (Compiles and hot-reloads for development)
npm run serve
编译并最小化生产 (Compiles and minifies for production)
npm run build
整理和修复文件 (Lints and fixes files)
npm run lint
翻译自: https://vuejsexamples.com/shows-or-hides-a-content-based-on-a-given-time-range/
求出给定范围区间子集异或和