mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
[WIP] initialize an app for address-picker + a demo page
This commit is contained in:
@@ -17,3 +17,9 @@ when@dev:
|
|||||||
defaults:
|
defaults:
|
||||||
template: '@ChillMain/Dev/dev.assets.test2.html.twig'
|
template: '@ChillMain/Dev/dev.assets.test2.html.twig'
|
||||||
|
|
||||||
|
|
||||||
|
sass_address_picker:
|
||||||
|
path: /_dev/address-picker
|
||||||
|
controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController
|
||||||
|
defaults:
|
||||||
|
template: '@ChillMain/Dev/dev.address-picker.html.twig'
|
||||||
|
@@ -0,0 +1,22 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
import {Address} from "ChillMainAssets/types";
|
||||||
|
|
||||||
|
interface AddressPickerProps {
|
||||||
|
suggestions?: Address[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<AddressPickerProps>(), {
|
||||||
|
suggestions: []
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<p>test</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@@ -0,0 +1,10 @@
|
|||||||
|
import {createApp} from "vue";
|
||||||
|
import AddressPicker from "ChillMainAssets/vuejs/AddressPicker/AddressPicker.vue";
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', async () => {
|
||||||
|
document.querySelectorAll<HTMLDivElement>('div[data-address-picker]').forEach((elem): void => {
|
||||||
|
const app = createApp(AddressPicker);
|
||||||
|
|
||||||
|
app.mount(elem);
|
||||||
|
})
|
||||||
|
})
|
@@ -0,0 +1,15 @@
|
|||||||
|
{% extends '@ChillMain/layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block css %}
|
||||||
|
{{ encore_entry_link_tags('address_picker') }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{{ encore_entry_script_tags('address_picker') }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<div data-address-picker="data-address-picker"></div>
|
||||||
|
|
||||||
|
{% endblock %}
|
@@ -120,5 +120,9 @@ module.exports = function (encore, entries) {
|
|||||||
"vue_onthefly",
|
"vue_onthefly",
|
||||||
__dirname + "/Resources/public/vuejs/OnTheFly/index.js",
|
__dirname + "/Resources/public/vuejs/OnTheFly/index.js",
|
||||||
);
|
);
|
||||||
|
encore.addEntry(
|
||||||
|
'address_picker',
|
||||||
|
__dirname + "/Resources/public/vuejs/AddressPicker/index.ts",
|
||||||
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user