-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
30 lines (28 loc) · 857 Bytes
/
index.php
File metadata and controls
30 lines (28 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
require "vendor/autoload.php";
require "src/PHPMV/VueJS.php";
?>
<!doctype html>
<html lang="fr" style="overflow-y:hidden;">
<head>
<meta charset="utf-8">
<title>Test</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
</head>
<body>
<div id="app" style="width:80%;margin:50px auto;">
<p>ok</p>
<input v-focus>
</div>
<?php
$test = new PHPMV\VueJS();
\PHPMV\AbstractVueJS::addGlobalObservable("state",["count"=>0]);
$test->addComputed("testComputed","console.log('testComputed')");
$test->addComputed("testComputedSet","console.log('testComputed')","var data=v");
$test->addDirective('focus',['inserted'=>'el.focus();']);
var_dump($test->getDirectives());
print $test;
?>
</body>
</html>