doway-coms 1.1.100 → 1.2.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doway-coms",
3
- "version": "1.1.100",
3
+ "version": "1.2.1",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -2,9 +2,13 @@
2
2
  <div class="d-control-container">
3
3
  <div class="d-control-label">
4
4
  {{ label
5
- }}<span v-if="rules && rules['required']" class="d-control-label-required"
5
+ }}
6
+ <span v-if="rules && rules['required']" class="d-control-label-required"
6
7
  >*</span
7
8
  >
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
8
12
  </div>
9
13
  <div class="d-control">
10
14
  <ValidationProvider
@@ -33,11 +37,13 @@
33
37
  <script>
34
38
  import { Checkbox } from 'ant-design-vue'
35
39
  import { ValidationProvider } from 'vee-validate'
40
+ import { Tooltip } from 'ant-design-vue'
36
41
  export default {
37
42
  name: 'BaseCheckbox',
38
43
  components:{
39
- Checkbox,
40
- ValidationProvider
44
+ Checkbox,
45
+ ValidationProvider,
46
+ Tooltip,
41
47
  },
42
48
  data() {
43
49
  return {
@@ -101,6 +107,12 @@
101
107
  default: function() {
102
108
  return ''
103
109
  }
110
+ },
111
+ tooltip: {
112
+ type: String,
113
+ default: function() {
114
+ return ''
115
+ }
104
116
  }
105
117
  },
106
118
  created() {},
@@ -5,9 +5,13 @@
5
5
  :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
6
6
  >
7
7
  {{ label
8
- }}<span v-if="rules && rules['required']" class="d-control-label-required"
8
+ }}
9
+ <span v-if="rules && rules['required']" class="d-control-label-required"
9
10
  >*</span
10
11
  >
12
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
14
+ </Tooltip>
11
15
  </div>
12
16
  <div class="d-control">
13
17
  <ValidationProvider
@@ -40,11 +44,15 @@
40
44
  import { DatePicker } from 'ant-design-vue'
41
45
  import { ValidationProvider } from 'vee-validate'
42
46
  import moment from 'moment'
47
+ import { Tooltip } from 'ant-design-vue'
48
+
43
49
  export default {
44
50
  name: 'BaseDate',
45
51
  components:{
46
52
  DatePicker,
47
- ValidationProvider
53
+ ValidationProvider,
54
+ Tooltip,
55
+
48
56
  },
49
57
  data() {
50
58
  return {
@@ -121,6 +129,12 @@ import { DatePicker } from 'ant-design-vue'
121
129
  default: function() {
122
130
  return ''
123
131
  }
132
+ },
133
+ tooltip: {
134
+ type: String,
135
+ default: function() {
136
+ return ''
137
+ }
124
138
  }
125
139
  },
126
140
  created() {},
@@ -2,9 +2,13 @@
2
2
  <div class="d-control-container">
3
3
  <div class="d-control-label">
4
4
  {{ label
5
- }}<span v-if="rules && rules['required']" class="d-control-label-required"
5
+ }}
6
+ <span v-if="rules && rules['required']" class="d-control-label-required"
6
7
  >*</span
7
8
  >
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
8
12
  </div>
9
13
  <div class="d-control">
10
14
  <ValidationProvider
@@ -34,11 +38,13 @@
34
38
  import moment from 'moment'
35
39
  import { DatePicker } from 'ant-design-vue'
36
40
  import { ValidationProvider } from 'vee-validate'
41
+ import { Tooltip } from 'ant-design-vue'
37
42
  export default {
38
43
  name: 'BaseDateWeek',
39
44
  components:{
40
45
  WeekPicker:DatePicker.WeekPicker,
41
- ValidationProvider
46
+ ValidationProvider,
47
+ Tooltip,
42
48
  },
43
49
  data() {
44
50
  return {
@@ -103,6 +109,12 @@
103
109
  default: function() {
104
110
  return ''
105
111
  }
112
+ },
113
+ tooltip: {
114
+ type: String,
115
+ default: function() {
116
+ return ''
117
+ }
106
118
  }
107
119
  },
108
120
  created() {},
@@ -5,9 +5,13 @@
5
5
  :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
6
6
  >
7
7
  {{ label
8
- }}<span v-if="rules && rules['required']" class="d-control-label-required"
8
+ }}
9
+ <span v-if="rules && rules['required']" class="d-control-label-required"
9
10
  >*</span
