From 1a16230079bfca4496198defad2a0a49ce291097 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Sun, 7 Apr 2024 10:12:18 +0800 Subject: [PATCH] refactor(skeleton): move to script setup (#3007) --- src/config.json | 1 + src/packages/__VUE/backtop/doc.en-US.md | 7 +- src/packages/__VUE/backtop/doc.md | 7 +- src/packages/__VUE/backtop/doc.taro.md | 7 +- src/packages/__VUE/empty/doc.en-US.md | 8 +- src/packages/__VUE/empty/doc.md | 8 +- src/packages/__VUE/empty/doc.taro.md | 8 +- src/packages/__VUE/indicator/doc.en-US.md | 8 +- src/packages/__VUE/indicator/doc.md | 8 +- src/packages/__VUE/indicator/doc.taro.md | 8 +- .../__snapshots__/skeleton.spec.ts.snap | 20 --- .../__snapshots__/skeleton.spec.tsx.snap | 3 + .../__VUE/skeleton/__tests__/skeleton.spec.ts | 82 ------------ .../skeleton/__tests__/skeleton.spec.tsx | 66 ++++++++++ src/packages/__VUE/skeleton/doc.en-US.md | 11 ++ src/packages/__VUE/skeleton/doc.md | 11 ++ src/packages/__VUE/skeleton/doc.taro.md | 11 ++ src/packages/__VUE/skeleton/index.taro.ts | 11 ++ src/packages/__VUE/skeleton/index.taro.vue | 122 ------------------ src/packages/__VUE/skeleton/index.ts | 11 ++ src/packages/__VUE/skeleton/index.vue | 122 ------------------ src/packages/__VUE/skeleton/skeleton.taro.vue | 74 +++++++++++ src/packages/__VUE/skeleton/skeleton.vue | 74 +++++++++++ src/packages/__VUE/swipe/doc.en-US.md | 10 +- src/packages/__VUE/swipe/doc.md | 10 +- src/packages/__VUE/swipe/doc.taro.md | 10 +- src/packages/__VUE/switch/doc.en-US.md | 7 +- src/packages/__VUE/switch/doc.md | 7 +- src/packages/__VUE/switch/doc.taro.md | 7 +- src/packages/__VUE/trendarrow/doc.en-US.md | 7 +- src/packages/__VUE/trendarrow/doc.md | 7 +- src/packages/__VUE/trendarrow/doc.taro.md | 7 +- 32 files changed, 378 insertions(+), 382 deletions(-) delete mode 100644 src/packages/__VUE/skeleton/__tests__/__snapshots__/skeleton.spec.ts.snap create mode 100644 src/packages/__VUE/skeleton/__tests__/__snapshots__/skeleton.spec.tsx.snap delete mode 100644 src/packages/__VUE/skeleton/__tests__/skeleton.spec.ts create mode 100644 src/packages/__VUE/skeleton/__tests__/skeleton.spec.tsx create mode 100644 src/packages/__VUE/skeleton/index.taro.ts delete mode 100644 src/packages/__VUE/skeleton/index.taro.vue create mode 100644 src/packages/__VUE/skeleton/index.ts delete mode 100644 src/packages/__VUE/skeleton/index.vue create mode 100644 src/packages/__VUE/skeleton/skeleton.taro.vue create mode 100644 src/packages/__VUE/skeleton/skeleton.vue diff --git a/src/config.json b/src/config.json index 75ac0f7b93..ee8732ea33 100644 --- a/src/config.json +++ b/src/config.json @@ -729,6 +729,7 @@ "name": "Skeleton", "cName": "骨架屏", "desc": "骨架屏", + "setup": true, "author": "liqiong" }, { diff --git a/src/packages/__VUE/backtop/doc.en-US.md b/src/packages/__VUE/backtop/doc.en-US.md index 8c1e8cbce2..bf6b987da0 100644 --- a/src/packages/__VUE/backtop/doc.en-US.md +++ b/src/packages/__VUE/backtop/doc.en-US.md @@ -56,8 +56,11 @@ app.use(Backtop) The component exports the following type definitions: -```ts -import type { BacktopProps, BacktopInstance } from '@nutui/nutui' +```js +import type { + BacktopProps, + BacktopInstance +} from '@nutui/nutui' ``` ## Theming diff --git a/src/packages/__VUE/backtop/doc.md b/src/packages/__VUE/backtop/doc.md index 8e630c7cbe..719e852f89 100644 --- a/src/packages/__VUE/backtop/doc.md +++ b/src/packages/__VUE/backtop/doc.md @@ -56,8 +56,11 @@ app.use(Backtop) 组件导出以下类型定义: -```ts -import type { BacktopProps, BacktopInstance } from '@nutui/nutui' +```js +import type { + BacktopProps, + BacktopInstance +} from '@nutui/nutui' ``` ## 主题定制 diff --git a/src/packages/__VUE/backtop/doc.taro.md b/src/packages/__VUE/backtop/doc.taro.md index 1c9095062a..5a91f99093 100644 --- a/src/packages/__VUE/backtop/doc.taro.md +++ b/src/packages/__VUE/backtop/doc.taro.md @@ -47,8 +47,11 @@ app.use(Backtop) 组件导出以下类型定义: -```ts -import type { BacktopProps, BacktopInstance } from '@nutui/nutui-taro' +```js +import type { + BacktopProps, + BacktopInstance +} from '@nutui/nutui-taro' ``` ## 主题定制 diff --git a/src/packages/__VUE/empty/doc.en-US.md b/src/packages/__VUE/empty/doc.en-US.md index 4fc10eb0f0..78acf768b7 100644 --- a/src/packages/__VUE/empty/doc.en-US.md +++ b/src/packages/__VUE/empty/doc.en-US.md @@ -52,8 +52,12 @@ app.use(Empty) The component exports the following type definitions: -```ts -import type { EmptyImage, EmptyProps, EmptyInstance } from '@nutui/nutui' +```js +import type { + EmptyImage, + EmptyProps, + EmptyInstance +} from '@nutui/nutui' ``` ## Theming diff --git a/src/packages/__VUE/empty/doc.md b/src/packages/__VUE/empty/doc.md index f4f55f80cd..46c295f533 100644 --- a/src/packages/__VUE/empty/doc.md +++ b/src/packages/__VUE/empty/doc.md @@ -52,8 +52,12 @@ app.use(Empty) 组件导出以下类型定义: -```ts -import type { EmptyImage, EmptyProps, EmptyInstance } from '@nutui/nutui' +```js +import type { + EmptyImage, + EmptyProps, + EmptyInstance +} from '@nutui/nutui' ``` ## 主题定制 diff --git a/src/packages/__VUE/empty/doc.taro.md b/src/packages/__VUE/empty/doc.taro.md index 6844509d22..c282651ee4 100644 --- a/src/packages/__VUE/empty/doc.taro.md +++ b/src/packages/__VUE/empty/doc.taro.md @@ -52,8 +52,12 @@ app.use(Empty) 组件导出以下类型定义: -```ts -import type { EmptyImage, EmptyProps, EmptyInstance } from '@nutui/nutui-taro' +```js +import type { + EmptyImage, + EmptyProps, + EmptyInstance +} from '@nutui/nutui-taro' ``` ## 主题定制 diff --git a/src/packages/__VUE/indicator/doc.en-US.md b/src/packages/__VUE/indicator/doc.en-US.md index c52378add8..08c0e8f3e5 100644 --- a/src/packages/__VUE/indicator/doc.en-US.md +++ b/src/packages/__VUE/indicator/doc.en-US.md @@ -42,8 +42,12 @@ app.use(Indicator) The component exports the following type definitions: -```ts -import type { IndicatorAlign, IndicatorProps, IndicatorInstance } from '@nutui/nutui' +```js +import type { + IndicatorAlign, + IndicatorProps, + IndicatorInstance +} from '@nutui/nutui' ``` ## Theming diff --git a/src/packages/__VUE/indicator/doc.md b/src/packages/__VUE/indicator/doc.md index dcb57607d6..e13c366e72 100644 --- a/src/packages/__VUE/indicator/doc.md +++ b/src/packages/__VUE/indicator/doc.md @@ -42,8 +42,12 @@ app.use(Indicator) 组件导出以下类型定义: -```ts -import type { IndicatorAlign, IndicatorProps, IndicatorInstance } from '@nutui/nutui' +```js +import type { + IndicatorAlign, + IndicatorProps, + IndicatorInstance +} from '@nutui/nutui' ``` ## 主题定制 diff --git a/src/packages/__VUE/indicator/doc.taro.md b/src/packages/__VUE/indicator/doc.taro.md index 3f23a03897..9c96c2257e 100644 --- a/src/packages/__VUE/indicator/doc.taro.md +++ b/src/packages/__VUE/indicator/doc.taro.md @@ -42,8 +42,12 @@ app.use(Indicator) 组件导出以下类型定义: -```ts -import type { IndicatorAlign, IndicatorProps, IndicatorInstance } from '@nutui/nutui-taro' +```js +import type { + IndicatorAlign, + IndicatorProps, + IndicatorInstance +} from '@nutui/nutui-taro' ``` ## 主题定制 diff --git a/src/packages/__VUE/skeleton/__tests__/__snapshots__/skeleton.spec.ts.snap b/src/packages/__VUE/skeleton/__tests__/__snapshots__/skeleton.spec.ts.snap deleted file mode 100644 index acb4646943..0000000000 --- a/src/packages/__VUE/skeleton/__tests__/__snapshots__/skeleton.spec.ts.snap +++ /dev/null @@ -1,20 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`should change avatar shape when using avatarShape prop 1`] = `""`; - -exports[`should change avatar size when using avatarSize prop > 20px 1`] = `"20px"`; - -exports[`should change avatar size when using avatarSize prop > 20px 2`] = `"20px"`; - -exports[`should render default slot 1`] = ` -" - - - - - - - - -" -`; diff --git a/src/packages/__VUE/skeleton/__tests__/__snapshots__/skeleton.spec.tsx.snap b/src/packages/__VUE/skeleton/__tests__/__snapshots__/skeleton.spec.tsx.snap new file mode 100644 index 0000000000..2d30657c19 --- /dev/null +++ b/src/packages/__VUE/skeleton/__tests__/__snapshots__/skeleton.spec.tsx.snap @@ -0,0 +1,3 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Skeleton: should change avatar shape when using avatarShape prop 1`] = `""`; diff --git a/src/packages/__VUE/skeleton/__tests__/skeleton.spec.ts b/src/packages/__VUE/skeleton/__tests__/skeleton.spec.ts deleted file mode 100644 index 0cb36c2f22..0000000000 --- a/src/packages/__VUE/skeleton/__tests__/skeleton.spec.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { mount } from '@vue/test-utils' -import { Skeleton } from '@nutui/nutui' - -test('should render with row‘s father content width correctly', () => { - const wrapper = mount(Skeleton, { - props: { - width: '100px' - } - }) - const skeleton: any = wrapper.find('.nut-skeleton-content__line') - expect(skeleton.element.style.width).toBe('100px') -}) - -test('should allow to disable animation', async () => { - const wrapper = mount(Skeleton, { - props: { - row: '1' - } - }) - - expect(wrapper.find('.nut-skeleton').exists()).toBeTruthy() - - await wrapper.setProps({ animated: false }) - expect(wrapper.find('.skeleton-animation').exists()).toBeFalsy() -}) - -test('should change avatar size when using avatarSize prop', () => { - const wrapper = mount(Skeleton, { - props: { - avatar: true, - avatarSize: '20px' - } - }) - - const avatar: any = wrapper.find('.avatarClass') - expect(avatar.element.style.width).toMatchSnapshot('20px') - expect(avatar.element.style.height).toMatchSnapshot('20px') -}) - -test('should change avatar shape when using avatarShape prop', () => { - const wrapper = mount(Skeleton, { - props: { - avatar: true, - avatarShape: 'square' - } - }) - expect(wrapper.find('.avatarClass').html()).toMatchSnapshot() -}) - -test('should be round when using round prop', () => { - const wrapper = mount(Skeleton, { - props: { - title: true, - round: true, - avatar: true - } - }) - expect(wrapper.find('.avatarClass').exists()).toBeTruthy() -}) - -test('should render default slot', () => { - const wrapper = mount(Skeleton, { - slots: { - default: 'default' - } - }) - expect(wrapper.html()).toMatchSnapshot() -}) - -test('should render correctly when title uses false', () => { - const wrapper = mount(Skeleton, { - props: { - title: false, - row: '1' - } - }) - - const content = wrapper.find('.nut-skeleton-content__line') - - expect(content.find('.nut-skeleton-blockTitle').exists()).toBeFalsy() - expect(content.findAll('.nut-skeleton-blockLine').length).toBe(1) -}) diff --git a/src/packages/__VUE/skeleton/__tests__/skeleton.spec.tsx b/src/packages/__VUE/skeleton/__tests__/skeleton.spec.tsx new file mode 100644 index 0000000000..db3a7872d4 --- /dev/null +++ b/src/packages/__VUE/skeleton/__tests__/skeleton.spec.tsx @@ -0,0 +1,66 @@ +import { mount } from '@vue/test-utils' +import { Skeleton } from '@nutui/nutui' + +test('Skeleton: should render with row‘s father content width correctly', () => { + const wrapper = mount(() => { + return + }) + const skeleton = wrapper.find('.nut-skeleton-content__line') + expect(skeleton.attributes('style')).includes('width: 100px') +}) + +test('Skeleton: should allow to disable animation', async () => { + const wrapper = mount(() => { + return + }) + + expect(wrapper.find('.nut-skeleton').exists()).toBeTruthy() + + await wrapper.setProps({ animated: false }) + expect(wrapper.find('.skeleton-animation').exists()).toBeFalsy() +}) + +test('Skeleton: should change avatar size when using avatarSize prop', () => { + const wrapper = mount(() => { + return + }) + + const avatar = wrapper.find('.avatarClass') + expect(avatar.attributes('style')).includes('width: 20px') + expect(avatar.attributes('style')).includes('height: 20px') +}) + +test('Skeleton: should change avatar shape when using avatarShape prop', () => { + const wrapper = mount(() => { + return + }) + expect(wrapper.find('.avatarClass').html()).toMatchSnapshot() +}) + +test('Skeleton: should be round when using round prop', () => { + const wrapper = mount(() => { + return + }) + expect(wrapper.find('.avatarClass').exists()).toBeTruthy() +}) + +test('Skeleton: should render default slot', () => { + const wrapper = mount(() => { + return ( + + content + + ) + }) + expect(wrapper.html()).includes('content') +}) + +test('Skeleton: should render correctly when title uses false', () => { + const wrapper = mount(() => { + return + }) + const content = wrapper.find('.nut-skeleton-content__line') + + expect(content.find('.nut-skeleton-blockTitle').exists()).toBeFalsy() + expect(content.findAll('.nut-skeleton-blockLine').length).toBe(1) +}) diff --git a/src/packages/__VUE/skeleton/doc.en-US.md b/src/packages/__VUE/skeleton/doc.en-US.md index a1edac9842..cb0e89fc01 100644 --- a/src/packages/__VUE/skeleton/doc.en-US.md +++ b/src/packages/__VUE/skeleton/doc.en-US.md @@ -61,6 +61,17 @@ app.use(Skeleton) | --- | --- | | default | Skeleton screen display content | +### Types version + +The component exports the following type definitions: + +```js +import type { + SkeletonProps, + SkeletonInstance +} from '@nutui/nutui'; +``` + ## Theming ### CSS Variables diff --git a/src/packages/__VUE/skeleton/doc.md b/src/packages/__VUE/skeleton/doc.md index e6418345c6..610748de02 100644 --- a/src/packages/__VUE/skeleton/doc.md +++ b/src/packages/__VUE/skeleton/doc.md @@ -61,6 +61,17 @@ app.use(Skeleton) | --- | --- | | default | 骨架屏显示内容 | +### 类型定义 version + +组件导出以下类型定义: + +```js +import type { + SkeletonProps, + SkeletonInstance +} from '@nutui/nutui'; +``` + ## 主题定制 ### 样式变量 diff --git a/src/packages/__VUE/skeleton/doc.taro.md b/src/packages/__VUE/skeleton/doc.taro.md index fd9c9fd0cf..cfa08a43c4 100644 --- a/src/packages/__VUE/skeleton/doc.taro.md +++ b/src/packages/__VUE/skeleton/doc.taro.md @@ -61,6 +61,17 @@ app.use(Skeleton) | --- | --- | | default | 骨架屏显示内容 | +### 类型定义 version + +组件导出以下类型定义: + +```js +import type { + SkeletonProps, + SkeletonInstance +} from '@nutui/nutui-taro'; +``` + ## 主题定制 ### 样式变量 diff --git a/src/packages/__VUE/skeleton/index.taro.ts b/src/packages/__VUE/skeleton/index.taro.ts new file mode 100644 index 0000000000..1919808ad1 --- /dev/null +++ b/src/packages/__VUE/skeleton/index.taro.ts @@ -0,0 +1,11 @@ +import Skeleton from './skeleton.taro.vue' +import type { ComponentPublicInstance } from 'vue' +import { withInstall } from '@/packages/utils' + +withInstall(Skeleton) + +export type { SkeletonProps } from './skeleton.taro.vue' + +export type SkeletonInstance = ComponentPublicInstance & InstanceType + +export { Skeleton, Skeleton as default } diff --git a/src/packages/__VUE/skeleton/index.taro.vue b/src/packages/__VUE/skeleton/index.taro.vue deleted file mode 100644 index 3d6ffcde93..0000000000 --- a/src/packages/__VUE/skeleton/index.taro.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - diff --git a/src/packages/__VUE/skeleton/index.ts b/src/packages/__VUE/skeleton/index.ts new file mode 100644 index 0000000000..29e026925d --- /dev/null +++ b/src/packages/__VUE/skeleton/index.ts @@ -0,0 +1,11 @@ +import Skeleton from './skeleton.vue' +import type { ComponentPublicInstance } from 'vue' +import { withInstall } from '@/packages/utils' + +withInstall(Skeleton) + +export type { SkeletonProps } from './skeleton.vue' + +export type SkeletonInstance = ComponentPublicInstance & InstanceType + +export { Skeleton, Skeleton as default } diff --git a/src/packages/__VUE/skeleton/index.vue b/src/packages/__VUE/skeleton/index.vue deleted file mode 100644 index 93c647d7ba..0000000000 --- a/src/packages/__VUE/skeleton/index.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - diff --git a/src/packages/__VUE/skeleton/skeleton.taro.vue b/src/packages/__VUE/skeleton/skeleton.taro.vue new file mode 100644 index 0000000000..3315c83e2f --- /dev/null +++ b/src/packages/__VUE/skeleton/skeleton.taro.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/packages/__VUE/skeleton/skeleton.vue b/src/packages/__VUE/skeleton/skeleton.vue new file mode 100644 index 0000000000..3208357517 --- /dev/null +++ b/src/packages/__VUE/skeleton/skeleton.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/packages/__VUE/swipe/doc.en-US.md b/src/packages/__VUE/swipe/doc.en-US.md index 8b64482839..1dbcfa677a 100644 --- a/src/packages/__VUE/swipe/doc.en-US.md +++ b/src/packages/__VUE/swipe/doc.en-US.md @@ -90,6 +90,12 @@ Use [ref](https://vuejs.org/guide/essentials/template-refs.html) to get Swipe in The component exports the following type definitions: -```ts -import type { SwipePosition, SwipeProps, SwipeInstance, SwipeGroupProps, SwipeGroupInstance } from '@nutui/nutui' +```js +import type { + SwipePosition, + SwipeProps, + SwipeInstance, + SwipeGroupProps, + SwipeGroupInstance +} from '@nutui/nutui' ``` diff --git a/src/packages/__VUE/swipe/doc.md b/src/packages/__VUE/swipe/doc.md index ef236e4057..3cdda17dd3 100644 --- a/src/packages/__VUE/swipe/doc.md +++ b/src/packages/__VUE/swipe/doc.md @@ -90,6 +90,12 @@ app.use(Swipe) 组件导出以下类型定义: -```ts -import type { SwipePosition, SwipeProps, SwipeInstance, SwipeGroupProps, SwipeGroupInstance } from '@nutui/nutui' +```js +import type { + SwipePosition, + SwipeProps, + SwipeInstance, + SwipeGroupProps, + SwipeGroupInstance +} from '@nutui/nutui' ``` diff --git a/src/packages/__VUE/swipe/doc.taro.md b/src/packages/__VUE/swipe/doc.taro.md index c614f388d2..09641bb37a 100644 --- a/src/packages/__VUE/swipe/doc.taro.md +++ b/src/packages/__VUE/swipe/doc.taro.md @@ -90,6 +90,12 @@ app.use(Swipe) 组件导出以下类型定义: -```ts -import type { SwipePosition, SwipeProps, SwipeInstance, SwipeGroupProps, SwipeGroupInstance } from '@nutui/nutui-taro' +```js +import type { + SwipePosition, + SwipeProps, + SwipeInstance, + SwipeGroupProps, + SwipeGroupInstance +} from '@nutui/nutui-taro' ``` diff --git a/src/packages/__VUE/switch/doc.en-US.md b/src/packages/__VUE/switch/doc.en-US.md index 2e820ff7e5..0eaa500ace 100644 --- a/src/packages/__VUE/switch/doc.en-US.md +++ b/src/packages/__VUE/switch/doc.en-US.md @@ -79,8 +79,11 @@ app.use(Switch) The component exports the following type definitions: -```ts -import type { SwitchProps, SwitchInstance } from '@nutui/nutui' +```js +import type { + SwitchProps, + SwitchInstance +} from '@nutui/nutui' ``` ## Theming diff --git a/src/packages/__VUE/switch/doc.md b/src/packages/__VUE/switch/doc.md index c7bd42975b..17d464d4e1 100644 --- a/src/packages/__VUE/switch/doc.md +++ b/src/packages/__VUE/switch/doc.md @@ -79,8 +79,11 @@ app.use(Switch) 组件导出以下类型定义: -```ts -import type { SwitchProps, SwitchInstance } from '@nutui/nutui' +```js +import type { + SwitchProps, + SwitchInstance +} from '@nutui/nutui' ``` ## 主题定制 diff --git a/src/packages/__VUE/switch/doc.taro.md b/src/packages/__VUE/switch/doc.taro.md index 614e67fb4f..23ce759d98 100644 --- a/src/packages/__VUE/switch/doc.taro.md +++ b/src/packages/__VUE/switch/doc.taro.md @@ -79,8 +79,11 @@ app.use(Switch) 组件导出以下类型定义: -```ts -import type { SwitchProps, SwitchInstance } from '@nutui/nutui-taro' +```js +import type { + SwitchProps, + SwitchInstance +} from '@nutui/nutui-taro' ``` ## 主题定制 diff --git a/src/packages/__VUE/trendarrow/doc.en-US.md b/src/packages/__VUE/trendarrow/doc.en-US.md index 171e9e3107..792e4e3ee8 100644 --- a/src/packages/__VUE/trendarrow/doc.en-US.md +++ b/src/packages/__VUE/trendarrow/doc.en-US.md @@ -69,8 +69,11 @@ app.use(TrendArrow) The component exports the following type definitions: -```ts -import type { TrendArrowProps, TrendArrowInstance } from '@nutui/nutui' +```js +import type { + TrendArrowProps, + TrendArrowInstance +} from '@nutui/nutui' ``` ## Theming diff --git a/src/packages/__VUE/trendarrow/doc.md b/src/packages/__VUE/trendarrow/doc.md index 199c99afc7..17dbd9449a 100644 --- a/src/packages/__VUE/trendarrow/doc.md +++ b/src/packages/__VUE/trendarrow/doc.md @@ -69,8 +69,11 @@ app.use(TrendArrow) 组件导出以下类型定义: -```ts -import type { TrendArrowProps, TrendArrowInstance } from '@nutui/nutui' +```js +import type { + TrendArrowProps, + TrendArrowInstance +} from '@nutui/nutui' ``` ## 主题定制 diff --git a/src/packages/__VUE/trendarrow/doc.taro.md b/src/packages/__VUE/trendarrow/doc.taro.md index 8edd62835b..83cce402db 100644 --- a/src/packages/__VUE/trendarrow/doc.taro.md +++ b/src/packages/__VUE/trendarrow/doc.taro.md @@ -69,8 +69,11 @@ app.use(TrendArrow) 组件导出以下类型定义: -```ts -import type { TrendArrowProps, TrendArrowInstance } from '@nutui/nutui-taro' +```js +import type { + TrendArrowProps, + TrendArrowInstance +} from '@nutui/nutui-taro' ``` ## 主题定制