初始化项目, 添加TDesign等包
This commit is contained in:
80
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/date-time-picker.d.ts
vendored
Normal file
80
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/date-time-picker.d.ts
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
import type { Dayjs } from 'dayjs';
|
||||
import { SuperComponent } from '../common/src/index';
|
||||
declare enum ModeItem {
|
||||
YEAR = "year",
|
||||
MONTH = "month",
|
||||
DATE = "date",
|
||||
HOUR = "hour",
|
||||
MINUTE = "minute",
|
||||
SECOND = "second"
|
||||
}
|
||||
interface ColumnItemValue {
|
||||
value: string | number;
|
||||
label: string | number;
|
||||
}
|
||||
export default class DateTimePicker extends SuperComponent {
|
||||
properties: import("./type").TdDateTimePickerProps;
|
||||
externalClasses: string[];
|
||||
options: {
|
||||
multipleSlots: boolean;
|
||||
};
|
||||
observers: {
|
||||
'start, end, value': () => void;
|
||||
customLocale(v: any): void;
|
||||
mode(m: any): void;
|
||||
};
|
||||
date: any;
|
||||
data: {
|
||||
prefix: string;
|
||||
classPrefix: string;
|
||||
columns: any[];
|
||||
columnsValue: any[];
|
||||
fullModes: any[];
|
||||
locale: any;
|
||||
dayjsLocale: any;
|
||||
};
|
||||
controlledProps: {
|
||||
key: string;
|
||||
event: string;
|
||||
}[];
|
||||
methods: {
|
||||
updateColumns(): void;
|
||||
getDaysOfWeekInMonth(date: Dayjs, type: string): Array<{
|
||||
value: string;
|
||||
label: string;
|
||||
}>;
|
||||
getParseDate(): Dayjs;
|
||||
normalize(val: string | number, defaultDay: Dayjs): Dayjs;
|
||||
getMinDate(): Dayjs;
|
||||
getMaxDate(): Dayjs;
|
||||
getDateRect(type?: string): any[];
|
||||
getDate(): Dayjs;
|
||||
clipDate(date: Dayjs): Dayjs;
|
||||
setYear(date: Dayjs, year: number): Dayjs;
|
||||
setMonth(date: Dayjs, month: number): Dayjs;
|
||||
getColumnOptions(): any[];
|
||||
getOptionByType(type: string): any;
|
||||
getYearOptions(dateParams: any): ColumnItemValue[];
|
||||
getOptionEdge(minOrMax: 'min' | 'max', type: any): any;
|
||||
getMonthOptions(): ColumnItemValue[];
|
||||
getDayOptions(): ColumnItemValue[];
|
||||
getHourOptions(): ColumnItemValue[];
|
||||
getMinuteOptions(): ColumnItemValue[];
|
||||
getValueCols(this: DateTimePicker): {
|
||||
columns: any;
|
||||
columnsValue: any;
|
||||
};
|
||||
getColumnsValue(): string[];
|
||||
getNewDate(value: number, type: ModeItem): Dayjs;
|
||||
onColumnChange(e: WechatMiniprogram.CustomEvent): void;
|
||||
onConfirm(): void;
|
||||
onCancel(): void;
|
||||
onVisibleChange(e: any): void;
|
||||
onClose(e: any): void;
|
||||
resetColumns(): void;
|
||||
};
|
||||
getFullModeArray(mode: any): any;
|
||||
getFullModeByModeString(modeString: any, matchModes: any): any;
|
||||
isTimeMode(): boolean;
|
||||
}
|
||||
export {};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"t-picker":"../picker/picker","t-picker-item":"../picker-item/picker-item"}}
|
||||
@@ -0,0 +1 @@
|
||||
<wxs src="../common/utils.wxs" module="_"/><t-picker style="{{_._style([style, customStyle])}}" class="class {{prefix}}-class {{classPrefix}}" visible="{{visible}}" value="{{columnsValue}}" header="{{header}}" title="{{title}}" auto-close="{{autoClose}}" confirm-btn="{{confirmBtn || locale.confirm}}" cancel-btn="{{cancelBtn || locale.cancel}}" use-popup="{{usePopup}}" popup-props="{{ popupProps }}" bind:pick="onColumnChange" bind:confirm="onConfirm" bind:cancel="onCancel" bind:visible-change="onVisibleChange" bind:close="onClose"><slot slot="header" name="header"/><t-picker-item wx:for="{{columns}}" wx:key="index" class="{{_.cls(classPrefix + '__item', [['roomly', columns.length >= 5 && index == 0]])}}" options="{{item}}" index="index" format="{{formatter}}"/><slot slot="footer" name="footer"/></t-picker>
|
||||
@@ -0,0 +1 @@
|
||||
@import '../common/style/index.wxss';.t-date-time-picker__item--roomly{width:var(--td-data-time-picker-year-width,128rpx);flex:0 0 var(--td-data-time-picker-year-width,128rpx);}
|
||||
174
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/dayjs.d.ts
vendored
Normal file
174
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/dayjs.d.ts
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
import * as enLocale from 'dayjs/locale/en';
|
||||
declare const _default: {
|
||||
default: {
|
||||
key: string;
|
||||
label: string;
|
||||
locale: enLocale.Locale;
|
||||
i18n: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
};
|
||||
en: {
|
||||
key: string;
|
||||
label: string;
|
||||
locale: enLocale.Locale;
|
||||
i18n: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
};
|
||||
'zh-cn': {
|
||||
key: string;
|
||||
label: string;
|
||||
locale: enLocale.Locale;
|
||||
i18n: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
};
|
||||
zh: {
|
||||
key: string;
|
||||
label: string;
|
||||
locale: enLocale.Locale;
|
||||
i18n: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
};
|
||||
'zh-tw': {
|
||||
key: string;
|
||||
label: string;
|
||||
locale: enLocale.Locale;
|
||||
i18n: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
};
|
||||
tc: {
|
||||
key: string;
|
||||
label: string;
|
||||
locale: enLocale.Locale;
|
||||
i18n: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
};
|
||||
ko: {
|
||||
key: string;
|
||||
label: string;
|
||||
locale: enLocale.Locale;
|
||||
i18n: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
};
|
||||
kr: {
|
||||
key: string;
|
||||
label: string;
|
||||
locale: enLocale.Locale;
|
||||
i18n: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
};
|
||||
ja: {
|
||||
key: string;
|
||||
label: string;
|
||||
locale: enLocale.Locale;
|
||||
i18n: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
};
|
||||
ru: {
|
||||
key: string;
|
||||
label: string;
|
||||
locale: enLocale.Locale;
|
||||
i18n: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export default _default;
|
||||
@@ -0,0 +1 @@
|
||||
import*as enLocale from"dayjs/locale/en";import*as zhLocale from"dayjs/locale/zh-cn";import*as tcLocale from"dayjs/locale/zh-tw";import*as koLocale from"dayjs/locale/ko";import*as jaLocale from"dayjs/locale/ja";import*as ruLocale from"dayjs/locale/ru";import en from"./en";import zh from"./zh";import tc from"./tc";import ko from"./ko";import ja from"./ja";import ru from"./ru";export default{default:{key:"zh-cn",label:"简体中文",locale:zhLocale,i18n:zh},en:{key:"en",label:"English",locale:enLocale,i18n:en},"zh-cn":{key:"zh-cn",label:"简体中文",locale:zhLocale,i18n:zh},zh:{key:"zh-cn",label:"简体中文",locale:zhLocale,i18n:zh},"zh-tw":{key:"zh-tw",label:"繁体中文",locale:tcLocale,i18n:tc},tc:{key:"zh-tw",label:"繁体中文",locale:tcLocale,i18n:tc},ko:{key:"ko",label:"한국어",locale:koLocale,i18n:ko},kr:{key:"ko",label:"한국어",locale:koLocale,i18n:ko},ja:{key:"ja",label:"日本語",locale:jaLocale,i18n:ja},ru:{key:"ru",label:"русский",locale:ruLocale,i18n:ru}};
|
||||
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/en.d.ts
vendored
Normal file
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/en.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
declare const _default: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
export default _default;
|
||||
@@ -0,0 +1 @@
|
||||
export default{year:"",month:"",date:"",hour:"",minute:"",second:"",am:"AM",pm:"PM",confirm:"confirm",cancel:"cancel"};
|
||||
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/ja.d.ts
vendored
Normal file
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/ja.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
declare const _default: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
export default _default;
|
||||
@@ -0,0 +1 @@
|
||||
export default{year:"年",month:"月",date:"日",hour:"時",minute:"分",second:"秒",am:"午前",pm:"午後",confirm:"確認",cancel:"キャンセル"};
|
||||
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/ko.d.ts
vendored
Normal file
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/ko.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
declare const _default: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
export default _default;
|
||||
@@ -0,0 +1 @@
|
||||
export default{year:"년",month:"월",date:"일",hour:"시",minute:"분",second:"초",am:"오전",pm:"오후",confirm:"확인",cancel:"취소"};
|
||||
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/ru.d.ts
vendored
Normal file
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/ru.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
declare const _default: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
export default _default;
|
||||
@@ -0,0 +1 @@
|
||||
export default{year:"",month:"",date:"",hour:"",minute:"",second:"",am:"до полудня",pm:"после полудня",confirm:"подтвердить",cancel:"отменить"};
|
||||
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/tc.d.ts
vendored
Normal file
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/tc.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
declare const _default: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
export default _default;
|
||||
@@ -0,0 +1 @@
|
||||
export default{year:"年",month:"月",date:"日",hour:"時",minute:"分",second:"秒",am:"上午",pm:"下午",confirm:"確定",cancel:"取消"};
|
||||
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/zh.d.ts
vendored
Normal file
13
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/locale/zh.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
declare const _default: {
|
||||
year: string;
|
||||
month: string;
|
||||
date: string;
|
||||
hour: string;
|
||||
minute: string;
|
||||
second: string;
|
||||
am: string;
|
||||
pm: string;
|
||||
confirm: string;
|
||||
cancel: string;
|
||||
};
|
||||
export default _default;
|
||||
@@ -0,0 +1 @@
|
||||
export default{year:"年",month:"月",date:"日",hour:"时",minute:"分",second:"秒",am:"上午",pm:"下午",confirm:"确定",cancel:"取消"};
|
||||
3
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/props.d.ts
vendored
Normal file
3
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/props.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { TdDateTimePickerProps } from './type';
|
||||
declare const props: TdDateTimePickerProps;
|
||||
export default props;
|
||||
@@ -0,0 +1 @@
|
||||
const props={autoClose:{type:Boolean,value:!1},cancelBtn:{type:String,value:"取消"},confirmBtn:{type:String,value:""},customLocale:{type:String,value:"zh"},end:{type:null},filter:{type:null},format:{type:String,value:"YYYY-MM-DD HH:mm:ss"},formatter:{type:null},header:{type:Boolean,value:!0},mode:{type:null,value:"date"},popupProps:{type:Object,value:{}},showWeek:{type:Boolean,value:!1},start:{type:null},steps:{type:Object,value:{}},title:{type:String,value:""},usePopup:{type:Boolean,value:!0},value:{type:null,value:null},defaultValue:{type:null},visible:{type:Boolean,value:!1}};export default props;
|
||||
89
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/type.d.ts
vendored
Normal file
89
miniprogram/miniprogram_npm/tdesign-miniprogram/date-time-picker/type.d.ts
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
import { PopupProps } from '../popup/index';
|
||||
export interface TdDateTimePickerProps {
|
||||
autoClose?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
cancelBtn?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
confirmBtn?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
customLocale?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
end?: {
|
||||
type: null;
|
||||
value?: string | number;
|
||||
};
|
||||
filter?: {
|
||||
type: undefined;
|
||||
value?: (type: TimeModeValues, columns: DateTimePickerColumn) => DateTimePickerColumn;
|
||||
};
|
||||
format?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
formatter?: {
|
||||
type: undefined;
|
||||
value?: (option: DateTimePickerColumnItem, columnIndex: number) => DateTimePickerColumnItem;
|
||||
};
|
||||
header?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
mode?: {
|
||||
type: null;
|
||||
value?: DateTimePickerMode;
|
||||
};
|
||||
popupProps?: {
|
||||
type: ObjectConstructor;
|
||||
value?: PopupProps;
|
||||
};
|
||||
showWeek?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
start?: {
|
||||
type: null;
|
||||
value?: string | number;
|
||||
};
|
||||
steps?: {
|
||||
type: ObjectConstructor;
|
||||
value?: {
|
||||
[key in TimeModeValues]?: number;
|
||||
};
|
||||
};
|
||||
title?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
usePopup?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
value?: {
|
||||
type: null;
|
||||
value?: DateValue;
|
||||
};
|
||||
defaultValue?: {
|
||||
type: null;
|
||||
value?: DateValue;
|
||||
};
|
||||
visible?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
}
|
||||
export declare type DateTimePickerColumn = DateTimePickerColumnItem[];
|
||||
export interface DateTimePickerColumnItem {
|
||||
label: string;
|
||||
value: string;
|
||||
}
|
||||
export declare type DateTimePickerMode = TimeModeValues | Array<TimeModeValues>;
|
||||
export declare type TimeModeValues = 'year' | 'month' | 'date' | 'hour' | 'minute' | 'second';
|
||||
export declare type DateValue = string | number;
|
||||
@@ -0,0 +1 @@
|
||||
export{};
|
||||
Reference in New Issue
Block a user