@94ai-plus/nf-date-picker 0.0.0-stage → 1.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +69 -2
- package/dist/browser/index.js +2355 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/index.umd.js +3 -0
- package/dist/browser/index.umd.js.map +1 -0
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/es/index.mjs +785 -0
- package/dist/es/index.mjs.map +1 -0
- package/dist/readme/94logo.png +0 -0
- package/dist/readme/common-plus.svg +7 -0
- package/dist/readme/contributors-wall.svg +16 -0
- package/dist/readme/contributors.svg +27 -0
- package/dist/style/index.css +2 -0
- package/dist/types/date-picker.vue.d.ts +34 -0
- package/dist/types/global.d.ts +13 -0
- package/dist/types/half-year-picker.vue.d.ts +30 -0
- package/dist/types/half-year-range-picker.vue.d.ts +30 -0
- package/dist/types/index.d.ts +471 -0
- package/dist/types/model.d.ts +5 -0
- package/dist/types/types.d.ts +36 -0
- package/dist/types/week-range-picker.vue.d.ts +30 -0
- package/package.json +63 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 94AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- common-ui-plus:brand:start -->
|
|
2
|
+
<h1 align="center">
|
|
3
|
+
<a href="https://oss.xccjh.top/common-ui-plus/index.html">
|
|
4
|
+
<img src="https://cdn.jsdelivr.net/npm/@94ai-plus/nf-date-picker@1.0.0-alpha.5/dist/readme/94logo.png" width="150" height="50" alt="94AI" />
|
|
5
|
+
|
|
6
|
+
<img src="https://cdn.jsdelivr.net/npm/@94ai-plus/nf-date-picker@1.0.0-alpha.5/dist/readme/common-plus.svg" width="300" height="50" alt="common-ui+" />
|
|
7
|
+
</a>
|
|
8
|
+
</h1>
|
|
2
9
|
|
|
3
|
-
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://www.npmjs.com/package/@94ai-plus/nf-date-picker"><img src="https://img.shields.io/npm/v/%4094ai-plus/nf-date-picker/latest.svg?label=version" alt="npm latest 版本" /></a>
|
|
12
|
+
<a href="https://nodejs.org/en/blog/release/v22.13.0"><img src="https://img.shields.io/badge/Node.js-22.13.0-5FA04E.svg" alt="开发环境 Node.js 22.13.0" /></a>
|
|
13
|
+
<a href="https://vuejs.org/"><img src="https://img.shields.io/badge/Vue-3.5-42B883.svg" alt="Vue 3.5" /></a>
|
|
14
|
+
<a href="https://cdn.jsdelivr.net/npm/@94ai-plus/nf-date-picker@1.0.0-alpha.5/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License" /></a>
|
|
15
|
+
<a href="https://oss.xccjh.top/common-ui-plus-badges/test-pass-rate.svg"><img src="https://oss.xccjh.top/common-ui-plus-badges/test-pass-rate.svg" alt="Repository test pass rate (default branch), not per-package results" /></a>
|
|
16
|
+
<a href="https://oss.xccjh.top/common-ui-plus-badges/coverage.svg"><img src="https://oss.xccjh.top/common-ui-plus-badges/coverage.svg" alt="Repository source line coverage (default branch), not per-package coverage" /></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="https://www.npmjs.com/package/@94ai-plus/nf-date-picker"><img src="https://nodei.co/npm/@94ai-plus/nf-date-picker.svg?downloads=true&downloadRank=true" width="360" alt="NPM" /></a>
|
|
21
|
+
</p>
|
|
22
|
+
<!-- common-ui-plus:brand:end -->
|
|
23
|
+
|
|
24
|
+
# @94ai-plus/nf-date-picker
|
|
25
|
+
|
|
26
|
+
## [HomePage](https://oss.xccjh.top/common-ui-plus/index.html)
|
|
27
|
+
|
|
28
|
+
[官网](https://oss.xccjh.top/common-ui-plus/index.html) · [项目仓库](http://gitlab.94ai.pro/ui/common-ui-plus)
|
|
29
|
+
|
|
30
|
+
Vue 3 / Element Plus 半年、半年区间和周区间选择器。季度、季度区间、周、年和年区间直接使用 Element Plus 原生类型。
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import NfDatePicker, { NfHalfYearPicker, NfHalfYearRangePicker, NfWeekRangePicker } from '@94ai-plus/nf-date-picker'
|
|
34
|
+
import '@94ai-plus/nf-date-picker/style.css'
|
|
35
|
+
app.use(NfDatePicker)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```vue
|
|
39
|
+
<NfHalfYearPicker v-model="half" value-format="YYYY-MM-DD" />
|
|
40
|
+
<NfHalfYearRangePicker v-model="halves" value-format="YYYY-MM-DD" />
|
|
41
|
+
<NfWeekRangePicker v-model="weeks" value-format="YYYY-MM-DD" />
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
默认返回 Date / Date[],valueFormat 指定时返回字符串,清空返回 null。半年使用 1 月 1 日/7 月 1 日作为值;半年区间返回两个半年起始日。周区间复用日期区间面板,选择完成后补齐完整周,周首日跟随 Element Plus 语言,也可用 weekStartsOn 指定。半年 disabledDate 判定半年起始日,周区间禁用包含不可选日期的整周。
|
|
45
|
+
|
|
46
|
+
支持 standalone install、CommonUI 注册、自动导入、GlobalComponents 类型、八语言和 Chalk/OEM 主题。提供 change、calendar-change、visible-change、clear、focus、blur 事件及 focus/blur/handleOpen/handleClose 方法。半年选择通过只读面板完成。
|
|
47
|
+
|
|
48
|
+
[完整 API 和示例](https://oss.xccjh.top/common-ui-plus/components/date-picker)
|
|
49
|
+
|
|
50
|
+
## 全局默认配置
|
|
51
|
+
|
|
52
|
+
通过总包的 `NfConfigProvider` 的 `nfDatePicker` 配置项设置默认属性;三个专用选择器也可分别通过 `nfHalfYearPicker`、`nfHalfYearRangePicker`、`nfWeekRangePicker` 覆盖;专用配置中未设置的属性回退到 `nfDatePicker`,组件显式属性优先于两者。支持响应式更新和嵌套继承,优先级为组件显式属性 → 最近一层配置 → 外层配置 → 组件原有默认值。`undefined` 继续继承,`false`、`0` 和空字符串保留;按属性合并,数组、对象和函数整体替换,不深度合并。初始化选项仍按组件原有生命周期生效,事件、插槽和原生 attributes 在组件上设置,必填业务数据仍需显式提供。详见[全局配置文档](https://oss.xccjh.top/common-ui-plus/components/fixture#component-defaults)。
|
|
53
|
+
|
|
54
|
+
<!-- common-ui-plus:footer:start -->
|
|
55
|
+
## Contributors
|
|
56
|
+
|
|
57
|
+
感谢每一位参与项目建设的贡献者!
|
|
58
|
+
|
|
59
|
+

|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
以上为随本版本发布的贡献者统计快照,统计日期与分支见图中说明;仅统计 Git 非合并提交,头像使用姓名首字母,不是 GitLab 个人照片。
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
本项目采用 [MIT License](https://cdn.jsdelivr.net/npm/@94ai-plus/nf-date-picker@1.0.0-alpha.5/LICENSE) 开源许可。
|
|
68
|
+
|
|
69
|
+
Copyright (c) 2026-present Jiahe Zou, 94 Intelligent Technology Co., Ltd.
|
|
70
|
+
<!-- common-ui-plus:footer:end -->
|