Skip to content

Commit

Permalink
style: 更新命名规范
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyh2001 committed Apr 10, 2023
1 parent e30ff81 commit 021c7d3
Show file tree
Hide file tree
Showing 17 changed files with 86 additions and 84 deletions.
40 changes: 20 additions & 20 deletions packages/fighting-design/_svg/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
export { default as FIconArrowLeftVue } from './f-icon-arrow-left/index.vue'
export { default as FIconChevronLeftVue } from './f-icon-chevron-left/index.vue'
export { default as FIconChevronRightVue } from './f-icon-chevron-right/index.vue'
export { default as FIconCircleCrossVue } from './f-icon-circle-cross/index.vue'
export { default as FIconCrossVue } from './f-icon-cross/index.vue'
export { default as FIconLayoutRowsVue } from './f-icon-layout-rows/index.vue'
export { default as FIconLightbulbVue } from './f-icon-lightbulb/index.vue'
export { default as FIconLoadingAVue } from './f-icon-loading-a/index.vue'
export { default as FIconRotateAntiClockwiseVue } from './f-icon-rotate-anti-clockwise/index.vue'
export { default as FIconRotateClockwiseVue } from './f-icon-rotate-clockwise/index.vue'
export { default as FIconSmileLineVue } from './f-icon-smile-line/index.vue'
export { default as FIconStarBVue } from './f-icon-star-b/index.vue'
export { default as FIconThumbUpVue } from './f-icon-thumb-up/index.vue'
export { default as FIconWarningVue } from './f-icon-warning/index.vue'
export { default as FIconZoomInVue } from './f-icon-zoom-in/index.vue'
export { default as FIconZoomOutVue } from './f-icon-zoom-out/index.vue'
export { default as FIconEyeOffOutlineVue } from './f-icon-eye-off-outline/index.vue'
export { default as FIconEyeOutlineVue } from './f-icon-eye-outline/index.vue'
export { default as FIconNotesVue } from './f-icon-notes/index.vue'
export { default as FIconPlusVue } from './f-icon-plus/index.vue'
export { default as FIconArrowLeft } from './f-icon-arrow-left/index.vue'
export { default as FIconChevronLeft } from './f-icon-chevron-left/index.vue'
export { default as FIconChevronRight } from './f-icon-chevron-right/index.vue'
export { default as FIconCircleCross } from './f-icon-circle-cross/index.vue'
export { default as FIconCross } from './f-icon-cross/index.vue'
export { default as FIconLayoutRows } from './f-icon-layout-rows/index.vue'
export { default as FIconLightbulb } from './f-icon-lightbulb/index.vue'
export { default as FIconLoadingA } from './f-icon-loading-a/index.vue'
export { default as FIconRotateAntiClockwise } from './f-icon-rotate-anti-clockwise/index.vue'
export { default as FIconRotateClockwise } from './f-icon-rotate-clockwise/index.vue'
export { default as FIconSmileLine } from './f-icon-smile-line/index.vue'
export { default as FIconStarB } from './f-icon-star-b/index.vue'
export { default as FIconThumbUp } from './f-icon-thumb-up/index.vue'
export { default as FIconWarning } from './f-icon-warning/index.vue'
export { default as FIconZoomIn } from './f-icon-zoom-in/index.vue'
export { default as FIconZoomOut } from './f-icon-zoom-out/index.vue'
export { default as FIconEyeOffOutline } from './f-icon-eye-off-outline/index.vue'
export { default as FIconEyeOutline } from './f-icon-eye-outline/index.vue'
export { default as FIconNotes } from './f-icon-notes/index.vue'
export { default as FIconPlus } from './f-icon-plus/index.vue'
export { default as FIconFullSharp } from './f-icon-full-sharp/index.vue'
export { default as FIconClockTime } from './f-icon-clock-time/index.vue'
export { default as FIconChevronUp } from './f-icon-chevron-up/index.vue'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { BREADCRUMB_PROPS_KEY } from '../../breadcrumb/src/props'
import { FSvgIcon } from '../../svg-icon'
import { useList } from '../../_hooks'
import { FIconChevronRightVue } from '../../_svg'
import { FIconChevronRight } from '../../_svg'
import type { FightingIcon } from '../../_interface'
import type { ComponentInternalInstance } from 'vue'
import type { BreadcrumbProps } from '../../breadcrumb'
Expand All @@ -28,13 +28,15 @@
/** 计算当前需要展示的 svg */
const svgIconComponent = computed((): FightingIcon => {
if (prop.separator) return prop.separator
if (prop.separator) {
return prop.separator
}
if (parentInject && parentInject.separator) {
return parentInject.separator
}
return FIconChevronRightVue
return FIconChevronRight
})
/** 样式列表 */
Expand Down
6 changes: 3 additions & 3 deletions packages/fighting-design/button/src/button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Props } from './props'
import { ref, toRefs, reactive, computed } from 'vue'
import { FSvgIcon } from '../../svg-icon'
import { FIconLoadingAVue } from '../../_svg'
import { FIconLoadingA } from '../../_svg'
import { useRipples, useRun, useGlobal, useButton } from '../../_hooks'
import type { RipplesOptions } from '../../_hooks'
import type { FightingIcon } from '../../_interface'
Expand Down Expand Up @@ -59,7 +59,7 @@
/** 前缀 icon */
const beforeIconNode = computed((): FightingIcon => {
return prop.loading ? prop.loadingIcon || FIconLoadingAVue : prop.beforeIcon
return prop.loading ? prop.loadingIcon || FIconLoadingA : prop.beforeIcon
})
</script>

Expand Down Expand Up @@ -104,7 +104,7 @@
<f-svg-icon
v-if="loading || beforeIcon"
:class="['f-button_before-icon', { 'f-button__loading-animation': loading }]"
:icon="loading ? loadingIcon || FIconLoadingAVue : beforeIcon"
:icon="loading ? loadingIcon || FIconLoadingA : beforeIcon"
:size="16"
/>

Expand Down
6 changes: 3 additions & 3 deletions packages/fighting-design/calendar/src/calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Props } from './props'
import { computed, watch, reactive } from 'vue'
import { FSvgIcon } from '../../svg-icon'
import { FIconChevronLeftVue, FIconChevronRightVue } from '../../_svg'
import { FIconChevronLeft, FIconChevronRight } from '../../_svg'
import { addZero, isDate } from '../../_utils'
import { useCalendar, useRun, useGlobal, useList } from '../../_hooks'
import type { GetLunarDetailReturn } from '../../_hooks'
Expand Down Expand Up @@ -162,7 +162,7 @@
<!-- 头部操作栏 -->
<header v-if="showHeader" class="f-calendar__header">
<!-- 上个月切换按钮 -->
<f-svg-icon :icon="FIconChevronLeftVue" @click.stop="optionClick('last')" />
<f-svg-icon :icon="FIconChevronLeft" @click.stop="optionClick('last')" />

<!-- 操作栏 -->
<div class="f-calendar__option">
Expand All @@ -171,7 +171,7 @@
</div>

<!-- 下个月切换按钮 -->
<f-svg-icon :icon="FIconChevronRightVue" @click.stop="optionClick('next')" />
<f-svg-icon :icon="FIconChevronRight" @click.stop="optionClick('next')" />
</header>

