2019年6月27日 星期四

ui-select 複選架構設定 title 於整個按鈕

無法直接於 ui-select-match 中取得 $item 物件,必須透過下一層來設定,若只在下一層設定 title,滑鼠必須停在文字上才會顯示

<ui-select-match><span ui-select-match-title="{{$item.text}}">...</span></ui-select-match>

.directive('uiSelectMatchTitle', function () {
        return {
            link: function ($scope, $element, attrs) {
                $($element).parent().parent().attr('title', attrs.uiSelectMatchTitle);
            }
        }
    })

沒有留言:

自訂權限驗證機制

// 使用 filter [Route("api/[controller]")] [ApiController] [Authorize] [TypeFilter(typeof(CustomAsyncAuthorizationFilter))] public c...