Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 79da4e1

Browse files
committed
Merge branch 'next' into feature/unit-test
2 parents d9880c8 + 1274df7 commit 79da4e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2728
-478
lines changed

demos/vue-3/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?

demos/vue-3/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# vue-3
2+
3+
## Project setup
4+
```
5+
yarn install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
yarn serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
yarn build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
yarn lint
21+
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).

demos/vue-3/public/favicon.ico

4.19 KB
Binary file not shown.

demos/vue-3/public/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>

demos/vue-3/src/App.vue

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<div id="app">
3+
<Toolbar />
4+
<router-view />
5+
</div>
6+
</template>
7+
8+
<script lang="ts">
9+
import { defineComponent } from 'vue';
10+
import Toolbar from './components/Toolbar.vue';
11+
12+
const components = {
13+
Toolbar,
14+
};
15+
16+
export default defineComponent({
17+
name: 'app',
18+
components,
19+
});
20+
</script>

demos/vue-3/src/assets/logo.png

8.44 KB
Loading

demos/vue-3/src/assets/logo.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<template>
2+
<div class="console bg-marine text-white text-xs p-4 rounded-md relative">
3+
<ul class="absolute top-1 left-2">
4+
<li class="rounded w-2 h-2 bg-salmon inline-block mr-1"></li>
5+
<li class="rounded w-2 h-2 bg-yellow-300 inline-block mr-1"></li>
6+
<li class="rounded w-2 h-2 bg-green-500 inline-block"></li>
7+
</ul>
8+
<pre data-cy="form-values" class="shadow-lg pt-4">{{ content }}</pre>
9+
</div>
10+
</template>
11+
12+
<script lang="ts">
13+
import { defineComponent } from 'vue';
14+
15+
const props = {
16+
content: String,
17+
};
18+
19+
export default defineComponent({
20+
name: 'console',
21+
props,
22+
});
23+
</script>
24+
25+
<style></style>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<template>
2+
<header class="toolbar flex px-8 py-4 border-b border-gray-100">
3+
<img src="../assets/logo.svg" class="logo mr-8" />
4+
<h1 class="text-bg text-xl font-bold font-display text-gray-700">
5+
{{ title }}
6+
</h1>
7+
</header>
8+
</template>
9+
10+
<script lang="ts">
11+
import { computed, defineComponent } from 'vue';
12+
import { useRoute } from 'vue-router';
13+
14+
export default defineComponent({
15+
name: 'toolbar',
16+
setup() {
17+
const route = useRoute();
18+
const title = computed(() => route.meta.title || 'Vue Dynamic Forms');
19+
20+
return { title };
21+
},
22+
});
23+
</script>
24+
25+
<style>
26+
.logo {
27+
width: 32px;
28+
height: 32px;
29+
}
30+
</style>

demos/vue-3/src/main.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { createApp } from 'vue';
2+
import App from './App.vue';
3+
import './styles/main.scss';
4+
import router from './router';
5+
6+
import { createDynamicForms } from '../../../src';
7+
8+
const VueDynamicForms = createDynamicForms({
9+
autoValidate: true,
10+
form: {
11+
customClass: 'plugin-options-class-added',
12+
method: 'POST',
13+
netlify: false,
14+
netlifyHoneypot: null,
15+
},
16+
});
17+
18+
export const app = createApp(App);
19+
20+
app.use(VueDynamicForms);
21+
22+
app.use(router).mount('#app');

0 commit comments

Comments
 (0)