by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 22:22
    visualfanatic edited #9403
  • Jan 31 2019 22:04
    visualfanatic opened #9403
  • Jan 31 2019 18:25

    yyx990803 on regression-test

    fix: allow more enumerated valu… chore: update sponsors [ci skip… fix: fix v-bind:style for camel… and 1 more (compare)

  • Jan 31 2019 17:29
    yyx990803 closed #9402
  • Jan 31 2019 17:20
    devedse opened #9402
  • Jan 31 2019 16:49
    Justineo closed #9401
  • Jan 31 2019 16:40
    Giwayume opened #9401
  • Jan 31 2019 15:24
    yyx990803 closed #9396
  • Jan 31 2019 15:24

    yyx990803 on dev

    fix: fix child forceUpdate regr… (compare)

  • Jan 31 2019 15:08
    yyx990803 closed #9382
  • Jan 31 2019 15:08

    yyx990803 on dev

    fix: fix v-bind:style for camel… (compare)

  • Jan 31 2019 15:08
    yyx990803 closed #9386
  • Jan 31 2019 15:04

    yyx990803 on dev

    chore: update sponsors [ci skip… (compare)

  • Jan 31 2019 15:04

    yyx990803 on patreon-update-1548947041032

    (compare)

  • Jan 31 2019 15:04
    yyx990803 closed #9400
  • Jan 31 2019 15:04

    vue-bot on patreon-update-1548947041032

    chore: update sponsors [ci skip] (compare)

  • Jan 31 2019 15:04
    vue-bot opened #9400
  • Jan 31 2019 14:59

    yyx990803 on patreon-update-1548924868622

    (compare)

  • Jan 31 2019 14:58
    yyx990803 closed #9393
  • Jan 31 2019 14:56

    yyx990803 on dev

    fix: allow more enumerated valu… (compare)

Marcello
@marcebdev
@matrixbot appreciate it, gotcha so essentially the call another action for handling the ticketer inside the mutation? The action will then call a mutation to update the ticker and so then actions can return values?
matrixbot
@matrixbot
PublicByte Why so complex (and impossible as you can't call an action inside a mutation)? You can call the mutation, decrement the value by 1 and return the decremented value (although that means the ticket state is always one step ahead of the actual value).
PublicByte * Why so complex (and impossible as you can't call an action inside a mutation)? You can call the mutation, decrement the value by 1 and return the decremented value in one action (although that means the ticket state is always one step ahead of the actual value).
PublicByte I think the best course of action is to create a new action which returns the current state of the ticket as well as incrementing it using a mutation. You can't use a getter if you absolutely *must increment the ticket value. Otherwise, creating a getter getTicket and an action incrementTicket (which calls the INCREMENT_TICKET or SET_TICKET mutation) should be more appropriate.
PublicByte * Why so complex (and "impossible" as you can't call an action inside a mutation)? You can call the mutation, decrement the value by 1 and return the decremented value in one action (although that means the ticket state is always one step ahead of the actual value).
Marcello
@marcebdev

Well I guess that’s what I’m trying to figure out a ticketer is a classic example of something you’d want a helper for since you always want to increment the value after you use the current one. This prevents having to jam one-liners in or forgetting and makes the code cleaner.

I guess a mutation would work (having it start 1 value ahead is fine) but I’m not sure I'm understanding what you mean. I thought at first you reccomended creating a new action for the ticker? Maybe it’s better if I provide an example

export const mutations = {
  addItem(state) {
    State.items.push(
      { ticket: state.ticket, props: ...  }
    );
    state.ticket += 1;
  }
};

What I’d like to do as an example

newTicket() {
  state.ticket += 1;
  return state.ticket - 1;
}

export const mutations = {
  addItem(state) {
    State.items.push(
      { ticket: newTicket(), props: ...  }
    );
  }
};
matrixbot
@matrixbot
PublicByte ts export const actions = { getTicket({ state, commit }) { commit("INCREMENT_TICKET"); // or commit("SET_TICKET", state.ticket); return --state.ticket; }, };
PublicByte * ts export const actions = { getTicket({ state, commit }) { commit("INCREMENT_TICKET"); // or commit("SET_TICKET", state.ticket++); return --state.ticket; }, };
Marcello
@marcebdev
check my example since you mention actions can’t be called from methods I don’t think this would work… My example explains what I mean by helper and why you’d wan’t one as It’s dirty an less reliable to try to inline a function for it everytime for instance inside an object as per my example
Muaadh Almrham
@MuaathAlhaddad

Hi There

I have a vuejs bug, can I ask here?

BTW I am new, I don't know the rules here
matrixbot
@matrixbot

Der Goupil Hi Muaadh,
I guess https://github.com/vuejs/vue/issues is more suited for bugs.
Here you can ask about how to do complex or unusual things with Vue.

disclaimer : I'm new too so I might be wrong

Muaadh Almrham
@MuaathAlhaddad
Alright
Thanks Mr. Matrixbot
didididiboom
@didididiboom
Seniors, who has a better ts+vue open source project? Recently, the company let us start learning to use ts. The basics have been learned, but I want to see how ts are used in the project. Searched on Baidu and github and found that resources are scarce. Which gangster resource I hope to share, thanks!
nasreddine skandrani
@nasreddineskandrani
(^^)/
prog20901
@prog20901
How to create an HTML file which works locally without internet to image to text ? Ex: https://omed.hplar.ch/webocr/ and https://golb.hplar.ch/2019/07/ocr-with-tesseractjs.html
Jeric Santos
@gssjericsantos
Hello Guys.
Im running a Vue.js app with Google maps in a docker container. But it is giving me an error that my key is invalid when it is inside the container.
I Just Want To Ask If Someone Encountered The Same Issue As Mine.
Hareem-E-Sahar
@Hareem-E-Sahar
Hi everyone, Can anyone share their perspective on why project issues are discussed here in Gitter instead of under the comments section of the issue report in the GitHub issue tracker?
robinwatson
@Robinhoeh

Hey @crswll im looking into disabling <transition-group> from our e2e -

In what file do you set this?

```if (process.env.NODE_ENV === 'testing') {
const div = {
functional: true,
render: (h, { data, children }) => h('div', data, children),
}

Vue.component('transition', div)
Vue.component('transition-group', div)
}```

is it in vue.config.js
?
crazybit
@crazybit_gitlab
I'm migrating a component from a Vue cli app into a Symfony app using Vue that uses webpack. When compiling the Vue app, this new component gives a compile error. It looks like it's not recognizing return <div>hi</div> as correct syntax. In the Vue cli app it compiles no problem. What am I missing? Some webpack settings? Error is Syntax Error: Unexpected token and goes away if I replace the line with return ""
crazybit
@crazybit_gitlab
FIXED: Vue.js installed via vue cli has built-in JSX support, which I thought was standard. Well, not if you install Vue via the Symfony recommended way. JSX is not supported and must be enabled (and a few npm packages installed). Holy shit that took way longer to figure out than I expected. I did not even think Vue could lack JSX support, but there's that. Phew!
Om Prakash
@prakash32596
hi
how to call http call using onrequest method in firebase cloudfunctions
Simon
@SimonFricker

Hey! New to Vue but I'm really enjoying it.

I have a question. I'm using bootstrap-vue, specifically the b-tab component to create a dashboard.

I want to limit the number of API requests made to the server to only the data in the current active tab. I'm not sure how to achieve this. Any ideas?

MaxLAB
@Max-LAB

Hi all I have a problem with router on my app. Actually it works fine but I receive warning and error in console
Warning
vue-router.esm.js?8c4f:16 [vue-router] uncaught error during route navigation:
Error
Error: Navigation aborted from "/" to "/users" via a navigation guard.

Does anyone have a clue what it could be. What am I doing is

{
            path: '/users',
            component: Users,
            meta: { requiresAuth: true },
            beforeEnter: (to, from, next) => {
                if (!store.getters.isPremium) {
                    next();
                } else {
                    next(false);
                }
            }
        }
Rob
@borriej

hi guys :wave:

I've created a scrum agile retrospective app for your team!

https://retros.work

hope this can help your team during the corona. It support remote sessions with socket.

2 replies
Matt Benson
@mbenson
hello all, [I think] I have adopted the advice of several online articles regarding code splitting in a Vue.js SPA. I am using vue-router and several of my components seem to be great candidates for lazy loading. I have converted some of these to e.g. () => import('./FooComponent'). I have additionally confirmed that my .babelrc includes the plugin entry @babel/syntax-dynamic-import and adopted (in my webpack.config.js) the splitChunks change from vuejs/vue-cli@4db901c but when I build, my components are still not splitting off new js files. Any ideas?
thinhmascot
@thinhmascot
could you tell me to implement the best way of a dynamic component with data?
matrixbot
@matrixbot

kwozniak > <@gitter_pauranik51:matrix.org> Can anybody help me here -https://stackoverflow.com/questions/62606204/why-scss-classes-is-not-applied-compiled-in-nuxt-when-pushed-to-production-aws

Maybe you should use purgecss as nuxt module?

kwozniak > <@gitter_pauranik51:matrix.org> Can anybody help me here -https://stackoverflow.com/questions/62606204/why-scss-classes-is-not-applied-compiled-in-nuxt-when-pushed-to-production-aws
Diego Alvarez S.
@dialvarezs_gitlab
does anybody have a biolerplate or something like that to start with vue3 + router + vuex + ts?

I tried starting a project with vue-cli with this preset:

? Check the features needed for your project: Babel, TS, Router, Vuex, CSS Pre-processors, Linter
? Use class-style component syntax? No
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? Yes
? Use history mode for router? (Requires proper server setup for index fallback in production) Yes
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS (with dart-sass)
? Pick a linter / formatter config: Prettier
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files

And then added vue-cli-plugin-vue-next

But I'm getting these errors on build:
ERROR in /home/dialvarezs/_tests/vue-next/src/router/index.ts(1,10):
1:10 Module '"../../node_modules/vue-router/dist/vue-router"' has no exported member 'RouteConfig'.
  > 1 | import { RouteConfig, createRouter, createWebHistory } from "vue-router";
      |          ^
    2 | import Home from "../views/Home.vue";
    3 | 
    4 | const routes: Array<RouteConfig> = [

 error  in /home/dialvarezs/_tests/vue-next/src/shims-tsx.d.ts

ERROR in /home/dialvarezs/_tests/vue-next/src/shims-tsx.d.ts(8,36):
8:36 Cannot use namespace 'Vue' as a type.
     6 |     interface Element extends VNode {}
     7 |     // tslint:disable no-empty-interface
  >  8 |     interface ElementClass extends Vue {}
       |                                    ^
     9 |     interface IntrinsicElements {
    10 |       [elem: string]: any;
    11 |     }

 error  in /home/dialvarezs/_tests/vue-next/src/shims-tsx.d.ts

ERROR in /home/dialvarezs/_tests/vue-next/src/shims-tsx.d.ts(10,7):
10:7 Duplicate string index signature.
     8 |     interface ElementClass extends Vue {}
     9 |     interface IntrinsicElements {
  > 10 |       [elem: string]: any;
       |       ^
    11 |     }
    12 |   }
    13 | }

 error  in /home/dialvarezs/_tests/vue-next/src/store/index.ts

ERROR in /home/dialvarezs/_tests/vue-next/src/store/index.ts(3,21):
3:21 Property 'createStore' does not exist on type '{ Store: typeof Store; mapState: Mapper<Computed> & MapperWithNamespace<Computed> & MapperForState & MapperForStateWithNamespace; ... 4 more ...; createLogger: <S>(option?: LoggerOption<...> | undefined) => Plugin<...>; }'.
    1 | import Vuex from "vuex";
    2 | 
  > 3 | export default Vuex.createStore({
      |                     ^
    4 |   state: {},
    5 |   mutations: {},
    6 |   actions: {},

 ERROR  Build failed with errors.
gribchic
@gribchic
Hi .Does anybody use bootstrap-vue? I have a problem Accordion and collapse are not animated in my app. I try copy code from the example page everything works good but animation doesn't work version bootstrap-vue 2.15 (last stable)
Ali Akhtar
@AliAkhtar__twitter
I'm using websockets for all communication in my app - sending data from multiple views, need to always show a connected / disconnected indicator
What's the best way of doing this?
in vue
Please help me out.
Simon
@SimonFricker

I have been struggling with this issue for a day now. I want to make a copy of the store for user into userCopy so that it can be edited by the user without causing a mutation. My problem is that even though I am using the mounted hook, userCopy only returns an empty store state.

https://stackoverflow.com/questions/62672192/copy-of-store-not-updated-when-mounted-async-axios

Veck Hsiao
@fbukevin

Hi Guys, I want to ask a question about the contenteditable span:

<span v-bind:contenteditable="true" @change="changeValue">{{ myValue }}</span>

I found that whenever I input value to the contenteditable span, the method changeValue is not called.
Is that @change not supported to span? Or there is another reason it doesn't work?
Thanks!

prog20901
@prog20901
The HTML https://pastebin.com/z8q5cavm works fine without any issues. However it always plays serm.mp3 instead of the mp3 given in the href link in the datatable. How to pass the value to the model ?? How to pass the src via the datatable link ?? so that mp3 plays in the player. Currently it plays always the serm.mp3 which is hard-coded.
robertovaldesperez
@robertovaldesperez
hi everyone
any component similar to react virtualized to generate large tables?
James Wragg
@jameswragg
Can anyone point me to current best practice for bundling a vue library with rollup?
Or a good example of an existing library that uses rollup? I understand it has better tree-shaking (than webpack) and can also output es6 modules.