• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • CSSProperties

    用于增加样式属性绑定中的允许值。

    例子

    ts
    declare module 'vue' {
      interface CSSProperties {
        [key: `--${string}`]: string
      }
    }
    
    tsx
    <div style={ { '--bg-color': 'blue' } }>
    
    html
    <div :style="{ '--bg-color': 'blue' }">