纸板小程序:订单/送货单:列表与详情功能
This commit is contained in:
+78
@@ -0,0 +1,78 @@
|
||||
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 {
|
||||
behaviors: string[];
|
||||
properties: import("./type").TdDateTimePickerProps;
|
||||
externalClasses: string[];
|
||||
options: {
|
||||
multipleSlots: boolean;
|
||||
};
|
||||
observers: {
|
||||
'start, end, value, globalConfig'(): void;
|
||||
mode(m: any): void;
|
||||
};
|
||||
date: any;
|
||||
data: {
|
||||
prefix: string;
|
||||
classPrefix: string;
|
||||
columns: any[];
|
||||
columnsValue: any[];
|
||||
fullModes: 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 || globalConfig.title || ''}}" auto-close="{{autoClose}}" confirm-btn="{{confirmBtn || globalConfig.confirm}}" cancel-btn="{{cancelBtn || globalConfig.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]])}}" use-slots="{{false}}" 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);}
|
||||
@@ -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:""},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;
|
||||
@@ -0,0 +1,85 @@
|
||||
import { PopupProps } from '../popup/index';
|
||||
export interface TdDateTimePickerProps {
|
||||
autoClose?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
cancelBtn?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
confirmBtn?: {
|
||||
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