Skip to content

Commit

Permalink
Merge pull request umijs#31 from sendya/feature/support-antdv-1.2.1
Browse files Browse the repository at this point in the history
Feature/support antd-vue 1.2.2
  • Loading branch information
sendya authored Dec 19, 2018
2 parents 83f779a + f4f8181 commit 93ae2f1
Show file tree
Hide file tree
Showing 11 changed files with 226 additions and 176 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@antv/data-set": "^0.10.1",
"ant-design-vue": "^1.1.10",
"ant-design-vue": "~1.2.2",
"axios": "^0.18.0",
"dayjs": "^1.7.5",
"enquire.js": "^2.1.6",
Expand Down
3 changes: 3 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import enquireScreen from '@/utils/device'
import { version } from 'ant-design-vue'
export default {
data () {
return {
locale: zhCN,
version
}
},
created () {
const that = this
console.log('use Ant-Design Of Vue:', version)
enquireScreen(deviceType => {
// tablet
if (deviceType === 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/SideMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
:collapsed="collapsed"
:menu="menus"
:theme="theme"
@select="onSelect"
:mode="mode"
@select="onSelect"
style="padding: 16px 0px;"></s-menu>
</a-layout-sider>

Expand Down
3 changes: 2 additions & 1 deletion src/components/menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default {
watch: {
collapsed(val) {
if (val) {
this.cachedOpenKeys = this.openKeys
this.cachedOpenKeys = this.openKeys.concat()
this.openKeys = []
} else {
this.openKeys = this.cachedOpenKeys
Expand Down Expand Up @@ -107,6 +107,7 @@ export default {
},
updateMenu() {
const routes = this.$route.matched.concat()

if (routes.length >= 4 && this.$route.meta.hidden) {
routes.pop()
this.selectedKeys = [routes[2].path]
Expand Down
6 changes: 3 additions & 3 deletions src/components/page/GlobalHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
v-if="device==='mobile'"
class="trigger"
:type="collapsed ? 'menu-fold' : 'menu-unfold'"
@click.native="toggle"></a-icon>
@click="toggle"></a-icon>
<a-icon
v-else
class="trigger"
:type="collapsed ? 'menu-unfold' : 'menu-fold'"
@click.native="toggle"/>
@click="toggle"/>

<user-menu></user-menu>
</div>
Expand All @@ -29,7 +29,7 @@
v-else
class="trigger"
:type="collapsed ? 'menu-fold' : 'menu-unfold'"
@click.native="toggle"></a-icon>
@click="toggle"></a-icon>
</div>
<user-menu class="header-index-right"></user-menu>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/page/GlobalLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
}
}
.layout {
.layout.ant-layout {
min-height: 100vh;
overflow-x: hidden;
Expand Down
8 changes: 7 additions & 1 deletion src/views/account/settings/AvatarModal.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<template>
<a-modal :visible="visible" title="修改头像" :maskClosable="false" :confirmLoading="confirmLoading" :width="800">
<a-modal
title="修改头像"
:visible="visible"
:maskClosable="false"
:confirmLoading="confirmLoading"
:width="800"
@cancel="cancelHandel">
<a-row>
<a-col :xs="24" :md="12" :style="{height: '350px'}">
<vue-cropper
Expand Down
4 changes: 2 additions & 2 deletions src/views/list/TableList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
</template>
<a-col :md="!advanced && 8 || 24" :sm="24">
<span class="table-page-search-submitButtons" :style="advanced && { float: 'right', overflow: 'hidden' } || {} ">
<a-button type="primary">查询</a-button>
<a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
<a-button type="primary" @click="$refs.table.refresh()">查询</a-button>
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
<a @click="toggleAdvanced" style="margin-left: 8px">
{{ advanced ? '收起' : '展开' }}
<a-icon :type="advanced ? 'up' : 'down'"/>
Expand Down
3 changes: 1 addition & 2 deletions src/views/result/Result.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="result">
<div>
<a-icon :class="[isSuccess ? 'success' : 'error' ,'icon']" :type="isSuccess ? 'check-circle' : 'close-circle'"/>
<a-icon :class="{ 'icon': true, 'success': isSuccess, 'error': !isSuccess }" :type="isSuccess ? 'check-circle' : 'close-circle'"/>
</div>
<div class="title" v-if="title">{{ title }}</div>
<div class="description" v-if="description">{{ description }}</div>
Expand All @@ -17,7 +17,6 @@
<script>
export default {
name: 'Result',
// 'isSuccess', 'title', 'description'
props: {
isSuccess: {
type: Boolean,
Expand Down
Loading

0 comments on commit 93ae2f1

Please sign in to comment.