10
11
  >
12
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
14
+ </Tooltip>
11
15
  </div>
12
16
  <div class="d-control">
13
17
  <ValidationProvider
@@ -40,11 +44,15 @@
40
44
  import { DatePicker } from 'ant-design-vue'
41
45
  import { ValidationProvider } from 'vee-validate'
42
46
  import moment from 'moment'
47
+ import { Tooltip } from 'ant-design-vue'
48
+
43
49
  export default {
44
50
  name: "BaseDatetime",
45
51
  components:{
46
52
  DatePicker,
47
- ValidationProvider
53
+ ValidationProvider,
54
+ Tooltip,
55
+
48
56
  },
49
57
  data() {
50
58
  return {
@@ -121,7 +129,13 @@ import moment from 'moment'
121
129
  default: function () {
122
130
  return "";
123
131
  }
132
+ },
133
+ tooltip: {
134
+ type: String,
135
+ default: function() {
136
+ return ''
124
137
  }
138
+ }
125
139
  },
126
140
  created() { },
127
141
  methods: {
@@ -14,6 +14,7 @@
14
14
  :label="col.title"
15
15
  v-model="row[col.field]"
16
16
  :edit="col.edit"
17
+ :tooltip="col.tooltip"
17
18
  :rules="col.rules"
18
19
  @change="
19
20
  () => {
@@ -50,6 +51,7 @@
50
51
  :label="col.title"
51
52
  v-model="row[col.field]"
52
53
  :edit="col.edit"
54
+ :tooltip="col.tooltip"
53
55
  :rules="col.rules"
54
56
  @change="
55
57
  () => {
@@ -68,6 +70,7 @@
68
70
  :edit="col.edit"
69
71
  :rules="col.rules"
70
72
  :min="col.min"
73
+ :tooltip="col.tooltip"
71
74
  :max="col.max"
72
75
  :precision="col.precision"
73
76
  @change="
@@ -90,6 +93,7 @@
90
93
  v-model="row[col.field]"
91
94
  :edit="col.edit"
92
95
  :rules="col.rules"
96
+ :tooltip="col.tooltip"
93
97
  :displayType="col.displayType"
94
98
  :valueType="col.valueType"
95
99
  @change="
@@ -107,6 +111,7 @@
107
111
  :label="col.title"
108
112
  v-model="row[col.field]"
109
113
  :edit="col.edit"
114
+ :tooltip="col.tooltip"
110
115
  :pastDate="col.pastDate"
111
116
  :rules="col.rules"
112
117
  />
@@ -119,6 +124,7 @@
119
124
  :label="col.title"
120
125
  v-model="row[col.field]"
121
126
  :pastDate="col.pastDate"
127
+ :tooltip="col.tooltip"
122
128
  :edit="col.edit"
123
129
  :rules="col.rules"
124
130
  />
@@ -131,6 +137,7 @@
131
137
  :label="col.title"
132
138
  v-model="row[col.field]"
133
139
  :edit="col.edit"
140
+ :tooltip="col.tooltip"
134
141
  :rules="col.rules"
135
142
  @change="
136
143
  rowInfo => {
@@ -145,6 +152,7 @@
145
152
  "
146
153
  :label="col.title"
147
154
  v-model="row[col.field]"
155
+ :tooltip="col.tooltip"
148
156
  :edit="col.edit"
149
157
  :rules="col.rules"
150
158
  />
@@ -156,6 +164,7 @@
156
164
  :label="col.title"
157
165
  v-model="row[col.field]"
158
166
  :edit="col.edit"
167
+ :tooltip="col.tooltip"
159
168
  :rules="col.rules"
160
169
  />
161
170
  <BaseSelect
@@ -167,6 +176,7 @@
167
176
  v-model="row[col.field]"
168
177
  :edit="col.edit"
169
178
  :rules="col.rules"
179
+ :tooltip="col.tooltip"
170
180
  :dataSource="col.dataSource"
171
181
  @change="
172
182
  rowInfo => {
@@ -182,6 +192,7 @@
182
192
  :label="col.title"
183
193
  v-model="row[col.field]"
184
194
  :edit="col.edit"
195
+ :tooltip="col.tooltip"
185
196
  :rules="col.rules"
186
197
  @change="
187
198
  rowInfo => {
@@ -201,6 +212,7 @@
201
212
  :defaultExpression="col.defaultExpression"
202
213
  :row="row"
203
214
  :api="col.api"
215
+ :tooltip="col.tooltip"
204
216
  :optBtns="col.optBtns"
205
217
  :popupAddName="col.popupAddName"
206
218
  :popupAddPath="col.popupAddPath"
@@ -64,6 +64,15 @@
64
64
  :show-footer="showFooter"
65
65
  @scroll="bodyScroll"
66
66
  >
67
+ <template v-for="item in internalColumns" #[item.field]>
68
+ <div :key="item.field">
69
+ <span v-if="item.visible !== false">{{item.title}}</span>
70
+ <Tooltip :title="item.tooltip" v-if="item.tooltip && item.visible !== false" style="margin: 0 2px">
71
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
72
+ </Tooltip>
73
+ <!-- {{item}}-->
74
+ </div>
75
+ </template>
67
76
  <template #toolbar_buttons>
68
77
  <!-- <div>-->
69
78
  <!-- <span v-for="loopFilterStr in filterStr" :key="loopFilterStr.field">-->
@@ -471,6 +480,7 @@ import { mapGetters } from "vuex";
471
480
  import XEUtils from "xe-utils";
472
481
  //VXETable插件
473
482
  import VXETable from "vxe-table";
483
+ import { Tooltip } from 'ant-design-vue'
474
484
  //ant的空状态展示占位图
475
485
  import {
476
486
  Empty,
@@ -508,6 +518,7 @@ export default {
508
518
  BasePagination,
509
519
  BasePulldown,
510
520
  BaseGridAdjust,
521
+ Tooltip,
511
522
  },
512
523
  data() {
513
524
  return {
@@ -817,6 +828,7 @@ export default {
817
828
  },
818
829
 
819
830
  created() {
831
+
820
832
  //拖动后输入框有错位问题,暂时不启用
821
833
  // this.initColumnDrop()
822
834
 
@@ -826,6 +838,12 @@ export default {
826
838
  // filterMethod:this.sysRowStateFilter,
827
839
  // filters:[{label:'筛选删除行',value:'delete',checked:true}]
828
840
  // })
841
+ for (let i = 0; i < this.columns.length; i++) {
842
+ this.internalColumns.push(this.initColumns(this.columns[i]));
843
+ if(this.columns[i].visible !== false && this.columns[i].controlType !== 'operation') {
844
+ this.internalColumns[i].slots.header = this.columns[i].field;
845
+ }
846
+ }
829
847
  if (this.showSeq) {
830
848
  this.internalColumns.push(
831
849
  // {
@@ -859,9 +877,8 @@ export default {
859
877
  },
860
878
  });
861
879
  }
862
- for (let i = 0; i < this.columns.length; i++) {
863
- this.internalColumns.push(this.initColumns(this.columns[i]));
864
- }
880
+
881
+ console.log(this.internalColumns)
865
882
  this.gridEdit = this.edit;
866
883
  },
867
884
 
@@ -1182,6 +1199,7 @@ export default {
1182
1199
  let colInfo = {
1183
1200
  field: originCol.field,
1184
1201
  title: originCol.title,
1202
+ tooltip: originCol.tooltip,
1185
1203
  visible: true,
1186
1204
  };
1187
1205
 
@@ -2,9 +2,13 @@
2
2
  <div class="d-control-container">
3
3
  <div class="d-control-label">
4
4
  {{ label
5
- }}<span v-if="rules && rules['required']" class="d-control-label-required"
5
+ }}
6
+ <span v-if="rules && rules['required']" class="d-control-label-required"
6
7
  >*
7
8
  </span>
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
8
12
  </div>
9
13
  <div class="d-control">
10
14
  <ValidationProvider
@@ -35,11 +39,14 @@
35
39
 
36
40
  import { Input } from 'ant-design-vue'
37
41
  import { ValidationProvider } from 'vee-validate'
42
+ import { Tooltip } from 'ant-design-vue'
38
43
  export default {
39
44
  name: 'BaseInput',
40
45
  components:{
41
46
  Input,
42
- ValidationProvider
47
+ ValidationProvider,
48
+ Tooltip,
49
+
43
50
  },
44
51
  data() {
45
52
  return {
@@ -103,6 +110,12 @@ export default {
103
110
  default: function() {
104
111
  return ''
105
112
  }
113
+ },
114
+ tooltip: {
115
+ type: String,
116
+ default: function() {
117
+ return ''
118
+ }
106
119
  }
107
120
  },
108
121
  created() {},
@@ -2,11 +2,15 @@
2
2
  <div class="d-control-container">
3
3
  <div class="d-control-label">
4
4
  {{ label
5
- }}<span
5
+ }}
6
+ <span
6
7
  v-if="rules && Object.getOwnPropertyNames(rules).length > 0"
7
8
  class="d-control-label-required"
8
9
  >*</span
9
10
  >
11
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
12
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
13
+ </Tooltip>
10
14
  </div>
11
15
  <div class="d-control" style="font-size:12px">
12
16
  <ValidationProvider
@@ -79,10 +83,14 @@
79
83
  import XEUtils from 'xe-utils'
80
84
  import moment from 'moment'
81
85
  import { ValidationProvider } from 'vee-validate'
86
+ import { Tooltip } from 'ant-design-vue'
87
+
82
88
  export default {
83
89
  name: 'BaseIntervalInput',
84
90
  components:{
85
- ValidationProvider
91
+ ValidationProvider,
92
+ Tooltip,
93
+
86
94
  },
87
95
  data() {
88
96
  return {
@@ -197,6 +205,12 @@ export default {
197
205
  default: function() {
198
206
  return ''
199
207
  }
208
+ },
209
+ tooltip: {
210
+ type: String,
211
+ default: function() {
212
+ return ''
213
+ }
200
214
  }
201
215
  },
202
216
  created() {},
@@ -6,11 +6,15 @@
6
6
  :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
7
7
  >
8
8
  {{ label
9
- }}<span
9
+ }}
10
+ <span
10
11
  v-if="rules && Object.getOwnPropertyNames(rules).length > 0"
11
12
  class="d-control-label-required"
12
13
  >*</span
13
14
  >
15
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
16
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
17
+ </Tooltip>
14
18
  </div>
15
19
  <div
16
20
  :class="{
@@ -48,11 +52,15 @@
48
52
  import XEUtils from 'xe-utils'
49
53
  import { InputNumber } from 'ant-design-vue'
50
54
  import { ValidationProvider } from 'vee-validate'
55
+ import { Tooltip } from 'ant-design-vue'
56
+
51
57
  export default {
52
58
  name: 'BaseNumberInput',
53
59
  components:{
54
60
  InputNumber,
55
- ValidationProvider
61
+ ValidationProvider,
62
+ Tooltip,
63
+
56
64
  },
57
65
  data() {
58
66
  return {
@@ -156,6 +164,12 @@
156
164
  default: function() {
157
165
  return ''
158
166
  }
167
+ },
168
+ tooltip: {
169
+ type: String,
170
+ default: function() {
171
+ return ''
172
+ }
159
173
  }
160
174
  },
161
175
  created() {},
@@ -6,9 +6,13 @@
6
6
  :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
7
7
  >
8
8
  {{ label
9
- }}<span v-if="rules && rules['required']" class="d-control-label-required"
9
+ }}
10
+ <span v-if="rules && rules['required']" class="d-control-label-required"
10
11
  >*</span
11
12
  >
13
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
14
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
15
+ </Tooltip>
12
16
  </div>
13
17
  <div
14
18
  :class="{
@@ -149,6 +153,7 @@
149
153
  import { Input,Button,Row,Col } from 'ant-design-vue'
150
154
  import { ValidationProvider } from 'vee-validate'
151
155
  import {Pulldown} from 'vxe-table'
156
+ import { Tooltip } from 'ant-design-vue'
152
157
  export default {
153
158
  name: 'BasePulldown',
154
159
  components:{
@@ -157,7 +162,9 @@
157
162
  'a-row':Row,
158
163
  'a-col':Col,
159
164
  'VxePulldown':Pulldown,
160
- ValidationProvider
165
+ ValidationProvider,
166
+ Tooltip,
167
+
161
168
  },
162
169
  data() {
163
170
  return {
@@ -309,6 +316,12 @@
309
316
  isLocalData: {
310
317
  type: Boolean,
311
318
  default: false
319
+ },
320
+ tooltip: {
321
+ type: String,
322
+ default: function() {
323
+ return ''
324
+ }
312
325
  }
313
326
  },
314
327
  watch: {},
@@ -5,9 +5,13 @@
5
5
  :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
6
6
  >
7
7
  {{ label
8
- }}<span v-if="rules && rules['required']" class="d-control-label-required"
8
+ }}
9
+ <span v-if="rules && rules['required']" class="d-control-label-required"
9
10
  >*</span
10
11
  >
12
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
14
+ </Tooltip>
11
15
  </div>
12
16
  <div class="d-control">
13
17
  <ValidationProvider
@@ -44,6 +48,7 @@
44
48
  import { Select } from 'ant-design-vue'
45
49
  import { ValidationProvider } from 'vee-validate'
46
50
  import { displaySelectCaption } from '../../utils/filters'
51
+ import { Tooltip } from 'ant-design-vue'
47
52
  export default {
48
53
  filters:{
49
54
  displaySelectCaption:displaySelectCaption
@@ -52,7 +57,9 @@
52
57
  components:{
53
58
  Select,
54
59
  SelectOption:Select.Option,
55
- ValidationProvider
60
+ ValidationProvider,
61
+ Tooltip,
62
+
56
63
  },
57
64
  data() {
58
65
  return {
@@ -124,6 +131,12 @@
124
131
  default: function() {
125
132
  return ''
126
133
  }
134
+ },
135
+ tooltip: {
136
+ type: String,
137
+ default: function() {
138
+ return ''
139
+ }
127
140
  }
128
141
  },
129
142
  created() {},
@@ -2,9 +2,13 @@
2
2
  <div class="d-control-container">
3
3
  <div class="d-control-label">
4
4
  {{ label
5
- }}<span v-if="rules && rules['required']" class="d-control-label-required"
5
+ }}
6
+ <span v-if="rules && rules['required']" class="d-control-label-required"
6
7
  >*</span
7
8
  >
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
8
12
  </div>
9
13
  <div class="d-control">
10
14
  <ValidationProvider
@@ -42,8 +46,10 @@
42
46
 
43
47
  <script>
44
48
  import { Select } from 'ant-design-vue'
45
- import { ValidationProvider } from 'vee-validate'
46
- import { displaySelectMultiCaption } from '../../utils/filters'
49
+ import { ValidationProvider } from 'vee-validate'
50
+ import { displaySelectMultiCaption } from '../../utils/filters'
51
+ import { Tooltip } from 'ant-design-vue'
52
+
47
53
  export default {
48
54
  name: 'BaseSelectMulti',
49
55
  filters:{
@@ -52,7 +58,9 @@ export default {
52
58
  components:{
53
59
  Select,
54
60
  SelectOption:Select.Option,
55
- ValidationProvider
61
+ ValidationProvider,
62
+ Tooltip,
63
+
56
64
  },
57
65
  data() {
58
66
  return {
@@ -118,6 +126,12 @@ export default {
118
126
  default: function() {
119
127
  return ''
120
128
  }
129
+ },
130
+ tooltip: {
131
+ type: String,
132
+ default: function() {
133
+ return ''
134
+ }
121
135
  }
122
136
  },
123
137
  created() {},
@@ -2,9 +2,13 @@
2
2
  <div class="d-control-container">
3
3
  <div class="d-control-label" v-if="showLabel === true">
4
4
  {{ label
5
- }}<span v-if="rules && rules['required']" class="d-control-label-required"
5
+ }}
6
+ <span v-if="rules && rules['required']" class="d-control-label-required"
6
7
  >*</span
7
8
  >
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
8
12
  </div>
9
13
  <div
10
14
  :style="{ width: width ? width : '100%', height: height ? height : '' }"
@@ -35,11 +39,15 @@
35
39
  <script>
36
40
  import { Input } from 'ant-design-vue'
37
41
  import { ValidationProvider } from 'vee-validate'
42
+ import { Tooltip } from 'ant-design-vue'
43
+
38
44
  export default {
39
45
  name: 'BaseTextArea',
40
46
  components:{
41
47
  'a-textarea':Input.TextArea,
42
- ValidationProvider
48
+ ValidationProvider,
49
+ Tooltip,
50
+
43
51
  },
44
52
  data() {
45
53
  return {
@@ -121,6 +129,12 @@
121
129
  default: function() {
122
130
  return ''
123
131
  }
132
+ },
133
+ tooltip: {
134
+ type: String,
135
+ default: function() {
136
+ return ''
137
+ }
124
138
  }
125
139
  },
126
140
  created() {},