tianheng-ui 0.1.11 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/lib/theme-chalk/js/axios.js +3 -2
  2. package/lib/theme-chalk/js/util.js +23 -0
  3. package/lib/theme-chalk/styles/feature.scss +15 -0
  4. package/lib/tianheng-ui.js +13 -14
  5. package/package.json +1 -1
  6. package/packages/FormMaking/GenerateForm.vue +6 -1
  7. package/packages/FormMaking/GenerateFormItem.vue +9 -5
  8. package/packages/FormMaking/GenerateFormItemH5.vue +1 -1
  9. package/packages/FormMaking/WidgetConfig.vue +39 -51
  10. package/packages/FormMaking/WidgetForm.vue +9 -10
  11. package/packages/FormMaking/WidgetFormItem.vue +2 -2
  12. package/packages/FormMaking/WidgetSelect.vue +0 -1
  13. package/packages/FormMaking/WidgetTools.vue +539 -0
  14. package/packages/FormMaking/config/index.js +6 -0
  15. package/packages/FormMaking/custom/config.js +21 -24
  16. package/packages/FormMaking/custom/configs/button.vue +25 -25
  17. package/packages/FormMaking/custom/configs/cascader.vue +7 -7
  18. package/packages/FormMaking/custom/configs/checkbox.vue +23 -22
  19. package/packages/FormMaking/custom/configs/color.vue +3 -3
  20. package/packages/FormMaking/custom/configs/date.vue +3 -3
  21. package/packages/FormMaking/custom/configs/input.vue +3 -3
  22. package/packages/FormMaking/custom/configs/number.vue +3 -3
  23. package/packages/FormMaking/custom/configs/radio.vue +23 -19
  24. package/packages/FormMaking/custom/configs/rate.vue +3 -3
  25. package/packages/FormMaking/custom/configs/select.vue +25 -20
  26. package/packages/FormMaking/custom/configs/slider.vue +3 -3
  27. package/packages/FormMaking/custom/configs/switch.vue +3 -3
  28. package/packages/FormMaking/custom/configs/tabs.vue +12 -17
  29. package/packages/FormMaking/custom/configs/textarea.vue +3 -3
  30. package/packages/FormMaking/custom/configs/time.vue +3 -3
  31. package/packages/FormMaking/custom/configs/upload.vue +5 -5
  32. package/packages/FormMaking/custom/items/button.vue +35 -1
  33. package/packages/FormMaking/custom/items/checkbox.vue +1 -1
  34. package/packages/FormMaking/custom/items/date.vue +1 -0
  35. package/packages/FormMaking/custom/items/grid_dev.vue +3 -3
  36. package/packages/FormMaking/custom/items/tableH5_dev.vue +3 -3
  37. package/packages/FormMaking/custom/items/table_dev.vue +3 -3
  38. package/packages/FormMaking/custom/items/tabs_dev.vue +3 -3
  39. package/packages/FormMaking/custom/mixins/index.js +12 -12
  40. package/packages/FormMaking/index.vue +93 -469
  41. package/packages/FormMaking/styles/index.scss +1 -21
  42. package/packages/FormMaking/util/index.js +24 -0
  43. package/packages/FormMaking/util/request.js +9 -12
  44. package/packages/TableMaking/WidgetTools.vue +246 -0
  45. package/packages/TableMaking/custom/config.js +110 -0
  46. package/packages/TableMaking/generateTable.vue +2 -2
  47. package/packages/TableMaking/index.vue +62 -157
  48. package/packages/TableMaking/util/index.js +54 -1
  49. package/packages/TableMaking/widgetConfig.vue +261 -178
  50. package/packages/TableMaking/widgetTable.vue +16 -46
  51. package/packages/index.js +5 -4
@@ -33,13 +33,7 @@ export const configComponent = {
33
33
  };
34
34
 
35
35
  export const itemsComponent = {
36
- props: [
37
- "value",
38
- "widget",
39
- "widgetArray",
40
- "select",
41
- "config",
42
- ],
36
+ props: ["value", "widget", "widgetArray", "models", "select", "config"],
43
37
  data() {
44
38
  return {
45
39
  dataModel: this.value
@@ -59,13 +53,19 @@ export const itemsComponent = {
59
53
  methods: {
60
54
  handleEventAction(key) {
61
55
  const eventScript = this.config.eventScript;
62
- for (let i = 0; i < eventScript.length; i++) {
63
- const element = eventScript[i];
64
- if (element.key === key) {
65
- const func = `(item,value)=>{${element.func}}`;
66
- eval(func)(this.widget, this.widget.options.defaultValue);
56
+ if (key) {
57
+ for (let i = 0; i < eventScript.length; i++) {
58
+ const element = eventScript[i];
59
+ if (element.key === key) {
60
+ const func = `(item,value)=>{${element.func}}`;
61
+ eval(func)(this.widget, this.widget.options.defaultValue);
62
+ }
67
63
  }
68
64
  }
65
+ if (this.widget.type === "button") {
66
+ this.hendleRemoteData();
67
+ return;
68
+ }
69
69
  },
70
70
  display(keys) {
71
71
  console.log("请在 预览 模式下使用 display 方法");