diff --git a/docs/.vitepress/json/search.json b/docs/.vitepress/json/search.json index 6726d15a1..eda167aca 100644 --- a/docs/.vitepress/json/search.json +++ b/docs/.vitepress/json/search.json @@ -361,4 +361,4 @@ "url": "components/confirm-box" } ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 41f4b4c15..1023701b4 100644 --- a/package.json +++ b/package.json @@ -77,4 +77,4 @@ "eslint --fix" ] } -} \ No newline at end of file +} diff --git a/packages/fighting-design/_utils/compatible/__test__/utils.spec.ts b/packages/fighting-design/_utils/compatible/__test__/utils.spec.ts index 0815f6853..217500303 100644 --- a/packages/fighting-design/_utils/compatible/__test__/utils.spec.ts +++ b/packages/fighting-design/_utils/compatible/__test__/utils.spec.ts @@ -9,8 +9,8 @@ const data = { test('objectEntries', () => { /** - * @see toStrictEqual https://cn.vitest.dev/api/expect.html#tostrictequal - */ + * @see toStrictEqual https://cn.vitest.dev/api/expect.html#tostrictequal + */ expect(objectEntries(data)).toStrictEqual([ ['a', 1], ['b', 2], diff --git a/packages/fighting-design/_utils/props/__test__/utils.spec.ts b/packages/fighting-design/_utils/props/__test__/utils.spec.ts index cd8f09022..72603f49f 100644 --- a/packages/fighting-design/_utils/props/__test__/utils.spec.ts +++ b/packages/fighting-design/_utils/props/__test__/utils.spec.ts @@ -21,7 +21,10 @@ test('setStringProp', () => { }) test('setStringNumberProp', () => { - expect(setStringNumberProp('123')).toStrictEqual({ type: [String, Number], default: '123' }) + expect(setStringNumberProp('123')).toStrictEqual({ + type: [String, Number], + default: '123' + }) expect(setStringNumberProp()).toStrictEqual({ type: [String, Number], default: void 0 }) expect(setStringNumberProp(222)).toStrictEqual({ type: [String, Number], default: 222 }) }) diff --git a/packages/fighting-design/_utils/type/__test__/utils.spec.ts b/packages/fighting-design/_utils/type/__test__/utils.spec.ts index 13d72bbe1..2456b9998 100644 --- a/packages/fighting-design/_utils/type/__test__/utils.spec.ts +++ b/packages/fighting-design/_utils/type/__test__/utils.spec.ts @@ -8,7 +8,7 @@ test('toString', () => { expect(toString([])).toBe('[object Array]') expect(toString({})).toBe('[object Object]') expect(toString((): number => 1)).toBe('[object Function]') - expect(toString(new Date)).toBe('[object Date]') + expect(toString(new Date())).toBe('[object Date]') expect(toString(Symbol(1))).toBe('[object Symbol]') expect(toString(null)).toBe('[object Null]') expect(toString(undefined)).toBe('[object Undefined]') diff --git a/packages/fighting-design/_utils/utils/index.ts b/packages/fighting-design/_utils/utils/index.ts index f0cf45ea8..e9a6e0fbd 100644 --- a/packages/fighting-design/_utils/utils/index.ts +++ b/packages/fighting-design/_utils/utils/index.ts @@ -2,7 +2,7 @@ import { isString, isNumber } from '..' // #region 保留小数点后 no 位 /** - * + * * 保留小数点后 no 位 * * @see Number.prototype.toFixed() https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed diff --git a/packages/fighting-design/dropdown-item/__test__/dropdown-item.spec.ts b/packages/fighting-design/dropdown-item/__test__/dropdown-item.spec.ts index 659594959..d68d339ea 100644 --- a/packages/fighting-design/dropdown-item/__test__/dropdown-item.spec.ts +++ b/packages/fighting-design/dropdown-item/__test__/dropdown-item.spec.ts @@ -39,10 +39,10 @@ describe('DropdownItem', () => { const fn = vi.fn() const wrapper = mount(FDropdownItem, { props: { - onClick() { + onClick () { fn('onClick') } - }, + } }) wrapper.trigger('click') expect(fn.mock.calls[0]).toEqual(['onClick']) @@ -54,7 +54,7 @@ describe('DropdownItem', () => { global: { provide: { [TRIGGER_CLOSE_KEY as symbol]: { - close() { + close () { fn('close') } } diff --git a/packages/fighting-design/package.json b/packages/fighting-design/package.json index 7aa3d523c..337ca3be2 100644 --- a/packages/fighting-design/package.json +++ b/packages/fighting-design/package.json @@ -58,4 +58,4 @@ }, "homepage": "https://fighting.tianyuhao.cn", "repository": "https://github.com/FightingDesign/fighting-design" -} \ No newline at end of file +} diff --git a/packages/fighting-design/select/src/interface.ts b/packages/fighting-design/select/src/interface.ts index 2f690c8ba..06e71c130 100644 --- a/packages/fighting-design/select/src/interface.ts +++ b/packages/fighting-design/select/src/interface.ts @@ -18,11 +18,14 @@ export type SelectChange = ( /** * 值在改变之前的回调类型 - * + * * @param { string | number } value 需要改变的值 * @param { string | number } label 需要改变的标签 */ -export type SelectBeforeChange = (value: SelectModelValue, label: SelectModelValue) => Promise +export type SelectBeforeChange = ( + value: SelectModelValue, + label: SelectModelValue +) => Promise /** * 提供给子组件注入的依赖项类型接口 diff --git a/packages/fighting-design/select/src/props.ts b/packages/fighting-design/select/src/props.ts index 311238c0a..4645522a8 100644 --- a/packages/fighting-design/select/src/props.ts +++ b/packages/fighting-design/select/src/props.ts @@ -1,7 +1,12 @@ import { setBooleanProp, setFunctionProp, setStringProp } from '../../_utils' import { FIGHTING_SIZE } from '../../_tokens' import type { ExtractPropTypes, InjectionKey, PropType } from 'vue' -import type { SelectProvide, SelectModelValue, SelectChange, SelectBeforeChange } from './interface' +import type { + SelectProvide, + SelectModelValue, + SelectChange, + SelectBeforeChange +} from './interface' import type { FightingSize } from '../../_interface' export const Props = {