Vue.js

“blocked by CORS policy” error with https://streamlabs.com/api/v1.0 endpoint

一个人想着一个人 提交于 2021-02-05 09:46:48
问题 I want to send a test donation from my fronted web app. For this i use: STREAMLABS API docs. Vue v2.5.17 component with template: <template> <layout> <h1>Dashboard</h1> <p><label for="donationSum">Sum</label></p> <p><input type="number" id="donationSum" v-model="amount"></p> <button @click="makeDonation">DONATE</button> </layout> </template> 'makeDonation' is mapped action from Vuex: makeDonation ({ getters }) { const url = 'https://streamlabs.com/api/v1.0/donations' const postData = JSON

Vue-Cli: why after the build the index.html is not generated with quotes?

僤鯓⒐⒋嵵緔 提交于 2021-02-05 09:32:01
问题 After running the npm build, the ./dist/index.html file is generated without the quotes. The project does not have a webpack.config.js or a vue.config.js . The build is generated from the example project made with vue create . How do I solve this? <!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>html-project</title><link href=/app

Vue-Cli: why after the build the index.html is not generated with quotes?

╄→гoц情女王★ 提交于 2021-02-05 09:31:07
问题 After running the npm build, the ./dist/index.html file is generated without the quotes. The project does not have a webpack.config.js or a vue.config.js . The build is generated from the example project made with vue create . How do I solve this? <!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>html-project</title><link href=/app

Vue index.html contains <link> tags to several lazy-loaded components

对着背影说爱祢 提交于 2021-02-05 09:26:42
问题 I'm trying to improve the load time of my website, and towards that, I'm using the following settings in my vue.config.js : config.output.chunkFilename(`js/[name].[chunkhash:8].js`) config.optimization .runtimeChunk('single') .splitChunks({ chunks: 'all', maxInitialRequests: Infinity, minSize: 0, cacheGroups: { vendor: { test: /[\\/]node_modules[\\/]/, name (module) { // get the name. E.g. node_modules/packageName/not/this/part.js // or node_modules/packageName const packageName = module

VUE~~ant-design-vue Date range控制日期的选择功能

…衆ロ難τιáo~ 提交于 2021-02-05 09:26:12
ant-design-vue Date range控制日期的选择功能 <a-range-picker :format="dateFormat" :disabled-date="disabledDate" @change="onChange" v-model="tbdate"/> import moment from 'moment' data(){return {dateFormat: 'YYYY-MM-DD',tbdate:undefined}} methods: { moment, disabledDate (current) { return (current < moment().subtract(90, "days")) || (current > moment().startOf('day')) // return current && current < moment().endOf(‘day’);!!!!!当天之前的不可选,包括当天 // return current < moment().subtract(1, ‘day’) !!!!!当天之前的不可选,不包括当天 //(current > moment().subtract(0, "day")) //当天之后的日期不可选,包括当天 (已测) }, onChange (date, dateString) {

vuejs v-html image tag not resolving src

浪尽此生 提交于 2021-02-05 09:26:11
问题 I have a vue page which uses v-html to place an html content inside a <div> as follows: <div v-html="noDataMessage"> </div> And the data of noDataMessage is set in created() lifecycle hook of vue. created() { this.noDataMessage = "<img src='../assets/Content/img/Myfav_empty.png' width='35px' height='35px'>"; } The html tag is showing properly, but it is not able to fetch the image. I tried to load the image separately to see if image path is correct, and got the image. Am I missing anything

vuejs v-html image tag not resolving src

天涯浪子 提交于 2021-02-05 09:26:06
问题 I have a vue page which uses v-html to place an html content inside a <div> as follows: <div v-html="noDataMessage"> </div> And the data of noDataMessage is set in created() lifecycle hook of vue. created() { this.noDataMessage = "<img src='../assets/Content/img/Myfav_empty.png' width='35px' height='35px'>"; } The html tag is showing properly, but it is not able to fetch the image. I tried to load the image separately to see if image path is correct, and got the image. Am I missing anything

how to fix error “net::ERR_SSL_SERVER_CERT_BAD_FORMAT” When useing vuejs and nodejs with https and express

◇◆丶佛笑我妖孽 提交于 2021-02-05 09:25:10
问题 I have some code to send https request in vue.js and when use actions methods in vuex for send https request I get this error in console GET https://localhost/api/getpeople net::ERR_SSL_SERVER_CERT_BAD_FORMAT my code is : vue.js table.js import Axios from "axios"; let state = { people: [] }; let getters = { getPeople(state) { return state.people; } } let mutations = { setPeople(state, people) { state.people = people } } let actions = { sendHttpReq({ commit }) { Axios.get('https://localhost

i have problem in firebase.auth.ApplicationVerifier

旧街凉风 提交于 2021-02-05 09:24:08
问题 error occur in second argument of signInWithPhoneNumber() and i am not able to fix this problem, in there is three method i used for send otp, verify otp and last on for captcha methods:{ sendOTP(e){ e.preventDefault(); if(this.phoneNo.length!=10){ alert('Invalid No.'); }else{ let countryCode="+91" let phoneNumber=countryCode+ this.phoneNo let appVerifier=window.recaptchaVerifier firebase.default.auth().signInWithPhoneNumber(phoneNumber, appVerifier) .then(function (confirmationResult){

VueJS: dynamic component loses it`s props after reloading

人走茶凉 提交于 2021-02-05 09:14:27
问题 I have a django rest_framework as a server and vuejs for a client side. There is an index page like '/' where i`m using v-for to iterate an array of objects to show some item's cards. Each card has a button to the '/info'(which is dynamically changed with /:slug in a router) like so: ... <RouterLink :to="{name: 'contentItemInfo', params: {item: item, slug: item.slug} }"> <button class="card-button btn fade-in"> ... </button> </RouterLink> ... Then, when we press the button, we are going to '/