File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010
1111---
1212
13+ ## 1.0.5
14+ ` 2020-3-31 `
15+ - 🐞 修复部分时间日期相关的组件内部使用的 Day.js 的插件没有在内部引入而需要用户引入的问题 [ #53 ] ( https://github.com/ecomfe/santd/pull/53 )
16+
1317## 1.0.4
1418` 2020-3-30 `
1519- Table
Original file line number Diff line number Diff line change @@ -10,10 +10,8 @@ import Select from '../select';
1010import Calendar from './src/FullCalendar' ;
1111import './style/index.less' ;
1212import localeReceiver from '../localeprovider/receiver' ;
13- import weekOfYear from 'dayjs/plugin/weekOfYear' ;
1413import localeData from 'dayjs/plugin/localeData' ;
1514
16- dayjs . extend ( weekOfYear ) ;
1715dayjs . extend ( localeData ) ;
1816
1917const prefixCls = classCreator ( 'fullcalendar' ) ( ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ import san, {DataTypes} from 'san';
77import MonthPanel from '../month/MonthPanel' ;
88import YearPanel from '../year/YearPanel' ;
99import DecadePanel from '../decade/DecadePanel' ;
10+ import dayjs from 'dayjs' ;
11+ import localeData from 'dayjs/plugin/localeData' ;
12+
13+ dayjs . extend ( localeData ) ;
1014
1115export default san . defineComponent ( {
1216 dataTypes : {
Original file line number Diff line number Diff line change 66import san , { DataTypes } from 'san' ;
77import dayjs from 'dayjs' ;
88import { getTitleString , getTodayTime } from '../util/index' ;
9+ import weekOfYear from 'dayjs/plugin/weekOfYear' ;
10+ import localeData from 'dayjs/plugin/localeData' ;
11+
12+ dayjs . extend ( weekOfYear ) ;
13+ dayjs . extend ( localeData ) ;
914
1015const ROW = 6 ;
1116const COL = 7 ;
Original file line number Diff line number Diff line change 1+ import dayjs from 'dayjs' ;
2+ import advancedFormat from 'dayjs/plugin/advancedFormat' ;
3+
4+ dayjs . extend ( advancedFormat ) ;
5+
16export default {
27 today : '오늘' ,
38 now : '현재 시각' ,
Original file line number Diff line number Diff line change 44 **/
55import dayjs from 'dayjs' ;
66import utc from 'dayjs/plugin/utc' ;
7+ import localeData from 'dayjs/plugin/localeData' ;
78
89dayjs . extend ( utc ) ;
10+ dayjs . extend ( localeData ) ;
911
1012const defaultDisabledTime = {
1113 disabledHours ( ) {
Original file line number Diff line number Diff line change 7272| 参数 | 说明 | 类型 | 默认值 |
7373| --- | --- | --- | --- |
7474| defaultValue | 默认日期 | [ dayjs] ( https://day.js.org ) | - |
75- | format | 设置日期格式,配置参考 [ dayjs.js] ( https://day.js.org ) | string | 'YYYY -wo' |
75+ | format | 设置日期格式,配置参考 [ dayjs.js] ( https://day.js.org ) | string | 'gggg -wo' |
7676| renderExtraFooter | 在面板中添加额外的页脚 | slot | - |
7777| value | 日期 | [ dayjs] ( https://day.js.org ) | - |
7878| on-change | 时间发生变化的回调 | function({date: dayjs, dateString: string}) | - |
Original file line number Diff line number Diff line change @@ -10,12 +10,6 @@ import RangePicker from './RangePicker';
1010import createPicker from './createPicker' ;
1111import wrapPicker from './wrapPicker' ;
1212import WeekPicker from './WeekPicker' ;
13- import dayjs from 'dayjs' ;
14- import weekYear from 'dayjs/plugin/weekYear' ;
15- import advancedFormat from 'dayjs/plugin/advancedFormat' ;
16-
17- dayjs . extend ( weekYear ) ;
18- dayjs . extend ( advancedFormat ) ;
1913
2014const DatePicker = wrapPicker ( createPicker ( Calendar ) , 'date' ) ;
2115
Original file line number Diff line number Diff line change 11import CalendarLocale from '../../calendar/src/locale/ar_EG' ;
22import TimePickerLocale from '../../time-picker/locale/ar_EG' ;
3+ import dayjs from 'dayjs' ;
4+ import weekOfYear from 'dayjs/plugin/weekOfYear' ;
5+ import advancedFormat from 'dayjs/plugin/advancedFormat' ;
6+
7+ dayjs . extend ( weekOfYear ) ;
8+ dayjs . extend ( advancedFormat ) ;
9+
310
411// Merge into a locale object
512export default {
Original file line number Diff line number Diff line change 66import san from 'san' ;
77import { classCreator } from '../core/util/index' ;
88import localeReceiver from '../localeprovider/receiver' ;
9+ import dayjs from 'dayjs' ;
10+ import weekYear from 'dayjs/plugin/weekYear' ;
11+ import weekOfYear from 'dayjs/plugin/weekOfYear' ;
12+ import advancedFormat from 'dayjs/plugin/advancedFormat' ;
13+
14+ dayjs . extend ( weekYear ) ;
15+ dayjs . extend ( weekOfYear ) ;
16+ dayjs . extend ( advancedFormat ) ;
917
1018const prefixCls = classCreator ( 'calendar' ) ( ) ;
1119const inputPrefixCls = classCreator ( 'input' ) ( ) ;
You can’t perform that action at this time.
0 commit comments