Hello
I have a route for actions sheet:
{
path: ‘/comp/actions/:a/:b’,
actions: {
componentUrl: ‘/ajax_comps.php?link1={{a}}&id={{b}}’,
},
options: {
history: false,
browserHistory: false,
animate: animations,
},
},
And the file it returns looks like this:
<script>
export default (props, { $, $f7, $on }) => {
$on('pageInit', () => {
//- With callbacks on click
var ac = $f7.actions.create({
buttons: [
{
text: '<?php echo $wo["lang"]["forum"] ?>',
onClick: function () {
$f7.dialog.alert('Button1 clicked')
}
},
{
text: 'Button2',
onClick: function () {
$f7.dialog.alert('Button2 clicked')
}
},
{
text: 'Cancel',
color: 'red',
onClick: function () {
$f7.dialog.alert('Cancel clicked')
}
},
]
});
ac.open();
})
return $render;
}
</script>
It returns an error, what should I do?