vue-component

access store outside of component vuejs

别等时光非礼了梦想. 提交于 2020-05-10 03:52:48
问题 I have a file for configuring my OpenID Connect authentication export const authMgr = new Oidc.UserManager({ userStore: new Oidc.WebStorageStateStore(), authority: **appsetting.oidc** }) I want to access my state in order to get the value of appsetting. I did this: import store from './store' const appsetting = () => store.getters.appsetting but my appsetting is always returning undefined what I my missing? Store: app.js const state = { appsetting: appsetting, } export { state } getters.js

vue-treeselect component with Vue I18n

陌路散爱 提交于 2020-04-30 10:06:58
问题 How can I use https://vue-treeselect.js.org/ with Vue I18n as a multi-language component? the json file (my-es.json, my-en.json), placeholder, etc. should change depending on selected language. <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://unpkg.com/vue/dist/vue.js"></script> <script src="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.umd.min.js"></script> <link rel="stylesheet" href

Resume adding rows on history back and forward

巧了我就是萌 提交于 2020-04-30 06:56:24
问题 There is two pages: Home.vue and Statistics.vue . At home page, there is the interval that counts some numbers at page load. When you switch to "/statistic" page interval is stopped and when you get back to "/" page, interval and counting are start from when they stopped. Problem is, that I need to resume adding rows to "/statistic" page once when you switch from "/statistics" to "/" and back again to "/statistics". Now "/statistics" always reset values to default and start adding rows from

Integrate existing static html website into existing vue js web app

不问归期 提交于 2020-04-18 07:12:09
问题 I created a contact form with vue and vuetify as a new vue project. Now I would like to integrate it into the existing static html page. I tried to add the vue app as a vue instance which didn't seem to be the right approach. Would it be easier to existing html & css code into the new light weight vue project setup? Can you recommend a simple github project as an example which includes vue just as an instance into an existing website? 回答1: Vue's can be praised for many reasons but one of the

Vue.js not working after vue-router is implemented

天涯浪子 提交于 2020-04-18 05:45:42
问题 This is the code I'm using to try creating a single page app. I'm reading about vue router and I've tried to apply it to my project. I'm not sure what's wrong with the code, but I'm not able to see the page where the app run. I get some errors on chrom console, but this happen after I've added vue router to my project. Any help to fix it? <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!--

Vue Components not showing/updating

删除回忆录丶 提交于 2020-04-14 07:48:29
问题 I am working in Laravel 5.4, and Vue components are not showing/updating. I start a new project and create a route /chat in web.php This is chat.blade.php <!DOCTYPE html> <html> <head> <title></title> <link rel="stylesheet" type="text/css" href="css/app.css"> </head> <body> <div id="app"> <example></example> <chat></chat> </div> <script type="text/javascript"> window.Laravel = { csrfToken: '{{ csrf_token() }}' }; </script> <script src="js/app.js"></script> </body> </html> This is app.js

Vue Components not showing/updating

那年仲夏 提交于 2020-04-14 07:45:47
问题 I am working in Laravel 5.4, and Vue components are not showing/updating. I start a new project and create a route /chat in web.php This is chat.blade.php <!DOCTYPE html> <html> <head> <title></title> <link rel="stylesheet" type="text/css" href="css/app.css"> </head> <body> <div id="app"> <example></example> <chat></chat> </div> <script type="text/javascript"> window.Laravel = { csrfToken: '{{ csrf_token() }}' }; </script> <script src="js/app.js"></script> </body> </html> This is app.js

How can I generate unique id's in Vue.js from attributes in a JSON file?

一曲冷凌霜 提交于 2020-04-14 07:03:27
问题 I am using Vue.js to generate divs and I would like to use data from a JSON file to do so. It doesn't necessarily have to be from the JSON but that would be preferable, I just need to create a unique id for each instance of the div in the html below. What is the best way to create unique ID's for each of the divs? HTML <ul> <li v-for="(member, index) in cyclists" :key="index" class="col-md-4 inview fromBottomIn" data-in="fromBottomIn" data-out="fromBottomOut"> <div class="cycling__card"> <div

VueJs: Using component inside another component

寵の児 提交于 2020-04-10 07:15:50
问题 I'm trying to make use of the main component inside another with pre-defined properties. Here's what I'm trying to achieve, but I'm just getting an empty div as a result. <template> <call-dialog-link :id="id" :url=url" message="Are you sure you wish to remove this record?" label="Remove" css-classes="alert" ></call-dialog-link> </template> <script> import CallDialogLink from './CallDialogLink.vue'; export default { props: { id: { type: String, required: true }, url: { type: String, required:

VueJs: Using component inside another component

牧云@^-^@ 提交于 2020-04-10 07:13:10
问题 I'm trying to make use of the main component inside another with pre-defined properties. Here's what I'm trying to achieve, but I'm just getting an empty div as a result. <template> <call-dialog-link :id="id" :url=url" message="Are you sure you wish to remove this record?" label="Remove" css-classes="alert" ></call-dialog-link> </template> <script> import CallDialogLink from './CallDialogLink.vue'; export default { props: { id: { type: String, required: true }, url: { type: String, required: