@tongfun/tf-widget 0.1.16 → 0.1.21

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 (42) hide show
  1. package/.browserslistrc +3 -3
  2. package/.editorconfig +5 -5
  3. package/.eslintrc.js +17 -17
  4. package/README.md +10 -0
  5. package/lib/css/1.841c5d60.css +1 -0
  6. package/lib/tf-widget.common.1.js +10 -18
  7. package/lib/tf-widget.common.js +2574 -5632
  8. package/lib/tf-widget.css +1 -1
  9. package/lib/tf-widget.umd.1.js +10 -18
  10. package/lib/tf-widget.umd.js +2574 -5632
  11. package/lib/tf-widget.umd.min.1.js +1 -1
  12. package/lib/tf-widget.umd.min.js +4 -13
  13. package/package/t-data-list/main.vue +11 -10
  14. package/package/t-data-list/src/js/operatorEnum.js +6 -7
  15. package/package/t-data-list/src/mixins/button-controll-mixin.js +21 -5
  16. package/package/t-data-list/src/t-list-search.vue +5 -1
  17. package/package/t-data-list/src/t-plan/index.vue +16 -11
  18. package/package/t-data-list/src/t-plan/plan-content.vue +10 -17
  19. package/package/t-data-list/src/t-table/index.vue +11 -2
  20. package/package/t-data-list/src/t-table/table-group.vue +7 -6
  21. package/package/t-data-list/src/t-table/table-records-header-popover.vue +0 -4
  22. package/package/t-data-list/src/t-table/table-records.vue +31 -18
  23. package/package/t-input/children/basic.vue +2 -0
  24. package/package/t-input/children/group-components/group-dialog.vue +1 -7
  25. package/package/t-input/children/group.vue +1 -1
  26. package/package/tf-layout/src/components/tf-labelbar.vue +15 -3
  27. package/package/tf-layout/src/tf-layout.vue +27 -7
  28. package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +10 -5
  29. package/package.json +3 -2
  30. package/postinstall.js +10 -10
  31. package/src/api/tableV3.js +0 -26
  32. package/src/directives/debounce.js +24 -0
  33. package/src/mixins/t-data-query-mixin.js +8 -7
  34. package/dist/css/chunk-9c7a8e06.920744ef.css +0 -1
  35. package/dist/css/chunk-vendors.de967301.css +0 -1
  36. package/dist/css/index.153bd82e.css +0 -1
  37. package/dist/fonts/element-icons.535877f5.woff +0 -0
  38. package/dist/fonts/element-icons.732389de.ttf +0 -0
  39. package/dist/js/chunk-9c7a8e06.ffff58b5.js +0 -1
  40. package/dist/js/chunk-vendors.45086d09.js +0 -39
  41. package/dist/js/index.52bcef0d.js +0 -1
  42. package/lib/css/1.920744ef.css +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tongfun/tf-widget",
3
- "version": "0.1.16",
3
+ "version": "0.1.21",
4
4
  "description": "tf-widget",
5
5
  "main": "lib/tf-widget.umd.js",
6
6
  "private": false,
@@ -11,7 +11,8 @@
11
11
  "build": "vue-cli-service build",
12
12
  "lint": "vue-cli-service lint",
13
13
  "lib": "vue-cli-service build --target lib --name tf-widget --dest lib src/index.js",
14
- "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
14
+ "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\"",
15
+ "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch package -C -e js,vue,less --debug -x \"npm run lib && yalc push\" "
15
16
  },
16
17
  "dependencies": {
17
18
  "axios": "^0.21.1",
package/postinstall.js CHANGED
@@ -1,10 +1,10 @@
1
-
2
- const BANNER = '\u001B[96mThank you for using tf-widget for polyfilling JavaScript standard library!\u001B[0m\n\n' +
3
- '\u001B[96mWe need the best of you! Come and join us\n\n' +
4
- '\u001B[96mWe are waiting for you\n'
5
-
6
- function showBanner () {
7
- console.log(BANNER)
8
- }
9
-
10
- showBanner()
1
+
2
+ const BANNER = '\u001B[96mThank you for using tf-widget for polyfilling JavaScript standard library!\u001B[0m\n\n' +
3
+ '\u001B[96mWe need the best of you! Come and join us\n\n' +
4
+ '\u001B[96mWe are waiting for you\n'
5
+
6
+ function showBanner () {
7
+ console.log(BANNER)
8
+ }
9
+
10
+ showBanner()
@@ -23,26 +23,6 @@ export function getTableSum (target, data) {
23
23
  })
24
24
  }
25
25
 
26
- // 提交
27
- export function submit (ids) {
28
-
29
- }
30
-
31
- // 撤销
32
- export function unSubmit (ids) {
33
-
34
- }
35
-
36
- // 审批
37
- export function audit (ids) {
38
-
39
- }
40
-
41
- // 反审核
42
- export function unAudit (ids) {
43
-
44
- }
45
-
46
26
  // 删除数据
