load-font-face.js 514 B

1234567891011121314151617
  1. import { implJsapi } from './base';
  2. export var loadFontFace = implJsapi({
  3. alipay: function (instance, options) {
  4. return new Promise(function (resolve, reject) {
  5. instance.loadFontFace({
  6. family: options.family,
  7. source: options.source,
  8. success: function (res) {
  9. resolve(res);
  10. },
  11. fail: function (err) {
  12. reject(err);
  13. },
  14. });
  15. });
  16. },
  17. });