How does the vue instruction directive accept multiple parameters?

suppose I have an input, that can only enter numbers, and the length and the number of decimal places are limited, so I need two parameters. How can I pass it and get it in the instruction?

here is the code that I pass a parameter or get, as follows:

<input type="text" v-spec-input="8">
directives: {
    spec_input: {
        bind: function (el, binding) {
            //
            console.log(binding.value)
        }
    },
}        
Mar.07,2021
The form of

object is passed in


<input type="text" numberLength='8' pointLength='3'>
directives: {
    spec_input: {
        bind: function (el, binding) {
            //
            console.log(el.attributes.numberLength.value,el.attributes.pointLength.value )
        }
    },
}      

this should work.


parameters are passed as objects or arrays


Thank you, everyone. I found

<div v-demo="{ color: 'white', text: 'hello!' }"></div>

Vue.directive('demo', function (el, binding) {
  console.log(binding.value.color) // => "white"
  console.log(binding.value.text)  // => "hello!"
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e55db7-442df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e55db7-442df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?