MCPcopy
hub / github.com/youzan/vant-weapp / formatter

Function formatter

packages/datetime-picker/demo/index.ts:15–23  ·  view source on GitHub ↗
(type, value)

Source from the content-addressed store, hash-verified

13 currentDate4: '12:00',
14 loading: false,
15 formatter(type, value) {
16 if (type === 'year') {
17 return `${value}年`;
18 }
19 if (type === 'month') {
20 return `${value}月`;
21 }
22 return value;
23 },
24 filter(type, options) {
25 if (type === 'minute') {
26 return options.filter((option) => option % 5 === 0);

Callers 3

updateColumnsFunction · 0.85
updateColumnValueFunction · 0.85
index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected