Commit 67d182b
committed
Handle kebab-case attributes in component calls
libxml2 throws away the capitalization of attribute names (we always see
them all-lowercase), so component props must be specified in kebab-case
(e.g. :property-url= rather than :propertyUrl=); for this to work,
php-vuejs-templating needs to map the prop name back to camelCase
somewhere. Do this in handleComponent(). (Alternatively, it could
probably happen in App::renderComponentToDOM() or Component::render(),
but that would suggest that PHP entry points can provide props in either
format, and that feels bad to me.)1 parent 2d28b47 commit 67d182b
2 files changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
64 | 77 | | |
0 commit comments