index.js 637 B

12345678910111213141516171819202122
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. var vue = require('vue');
  4. require('../../utils/index.js');
  5. var error = require('../../utils/error.js');
  6. const useDeprecated = ({ from, replacement, scope, version, ref, type = "API" }, condition) => {
  7. vue.watch(() => vue.unref(condition), (val) => {
  8. if (val) {
  9. error.debugWarn(scope, `[${type}] ${from} is about to be deprecated in version ${version}, please use ${replacement} instead.
  10. For more detail, please visit: ${ref}
  11. `);
  12. }
  13. }, {
  14. immediate: true
  15. });
  16. };
  17. exports.useDeprecated = useDeprecated;
  18. //# sourceMappingURL=index.js.map