Skip to content

Commit

Permalink
Merge branch 'master' of github.com:szuprefix/vue-django
Browse files Browse the repository at this point in the history
  • Loading branch information
szuprefix committed Mar 1, 2020
2 parents 86a1d04 + d29e7e0 commit a80e76e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/szuprefix/vue-django#readme",
"dependencies": {
"axios": "^0.16.2",
"axios": "^0.19.0",
"date-fns": "^1.29.0",
"element-ui": "^2.7.2",
"js-cookie": "^2.2.0",
Expand Down
25 changes: 25 additions & 0 deletions src/components/media/VideoCover.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<el-image v-bind="[$attrs,$props,field]" :src="url">
</el-image>
</template>
<script>
export default{
props: {
value: String,
field: Object
},
data () {
return {}
},
created () {
// console.log(this.value)
},
components: {},
methods: {},
computed: {
url () {
return this.value[this.field.name]
}
}
}
</script>
2 changes: 1 addition & 1 deletion src/components/model/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
},
getId(){
let id = this.value && this.value.id ||
this.$route.path.includes(this.model.getListUrl()) && this.$route.params.id
this.$route.path.startsWith(this.model.getListUrl()) && this.$route.params.id
|| undefined
return id === 'create' ? undefined : id
},
Expand Down
6 changes: 4 additions & 2 deletions src/components/model/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,18 @@
})
}
let avairableActions = {...this.avairableActions, ...bactions}
let topActions = ['refresh', 'create', ['download'].concat(Object.keys(bactions))]
return {
topActions: ['refresh', 'create', ['download'].concat(Object.keys(bactions))],
topActions,
rowActions: ['edit', [this.parentMultipleRelationField ? 'removeFromParent' : 'delete']],
excelFormat: this.excelFormat,
permissionFunction: this.checkPermission,
dblClickAction: 'edit',
title: this.model.config.verbose_name,
...this.$attrs,
baseQueries: this._baseQueries,
avairableActions
avairableActions,
...get(this.model, 'viewsConfig.list.options.remoteTable')
}
},
_baseQueries () {
Expand Down

0 comments on commit a80e76e

Please sign in to comment.