Welcome to the Vue feedback portal. We’re happy you’re here! If you have feedback on how to improve the Vue, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

{

headerText: this.$t('common.c'),

field: 'permission',

valueAccessor: (field, data) => this.crudValueAccessor(field, data, UserManagementPermission.CREATE),

editTemplate: () => {

return {

template: {

extends: CrudEditTemplate,

propsData: {

local: (str) => {

return this.$t(str)

},

permissionEdit: UserManagementPermission.CREATE,

}

}

}

},

width: 10

},




Here my CrudEditTemplate



<template>

<ejs-dropdownlist :id='computedId' :value="computedValue" :dataSource='crudData' :fields="fields" @change="setValue"></ejs-dropdownlist>

</template>

<script>


import setPermission from '../permissionMixin'

import { UserManagementPermission } from '@/shared/enum'


export default {

props: {

local: Function,

permissionEdit: Number,

},

computed: {

computedId() {

return `${UserManagementPermission.properties[this.permissionEdit]}_permission_dd`

},

computedValue() {

const isOn = (this.data.permission & this.permissionEdit) === this.permissionEdit

if (isOn) {

const isExclusive = (this.data.permission_exclusive & this.permissionEdit) === this.permissionEdit

if (isExclusive) {

return 2

}

return 1

else {

const isPassive = (this.data.permission_passive & this.permissionEdit) === this.permissionEdit

if (isPassive) {

return 3

}

return 0

}

}

},

methods: {

setValue(args) {

setPermission(args.value, this.data, this.permissionEdit)

}

},

data() {

return {

data: {},

fields: {

text: 'text',

value: 'value'

},

crudData: [

{

text: '',

value: 0

},

{

text: this.local('common.on').toLocaleUpperCase(),

value: 1

},

{

text: this.local('common.exclusive').toLocaleUpperCase(),

value: 2

},

{

text: this.local('common.passive').toLocaleUpperCase(),

value: 3

},

]

}

},

}

</script>

<style lang="scss" scoped>

@import "src/styles/shared/variables.scss";

</style>


Any suggestion?