The complete code see github:github.com/lwjmzla/dat… The code is relatively simple, easy to understand, has added relevant notes, convenient for everyone to transform later, also can be used out of the box, the following is the relevant parameters, are common functions, scalability.
props
props: { defaultTime: { // ! Eg [2021, 1, 23] type: Array, default: () => []}, // Start time of year startYear: {type: [String, Number], default: EndYear: {type: [String, Number], default: 2050}, title: {type: String, default: }, confirmText: {type: String, default: 'confirm'}, cancelText: {type: String, default: 'cancel'}, confirmColor: {type: String, default: 'cancel'}, confirmColor: {type: String, default: 'cancel'} String, default: 'red' }, cancelColor: { type: String, default: 'black' }, styl: { type: Object, default: () => {} } }Copy the code
events
@cancle="cancleFn"
@confirm="clickFn"
Copy the code