App.vue 587 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <div id="app" :dir="dir">
  3. <keep-alive>
  4. <router-view v-if="$route.meta.keepAlive" />
  5. </keep-alive>
  6. <router-view v-if="!$route.meta.keepAlive" />
  7. </div>
  8. </template>
  9. <script>
  10. export default {
  11. name: "App",
  12. data() {
  13. return {
  14. dir: "ltr",
  15. };
  16. },
  17. created() {
  18. let lang_type = localStorage.getItem("language_type");
  19. if (lang_type == "AR") {
  20. this.dir = "rtl";
  21. }
  22. },
  23. };
  24. </script>
  25. </script>
  26. <style>
  27. * {
  28. margin: 0;
  29. padding: 0;
  30. }
  31. html,
  32. body {
  33. width: 100%;
  34. height: 100%;
  35. }
  36. #app {
  37. width: 100%;
  38. height: 100%;
  39. }
  40. </style>