style: format code
parent
ed9bdd8923
commit
7764bfcc57
49
.eslintrc.js
49
.eslintrc.js
|
@ -11,13 +11,7 @@ module.exports = {
|
|||
parserOptions: {
|
||||
parser: 'babel-eslint',
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/vue3-essential',
|
||||
'eslint:recommended',
|
||||
'@vue/typescript/recommended',
|
||||
'@vue/prettier',
|
||||
'@vue/prettier/@typescript-eslint',
|
||||
],
|
||||
extends: ['plugin:vue/vue3-recommended', 'prettier'],
|
||||
plugins: ['markdown', 'jest', '@typescript-eslint'],
|
||||
overrides: [
|
||||
{
|
||||
|
@ -47,6 +41,10 @@ module.exports = {
|
|||
'@typescript-eslint/ban-ts-comment': 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.vue'],
|
||||
parser: 'vue-eslint-parser',
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
'comma-dangle': [2, 'always-multiline'],
|
||||
|
@ -58,24 +56,25 @@ module.exports = {
|
|||
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,
|
||||
// {
|
||||
// singleline: 20,
|
||||
// multiline: {
|
||||
// max: 1,
|
||||
// allowFirstLine: false,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
'vue/no-v-html': 'off',
|
||||
'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,
|
||||
{
|
||||
singleline: 20,
|
||||
multiline: {
|
||||
max: 1,
|
||||
allowFirstLine: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
globals: {
|
||||
h: true,
|
||||
|
|
|
@ -2,8 +2,8 @@ import Button from '../index';
|
|||
import SearchOutlined from '@ant-design/icons-vue/SearchOutlined';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { nextTick } from 'vue';
|
||||
import { asyncExpect, sleep } from '@/tests/utils';
|
||||
import mountTest from '@/tests/shared/mountTest';
|
||||
import { asyncExpect, sleep } from '../../../tests/utils';
|
||||
import mountTest from '../../../tests/shared/mountTest';
|
||||
import { resetWarned } from '../../_util/warning';
|
||||
|
||||
describe('Button', () => {
|
||||
|
@ -27,7 +27,7 @@ describe('Button', () => {
|
|||
expect(wrapper.find('.ant-btn-primary').exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('renders Chinese characters correctly', (done) => {
|
||||
it('renders Chinese characters correctly', done => {
|
||||
const wrapper = mount({
|
||||
render() {
|
||||
return <Button>按钮</Button>;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import generateConfig from '../vc-picker/generate/dateFns';
|
||||
import { withInstall } from '../_util/type';
|
||||
import generateCalendar, { CalendarProps } from './generateCalendar';
|
||||
import type { CalendarProps } from './generateCalendar';
|
||||
import generateCalendar from './generateCalendar';
|
||||
|
||||
const Calendar = generateCalendar<Date>(generateConfig);
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import type { Dayjs } from 'dayjs';
|
||||
import generateConfig from '../vc-picker/generate/dayjs';
|
||||
import { withInstall } from '../_util/type';
|
||||
import generateCalendar, { CalendarProps } from './generateCalendar';
|
||||
import type { CalendarProps } from './generateCalendar';
|
||||
import generateCalendar from './generateCalendar';
|
||||
|
||||
const Calendar = generateCalendar<Dayjs>(generateConfig);
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import type { Moment } from 'moment';
|
||||
import generateConfig from '../vc-picker/generate/moment';
|
||||
import { withInstall } from '../_util/type';
|
||||
import generateCalendar, { CalendarProps } from './generateCalendar';
|
||||
import type { CalendarProps } from './generateCalendar';
|
||||
import generateCalendar from './generateCalendar';
|
||||
|
||||
const Calendar = generateCalendar<Moment>(generateConfig);
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
import Menu, { MenuProps } from './src/Menu';
|
||||
import MenuItem, { MenuItemProps } from './src/MenuItem';
|
||||
import SubMenu, { SubMenuProps } from './src/SubMenu';
|
||||
import ItemGroup, { MenuItemGroupProps } from './src/ItemGroup';
|
||||
import type { MenuProps } from './src/Menu';
|
||||
import Menu from './src/Menu';
|
||||
import type { MenuItemProps } from './src/MenuItem';
|
||||
import MenuItem from './src/MenuItem';
|
||||
import type { SubMenuProps } from './src/SubMenu';
|
||||
import SubMenu from './src/SubMenu';
|
||||
import type { MenuItemGroupProps } from './src/ItemGroup';
|
||||
import ItemGroup from './src/ItemGroup';
|
||||
import Divider from './src/Divider';
|
||||
import type { App, Plugin } from 'vue';
|
||||
import type { MenuTheme } from './src/interface';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import Picker, { PickerProps } from './Picker';
|
||||
import type { PickerProps } from './Picker';
|
||||
import Picker from './Picker';
|
||||
import PickerPanel from './PickerPanel';
|
||||
import RangePicker from './RangePicker';
|
||||
import type { PickerPanelProps } from './PickerPanel';
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import TreeSelect from './TreeSelect';
|
||||
import TreeNode from './TreeNode';
|
||||
import { SHOW_ALL, SHOW_CHILD, SHOW_PARENT } from './utils/strategyUtil';
|
||||
import { TreeSelectProps, treeSelectProps } from './props';
|
||||
import type { TreeSelectProps } from './props';
|
||||
import { treeSelectProps } from './props';
|
||||
|
||||
export { TreeNode, SHOW_ALL, SHOW_CHILD, SHOW_PARENT, treeSelectProps };
|
||||
export type { TreeSelectProps };
|
||||
|
|
|
@ -19,15 +19,15 @@
|
|||
<script lang="ts">
|
||||
import { defineComponent, computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import GoogleAds from '../components/rice/GoogleAds.vue';
|
||||
// import GoogleAds from '../components/rice/GoogleAds.vue';
|
||||
|
||||
const showAd = location.host.indexOf('antdv.com') > -1;
|
||||
export default defineComponent({
|
||||
name: 'Demo',
|
||||
props: ['pageData', 'isZhCN'],
|
||||
components: {
|
||||
GoogleAds,
|
||||
// GoogleAds,
|
||||
},
|
||||
props: ['pageData', 'isZhCN'],
|
||||
setup(props) {
|
||||
const route = useRoute();
|
||||
const frontmatter = computed(() => props?.pageData?.frontmatter || {});
|
||||
|
|
Loading…
Reference in New Issue