vuejs / babel-plugin-jsx

JSX for Vue 3

Home Page:https://vue-jsx-explorer.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Passing an array to my custom directive in JSX gets a string instead

ParadiseWitch opened this issue · comments

commented

Vue version

^3.2.6

Link to minimal reproduction

https://github.com/ParadiseWitch/vue-jsx-directive-test-demo

Steps to reproduce

  1. Clone.
  2. npm i
  3. 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:

B LC`)LV%7T8CIPUPE R3V2

C4$INU0(UFFF4~ HP3 JY

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

@ParadiseWitch You cannot get binding as array and there is no point in it.