localized-sprite.js 560 B

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. Vue.component('localized-sprite', {
  3. template: `
  4. <cc-array-prop :target.sync="target.spriteFrameSet"></cc-array-prop>
  5. <ui-prop name="Update Scene">
  6. <ui-button
  7. class="green tiny"
  8. @confirm="refresh"
  9. >
  10. Refresh
  11. </ui-button>
  12. </ui-prop>
  13. `,
  14. props: {
  15. target: {
  16. twoWay: true,
  17. type: Object,
  18. },
  19. },
  20. methods: {
  21. refresh: function () {
  22. let i18n = window.require('LanguageData');
  23. i18n.updateSceneRenderers();
  24. }
  25. }
  26. });