@web-utils/component 2.40.0 → 2.50.0

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.
@@ -5899,44 +5899,44 @@ const Ya = {
5899
5899
  let { props: d } = this.data;
5900
5900
  d || (d = { label: "label", value: "value" });
5901
5901
  const { value: f } = d, te = `(res, cb) => {
5902
- let { page, value, data } = res
5903
- if (!page) page = { currentPage: 1, pageSize: 10 }
5904
- const { currentPage, pageSize } = page
5905
- let params = { ...data, ${i || "current"}: currentPage, ${s || "page"}: pageSize }
5902
+ let { page, value, data } = res
5903
+ if (!page) page = { currentPage: 1, pageSize: 10 }
5904
+ const { currentPage, pageSize } = page
5905
+ let params = { ...data, ${i || "current"}: currentPage, ${s || "page"}: pageSize }
5906
5906
 
5907
- if (value) params['${f}'] = value
5907
+ if (value) params['${f}'] = value
5908
5908
 
5909
- if ('${t || "get"}' == 'get') params = { params: { ...params } }
5909
+ if ('${t || "get"}' == 'get') params = { params: { ...params } }
5910
5910
 
5911
- this.$axios['${t}']('${l}', params).then(res => {
5912
- const response = this.getAsVal(res, '${n || "data.data"}')
5913
- if (!response) this.$message.error('未查询到数据或者返回层级配置错误')
5911
+ this.$axios['${t}']('${l}', params).then(res => {
5912
+ const response = this.getAsVal(res, '${n || "data.data"}')
5913
+ if (!response) this.$message.error('未查询到数据或者返回层级配置错误')
5914
5914
 
5915
- let result = {}
5916
- if (${a}) {
5917
- const total = this.getAsVal(response, '${o || "total"}')
5918
- if (total || total == 0) {
5919
- result.total = total
5920
- } else {
5921
- this.$message.error('总条数配置错误')
5922
- return
5923
- }
5924
- const records = this.getAsVal(response, '${r || "records"}')
5925
- if (records) {
5926
- result.data = records
5927
- } else {
5928
- this.$message.error('列表配置错误')
5929
- return
5930
- }
5931
- } else result = { total: response.length, data: response }
5915
+ let result = {}
5916
+ if (${a}) {
5917
+ const total = this.getAsVal(response, '${o || "total"}')
5918
+ if (total || total == 0) {
5919
+ result.total = total
5920
+ } else {
5921
+ this.$message.error('总条数配置错误')
5922
+ return
5923
+ }
5924
+ const records = this.getAsVal(response, '${r || "records"}')
5925
+ if (records) {
5926
+ result.data = records
5927
+ } else {
5928
+ this.$message.error('列表配置错误')
5929
+ return
5930
+ }
5931
+ } else result = { total: response.length, data: response }
5932
5932
 
5933
- if (value) {
5934
- const records = result.data
5935
- if (records && records.length > 0) cb(records[0])
5936
- else this.$message.error('根据${f}: ' + value + ' 查询不到结果')
5937
- } else cb(result)
5938
- })
5939
- }`;
5933
+ if (value) {
5934
+ const records = result.data
5935
+ if (records && records.length > 0) cb(records[0])
5936
+ else this.$message.error('根据${f}: ' + value + ' 查询不到结果')
5937
+ } else cb(result)
5938
+ })
5939
+ }`;
5940
5940
  this.onLoad = te;
5941
5941
  }
5942
5942
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
3
  "description": "Web Components",
4
- "version": "2.40.0",
4
+ "version": "2.50.0",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "@web-utils/component",
5
- "version": "2.40.0",
5
+ "version": "2.50.0",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",