From 94374960afec2812a5f8f369a2a938c4d4e43bce Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sun, 28 Apr 2019 15:42:55 +0800 Subject: [PATCH] Remove useless components. --- src/components/AvatarList/Item.vue | 46 ---------- src/components/AvatarList/List.vue | 99 --------------------- src/components/AvatarList/index.js | 4 - src/components/AvatarList/index.less | 60 ------------- src/components/Result/Result.vue | 90 ------------------- src/components/Result/index.js | 2 - src/components/Tree/Tree.jsx | 124 --------------------------- src/components/Trend/Trend.vue | 41 --------- src/components/Trend/index.js | 3 - src/components/Trend/index.less | 42 --------- src/components/Trend/index.md | 45 ---------- src/components/index.js | 8 -- src/views/system/Installation.vue | 12 --- 13 files changed, 576 deletions(-) delete mode 100644 src/components/AvatarList/Item.vue delete mode 100644 src/components/AvatarList/List.vue delete mode 100644 src/components/AvatarList/index.js delete mode 100644 src/components/AvatarList/index.less delete mode 100644 src/components/Result/Result.vue delete mode 100644 src/components/Result/index.js delete mode 100644 src/components/Tree/Tree.jsx delete mode 100644 src/components/Trend/Trend.vue delete mode 100644 src/components/Trend/index.js delete mode 100644 src/components/Trend/index.less delete mode 100644 src/components/Trend/index.md diff --git a/src/components/AvatarList/Item.vue b/src/components/AvatarList/Item.vue deleted file mode 100644 index 946f3646..00000000 --- a/src/components/AvatarList/Item.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - diff --git a/src/components/AvatarList/List.vue b/src/components/AvatarList/List.vue deleted file mode 100644 index 933dbe2b..00000000 --- a/src/components/AvatarList/List.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - diff --git a/src/components/AvatarList/index.js b/src/components/AvatarList/index.js deleted file mode 100644 index dd6bb8ba..00000000 --- a/src/components/AvatarList/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import AvatarList from './List' -import './index.less' - -export default AvatarList diff --git a/src/components/AvatarList/index.less b/src/components/AvatarList/index.less deleted file mode 100644 index 9ce073fd..00000000 --- a/src/components/AvatarList/index.less +++ /dev/null @@ -1,60 +0,0 @@ -@import "../index"; - -@avatar-list-prefix-cls: ~"@{ant-pro-prefix}-avatar-list"; -@avatar-list-item-prefix-cls: ~"@{ant-pro-prefix}-avatar-list-item"; - -.@{avatar-list-prefix-cls} { - display: inline-block; - - ul { - list-style: none; - display: inline-block; - padding: 0; - margin: 0 0 0 8px; - font-size: 0; - } -} - -.@{avatar-list-item-prefix-cls} { - display: inline-block; - font-size: @font-size-base; - margin-left: -8px; - width: @avatar-size-base; - height: @avatar-size-base; - - :global { - .ant-avatar { - border: 1px solid #fff; - cursor: pointer; - } - } - - &.large { - width: @avatar-size-lg; - height: @avatar-size-lg; - } - - &.small { - width: @avatar-size-sm; - height: @avatar-size-sm; - } - - &.mini { - width: 20px; - height: 20px; - - :global { - .ant-avatar { - width: 20px; - height: 20px; - line-height: 20px; - - .ant-avatar-string { - font-size: 12px; - line-height: 18px; - } - } - } - } -} - diff --git a/src/components/Result/Result.vue b/src/components/Result/Result.vue deleted file mode 100644 index cd25a962..00000000 --- a/src/components/Result/Result.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - - - diff --git a/src/components/Result/index.js b/src/components/Result/index.js deleted file mode 100644 index 51cb3b2a..00000000 --- a/src/components/Result/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import Result from './Result.vue' -export default Result diff --git a/src/components/Tree/Tree.jsx b/src/components/Tree/Tree.jsx deleted file mode 100644 index 37df16d9..00000000 --- a/src/components/Tree/Tree.jsx +++ /dev/null @@ -1,124 +0,0 @@ -import { Menu, Icon, Input } from 'ant-design-vue' - -const { Item, ItemGroup, SubMenu } = Menu -const { Search } = Input - -export default { - name: 'Tree', - props: { - dataSource: { - type: Array, - required: true - }, - openKeys: { - type: Array, - default: () => [] - }, - search: { - type: Boolean, - default: false - } - }, - created() { - this.localOpenKeys = this.openKeys.slice(0) - }, - data() { - return { - localOpenKeys: [] - } - }, - methods: { - handlePlus(item) { - this.$emit('add', item) - }, - handleTitleClick(...args) { - this.$emit('titleClick', { args }) - }, - - renderSearch() { - return ( - - ) - }, - renderIcon(icon) { - return icon && () || null - }, - renderMenuItem(item) { - return ( - - { this.renderIcon(item.icon) } - { item.title } - this.handlePlus(item) } }}> - - ) - }, - renderItem(item) { - return item.children ? this.renderSubItem(item, item.key) : this.renderMenuItem(item, item.key) - }, - renderItemGroup(item) { - const childrenItems = item.children.map(o => { - return this.renderItem(o, o.key) - }) - - return ( - - - { childrenItems } - - ) - }, - renderSubItem(item, key) { - const childrenItems = item.children && item.children.map(o => { - return this.renderItem(o, o.key) - }) - - const title = ( - - { this.renderIcon(item.icon) } - { item.title } - - ) - - if (item.group) { - return this.renderItemGroup(item) - } - // titleClick={this.handleTitleClick(item)} - return ( - - { title } - { childrenItems } - - ) - } - }, - render() { - const { dataSource, search } = this.$props - - // this.localOpenKeys = openKeys.slice(0) - const list = dataSource.map(item => { - return this.renderItem(item) - }) - - return ( -
- { search ? this.renderSearch() : null } - this.$emit('click', item), 'update:openKeys': val => { this.localOpenKeys = val } } }} openKeys={this.localOpenKeys}> - { list } - -
- ) - } -} diff --git a/src/components/Trend/Trend.vue b/src/components/Trend/Trend.vue deleted file mode 100644 index 526e1cc6..00000000 --- a/src/components/Trend/Trend.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/src/components/Trend/index.js b/src/components/Trend/index.js deleted file mode 100644 index 9f142280..00000000 --- a/src/components/Trend/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Trend from './Trend.vue' - -export default Trend diff --git a/src/components/Trend/index.less b/src/components/Trend/index.less deleted file mode 100644 index 8a3d24cf..00000000 --- a/src/components/Trend/index.less +++ /dev/null @@ -1,42 +0,0 @@ -@import "../index"; - -@trend-prefix-cls: ~"@{ant-pro-prefix}-trend"; - -.@{trend-prefix-cls} { - display: inline-block; - font-size: @font-size-base; - line-height: 22px; - - .up, - .down { - margin-left: 4px; - position: relative; - top: 1px; - - i { - font-size: 12px; - transform: scale(0.83); - } - } - - .item-text { - display: inline-block; - margin-left: 8px; - color: rgba(0,0,0,.85); - } - - .up { - color: @red-6; - } - .down { - color: @green-6; - top: -1px; - } - - &.reverse-color .up { - color: @green-6; - } - &.reverse-color .down { - color: @red-6; - } -} \ No newline at end of file diff --git a/src/components/Trend/index.md b/src/components/Trend/index.md deleted file mode 100644 index 8881f0e1..00000000 --- a/src/components/Trend/index.md +++ /dev/null @@ -1,45 +0,0 @@ -# Trend 趋势标记 - -趋势符号,标记上升和下降趋势。通常用绿色代表“好”,红色代表“不好”,股票涨跌场景除外。 - - - -引用方式: - -```javascript -import Trend from '@/components/Trend' - -export default { - components: { - Trend - } -} -``` - - - -## 代码演示 [demo](https://pro.loacg.com/test/home) - -```html -5% -``` -或 -```html - - 工资 - 5% - -``` -或 -```html -5% -``` - - -## API - -| 参数 | 说明 | 类型 | 默认值 | -|----------|------------------------------------------|-------------|-------| -| flag | 上升下降标识:`up|down` | string | - | -| reverseColor | 颜色反转 | Boolean | false | - diff --git a/src/components/index.js b/src/components/index.js index f0bdb711..19d865d5 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -1,26 +1,18 @@ import Vue from 'vue' // pro components -import AvatarList from '@/components/AvatarList' import Ellipsis from '@/components/Ellipsis' import FooterToolbar from '@/components/FooterToolbar' import NumberInfo from '@/components/NumberInfo' import DescriptionList from '@/components/DescriptionList' -import Tree from '@/components/Tree/Tree' -import Trend from '@/components/Trend' -import Result from '@/components/Result' import ExceptionPage from '@/components/Exception' import Upload from '@/components/Upload/Upload' const _components = { - AvatarList, - Trend, Ellipsis, FooterToolbar, NumberInfo, DescriptionList, - Tree, - Result, ExceptionPage, Upload } diff --git a/src/views/system/Installation.vue b/src/views/system/Installation.vue index c6a91b56..d8690860 100644 --- a/src/views/system/Installation.vue +++ b/src/views/system/Installation.vue @@ -47,18 +47,6 @@ layout="horizontal" v-show="stepCurrent == 0" > - - - - - -