style: format code
parent
a13dd20f58
commit
b155627923
|
@ -50,11 +50,14 @@
|
|||
"camelcase": "off",
|
||||
"no-extra-boolean-cast": "off",
|
||||
"semi": ["error", "always"],
|
||||
"vue/require-explicit-emits": "off",
|
||||
"vue/require-prop-types": "off",
|
||||
"vue/require-default-prop": "off",
|
||||
"vue/no-reserved-keys": "off",
|
||||
"vue/comment-directive": "off",
|
||||
"vue/prop-name-casing": "off",
|
||||
"vue/one-component-per-file": "off",
|
||||
"vue/custom-event-name-casing": "off",
|
||||
"vue/max-attributes-per-line": [
|
||||
2,
|
||||
{
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 7f7141a1dd62488287157dee6a1af52716924c62
|
||||
Subproject commit 937ccc4896088f148db3a1742517de351161ec5d
|
|
@ -25,7 +25,6 @@ const AutoCompleteProps = {
|
|||
const AutoComplete = defineComponent({
|
||||
name: 'AAutoComplete',
|
||||
inheritAttrs: false,
|
||||
emits: ['change', 'select', 'focus', 'blur'],
|
||||
props: {
|
||||
...AutoCompleteProps,
|
||||
prefixCls: PropTypes.string.def('ant-select'),
|
||||
|
@ -38,6 +37,7 @@ const AutoComplete = defineComponent({
|
|||
filterOption: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func]).def(false),
|
||||
defaultActiveFirstOption: PropTypes.looseBool.def(true),
|
||||
},
|
||||
emits: ['change', 'select', 'focus', 'blur'],
|
||||
Option: { ...Option, name: 'AAutoCompleteOption' },
|
||||
OptGroup: { ...OptGroup, name: 'AAutoCompleteOptGroup' },
|
||||
setup(props, { slots }) {
|
||||
|
|
|
@ -20,11 +20,11 @@ const BackTop = defineComponent({
|
|||
name: 'ABackTop',
|
||||
mixins: [BaseMixin],
|
||||
inheritAttrs: false,
|
||||
emits: ['click'],
|
||||
props: {
|
||||
...props,
|
||||
visibilityHeight: PropTypes.number.def(400),
|
||||
},
|
||||
emits: ['click'],
|
||||
setup() {
|
||||
return {
|
||||
configProvider: inject('configProvider', defaultConfigProvider),
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable */
|
||||
import PropTypes from '../_util/vue-types';
|
||||
import { defaultConfigProvider } from '../config-provider';
|
||||
import BaseMixin from '../_util/BaseMixin';
|
||||
|
@ -12,6 +13,9 @@ let colors = '#194d33';
|
|||
export default {
|
||||
name: 'AColorPicker',
|
||||
mixins: [BaseMixin],
|
||||
inject: {
|
||||
configProvider: { default: () => defaultConfigProvider },
|
||||
},
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'change.value', //为了支持v-model直接返回颜色字符串 所以用了自定义的事件,与pickr自带change事件进行区分
|
||||
|
@ -30,9 +34,7 @@ export default {
|
|||
alpha: PropTypes.looseBool.def(false), //是否开启透明通道
|
||||
hue: PropTypes.looseBool.def(true), //是否开启色彩预选
|
||||
},
|
||||
inject: {
|
||||
configProvider: { default: () => defaultConfigProvider },
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
colors,
|
||||
|
@ -82,7 +84,7 @@ export default {
|
|||
this.createPickr();
|
||||
this.eventsBinding();
|
||||
},
|
||||
destroyed() {
|
||||
unmounted() {
|
||||
this.pickr.destroyAndRemove();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -32,13 +32,13 @@ export default function createPicker<P>(
|
|||
): DefineComponent<any> {
|
||||
return defineComponent({
|
||||
name,
|
||||
mixins: [BaseMixin],
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
...props,
|
||||
allowClear: PropTypes.looseBool.def(true),
|
||||
showToday: PropTypes.looseBool.def(true),
|
||||
},
|
||||
mixins: [BaseMixin],
|
||||
setup() {
|
||||
return {
|
||||
configProvider: inject('configProvider', defaultConfigProvider),
|
||||
|
|
|
@ -13,6 +13,7 @@ const PlacementTypes = tuple('top', 'right', 'bottom', 'left');
|
|||
type placementType = typeof PlacementTypes[number];
|
||||
const Drawer = defineComponent({
|
||||
name: 'ADrawer',
|
||||
mixins: [BaseMixin],
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
closable: PropTypes.looseBool.def(true),
|
||||
|
@ -40,7 +41,6 @@ const Drawer = defineComponent({
|
|||
onClose: PropTypes.func,
|
||||
'onUpdate:visible': PropTypes.func,
|
||||
},
|
||||
mixins: [BaseMixin],
|
||||
setup(props) {
|
||||
const configProvider = inject('configProvider', defaultConfigProvider);
|
||||
return {
|
||||
|
|
|
@ -150,7 +150,6 @@ export const destroyFns = [];
|
|||
export default defineComponent({
|
||||
name: 'AModal',
|
||||
inheritAttrs: false,
|
||||
emits: ['update:visible', 'cancel', 'change', 'ok'],
|
||||
props: initDefaultProps(modalProps, {
|
||||
width: 520,
|
||||
transitionName: 'zoom',
|
||||
|
@ -159,6 +158,7 @@ export default defineComponent({
|
|||
visible: false,
|
||||
okType: 'primary',
|
||||
}),
|
||||
emits: ['update:visible', 'cancel', 'change', 'ok'],
|
||||
setup() {
|
||||
return {
|
||||
configProvider: inject('configProvider', defaultConfigProvider),
|
||||
|
|
|
@ -18,6 +18,7 @@ const btnProps = buttonTypes();
|
|||
|
||||
const Popconfirm = defineComponent({
|
||||
name: 'APopconfirm',
|
||||
mixins: [BaseMixin],
|
||||
props: {
|
||||
...tooltipProps,
|
||||
prefixCls: PropTypes.string,
|
||||
|
@ -36,7 +37,6 @@ const Popconfirm = defineComponent({
|
|||
onCancel: PropTypes.func,
|
||||
onVisibleChange: PropTypes.func,
|
||||
},
|
||||
mixins: [BaseMixin],
|
||||
emits: ['update:visible', 'confirm', 'cancel', 'visibleChange'],
|
||||
setup() {
|
||||
return {
|
||||
|
|
|
@ -55,6 +55,9 @@ const Slider = defineComponent({
|
|||
name: 'ASlider',
|
||||
mixins: [BaseMixin],
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
...SliderProps(),
|
||||
},
|
||||
emits: ['update:value', 'change'],
|
||||
setup() {
|
||||
return {
|
||||
|
@ -62,9 +65,6 @@ const Slider = defineComponent({
|
|||
configProvider: inject('configProvider', defaultConfigProvider),
|
||||
};
|
||||
},
|
||||
props: {
|
||||
...SliderProps(),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visibles: {},
|
||||
|
|
|
@ -78,7 +78,6 @@ const TimePicker = defineComponent({
|
|||
name: 'ATimePicker',
|
||||
mixins: [BaseMixin],
|
||||
inheritAttrs: false,
|
||||
emits: ['update:value', 'update:open', 'change', 'openChange', 'focus', 'blur', 'keydown'],
|
||||
props: initDefaultProps(TimePickerProps(), {
|
||||
align: {
|
||||
offset: [0, -2],
|
||||
|
@ -93,6 +92,7 @@ const TimePicker = defineComponent({
|
|||
focusOnOpen: true,
|
||||
allowClear: true,
|
||||
}),
|
||||
emits: ['update:value', 'update:open', 'change', 'openChange', 'focus', 'blur', 'keydown'],
|
||||
setup() {
|
||||
return {
|
||||
popupRef: null,
|
||||
|
|
|
@ -24,6 +24,7 @@ const getMomentObjectIfValid = date => {
|
|||
|
||||
const Calendar = defineComponent({
|
||||
name: 'Calendar',
|
||||
mixins: [BaseMixin, CommonMixin, CalendarMixin],
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
locale: PropTypes.object.def(enUs),
|
||||
|
@ -66,8 +67,6 @@ const Calendar = defineComponent({
|
|||
monthCellContentRender: PropTypes.func,
|
||||
},
|
||||
|
||||
mixins: [BaseMixin, CommonMixin, CalendarMixin],
|
||||
|
||||
data() {
|
||||
const props = this.$props;
|
||||
return {
|
||||
|
|
|
@ -11,6 +11,7 @@ import enUs from './locale/en_US';
|
|||
import { defineComponent } from 'vue';
|
||||
const FullCalendar = defineComponent({
|
||||
name: 'FullCalendar',
|
||||
mixins: [BaseMixin, CommonMixin, CalendarMixin],
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
locale: PropTypes.object.def(enUs),
|
||||
|
@ -36,7 +37,6 @@ const FullCalendar = defineComponent({
|
|||
renderFooter: PropTypes.func.def(() => null),
|
||||
renderSidebar: PropTypes.func.def(() => null),
|
||||
},
|
||||
mixins: [BaseMixin, CommonMixin, CalendarMixin],
|
||||
data() {
|
||||
let type;
|
||||
if (hasProp(this, 'type')) {
|
||||
|
|
|
@ -10,6 +10,7 @@ import enUs from './locale/en_US';
|
|||
import { defineComponent } from 'vue';
|
||||
const MonthCalendar = defineComponent({
|
||||
name: 'MonthCalendar',
|
||||
mixins: [BaseMixin, CommonMixin, CalendarMixin],
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
locale: PropTypes.object.def(enUs),
|
||||
|
@ -26,7 +27,6 @@ const MonthCalendar = defineComponent({
|
|||
renderFooter: PropTypes.func.def(() => null),
|
||||
renderSidebar: PropTypes.func.def(() => null),
|
||||
},
|
||||
mixins: [BaseMixin, CommonMixin, CalendarMixin],
|
||||
|
||||
data() {
|
||||
const props = this.$props;
|
||||
|
|
|
@ -27,6 +27,7 @@ function refFn(field, component) {
|
|||
|
||||
const Picker = defineComponent({
|
||||
name: 'Picker',
|
||||
mixins: [BaseMixin],
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
animation: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
||||
|
@ -48,7 +49,6 @@ const Picker = defineComponent({
|
|||
dateRender: PropTypes.func,
|
||||
children: PropTypes.func,
|
||||
},
|
||||
mixins: [BaseMixin],
|
||||
|
||||
data() {
|
||||
const props = this.$props;
|
||||
|
|
|
@ -82,6 +82,7 @@ function onInputSelect(direction, value, cause) {
|
|||
|
||||
const RangeCalendar = defineComponent({
|
||||
name: 'RangeCalendar',
|
||||
mixins: [BaseMixin, CommonMixin],
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
locale: PropTypes.object.def(enUs),
|
||||
|
@ -123,8 +124,6 @@ const RangeCalendar = defineComponent({
|
|||
inputReadOnly: PropTypes.looseBool,
|
||||
},
|
||||
|
||||
mixins: [BaseMixin, CommonMixin],
|
||||
|
||||
data() {
|
||||
const props = this.$props;
|
||||
const selectedValue = props.selectedValue || props.defaultSelectedValue;
|
||||
|
|
|
@ -9,11 +9,11 @@ import { defineComponent } from 'vue';
|
|||
|
||||
export default defineComponent({
|
||||
name: 'Slider',
|
||||
mixins: [BaseMixin],
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
...defaultProps,
|
||||
},
|
||||
mixins: [BaseMixin],
|
||||
inheritAttrs: false,
|
||||
data() {
|
||||
this._responsiveMediaHandlers = [];
|
||||
return {
|
||||
|
|
|
@ -193,22 +193,7 @@ const Select = defineComponent({
|
|||
...newState,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
provide('vcTreeSelect', {
|
||||
onSelectorFocus: this.onSelectorFocus,
|
||||
onSelectorBlur: this.onSelectorBlur,
|
||||
onSelectorKeyDown: this.onComponentKeyDown,
|
||||
onSelectorClear: this.onSelectorClear,
|
||||
onMultipleSelectorRemove: this.onMultipleSelectorRemove,
|
||||
|
||||
onTreeNodeSelect: this.onTreeNodeSelect,
|
||||
onTreeNodeCheck: this.onTreeNodeCheck,
|
||||
onPopupKeyDown: this.onComponentKeyDown,
|
||||
|
||||
onSearchInputChange: this.onSearchInputChange,
|
||||
onSearchInputKeyDown: this.onSearchInputKeyDown,
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
...getWatch(['treeData', 'defaultValue', 'value']),
|
||||
__propsSymbol__() {
|
||||
|
@ -258,6 +243,22 @@ const Select = defineComponent({
|
|||
});
|
||||
},
|
||||
},
|
||||
created() {
|
||||
provide('vcTreeSelect', {
|
||||
onSelectorFocus: this.onSelectorFocus,
|
||||
onSelectorBlur: this.onSelectorBlur,
|
||||
onSelectorKeyDown: this.onComponentKeyDown,
|
||||
onSelectorClear: this.onSelectorClear,
|
||||
onMultipleSelectorRemove: this.onMultipleSelectorRemove,
|
||||
|
||||
onTreeNodeSelect: this.onTreeNodeSelect,
|
||||
onTreeNodeCheck: this.onTreeNodeCheck,
|
||||
onPopupKeyDown: this.onComponentKeyDown,
|
||||
|
||||
onSearchInputChange: this.onSearchInputChange,
|
||||
onSearchInputKeyDown: this.onSearchInputKeyDown,
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
const { autofocus, disabled } = this.$props;
|
||||
|
|
|
@ -44,6 +44,11 @@ function getWatch(keys = []) {
|
|||
const Tree = defineComponent({
|
||||
name: 'Tree',
|
||||
mixins: [BaseMixin],
|
||||
provide() {
|
||||
return {
|
||||
vcTree: this,
|
||||
};
|
||||
},
|
||||
inheritAttrs: false,
|
||||
props: initDefaultProps(
|
||||
{
|
||||
|
@ -136,11 +141,6 @@ const Tree = defineComponent({
|
|||
...this.getDerivedState(getOptionProps(this), state),
|
||||
};
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
vcTree: this,
|
||||
};
|
||||
},
|
||||
|
||||
watch: {
|
||||
// watch 引用类型的改变
|
||||
|
|
Loading…
Reference in New Issue