【问题标题】:Set type description in typescript vuejs在 typescript vuejs 中设置类型描述
【发布时间】:2022-10-14 22:13:39
【问题描述】:

这会引发'description' does not exist in PropValidator

export default Vue.extend( {
  name: 'something',
  props: {
    'backgroundColor': {
      type: String,
      description: 'What background color to use'
     },

在故事书中得到这个

【问题讨论】:

    标签: typescript vue.js storybook


    【解决方案1】:

    答案是https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api#props

    export default Vue.extend( {
      name: 'something',
      props: {
         /**
         * 'What background color to use'
         */
        'backgroundColor': {
          type: String
         },
    

    必须是多行注释行内注释不起作用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-15
      • 2021-07-18
      • 2011-07-24
      • 1970-01-01
      • 2020-06-16
      • 1970-01-01
      相关资源
      最近更新 更多