Browse Source

Merge branch 'next' of github.com:vueComponent/ant-design-vue into next

pull/3733/head
tangjinzhou 4 years ago
parent
commit
9dbc46cfa6
  1. 2
      .github/workflows/translate.yml
  2. 2
      components/calendar/index.tsx
  3. 2
      components/input/Search.tsx
  4. 2
      components/vc-pagination/Pagination.jsx
  5. 2
      components/vc-switch/Switch.jsx

2
.github/workflows/translate.yml

@ -13,6 +13,8 @@ jobs:
- name: issue
if: github.event_name == 'issues'
uses: actions-cool/translation-helper@v1.1.1
with:
translate-body: false
- name: pr
if: github.event_name == 'pull_request_target'

2
components/calendar/index.tsx

@ -93,11 +93,11 @@ const Calendar = defineComponent({
},
triggerPanelChange(value: moment.Moment, mode: CalendarMode | undefined) {
const val = this.valueFormat ? momentToString(value, this.valueFormat) : value;
this.$emit('panelChange', val, mode);
if (value !== this.sValue) {
this.$emit('update:value', val);
this.$emit('change', val);
}
this.$emit('panelChange', val, mode);
},
triggerSelect(value: moment.Moment) {

2
components/input/Search.tsx

@ -32,10 +32,10 @@ export default defineComponent({
this.input = node;
},
handleChange(e: Event) {
this.$emit('update:value', (e.target as HTMLInputElement).value);
if (e && e.target && e.type === 'click') {
this.$emit('search', (e.target as HTMLInputElement).value, e);
}
this.$emit('update:value', (e.target as HTMLInputElement).value);
this.$emit('change', e);
},
handleSearch(e: Event) {

2
components/vc-pagination/Pagination.jsx

@ -237,10 +237,10 @@ export default defineComponent({
}
}
this.__emit('update:pageSize', size);
this.__emit('showSizeChange', current, size);
if (current !== preCurrent) {
this.__emit('update:current', current);
}
this.__emit('showSizeChange', current, size);
},
handleChange(p) {
const { disabled } = this.$props;

2
components/vc-switch/Switch.jsx

@ -51,8 +51,8 @@ export default defineComponent({
if (!hasProp(this, 'checked')) {
this.stateChecked = checked;
}
this.__emit('change', checked, e);
this.__emit('update:checked', checked);
this.__emit('change', checked, e);
},
handleClick(e) {
const checked = !this.stateChecked;

Loading…
Cancel
Save