Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/location/widget/src/mappopup/ |
Upload File : |
import {Vue} from 'ui.vue'; import {Address, AddressStringConverter} from 'location.core'; export default Vue.extend({ props: { address: {required: true}, addressFormat: {required: true}, isHidden: {required: true}, }, methods: { handleApplyClick() { this.$emit('apply', {address: this.address}); }, convertAddressToString(address: ?Address): string { if (!address) { return ''; } return address.toString(this.addressFormat, AddressStringConverter.STRATEGY_TYPE_TEMPLATE_COMMA); } }, computed: { addressString() { if (!this.address) { return ''; } return this.address.toString(this.addressFormat, AddressStringConverter.STRATEGY_TYPE_TEMPLATE_COMMA, AddressStringConverter.CONTENT_TYPE_TEXT); }, containerStyles() { return { display: this.isHidden ? 'none' : 'flex' }; }, containerClasses() { return this.isHidden ? {hidden: true} : {}; }, localize() { return Vue.getFilteredPhrases('LOCATION_WIDGET_'); }, }, template: ` <div :class="containerClasses" :style="containerStyles" class="location-map-address-changed" > <div class="location-map-address-changed-inner"> <div class="location-map-address-changed-title"> {{localize.LOCATION_WIDGET_AUI_ADDRESS_CHANGED_NEW_ADDRESS}} </div> <div class="location-map-address-changed-text">{{addressString}}</div> </div> <button @click="handleApplyClick" type="button" class="location-map-address-apply-btn"> {{localize.LOCATION_WIDGET_AUI_ADDRESS_APPLY}} </button> </div> ` });