New file |
| | |
| | | /** |
| | | * CLoading - 加载中状态 |
| | | * @author Tevin |
| | | */ |
| | | |
| | | <template> |
| | | <view |
| | | class="c-loading" |
| | | @tap="evt => handleGoTo()" |
| | | > |
| | | <AtActivityIndicator |
| | | :isOpened="show" |
| | | mode="center" |
| | | ></AtActivityIndicator> |
| | | <view |
| | | class="c-loading-content" |
| | | :class="show?'off':''" |
| | | > |
| | | <slot /> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import Taro from '@tarojs/taro'; |
| | | import { AtActivityIndicator } from 'taro-ui-vue'; |
| | | import './cLoading.scss'; |
| | | |
| | | export default { |
| | | name: 'CLoading', |
| | | components: { |
| | | AtActivityIndicator, |
| | | }, |
| | | props: { |
| | | show: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | }, |
| | | data() { |
| | | return {}; |
| | | }, |
| | | }; |
| | | </script> |
New file |
| | |
| | | /** |
| | | * CLoading |
| | | * @author Tevin |
| | | */ |
| | | |
| | | @import "../../common/sassMixin"; |
| | | |
| | | .c-loading { |
| | | position: relative; |
| | | .at-loading { |
| | | width: 60px; |
| | | height: 60px; |
| | | .at-loading__ring { |
| | | width: 60px; |
| | | height: 60px; |
| | | border-width: 2PX; |
| | | } |
| | | } |
| | | .c-loading-content { |
| | | opacity: 1; |
| | | transition: opacity 0.1s; |
| | | &.off { |
| | | opacity: 0.35; |
| | | transition: opacity 0.5s 0.1s; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * CLoading |
| | | * @author Tevin |
| | | */ |
| | | |
| | | import CLoading from '@components/layout/loading/CLoading.vue'; |
| | | |
| | | export { |
| | | CLoading, |
| | | } |