Vuetify里的v-text-field的border颜色
简而言之,需要有outline
这个api,v-text-field
才会有border
,这显然的,然后呢,怎么,要想具体改变这个border
的颜色, 需要对这个class
进行调整:
简而言之,需要有outline
这个api,v-text-field
才会有border
,这显然的,然后呢,怎么,要想具体改变这个border
的颜色, 需要对这个class
进行调整:
原文:http://michaelnthiessen.com/force-re-render/
标题: The correct way to force Vue to re-render a componentThe best way to force Vue to re-render a component is to set a :key on the component. When you need the component to be re-rendered, you just change the value of the key and Vue will re-render the component.
- The horrible way: reloading the entire page
- The terrible way: using the v-if hack
- The better way: using Vue’s built-in forceUpdate method
- The best way: key-changing on your component
If you look at https://cli.vuejs.org/guide/cli-service.html it tells
you that after installing @vue/cli-service ( which may be part of the
standard CLI installation ) then vue-cli-service is available in npm
scripts, but that if you want to access it directly then you need to
use ./node_modules/.bin/vue-cli-service This worked for me, and I
guess you could add ./node_modules/.bin to your $PATH if you were so
inclined.
毕竟有时不总是需要有持久化的,比如登录,当然需要,但其他的时候,基本上都只是一个瞬时状态。
这个有误,需要更新,不是所有的都可以这样写
Vue显然是单例模式,所以任何地方new出来的,都是同样一个Vue实例,所以可以单独设置一个directory,叫做plugins,里面写上各种plugin。
例如:
// vee-validate.js
import Vue from 'vue';
import VeeValidate from 'vee-validate';
Vue.use(VeeValidate);
如果我们使用auth0
或者okta
等第三方提供的IDaas
,那么就要设置一下callback url。
通常,有一个参数是response_mode
,默认是query
,所以通常是忽略的,但如果你用vuejs,Reactjs或者Angular等构建的SPA,通常用到router
的hash
mode,那么这个时候就会导致报错,因为单纯的静态页面,url #
后面的部分会被忽略,我目前还没搞明白到底是被浏览器忽略,还是auth0的服务器,还是其他什么地方忽略掉了。总之就总是不能执行这个带#
的callback。(2018年11月23日更新:应该是auth0的服务器不认这个带#
的callback url)
如果实在想用这个#
,也可以的,但要配置一下:
https://developer.okta.com/docs/api/resources/oidc
我配置了,就是response_mode: 'fragment'
,然后不好使。我高度怀疑是需要一个server才能生效的。总之,只有history mode
才生效。
好,那就用history
模式呗。
但我的小app,