when components are introduced in different places, the sizes of components are different, and all other styles are the same. Could you tell me how to use scss? at this time?
when components are introduced in different places, the sizes of components are different, and all other styles are the same. Could you tell me how to use scss? at this time?
you can use
in the component<Item :style="style"></Item>
props:['newStyle']
data(){
return {
style:{
....
}
},
created() {
this.style = Object. assign({},this.newStyle,this.style)
}
}
define style bindings when writing components
example: class= "xxx==1?bigClass:smallClass" component
introduce the value of determining xxx to determine the style
the problem with values is that component communication is not detailed
provides ideas: receive: size, in the component and transfer the size in the parent component;
Why not props to do it? It feels best to pass props to different styles
props to accept style parameters. Super highly customizable
iview button components you can refer to
`classes () {
return [
`${prefixCls}`,
{
[`${prefixCls}-${this.type}`]: !!this.type,
[`${prefixCls}-long`]: this.long,
[`${prefixCls}-${this.shape}`]: !!this.shape,
[`${prefixCls}-${this.size}`]: !!this.size,
[`${prefixCls}-loading`]: this.loading != null && this.loading,
[`${prefixCls}-icon-only`]: !this.showSlot && (!!this.icon || this.loading)
}
]; `
Previous: Add up the data from php curl?
Next: Does session.run ([op1,op2]) in tensorflow have priority when assigning cpu or gpu?
< H2 > previously on < H2 > there is a difference in color between the design style and the vant style so you need to redefine the default style of vant < H2 > current practice < H2 > File directory structure var.css(,vantcopy,) base.css ...
different css files need to be referenced dynamically according to the data returned in the background. Considering that import cannot use variables, it is effective to use require, , but it is not very good , . how should I write it? ...
set style <style lang="scss" scoped> * { margin: 0; padding: 0; box-sizing: border-box; } < style> found that it is only valid for some elements. all valid after being changed to deep .editor deep { * { ...
Note: is visual studio not visual studio code my project can run normally Line 42 in figure, I want vs to support the scss syntax inside the .vue file. What settings do I need to do? Thank you all ...