Unverified Commit a22763ef by Sendya

fix: export component, mv Result to src/components

parent 218e9211
<template> <template>
<div class="result"> <div class="result">
<div> <div>
<a-icon :class="{ 'icon': true, 'success': isSuccess, 'error': !isSuccess }" :type="isSuccess ? 'check-circle' : 'close-circle'"/> <a-icon :class="{ 'icon': true, 'success': isSuccess, 'error': !isSuccess }" :type="isSuccess ? 'check-circle' : 'close-circle'"/>
</div> </div>
<div class="title" v-if="title">{{ title }}</div> <div class="title" v-if="title">{{ title }}</div>
<div class="description" v-if="description">{{ description }}</div> <div class="description" v-if="description">{{ description }}</div>
<div class="content" v-if="content"> <div class="content" v-if="content">
<slot></slot> <slot></slot>
</div> </div>
<div class="action"> <div class="action">
<slot name="action"></slot> <slot name="action"></slot>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'Result', name: 'Result',
props: { props: {
isSuccess: { isSuccess: {
type: Boolean, type: Boolean,
default: false default: false
}, },
title: { title: {
type: String, type: String,
default: '' default: ''
}, },
description: { description: {
type: String, type: String,
default: '' default: ''
}, },
content: { content: {
type: Boolean, type: Boolean,
default: true default: true
} }
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.result { .result {
text-align: center; text-align: center;
width: 72%; width: 72%;
margin: 0 auto; margin: 0 auto;
padding: 24px 0 8px; padding: 24px 0 8px;
.icon { .icon {
font-size: 72px; font-size: 72px;
line-height: 72px; line-height: 72px;
margin-bottom: 24px; margin-bottom: 24px;
} }
.success { .success {
color: #52c41a; color: #52c41a;
} }
.error { .error {
color: red; color: red;
} }
.title { .title {
font-size: 24px; font-size: 24px;
color: rgba(0, 0, 0, .85); color: rgba(0, 0, 0, .85);
font-weight: 500; font-weight: 500;
line-height: 32px; line-height: 32px;
margin-bottom: 16px; margin-bottom: 16px;
} }
.description { .description {
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
color: rgba(0, 0, 0, 0.45); color: rgba(0, 0, 0, 0.45);
margin-bottom: 24px; margin-bottom: 24px;
} }
.content { .content {
background: #fafafa; background: #fafafa;
padding: 24px 40px; padding: 24px 40px;
border-radius: 2px; border-radius: 2px;
text-align: left; text-align: left;
} }
.action { .action {
margin-top: 32px; margin-top: 32px;
} }
} }
.mobile { .mobile {
.result { .result {
width: 100%; width: 100%;
margin: 0 auto; margin: 0 auto;
padding: unset; padding: unset;
} }
} }
</style> </style>
import Result from './Result.vue'
export default Result
import AvatarList from '@/components/AvatarList/index'
// chart // chart
import Bar from '@/components/chart/Bar' import Bar from '@/components/chart/Bar'
import ChartCard from '@/components/chart/ChartCard' import ChartCard from '@/components/chart/ChartCard'
...@@ -9,13 +8,20 @@ import MiniProgress from '@/components/chart/MiniProgress' ...@@ -9,13 +8,20 @@ import MiniProgress from '@/components/chart/MiniProgress'
import Radar from '@/components/chart/Radar' import Radar from '@/components/chart/Radar'
import RankList from '@/components/chart/RankList' import RankList from '@/components/chart/RankList'
import TransferBar from '@/components/chart/TransferBar' import TransferBar from '@/components/chart/TransferBar'
// ------我是分割线----------
import CountDown from '@/components/CountDown/index' // pro components
import Ellipsis from '@/components/Ellipsis/index' import AvatarList from '@/components/AvatarList'
import FooterToolbar from '@/components/FooterToolbar/index' import CountDown from '@/components/CountDown'
import NumberInfo from '@/components/NumberInfo/index' import Ellipsis from '@/components/Ellipsis'
import FooterToolbar from '@/components/FooterToolbar'
import NumberInfo from '@/components/NumberInfo'
import DetailList from '@/components/tools/DetailList'
import Tree from '@/components/Tree/Tree' import Tree from '@/components/Tree/Tree'
import Trend from '@/components/Trend/index' import Trend from '@/components/Trend'
import STable from '@/components/table'
import MultiTab from '@/components/MultiTab'
import Result from '@/components/Result'
import IconSelector from '@/components/IconSelector'
export { export {
AvatarList, AvatarList,
...@@ -33,5 +39,10 @@ export { ...@@ -33,5 +39,10 @@ export {
Ellipsis, Ellipsis,
FooterToolbar, FooterToolbar,
NumberInfo, NumberInfo,
Tree DetailList,
Tree,
STable,
MultiTab,
Result,
IconSelector
} }
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</template> </template>
<script> <script>
import Result from '../../result/Result' import { Result } from '@/components'
export default { export default {
name: 'Step3', name: 'Step3',
...@@ -66,4 +66,4 @@ export default { ...@@ -66,4 +66,4 @@ export default {
font-size: 20px; font-size: 20px;
line-height: 14px; line-height: 14px;
} }
</style> </style>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</template> </template>
<script> <script>
import Result from './Result' import { Result } from '@/components'
export default { export default {
name: 'Error', name: 'Error',
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</template> </template>
<script> <script>
import Result from './Result' import { Result } from '@/components'
import { mixinDevice } from '@/utils/mixin.js' import { mixinDevice } from '@/utils/mixin.js'
const directionType = { const directionType = {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</template> </template>
<script> <script>
import Result from '@/views/result/Result' import { Result } from '@/components'
export default { export default {
name: 'RegisterResult', name: 'RegisterResult',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment