Passing an array to my custom directive in JSX gets a string instead
ParadiseWitch opened this issue · comments
Maid commented
Vue version
^3.2.6
Link to minimal reproduction
https://github.com/ParadiseWitch/vue-jsx-directive-test-demo
Steps to reproduce
- Clone.
- npm i
- npm run dev, then you can see the output in the console.
What is expected?
if i use directive like this:
<div v-permission={['user']}>test1</div>
The binding value I want to get is a ArrayLike.
What is actually happening?
Actually I get a string.
See the screenshot:
System Info
System:
OS: Windows 10 10.0.19043
CPU: (12) x64 Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz
Memory: 15.67 GB / 31.93 GB
Binaries:
Node: 14.15.1 - D:\nodejs\node.EXE
Yarn: 1.22.10 - D:\nodejs\node-global\yarn.CMD
npm: 6.14.8 - D:\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.42)
Internet Explorer: 11.0.19041.1566
npmPackages:
vue: ^3.2.6 => 3.2.39
Any additional comments?
No response
funny-family commented
@ParadiseWitch You cannot get binding
as array and there is no point in it.