uniapp动态样式对象配置[...styles] - 避坑指南

不知道为什么uniapp的要这么写才行,必须是数组解析。。

[...styles]">

props: {

    // 样式

    styles: {

      type: Object,

      default: () => {

        return { backgroundColor: "#f2f2f2" };

      },

    },

  },

参考文章:uniapp、vue中动态添加绑定style、class_uniapp :style_成长中...的博客-CSDN博客

你可能感兴趣的:(uni-app,前端,vue.js)