Posts tagged with “vue.js”

Vue.js Event modifier: .stop .prevent .passive .once .self .capture explanation

Two articles explain well this subject. One is in Chinese, the other is in English.

Tips collection

  • Buefy is a lightweight UI components library for Vue.js based on Bulma
  • @keyup.enter="eventHandler" doesn't work in el-input, but @keyup.enter.native="eventHandler" does. #element-ui
  • git rm -rf . && git clean -fxd is the best way to delete all files except .git directory. #git
  • To make your dynamic LINQ query safe, you must use placeholders for all user input. Never concatenate your string! #dotnetcore
  • try_files $uri $uir/ =404; is better than try_files $uri $uri/ /index.html;, because it can avoid endless loop when /index.html doesn't exist. #nginx
  • git tag -n99 show tags along with annotations Reference
  • new crontab task added
0 6 * * * /bin/docker container prune -f 
10 6 * * * /bin/docker rmi $(/bin/docker images -f "dangling=true" -q)

Two silly moments when I develop using Vue.js

  1. Bound object changes but the UI didn't change. Solution:

Template part,

<el-select v-model="form.categoryIdList" multiple @change="setValue(form.categoryIdList)">

Component part,

    setValue(object) {
      this.$set(this.form, this.form.categoryIdList, object)
    },
  1. VUE_APP_CUSTOM_VARIBLE doesn't work, solution:
Restart your dev server.