forked from wansenai/flow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fetch: Fix ICON configuration wansenai#22
- Loading branch information
Showing
36 changed files
with
120 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,80 @@ | ||
<!-- | ||
* @Author: Vben | ||
* @Description: Arrow component with animation | ||
--> | ||
<template> | ||
<span :class="getClass"> | ||
<Icon icon="ion:chevron-forward" :style="$attrs.iconStyle" /> | ||
</span> | ||
</template> | ||
<script lang="ts" setup> | ||
import { computed } from 'vue'; | ||
import { Icon } from '/@/components/Icon'; | ||
import { useDesign } from '/@/hooks/web/useDesign'; | ||
import { computed } from 'vue'; | ||
import Icon from '@/components/Icon/Icon.vue'; | ||
import { useDesign } from '/@/hooks/web/useDesign'; | ||
const props = defineProps({ | ||
/** | ||
* Arrow expand state | ||
*/ | ||
expand: { type: Boolean }, | ||
/** | ||
* Arrow up by default | ||
*/ | ||
up: { type: Boolean }, | ||
/** | ||
* Arrow down by default | ||
*/ | ||
down: { type: Boolean }, | ||
/** | ||
* Cancel padding/margin for inline | ||
*/ | ||
inset: { type: Boolean }, | ||
}); | ||
const props = defineProps({ | ||
/** | ||
* Arrow expand state | ||
*/ | ||
expand: { type: Boolean }, | ||
/** | ||
* Arrow up by default | ||
*/ | ||
up: { type: Boolean }, | ||
/** | ||
* Arrow down by default | ||
*/ | ||
down: { type: Boolean }, | ||
/** | ||
* Cancel padding/margin for inline | ||
*/ | ||
inset: { type: Boolean }, | ||
}); | ||
const { prefixCls } = useDesign('basic-arrow'); | ||
const { prefixCls } = useDesign('basic-arrow'); | ||
// get component class | ||
const getClass = computed(() => { | ||
const { expand, up, down, inset } = props; | ||
return [ | ||
prefixCls, | ||
{ | ||
[`${prefixCls}--active`]: expand, | ||
up, | ||
inset, | ||
down, | ||
}, | ||
]; | ||
}); | ||
// get component class | ||
const getClass = computed(() => { | ||
const { expand, up, down, inset } = props; | ||
return [ | ||
prefixCls, | ||
{ | ||
[`${prefixCls}--active`]: expand, | ||
up, | ||
inset, | ||
down, | ||
}, | ||
]; | ||
}); | ||
</script> | ||
<style lang="less" scoped> | ||
@prefix-cls: ~'@{namespace}-basic-arrow'; | ||
@prefix-cls: ~'@{namespace}-basic-arrow'; | ||
.@{prefix-cls} { | ||
display: inline-block; | ||
cursor: pointer; | ||
transform: rotate(0deg); | ||
transition: all 0.3s ease 0.1s; | ||
transform-origin: center center; | ||
.@{prefix-cls} { | ||
display: inline-block; | ||
transform: rotate(0deg); | ||
transform-origin: center center; | ||
transition: all 0.3s ease 0.1s; | ||
cursor: pointer; | ||
&--active { | ||
transform: rotate(90deg); | ||
} | ||
&--active { | ||
transform: rotate(90deg); | ||
} | ||
&.inset { | ||
line-height: 0px; | ||
} | ||
&.inset { | ||
line-height: 0px; | ||
} | ||
&.up { | ||
transform: rotate(-90deg); | ||
} | ||
&.up { | ||
transform: rotate(-90deg); | ||
} | ||
&.down { | ||
transform: rotate(90deg); | ||
} | ||
&.down { | ||
transform: rotate(90deg); | ||
} | ||
&.up.@{prefix-cls}--active { | ||
transform: rotate(90deg); | ||
} | ||
&.up.@{prefix-cls}--active { | ||
transform: rotate(90deg); | ||
} | ||
&.down.@{prefix-cls}--active { | ||
transform: rotate(-90deg); | ||
} | ||
&.down.@{prefix-cls}--active { | ||
transform: rotate(-90deg); | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.