Coder Social home page Coder Social logo

vue-widget-mondial-relay's Introduction

Captura de pantalla 2021-09-11 a las 17 09 04

Vue Widget Mondial Relay

Mondial Relay Widget https://widget.mondialrelay.com/parcelshop-picker/v4_0/codesamples/Sample-LightImplementation.aspx to Vue

Installation

Using npm

npm i --save vue-widget-mondial-relay

Requirements

Vue 2

Vue 3 ? use the new component -> https://github.com/EduardoMateos/vue3-widget-mondial-relay

Props API

Props Type Required Default Details
brand String true Provider by Mondial Relay
defaultPostCode String false 59000 Default postal Code used for search at loading
defaultCountry String false FR FR, ES, BE, NL, LU, DE, AT
maxResults Int false 7 Must be less than 20
deliveryMode String false 24R Standard [24R], XL [24L], XXL [24X], Drive [DRI]
allowedCountries Array false * FR, ES, BE, NL, LU, DE, AT
translations Object false texts in spanish details in documentation

Translations

Prop: translations

Object example:

        :translations="{
          headerTitle: 'Select your mondial relay ®',
          findCpText: 'CP',
          findCityText: 'City',
          cityNoResults: 'no results',
          btnListMobile: 'List',
          btnMapMobile: 'Map'
        }"

Example

<template>
  <div id="app" style="max-width: 980px; margin: auto">
    <WidgetMondialRelay
        brand="BDTEST  "
        defaultPostCode="59000"
        defaultCountry="FR"
        maxResults="7"
        deliveryMode="24R"
        @select="setParcelSelected($event)"
        :translations="{
          headerTitle: 'Select your mondial relay ®',
          findCpText: 'CP',
          findCityText: 'City',
          cityNoResults: 'no results',
          btnListMobile: 'List',
          btnMapMobile: 'Map'
        }"
    />
  </div>
</template>
import WidgetMondialRelay from 'vue-widget-mondial-relay';
import 'vue-widget-mondial-relay/dist/widget-mondial-relay.min.css';

export default {
  name: 'App',
  components: {
    WidgetMondialRelay
  },
  methods:{
    setParcelSelected(data){
      console.log(data)
    }
  }
}

vue-widget-mondial-relay's People

Contributors

eduardomateos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.