design.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. var followOfficialAccountHtml = '<div></div>';
  2. Vue.component("follow-official-account-sources", {
  3. template: followOfficialAccountHtml,
  4. data: function () {
  5. return {
  6. data: this.$parent.data,
  7. };
  8. },
  9. created: function () {
  10. if (!this.$parent.data.verify) this.$parent.data.verify = [];
  11. this.$parent.data.verify.push(this.verify);//加载验证方法
  12. this.$parent.data.ignore = ['pageBgColor','componentBgColor','textColor','marginTop','marginBottom','marginBoth'];//加载忽略内容 -- 其他设置中的属性设置
  13. this.$parent.data.ignoreLoad = true; // 等待忽略数组赋值后加载
  14. // $(".draggable-element .follow-official-account-wrap").css({
  15. // top: 86, // 55+20+11
  16. // });
  17. //
  18. // $(".draggable-element .follow-official-account-wrap .edit-attribute").css({
  19. // position: 'fixed',
  20. // right:15,
  21. // top: 55 // layui-header-right 的高度
  22. // })
  23. },
  24. methods: {
  25. verify: function (index) {
  26. var res = {code: true, message: ""};
  27. if (vue.data[index].welcomeMsg.length === 0) {
  28. res.code = false;
  29. res.message = "请输入欢迎语";
  30. }
  31. return res;
  32. },
  33. }
  34. });