Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <Page class="page">
- <ActionBar class="action-bar" title="Créer une annonce">
- </ActionBar>
- <ScrollView>
- <StackLayout class="content">
- <TextField v-model="annonce.title" hint="Titre de l'annonce" class="input" />
- <TextView height="100" hint="Description de l'annonce"></TextView>
- <Label text="Appuyez 2 fois sur 'espace' pour faire une nouvelle ligne" class="hint" />
- <Label text="A qui envoyer votre annonce ?" class="label" />
- <ListPicker :items="listStatus" v-model="userStatus" class="listStatus" />
- <Button class="btn btn-primary" text="Créer mon annonce" @tap="createAnnonce"/>
- </StackLayout>
- </ScrollView>
- </Page>
- </template>
- <script>
- import HomeEmp from './HomeEmp'
- export default {
- components: {
- },
- data() {
- return {
- annonce: {
- title: "",
- details: "",
- typeProfil: "",
- },
- listStatus: [ '1', '2', '3' ],
- userStatus: "",
- };
- },
- computed: {
- },
- methods: {
- createAnnonce () {
- console.log('create')
- console.log()
- confirm({
- title: "Confirmation",
- message: "Confirm?",
- okButtonText: "Yes",
- cancelButtonText: "No"
- }).then(result => {
- if (result) {
- alert({
- title: 'Ok',
- message: 'Sent!'
- })
- .then(() => {
- this.$navigateTo(HomeEmployeur);
- });
- } else {
- alert({
- title: 'Envoi canceled',
- message: 'Not sent'
- })
- .then(() => {
- //console.log("Alert dialog closed.");
- });
- }
- });
- },
- handleEnterKeyPress () {
- console.log('ENTER PRESSED')
- this.annonce.details = this.annonce.details.concat("\n");
- },
- tchange (t) {
- var tmp = this.annonce.details;
- this.annonce.details = tmp.replace(" ", "\n");
- }
- }
- }
- </script>
- <style scoped>
- .label {
- margin-top: 25;
- }
- .input {
- margin-bottom: 15;
- }
- .content {
- margin: 20;
- vertical-align: center;
- }
- .hint {
- font-size: 12;
- }
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement