Show google picker inside/over modal

前端 未结 4 1389
慢半拍i
慢半拍i 2021-02-06 05:00

Is there a way to show the google drive picker to be shown inside a custom modal or a div? I have a modal where there will be multiple providers user can choose e.g. google, dro

4条回答
  •  时光取名叫无心
    2021-02-06 05:20

    Actually you can manipulate the picker object after setting it to visible. If picker is the GooglePicker object, the A is the div for the dialog modal. You can set its z-index using JavaScript.

    var picker = new google.picker.PickerBuilder().
      addView(self.viewId).
      setOAuthToken(self.oauthToken).
      setDeveloperKey(self.developerKey).
      setCallback(self.pickerCallback).
      build();
    
      picker.setVisible(true);
    
      picker.A.style.zIndex = 2000;
    

提交回复
热议问题