Giter Site home page Giter Site logo

didactic-funicular's People

Contributors

rrandom avatar

Watchers

 avatar  avatar

didactic-funicular's Issues

Vuex, v-model and complex data

v-model 不能直接绑定 vuex store 中的对象,这样在严格模式中会报错。因此简单的解决办法是分别绑定value,监听回调事件去调用commit。像这样:表单处理 | Vuex

但是这个方法在store中的对象很复杂的时候会失效,比如 store 对象中有一个动态的嵌套数组,以表示可增减的多列表单。在这种情况下,放弃vuex, 利用 watch 深复制 props 也可行,但是这样并不是一个好办法。

其中一种办法是 利用 GitHub - maoberlehner/vuex-map-fields: Enable two-way data binding for form fields saved in a Vuex store 去双向绑定vuex store: How to Handle Multi-row Forms with Vue, Vuex and vuex-map-fields - Markus Oberlehner

该仓库的作者也提到其他一些解决这个问题的方向 现在罗列如下:

  1. Use local state.
  2. Provide/inject API — Vue.js
  3. Get specific data from API or Apollo
  4. Portals Should I Store This Data in Vuex? - Markus Oberlehner. flatten the data props tree.

最后,是一个流程图
should-i-store-this-data-in-vuex-flow-chart.png

私有gitlab配置ci踩坑

  1. gitlab runner 注册报错: x509: certificate signed by unknown authority, 需导入gitlab的cert文件: https://docs.gitlab.com/runner/configuration/tls-self-signed.html

  2. 若cert文件的域名是·假的·,则修改 gitlab runner 的hosts文件,使其能够正确注册

  3. 若在运行runner时,ip解析错误,或者报错: can't resolve host; host is unreacheable, 则修改 /etc/gitlab-runner/config.toml, 加入extra_hosts : https://docs.gitlab.com/runner/configuration/advanced-configuration.html

  4. 在3的情况下,若gitlab未注册在443端口,可能会报错 connect refused, 此时应该开启 gitlab服务器的443端口。

  5. 若 上传 artifacts 报错, config.toml 的 extra_hosts 未生效,则在 config.toml 加入 environment = ["GODEBUG=netdns=cgo"]: https://gitlab.com/gitlab-org/gitlab-runner/issues/1845

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.