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)

Zerka1982
@Zerka1982
jquery
and jqueryUI
robin
@RobinYang11
@Zerka1982 ok
it's ok now
$('#ac').autocomplete({
  source: function( request, response ) {

    var matches = $.map( acList, function(acItem) {
      if ( acItem.name.toUpperCase().indexOf(request.term.toUpperCase()) === 0 ) {
        return acItem.name;
      }
    });
    response(matches);
  }
});
image.png
Zerka1982
@Zerka1982
Thanks !
robin
@RobinYang11
you are welcome
Zerka1982
@Zerka1982
what about if each object has an Id and name. I wish I can assign the id to each element accordingly. The displayed results will show elements where each one has a name and own id attrbute
robin
@RobinYang11
 var acList = [{name:'smart',id:1},
{name:'oversmart',id:1}
// {name:'smartland'},
// {name:'undersmart'},
// {name:'verysmart'}
];
$('#ac').autocomplete({
  source: function( request, response ) {

    var matches = $.map( acList, function(acItem) {
      if ( acItem.name.toUpperCase().indexOf(request.term.toUpperCase()) === 0 ) {
        return acItem.name + acItem.id ;
      }
    });
    response(matches);
  }
});
like this ?
@Zerka1982
image.png
Zerka1982
@Zerka1982
Thanks dude!
robin
@RobinYang11
your are welcome
Aaron Gong
@ais-one

Hi everyone, in case you need to use Vue 3, Vite and Apollo Client (graphql)

https://dev.to/aisone/getting-vite-vue-3-and-apollo-client-3-running-51bp

robin
@RobinYang11
@ais-one hi there, how can i parse html string to a js object, how did vue parse template ? is there a lib or a package ?
Z
@sdrkyj
hi? I'm new here
robin
@RobinYang11
@sdrkyj welcome to china
Norman
@nkoehring
@RobinYang11 it is not that simple. Vue uses its template compiler to create VNodes: https://www.npmjs.com/package/vue-template-compiler
robin
@RobinYang11
@nkoehring thanks , there is a lib 'htmlparser2' ,i wonder if it similar to vue-template-compiler
Norman
@nkoehring
not at all
but you might be able to use it as a base for something like the vue template compiler
robin
@RobinYang11
@nkoehring do you know vue-template-compiler ' base
html-parser?
Norman
@nkoehring
Not out of my head but if you check the package info you'll find it
JingXiang
@feidao158
hello
Norman
@nkoehring
@feidao158 hi
Zerka1982
@Zerka1982
Hello guys, I am getting this Error: Cannot read property "addEventListener" of null
var search = document.getElementById("searchID");
var matchList = document.getElementById("searchBodyID");

// Search Data & Filter it
var dataResponse = <#dataset identifier="testQuery">;
console.table(dataResponse);

// Search Data & Filter it
function searchElement (query) {
  var result = dataResponse.filter(  word => {
    var regex = new RegExp(`^${query}`, 'gi'); 
    return word.name.match(regex);
    //return word.name.toLowerCase().startsWidth(query);
  });
  if(query.length === 0) {
      result = [];
      matchList.innerHTML = '';
    }
  outputHtml(result);


  // Show result in HTML
  function outputHtml  (result) {
    if(result.length > 0) {
      const html = result.map(match => `
        <div id="${match.id}" class="card card-body mb-4" onclick="runFunction('${match.id}', '${match.name}','${match.typename}')">
          <div class="resultNameCL">${match.name}</div>
          <span>${match.typename}</span>
          <span class="resultPerforanceCL" style="background:#${match.rangecolor}"></span>
        </div>
    `).join('');
    console.log(html);
    matchList.innerHTML = html;
  }
}

};


function runFunction (id, name, typename) { 
     console.table(id, name, typename);
}


search.addEventListener('input', (search) => searchElement(search.target.value));
Johannes Pichler
@joeherold
hey folks! anybody out there, who could help me with vuex-orm and isDirty?
Johannes Pichler
@joeherold

ok, I will post my question here anyhow, maybe somewone knows...
I use the vuex-orm with the plugin Vuex ORM IsDirty / IsNew plugin

In the plugins option, I desable exposeFlagsExternally

VuexORM.use(VuexORMisDirtyPlugin, {
    isNewFlagName: 'IsNew',
    isDirtyFlagName: 'IsDirty',
    exposeFlagsExternally: false // <--- this is set to false
});

Now my problem. $isDirty and $isNew is not in the store anymore.
When I update a value, the change of record.$isDirty is not reflected in the view.

I use Vue2 with @vue/composition-api

my Item is handled via computed in the setup()

...
setup(props, context) {

...
   return {
     item: computed(() => this.query().whereId(id).first())
   }
}
Jason Baker
@jtbaker
Can typescript typings be used for props in Vue3? I thought I’d seen that mentioned somewhere but can’t seem to find any docs.
Johannes Pichler
@joeherold
yes, they can
if you use reflect-metadata
just define your component as class with vue-property-decorator
belo404ka
@belo404ka
Hey. can anyone help me now?
just started studying vue
you need to do a check on the main page. If the sum of the two forms exceeds 100, you need an error message to appear
damienhollis
@damienhollis
@anlek I see that back in April you were looking into using Vue with JSONAPI. I have the same questions and I'm also looking at orbit. Did you come up with a good solution?
damienhollis
@damienhollis
Actually, I just say VuexORM above and it sounds like a nice solution - I see an old issue vuex-orm/vuex-orm#130 about JSONAPI. Has anyone used VuexORM with JSONAPI recently?
damienhollis
@damienhollis
There appears to be a plugin now https://github.com/scalient/vuex-orm-json-api
82amp
@82amp
I am trying to create a "distributed vue app", using UMDs. Is it possible to define sub-routing for the UMDs in the UMDs rather than having my shell-app knowing about all child routing?
Marco Amato
@linediconsine
Hi all, I would like to create a common.css that get injected in a <style scoped> space ( and keep the scope) how should I do it?
Zerka1982
@Zerka1982
Hello guys,
Something wrong in this code which does not allow me to type inside an input text area after the drop down list is displayed ....
// TESTING  FUNCTION Up & DOWN Keys

 function scrollUpandDown () {

   var listElm = document.getElementById("searchResultsID")

// Mark first list item
listElm.firstElementChild.focus()

// Event listener
window.addEventListener('keydown', onKeyDown)

// Event callback
function onKeyDown(e){
  e.preventDefault()

  var selectedElm = document.activeElement,
      goToStart,
      // map actions to event's key
      action = {Up:"previous", Down:"next"}

  selectedElm = selectedElm[action[e.key] + "ElementSibling"];

  // loop if top/bottom edges reached or "home"/"end" keys clicked
  if( !selectedElm || e.key == 'Home' || e.key == 'End' ){
    goToStart = action[e.key] == "next" || e.key == 'Home'
    selectedElm = listElm.children[goToStart ? 0 : listElm.children.length - 1]
  }

  selectedElm.focus()
}

}
Florian Krämer
@burzum
Can anyone recommend a datepicker that works with vue3 please? I've tried a few older ones but none worked. :(