<!-- 周几 -->
Expand Down
4 changes: 2 additions & 2 deletions packages/fighting-design/close-btn/src/close-btn.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup name="FCloseBtn">
import { Props } from './props'
import { FSvgIcon } from '../../svg-icon'
import { FIconCrossVue } from '../../_svg'
import { FIconCross } from '../../_svg'
import { useRun, useList } from '../../_hooks'
const prop = defineProps(Props)
Expand Down Expand Up @@ -30,7 +30,7 @@
<div role="button" :class="classList" :style="styleList" @click="handleClick">
<f-svg-icon :size="size" :icon="icon">
<slot>
<f-icon-cross-vue />
<f-icon-cross />
</slot>
</f-svg-icon>
</div>
Expand Down
32 changes: 16 additions & 16 deletions packages/fighting-design/image-preview/src/image-preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
import { FToolbarItem } from '../../toolbar-item'
import { isBoolean, isArray } from '../../_utils'
import {
FIconChevronLeftVue,
FIconChevronRightVue,
FIconRotateAntiClockwiseVue,
FIconRotateClockwiseVue,
FIconCrossVue,
FIconLayoutRowsVue,
FIconZoomInVue,
FIconZoomOutVue
FIconChevronLeft,
FIconChevronRight,
FIconRotateAntiClockwise,
FIconRotateClockwise,
FIconCross,
FIconLayoutRows,
FIconZoomIn,
FIconZoomOut
} from '../../_svg'
import { useOperationImg, useRun } from '../../_hooks'
import { EMIT_VISIBLE } from '../../_tokens'
Expand Down Expand Up @@ -150,11 +150,11 @@
<!-- 操作栏 -->
<template v-if="isOption">
<f-toolbar class="f-image-preview__option" round :on-click="optionClick">
<f-toolbar-item :icon="FIconZoomOutVue" :index="1" />
<f-toolbar-item :icon="FIconZoomInVue" :index="2" />
<f-toolbar-item :icon="FIconLayoutRowsVue" :index="3" />
<f-toolbar-item :icon="FIconRotateClockwiseVue" :index="4" />
<f-toolbar-item :icon="FIconRotateAntiClockwiseVue" :index="5" />
<f-toolbar-item :icon="FIconZoomOut" :index="1" />
<f-toolbar-item :icon="FIconZoomIn" :index="2" />
<f-toolbar-item :icon="FIconLayoutRows" :index="3" />
<f-toolbar-item :icon="FIconRotateClockwise" :index="4" />
<f-toolbar-item :icon="FIconRotateAntiClockwise" :index="5" />
</f-toolbar>
</template>

Expand All @@ -163,14 +163,14 @@
<f-button
class="f-image-preview__next"
circle
:before-icon="FIconChevronRightVue"
:before-icon="FIconChevronRight"
:on-click="() => switchImage('next')"
/>

<f-button
class="f-image-preview__prev"
circle
:before-icon="FIconChevronLeftVue"
:before-icon="FIconChevronLeft"
:on-click="() => switchImage('prev')"
/>
</template>
Expand All @@ -179,7 +179,7 @@
<f-button
class="f-image-preview__close"
circle
:before-icon="FIconCrossVue"
:before-icon="FIconCross"
:on-click="handelClose"
/>
</div>
Expand Down
8 changes: 4 additions & 4 deletions packages/fighting-design/input-number/src/input-number.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import { Props } from './props'
import { computed } from 'vue'
import {
FIconChevronLeftVue,
FIconChevronRightVue,
FIconChevronLeft,
FIconChevronRight,
FIconChevronUp,
FIconChevronDown
} from '../../_svg'
Expand Down Expand Up @@ -106,7 +106,7 @@
:type="buttonType || 'primary'"
:size="size"
:disabled="disabled || minDisabled"
:before-icon="FIconChevronLeftVue"
:before-icon="FIconChevronLeft"
:on-click="() => handleChangeVal('minus')"
/>

Expand Down Expand Up @@ -158,7 +158,7 @@
:type="buttonType || 'primary'"
:size="size"
:disabled="disabled || maxDisabled"
:before-icon="FIconChevronRightVue"
:before-icon="FIconChevronRight"
:on-click="() => handleChangeVal('plus')"
/>
</div>
Expand Down
8 changes: 4 additions & 4 deletions packages/fighting-design/input/src/input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { FButton } from '../../button'
import { FSwap } from '../../swap'
import { ref, toRefs, computed, reactive } from 'vue'
import { FIconCrossVue, FIconEyeOffOutlineVue, FIconEyeOutlineVue } from '../../_svg'
import { FIconCross, FIconEyeOffOutline, FIconEyeOutline } from '../../_svg'
import { isString, isNumber } from '../../_utils'
import { EMIT_UPDATE } from '../../_tokens'
import { useInput, useProps, useRun, useList, useGlobal } from '../../_hooks'
Expand Down Expand Up @@ -142,7 +142,7 @@
<f-svg-icon
v-if="clear"
class="f-input__clear-btn"
:icon="FIconCrossVue"
:icon="FIconCross"
:size="14"
:on-click="onClear"
/>
Expand All @@ -156,8 +156,8 @@
v-model="showPass"
class="f-input__show-password"
type="swap"
:icon-on="FIconEyeOutlineVue"
:icon-off="FIconEyeOffOutlineVue"
:icon-on="FIconEyeOutline"
:icon-off="FIconEyeOffOutline"
:size="14"
:on-change="handleShowPassword"
/>
Expand Down
4 changes: 2 additions & 2 deletions packages/fighting-design/loading/src/loading.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts" name="FLoading">
import { Props } from './props'
import { FSvgIcon } from '../../svg-icon'
import { FIconLoadingAVue } from '../../_svg'
import { FIconLoadingA } from '../../_svg'
import { useList } from '../../_hooks'
const prop = defineProps(Props)
Expand All @@ -18,7 +18,7 @@
<div v-if="visible" :class="classList" :style="styleList">
<f-svg-icon :size="20" class="f-loading__animation" :icon="icon">
<slot name="icon">
<f-icon-loading-a-vue />
<f-icon-loading-a />
</slot>
</f-svg-icon>

Expand Down
20 changes: 10 additions & 10 deletions packages/fighting-design/notification/src/notification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import { FSvgIcon } from '../../svg-icon'
import { FCloseBtn } from '../../close-btn'
import {
FIconSmileLineVue,
FIconLightbulbVue,
FIconThumbUpVue,
FIconCircleCrossVue,
FIconWarningVue,
FIconSmileLine,
FIconLightbulb,
FIconThumbUp,
FIconCircleCross,
FIconWarning,
FIconBell
} from '../../_svg'
import type { FightingIcon } from '../../_interface'
Expand Down Expand Up @@ -39,11 +39,11 @@
/** 默认 icon 列表 */
const icons = {
default: FIconSmileLineVue,
primary: FIconLightbulbVue,
success: FIconThumbUpVue,
danger: FIconCircleCrossVue,
warning: FIconWarningVue,
default: FIconSmileLine,
primary: FIconLightbulb,
success: FIconThumbUp,
danger: FIconCircleCross,
warning: FIconWarning,
info: FIconBell
} as const
Expand Down
4 changes: 2 additions & 2 deletions packages/fighting-design/page-header/src/page-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Props } from './props'
import { computed } from 'vue'
import { useRun, useGlobal } from '../../_hooks'
import { FIconArrowLeftVue } from '../../_svg'
import { FIconArrowLeft } from '../../_svg'
import { FSvgIcon } from '../../svg-icon'
const prop = defineProps(Props)
Expand All @@ -29,7 +29,7 @@
<div class="f-page-header__left" @click="handleClick">
<f-svg-icon :size="iconSize">
<slot name="icon">
<component :is="icon || FIconArrowLeftVue" />
<component :is="icon || FIconArrowLeft" />
</slot>
</f-svg-icon>

Expand Down
8 changes: 4 additions & 4 deletions packages/fighting-design/pagination/src/pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import { isNumber } from '../../_utils'
import { useList, usePage, useTurnPage } from '../../_hooks'
import {
FIconChevronLeftVue,
FIconChevronRightVue,
FIconChevronLeft,
FIconChevronRight,
FIconMenuMeatball
} from '../../_svg'
import { FInput } from '../../input'
Expand Down Expand Up @@ -67,7 +67,7 @@
:disabled="disabled"
@click="handelTurnPages('prev')"
>
<f-svg-icon :size="14" :icon="prevIcon || FIconChevronLeftVue" />
<f-svg-icon :size="14" :icon="prevIcon || FIconChevronLeft" />
</button>

<!-- 分页主内容 -->
Expand Down Expand Up @@ -129,7 +129,7 @@
:disabled="disabled"
@click="handelTurnPages('next')"
>
<f-svg-icon :size="14" :icon="nextIcon || FIconChevronRightVue" />
<f-svg-icon :size="14" :icon="nextIcon || FIconChevronRight" />
</button>

<!-- 快速跳转搜索框 -->
Expand Down
4 changes: 2 additions & 2 deletions packages/fighting-design/rate/src/rate.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup name="FRate">
import { Props } from './props'
import { FSvgIcon } from '../../svg-icon'
import { FIconStarBVue } from '../../_svg'
import { FIconStarB } from '../../_svg'
import { FText } from '../../text'
import { useRun } from '../../_hooks'
import { ref, watch, unref, computed } from 'vue'
Expand Down Expand Up @@ -76,7 +76,7 @@
>
<f-svg-icon
:size="size"
:icon="icon || FIconStarBVue"
:icon="icon || FIconStarB"
:color="starValue > index ? effectColor : invalidColor"
/>
</div>
Expand Down
Loading

0 comments on commit 021c7d3

Please sign in to comment.