Skip to content

Commit

Permalink
fix: target type defalue value
Browse files Browse the repository at this point in the history
  • Loading branch information
forecho committed Dec 19, 2019
1 parent f864081 commit a557db3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function actions()
'class' => TargetSettingAction::class,
'modelClass' => 'app\models\SiteForm',
//'scenario' => 'site', // Change if you want to re-use the model for multiple setting form.
//'targetType' => 'company', // By default use 'user'
//'targetType' => 'company', // By default use ''
//'targetId' => 1, // By default use \Yii::$app->user->id
'viewName' => 'site-settings', // The form we need to render
'successMessage' => '保存成功'
Expand Down
4 changes: 2 additions & 2 deletions src/TargetSettingAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class TargetSettingAction extends Action
public $viewName = 'target-setting';

/**
* @var string target id. Default is user
* @var string target type.
*/
public $targetType = 'user';
public $targetType = '';

/**
* @var int target id. Default Yii::$app->user->id
Expand Down

0 comments on commit a557db3

Please sign in to comment.