Vue.js

error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'Starscream')

落爺英雄遲暮 提交于 2021-02-10 14:35:24
问题 Steps to recreate $ vue init nativescript-vue/vue-cli-template transport $ cd transport $ npm install $ tns run ios --bundle Log error: error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'Starscream') note: Using new build systemnote: Planning buildnote: Constructing build description ** ARCHIVE FAILED ** Mac OS High Sierra 10.13.6 Darwin Aerosol.local 17.7.0 Darwin Kernel Version 17.7.0: Wed Feb 27 00:43:23 PST 2019; root:xnu-4570.71.35~1/RELEASE_X86

How to protect Asp.net core 2.1 and Vue.js single page application with Identity Server 4

…衆ロ難τιáo~ 提交于 2021-02-10 14:35:23
问题 Actually I am having a small confusion related to architect as I have 2 separated application and 1 Identity Server4 Application, one of AspNet core 2.1 API solution which is running on different domain and server and same with other 2. Now I have below points: Have added my Client Application (which is Vue.js SPA) as client in Identity Server4 with Implicit mode as it is Js client Do I need to add The API application as a client in IDP Server. If yes then How to call any API from VUE.js with

Laravel5.8 Pusher not working. Cannot receive

蓝咒 提交于 2021-02-10 14:21:51
问题 I am creating realtime chat app. I have set up pusher in my laravel and vue.js project. But it doesn't work. Though I don't have any error in the console. Also, I have no error in network tab. I need to create messenger app, so I need a realtime chat function. Now, I can push user's comment but in the other user's window, nothing shows up. But it does, once I refresh the page. I think my pusher setting has something wrong, because in the pusher debug console, any session is not executed. Here

darkmode with vuex and save in localstorage

有些话、适合烂在心里 提交于 2021-02-10 14:21:51
问题 I have a chrome bug telling me Write operation failed: computed property "isDark" is readonly. my mutation create a DarkMode key in the locastorage and I also create a store that checks if DarkMode exists in the localestorage it works but if I refresh the page the mutation is inverted for example if in the localestorage darkMode is true if I click on the toggle the mutation is also a true then what should return false My Page <div id="home"> <div class="toggleTheme"> <ToggleBtnTheme labelOn=

Modal form Validation errors persist when reopened

泄露秘密 提交于 2021-02-10 14:21:00
问题 About the problem I am using Laravel 5.6.7, Vue.js. I have modal div which being opened and closed on button click. I type something. Validation fires. I close the modal div. Then clicking button to open it. I see that the validation messages still there. Component Template <template> <div> <form role="form"> <input name="LastName" type="text" ref="LastName" v-validate data-vv-rules="required" v-model="createForm.LastName"> <p v-if="errors.has('LastName')">{{ errors.first('LastName') }}</p>

(Vue.js) modal close event

耗尽温柔 提交于 2021-02-10 14:20:44
问题 When I click on the outer area of ​​the modal, I want the same event as the close button of the modal. (Event that closes modal when clicking outside area of ​​modal) The current progress is that the modal is closed when the close modal button is clicked. Carousel.vue <template> <div> <div v-for="(item, index) in photos" :key="index"> <div @click="imgClick(item)" style="cursor:pointer;"> <img :src="item.thumbnail" /> </div> <Modal v-if='item.show' @close="item.show = false"> <div slot='body'>

Access to this.$apollo from Vuex store with vue-apollo in NUXT?

喜夏-厌秋 提交于 2021-02-10 13:59:45
问题 I want to store the user that comes from the login on an action in the vuex store. But there is no access to this.$apollo . export const actions = { UPSERT_USER({ commit }, { authUser, claims }) { this.$apollo .mutate({ mutation: UPSERT_USER_MUTATION, variables: { id: user.uid, email: user.email, name: user.name, picture: user.picture, }, }) } Thanks! 回答1: You should be able to access it like this: export default { actions: { foo (store, payload) { let client = this.app.apolloProvider

How to test plain Vue components (not single file components)

强颜欢笑 提交于 2021-02-10 12:22:11
问题 All of these tries are throwing an error: var testUtils=require('@vue/test-utils'), Vue=require('vue'); require('jsdom-global')(); testUtils.mount(Vue.component('test', { template:'<div>test</div>' })); testUtils.mount(Vue.component('test', { render:function(el) { return el('div', 'test'); } })); testUtils.mount({ template:'<div>test</div>' }); @vue/test-utils/dist/vue-test-utils.js:2471 var componentInstance = node.child; TypeError: Cannot read property 'child' of undefined I have also tried

In vue.js, where can I place “app initialization” code?

て烟熏妆下的殇ゞ 提交于 2021-02-10 11:55:48
问题 Specifically, code that runs before the app actually loads. I'm using vuex and the first thing I want to do (regardless of what route the user is on) is to dispatch a getUser action to get currently user details from the API (or alternatively, redirect if not authenticated). If I place it in my App.vue mounted component, I believe it might be too late? Don't children components load before parents? 回答1: If I get it right you want to do something before the application initialize. For that you

In vue.js, where can I place “app initialization” code?

為{幸葍}努か 提交于 2021-02-10 11:52:35
问题 Specifically, code that runs before the app actually loads. I'm using vuex and the first thing I want to do (regardless of what route the user is on) is to dispatch a getUser action to get currently user details from the API (or alternatively, redirect if not authenticated). If I place it in my App.vue mounted component, I believe it might be too late? Don't children components load before parents? 回答1: If I get it right you want to do something before the application initialize. For that you