47
27
  export function del ({ params, target }) {
48
28
  return request({
@@ -52,8 +32,6 @@ export function del ({ params, target }) {
52
32
  })
53
33
  }
54
34
 
55
- // todo:导入导出
56
-
57
35
  /**
58
36
  * 方案
59
37
  */
@@ -122,10 +100,6 @@ export function getTableLayout (target) {
122
100
  method: 'get'
123
101
  })
124
102
  }
125
- // 修改布局
126
- export function updateTalbeLayout (data) {
127
-
128
- }
129
103
 
130
104
  /**
131
105
  * 列表的分组查询
@@ -0,0 +1,24 @@
1
+ export default {
2
+ bind: function (el, { value }) {
3
+ const time = value || 2000
4
+ el._flag = true
5
+ el._timer = null
6
+ el.handler = (e) => {
7
+ if (!el._flag) {
8
+ // 无需执行时的操作
9
+ e.stopImmediatePropagation()
10
+ return
11
+ }
12
+ el._flag = false
13
+ el._timer = setTimeout(() => {
14
+ el._flag = true
15
+ clearTimeout(el._timer)
16
+ el._timer = null
17
+ }, time)
18
+ }
19
+ el.addEventListener('click', el.handler, true)
20
+ },
21
+ unbind: function (el, binding) {
22
+ el.removeEventListener('click', el.handler, true)
23
+ }
24
+ }
@@ -6,7 +6,7 @@ export default {
6
6
  /**
7
7
  * 通用过滤查询参数
8
8
  */
9
- // 搜索建议和右上角全局搜索的快速搜索条件(因为接口进行了复用)
9
+ // 被指定为搜索建议的查询的字段列表
10
10
  suggestFieldList: [],
11
11
  // 搜索建议的高级条件
12
12
  searchSuggestCondition: [],
@@ -96,7 +96,6 @@ export default {
96
96
  multiResult.forEach((item, index) => {
97
97
  item.sort = index
98
98
  })
99
-
100
99
  return multiResult
101
100
  },
102
101
  // 限定查询范围的条件
@@ -106,14 +105,14 @@ export default {
106
105
  }
107
106
  const result = []
108
107
  for (const key in this.limitation) {
109
- const fieldItem = this.tableLayout.find(v => v.filed === key)
108
+ const fieldItem = this.tableLayout.find(v => v.field === key)
110
109
  if (!fieldItem) continue
111
110
 
112
111
  let value = ''
113
112
  if (fieldItem.componentValueType === 'PARAM_BASIC') {
114
- value = this.limitation[key].name
113
+ value = this.limitation[key]?.name
115
114
  } else if (fieldItem.componentValueType === 'PARAM_ENUM') {
116
- value = this.limitation[key].id
115
+ value = this.limitation[key]?.id
117
116
  } else {
118
117
  value = this.limitation[key]
119
118
  }
@@ -175,7 +174,7 @@ export default {
175
174
  pageSize: 20
176
175
  }
177
176
 
178
- !this.disableSum && getSum && await this.getTableSum()
177
+ this.enableSum && getSum && await this.getTableSum()
179
178
  try {
180
179
  // 查询数据之前赋值高级过滤条件
181
180
  queryParams.conditionMultiList = this.multiCondition
@@ -188,12 +187,13 @@ export default {
188
187
  if (isSuggest) {
189
188
  return res.data.record
190
189
  }
191
- this.syncData.tableLoading = false
192
190
  this.tableData.total = Number(res.data.total)
193
191
  this.tableData.records = res.data.record
194
192
  } catch (err) {
195
193
  // 恢复成默认值
196
194
  this.syncData.tableSelectionClear = true
195
+ } finally {
196
+ this.syncData.tableLoading = false
197
197
  }
198
198
  },
199
199
  // 表格数据合计
@@ -268,6 +268,7 @@ export default {
268
268
  // 每页条数变化
269
269
  handleSizeChange (newSize) {
270
270
  this.query.pageSize = newSize
271
+ this.query.pageNum = 1
271
272
  this.getTableData(false, false)
272
273
  },
273
274
  // 翻页
@@ -1 +0,0 @@
1
- .el-popover .context-list .list-item[data-v-fcd31cd8]{display:flex;margin:1px 0;padding:2px 8px;justify-content:space-between}.el-popover .context-list .list-item[data-v-fcd31cd8]:hover{background-color:#e7ebfd}.el-popover .context-list .list-item-active[data-v-fcd31cd8]{color:#3b68fc;background-color:#e7ebfd}.el-popover .context-list[data-v-fcd31cd8] .el-input .el-input__inner{height:30px}.el-popover .context-list[data-v-fcd31cd8]:last-child{margin-top:4px;width:100%;display:flex;justify-content:space-between}.el-popover .header-input[data-v-fcd31cd8]{margin-top:5px}.el-popover .filter-icon[data-v-fcd31cd8]{outline:none;width:15px;height:15px;cursor:pointer}