widgetMobile.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <div class="Grid" :style="stylePrefence">
  3. </div>
  4. </template>
  5. <script>
  6. export default {
  7. name: "widget",
  8. components: {},
  9. props: {
  10. value: Object,
  11. ispreview: Boolean
  12. },
  13. data() {
  14. return {
  15. options: {},
  16. dataList: [],
  17. };
  18. },
  19. computed: {
  20. transStyle() {
  21. return this.objToOne(this.options);
  22. },
  23. stylePrefence() {
  24. return {
  25. width: this.transStyle.width + "px",
  26. height: this.transStyle.height + "px",
  27. left: this.transStyle.left + "px",
  28. top: this.transStyle.top + "px",
  29. right: this.transStyle.right + "px",
  30. 'background-color': this.transStyle.background_color,
  31. // linkAdress: this.transStyle.background_color,
  32. // jumpMode: this.transStyle.jumpMode = = "other" ? "_blank" : "_self"
  33. };
  34. }
  35. },
  36. watch: {
  37. value: {
  38. handler(val) {
  39. this.options = val;
  40. },
  41. deep: true
  42. }
  43. },
  44. mounted() {
  45. this.options = this.value;
  46. // for (var i = 0; i < 5; i++) {
  47. // this.dataList.push({
  48. // index: i,
  49. // });
  50. // }
  51. },
  52. methods: { }
  53. };
  54. </script>
  55. <style lang="scss" scoped>
  56. .Grid {
  57. // display: flex;
  58. // flex-wrap: wrap;
  59. width: 100%;
  60. height: 100%;
  61. overflow: hidden;
  62. background-color: #fff;
  63. padding: 10rpx 0;
  64. }
  65. </style>