formui-vue2-vistastory 0.2.0 → 0.2.2

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.
@@ -70,9 +70,10 @@ export default {
70
70
  },
71
71
  methods: {
72
72
  submitFormObj (formObj) {
73
+ let that=this
73
74
  formObj.fuTableName = this.tableName
74
75
  if (this.simpleFormResp.method === 'POST') {
75
- httpUtil.httpPost(ENV.VITE_API_PREFIX + '/table/process_simple_table_form', formObj, (res) => {
76
+ httpUtil.httpPost(that,'/formui/table/process_simple_table_form', formObj, (res) => {
76
77
  if (res.status.code !== 1) {
77
78
  alert(res.status.msg) // 修改: ElMessage 改为 alert
78
79
  } else {
@@ -87,7 +88,7 @@ export default {
87
88
  } else if (this.simpleFormResp.method === 'GET') {
88
89
  console.log('暂不支持get')
89
90
  } else if (this.simpleFormResp.method === 'PUT') {
90
- httpUtil.httpPut(ENV.VITE_API_PREFIX + '/table/process_simple_table_form', formObj, (res) => {
91
+ httpUtil.httpPut(that, '/formui/table/process_simple_table_form', formObj, (res) => {
91
92
  if (res.status.code !== 1) {
92
93
  alert(res.status.msg) // 修改: ElMessage 改为 alert
93
94
  } else {
@@ -100,7 +101,7 @@ export default {
100
101
  alert('提交错误,需要调试.') // 修改: ElMessage 改为 alert
101
102
  })
102
103
  } else if (this.simpleFormResp.method === 'DELETE') {
103
- httpUtil.httpDelete(ENV.VITE_API_PREFIX + '/table/process_simple_table_form', formObj, (res) => {
104
+ httpUtil.httpDelete(that, '/formui/table/process_simple_table_form', formObj, (res) => {
104
105
  this.$emit('submitCallback', res)
105
106
  this.$emit('closeDialog')
106
107
  alert('删除完成.') // 修改: ElMessage 改为 alert
@@ -63,14 +63,15 @@ export default {
63
63
  },
64
64
  methods: {
65
65
  submitFormObj(formObj) {
66
+ let that=this
66
67
  formObj.fuTableName = this.tableName
67
68
  if (this.simpleFormResp.method === 'POST') {
68
- httpUtil.httpPost(ENV.VITE_API_PREFIX + '/table/process_simple_table_form', formObj, (res) => {
69
+ httpUtil.httpPost(that, '/formui/table/process_simple_table_form', formObj, (res) => {
69
70
  if (res.status.code !== 1) {
70
71
  alert(res.status.msg) // 修改: ElMessage 改为 alert
71
72
  } else {
72
- this.$emit('submitCallback', res)
73
- this.$emit('closeDialog')
73
+ that.$emit('submitCallback', res)
74
+ that.$emit('closeDialog')
74
75
  alert('提交完成.') // 修改: ElMessage 改为 alert
75
76
  }
76
77
  }, (err) => {
@@ -80,12 +81,12 @@ export default {
80
81
  } else if (this.simpleFormResp.method === 'GET') {
81
82
  console.log('暂不支持get')
82
83
  } else if (this.simpleFormResp.method === 'PUT') {
83
- httpUtil.httpPut(ENV.VITE_API_PREFIX + '/table/process_simple_table_form', formObj, (res) => {
84
+ httpUtil.httpPut(that, '/formui/table/process_simple_table_form', formObj, (res) => {
84
85
  if (res.status.code !== 1) {
85
86
  alert(res.status.msg) // 修改: ElMessage 改为 alert
86
87
  } else {
87
- this.$emit('submitCallback', res)
88
- this.$emit('closeDialog')
88
+ that.$emit('submitCallback', res)
89
+ that.$emit('closeDialog')
89
90
  alert('提交完成.') // 修改: ElMessage 改为 alert
90
91
  }
91
92
  }, (err) => {
@@ -93,9 +94,9 @@ export default {
93
94
  alert('提交错误,需要调试.') // 修改: ElMessage 改为 alert
94
95
  })
95
96
  } else if (this.simpleFormResp.method === 'DELETE') {
96
- httpUtil.httpDelete(ENV.VITE_API_PREFIX + '/table/process_simple_table_form', formObj, (res) => {
97
- this.$emit('submitCallback', res)
98
- this.$emit('closeDialog')
97
+ httpUtil.httpDelete(that, '/formui/table/process_simple_table_form', formObj, (res) => {
98
+ that.$emit('submitCallback', res)
99
+ that.$emit('closeDialog')
99
100
  alert('删除完成.') // 修改: ElMessage 改为 alert
100
101
  }, (err) => {
101
102
  console.error('err post' + err)
package/index.js CHANGED
@@ -5,7 +5,7 @@ import FormUiTableCell from './FormUiTableCell.vue'
5
5
  import FormUiSimpleForm from './FormUiSimpleForm.vue'
6
6
  import FormUiTable from './FormUiTable.vue'
7
7
  import FormUiSimpleTable from './FormUiSimpleTable.vue'
8
- import formuiConfig from './formuiConfig.vue'
8
+ import formuiConfig from './formuiConfig.js'
9
9
 
10
10
 
11
11
  export default {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formui-vue2-vistastory",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "formui-vue2-vistastory",
5
5
  "author": "vistastory <vistastory@126.com>",
6
6
  "private": false,