2017-01-30 9 views
2
module.exports = { 
    extend: 'apostrophe-widgets', 
    label: 'Learn More', 
    instructions: 'Learn More Widgets', 
    addFields: [ 
     { 
      name: 'learnMore', 
      type: 'string', 
      label: 'Name for the Link', 
      required: false, 
     }, 

    ] 
}; 

どのようにデフォルト値を設定できますか?アポストロフィのデフォルト値

答えて

0

私はP'unk AvenueのApostropheの主任開発者です。

だけdefプロパティを使用します。

{ 
    name: 'learnMore', 
    type: 'string', 
    label: 'Name for the Link', 
    required: false, 
    def: 'Learn More' 
} 
+0

私はデフォルトの選択肢を選択するタイプのために選択された追加するにはどうすればよいですか? –

+1

それは同じです。デフォルトにしたい選択肢の 'value'にマッチする' def'を設定してください。 –

+0

アポストロフィCMSバージョン2.37.2では動作しないようです –