mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-30 02:57:50 +08:00
Merge branch 'next' of github.com:vueComponent/ant-design-vue into next
This commit is contained in:
commit
2070f702de
@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`DropdownButton should support href like Button 1`] = `
|
||||
<div class="ant-btn-group ant-dropdown-button"><a href="https://ant.design" class="ant-btn ant-btn-default">
|
||||
<div class="ant-btn-group ant-dropdown-button"><a class="ant-btn ant-btn-default" href="https://ant.design">
|
||||
<!---->
|
||||
</a>
|
||||
<!----><button class="ant-dropdown-trigger ant-btn ant-btn-default" type="button">
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { App, defineComponent, inject, nextTick, onMounted, ref } from 'vue';
|
||||
import { App, defineComponent, inject, nextTick, onMounted, ref, PropType } from 'vue';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
import { getOptionProps } from '../_util/props-util';
|
||||
import classNames from '../_util/classNames';
|
||||
@ -8,28 +8,6 @@ import VcInputNumber from '../vc-input-number/src';
|
||||
import { defaultConfigProvider } from '../config-provider';
|
||||
import { tuple } from '../_util/type';
|
||||
|
||||
export interface InputNumberPropsTypes {
|
||||
prefixCls?: string;
|
||||
min?: number;
|
||||
max?: number;
|
||||
value?: number;
|
||||
step?: number | string;
|
||||
defaultValue?: number;
|
||||
tabindex?: number;
|
||||
onChange?: (value: number | undefined) => void;
|
||||
disabled?: boolean;
|
||||
size?: 'large' | 'small' | 'default';
|
||||
formatter?: (value: number | string | undefined) => string;
|
||||
parser?: (displayValue: string | undefined) => number | string;
|
||||
decimalSeparator?: string;
|
||||
placeholder?: string;
|
||||
name?: string;
|
||||
id?: string;
|
||||
precision?: number;
|
||||
onPressEnter?: EventHandlerNonNull;
|
||||
autofocus?: boolean;
|
||||
}
|
||||
|
||||
const InputNumberProps = {
|
||||
prefixCls: PropTypes.string,
|
||||
min: PropTypes.number,
|
||||
@ -48,12 +26,15 @@ const InputNumberProps = {
|
||||
id: PropTypes.string,
|
||||
precision: PropTypes.number,
|
||||
autofocus: PropTypes.looseBool,
|
||||
onPressEnter: {
|
||||
type: Function as PropType<EventHandlerNonNull>,
|
||||
},
|
||||
};
|
||||
|
||||
const InputNumber = defineComponent<InputNumberPropsTypes>({
|
||||
const InputNumber = defineComponent({
|
||||
name: 'AInputNumber',
|
||||
inheritAttrs: false,
|
||||
props: InputNumberProps as any,
|
||||
props: InputNumberProps,
|
||||
setup(props) {
|
||||
const inputNumberRef = ref(null);
|
||||
const focus = () => {
|
||||
@ -84,7 +65,7 @@ const InputNumber = defineComponent<InputNumberPropsTypes>({
|
||||
...getOptionProps(this),
|
||||
...this.$attrs,
|
||||
} as any;
|
||||
const getPrefixCls = (this as any).configProvider.getPrefixCls;
|
||||
const { getPrefixCls } = this.configProvider;
|
||||
const prefixCls = getPrefixCls('input-number', customizePrefixCls);
|
||||
|
||||
const inputNumberClass = classNames(
|
||||
@ -104,7 +85,7 @@ const InputNumber = defineComponent<InputNumberPropsTypes>({
|
||||
...others,
|
||||
class: inputNumberClass,
|
||||
};
|
||||
return <VcInputNumber {...vcInputNumberprops} ref="saveInputNumber" />;
|
||||
return <VcInputNumber {...vcInputNumberprops} ref="inputNumberRef" />;
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user