Blame view

src/components/date-picker/panel/mixin.js 630 Bytes
3cf7cfd1   梁灏   update DatePicker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  const prefixCls = 'ivu-picker-panel';
  const datePrefixCls = 'ivu-date-picker';
  
  export default {
      methods: {
          iconBtnCls (direction, type = '') {
              return [
                  `${prefixCls}-icon-btn`,
                  `${datePrefixCls}-${direction}-btn`,
                  `${datePrefixCls}-${direction}-btn-arrow${type}`,
              ]
          },
          handleShortcutClick (shortcut) {
              if (shortcut.value) this.$emit('on-pick', shortcut.value());
              if (shortcut.onClick) shortcut.onClick(this);
472b4ff1   梁灏   update DatePicker
16
          },
0a5c5f41   梁灏   update DatePicker
17
18
          resetDate () {
              this.date = new Date(this.date);
3cf7cfd1   梁灏   update DatePicker
19
20
21
          }
      }
  }