SetJson.vue 4.0 KB

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <fm-making-form
  3. ref="makingform"
  4. style="height: 500px;"
  5. preview
  6. generate-code
  7. generate-json
  8. >
  9. <template slot="action">
  10. </template>
  11. </fm-making-form>
  12. </template>
  13. <script>
  14. export default {
  15. data () {
  16. return {
  17. }
  18. },
  19. mounted () {
  20. setTimeout(() => {
  21. this.$refs.makingform.setJSON({"list":[{"type":"input","icon":"icon-input","options":{"width":"100%","defaultValue":"","required":false,"requiredMessage":"","dataType":"","dataTypeCheck":false,"dataTypeMessage":"","pattern":"","patternCheck":false,"patternMessage":"","placeholder":"","customClass":"","disabled":false,"labelWidth":100,"isLabelWidth":false,"hidden":false,"dataBind":true,"showPassword":false,"remoteFunc":"func_1598495328900","remoteOption":"option_1598495328900"},"name":"单行文本","key":"1598495328900","model":"input_1598495328900","rules":[]},{"type":"textarea","icon":"icon-diy-com-textarea","options":{"width":"100%","defaultValue":"","required":false,"requiredMessage":"","disabled":false,"pattern":"","patternMessage":"","placeholder":"","customClass":"","labelWidth":100,"isLabelWidth":false,"hidden":false,"dataBind":true,"remoteFunc":"func_1598495329774","remoteOption":"option_1598495329774"},"name":"多行文本","key":"1598495329774","model":"textarea_1598495329774","rules":[]},{"type":"radio","icon":"icon-radio-active","options":{"inline":false,"defaultValue":"","showLabel":false,"options":[{"value":"Option 1","label":"Option 1"},{"value":"Option 2","label":"Option 2"},{"value":"Option 3","label":"Option 3"}],"required":false,"requiredMessage":"","width":"","remote":false,"remoteType":"option","remoteOption":"option_1598495330234","remoteOptions":[],"props":{"value":"value","label":"label"},"remoteFunc":"func_1598495330234","customClass":"","labelWidth":100,"isLabelWidth":false,"hidden":false,"dataBind":true,"disabled":false},"name":"单选框组","key":"1598495330234","model":"radio_1598495330234","rules":[]}],"config":{"labelWidth":100,"labelPosition":"right","size":"small","customClass":"","ui":"element","layout":"horizontal","labelCol":3,"width":"100%","hideLabel":false,"hideErrorMessage":false}})
  22. }, 200)
  23. // this.$nextTick(() => {
  24. // this.$refs.makingform.setJSON({"list":[{"type":"input","icon":"icon-input","options":{"width":"100%","defaultValue":"","required":false,"requiredMessage":"","dataType":"","dataTypeCheck":false,"dataTypeMessage":"","pattern":"","patternCheck":false,"patternMessage":"","placeholder":"","customClass":"","disabled":false,"labelWidth":100,"isLabelWidth":false,"hidden":false,"dataBind":true,"showPassword":false,"remoteFunc":"func_1598495328900","remoteOption":"option_1598495328900"},"name":"单行文本","key":"1598495328900","model":"input_1598495328900","rules":[]},{"type":"textarea","icon":"icon-diy-com-textarea","options":{"width":"100%","defaultValue":"","required":false,"requiredMessage":"","disabled":false,"pattern":"","patternMessage":"","placeholder":"","customClass":"","labelWidth":100,"isLabelWidth":false,"hidden":false,"dataBind":true,"remoteFunc":"func_1598495329774","remoteOption":"option_1598495329774"},"name":"多行文本","key":"1598495329774","model":"textarea_1598495329774","rules":[]},{"type":"radio","icon":"icon-radio-active","options":{"inline":false,"defaultValue":"","showLabel":false,"options":[{"value":"Option 1","label":"Option 1"},{"value":"Option 2","label":"Option 2"},{"value":"Option 3","label":"Option 3"}],"required":false,"requiredMessage":"","width":"","remote":false,"remoteType":"option","remoteOption":"option_1598495330234","remoteOptions":[],"props":{"value":"value","label":"label"},"remoteFunc":"func_1598495330234","customClass":"","labelWidth":100,"isLabelWidth":false,"hidden":false,"dataBind":true,"disabled":false},"name":"单选框组","key":"1598495330234","model":"radio_1598495330234","rules":[]}],"config":{"labelWidth":100,"labelPosition":"right","size":"small","customClass":"","ui":"element","layout":"horizontal","labelCol":3,"width":"100%","hideLabel":false,"hideErrorMessage":false}})
  25. // })
  26. },
  27. methods: {
  28. }
  29. }
  30. </script>