meixioacomponent 2.0.45 → 2.0.46

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.
@@ -7,21 +7,21 @@
7
7
  text-overflow: ellipsis;
8
8
  font-weight: var(--font-weight-m);
9
9
  color: var(--font-color-d) !important;
10
- font-size: var(--font-size-base) !important;
10
+ font-size: var(--font-size-l) !important;
11
11
  }
12
12
 
13
13
  .warn {
14
- font-size: var(--font-size-base) !important;
14
+ font-size: var(--font-size-l) !important;
15
15
  color: var(--color-warn) !important;
16
16
  }
17
17
 
18
18
  .error {
19
- font-size: var(--font-size-base) !important;
19
+ font-size: var(--font-size-l) !important;
20
20
  color: var(--color-error) !important;
21
21
  }
22
22
 
23
23
  .success {
24
- font-size: var(--font-size-base) !important;
24
+ font-size: var(--font-size-l) !important;
25
25
  color: var(--color-success) !important;
26
26
  }
27
27
 
@@ -29,7 +29,7 @@
29
29
  .primary,
30
30
  .fun, .handle-primary {
31
31
  color: var(--color-primary) !important;
32
- font-size: var(--font-size-base) !important;
32
+ font-size: var(--font-size-l) !important;
33
33
  }
34
34
 
35
35
  .fun, .handle-primary {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meixioacomponent",
3
- "version": "2.0.45",
3
+ "version": "2.0.46",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -143,7 +143,7 @@ export default {
143
143
 
144
144
  .base-text-wrap {
145
145
  width: fit-content;
146
- font-size: var(--font-size-base);
146
+ font-size: var(--font-size-l);
147
147
 
148
148
  .default {
149
149
  overflow: hidden;
@@ -172,7 +172,7 @@ export default {
172
172
  }
173
173
 
174
174
  /deep/ .t-statistic-content-value {
175
- font-size: var(--font-size-base) !important;
175
+ font-size: var(--font-size-l) !important;
176
176
  font-family: TCloudNumber !important;
177
177
  }
178
178
 
@@ -180,7 +180,7 @@ export default {
180
180
 
181
181
  .handle {
182
182
  color: var(--color-primary) !important;
183
- font-size: var(--font-size-base) !important;
183
+ font-size: var(--font-size-l) !important;
184
184
  cursor: pointer;
185
185
 
186
186
  &:hover {
@@ -191,6 +191,6 @@ export default {
191
191
 
192
192
  .empty {
193
193
  color: var(--font-color-ds);
194
- font-size: var(--font-size-s);
194
+ font-size: var(--font-size-l);
195
195
  }
196
196
  </style>
@@ -1,15 +1,21 @@
1
1
  <template>
2
- <t-radio-group v-model="module" :disabled="disabled" variant="primary-filled" :size="componentSize">
3
- <t-radio-button
4
- :disabled="item.disabled"
5
- v-for="(item, index) in toggleList"
6
- :key="index"
7
- :value="item.value">{{ item.label }}
8
- </t-radio-button>
9
- </t-radio-group>
2
+ <t-radio-group
3
+ ref="tRadioGroupRef"
4
+ v-model="module" :disabled="disabled" variant="primary-filled" :size="componentSize">
5
+ <t-radio-button
6
+ :disabled="item.disabled"
7
+ v-for="(item, index) in toggleList"
8
+ :key="index"
9
+ :value="item.value">{{ item.label }}
10
+ </t-radio-button>
11
+ </t-radio-group>
10
12
  </template>
11
13
 
12
14
  <script>
15
+ const checkedClassName = 't-is-checked';
16
+ const radioButtonClassName = 't-radio-button';
17
+ const blockClassName = 't-radio-group__bg-block'
18
+
13
19
  import {TransomComponentSize} from "../../../utils/utils";
14
20
 
15
21
  export default {
@@ -24,6 +30,7 @@ export default {
24
30
  },
25
31
  toggleList: {
26
32
  require: true,
33
+ type: Array,
27
34
  },
28
35
  size: {
29
36
  type: String,
@@ -49,32 +56,71 @@ export default {
49
56
  computed: {
50
57
  module: {
51
58
  set(val) {
52
- const {beforeHandle,toggleList} = this.$props
53
- const index = toggleList.findIndex(item=>{return item.value===val});
54
- const item = toggleList[index];
59
+ const {beforeHandle, toggleList} = this.$props
60
+ const index = toggleList.findIndex(item => {
61
+ return item.value === val
62
+ });
63
+ const item = toggleList[index];
55
64
  if (beforeHandle) {
56
65
  beforeHandle(() => {
57
66
  this.setModule(item)
58
67
  this.$emit('input', val)
68
+ this.onRadioChange(val);
59
69
  }, item)
60
70
  } else {
61
71
  this.$emit('input', val)
62
72
  this.setModule(item)
73
+ this.onRadioChange(val);
63
74
  }
64
75
  },
65
76
  get() {
66
77
  return this.$props.value
67
78
  },
68
79
  },
69
- componentSize(){
80
+ componentSize() {
70
81
  return TransomComponentSize(this.$props.size);
71
-
72
82
  }
73
83
  },
84
+ mounted() {
85
+ this.$nextTick(() => {
86
+ this.onRadioChange(this.module)
87
+ })
88
+ },
89
+ updated() {
90
+ this.onRadioChange(this.module)
91
+ },
74
92
  methods: {
75
93
  setModule(item) {
76
94
  this.$emit('handletoggle', item)
77
95
  },
96
+ onRadioChange(value) {
97
+ if (this.$props.toggleList.length !== 2) return;
98
+ this.$nextTick(() => {
99
+ const toggleIndex = this.$props.toggleList.findIndex(item => {
100
+ return item.value === value;
101
+ })
102
+ if (toggleIndex > -1) {
103
+ const el = this.$refs.tRadioGroupRef.$el;
104
+ if (el) {
105
+ const buttonList = el.querySelectorAll(`.${radioButtonClassName}`);
106
+ const checkEl = el.querySelector(`.${checkedClassName}`);
107
+ if (buttonList) {
108
+ for (let i = 0; i < buttonList.length; i++) {
109
+ const item = buttonList[i];
110
+ item.style.setProperty('color', `var(--font-color-m)`)
111
+ }
112
+ }
113
+ if (checkEl) {
114
+ checkEl.style.setProperty('color', `${this.$props.toggleTextColor[toggleIndex]} !important`)
115
+ }
116
+ const blockEl = el.querySelector(`.${blockClassName}`);
117
+ if (blockEl) {
118
+ blockEl.style.setProperty('background-color', `${this.$props.toggleColor[toggleIndex]} !important`);
119
+ }
120
+ }
121
+ }
122
+ })
123
+ }
78
124
  },
79
125
  }
80
126
  </script>
@@ -156,8 +156,6 @@ const install = (Vue) => {
156
156
  componentConfig.createDialogCacheWrap();
157
157
  componentConfig.eventBus = new componentConfig.Vue();
158
158
  proTableLocalConfigManage.initByProTableLocalConfigManage();
159
-
160
-
161
159
  };
162
160
  //
163
161
  if (typeof window !== "undefined" && window[`Vue`]) {
@@ -233,6 +233,8 @@ import TableCheckControl from "./TableCheckControl";
233
233
  import proTableLocalConfigManage from "../../config/ProTableLocalConfigManage/ProTableLocalConfigManage";
234
234
  import {TransomTableCheckConfig, TransomTableConfig} from "../../utils/utils";
235
235
 
236
+
237
+ const tableContentClassName = 't-table__content';
236
238
  export default {
237
239
  name: "baseProTable",
238
240
  data() {
@@ -1006,9 +1008,9 @@ export default {
1006
1008
  }
1007
1009
 
1008
1010
  this.$nextTick(() => {
1009
- if (refreshLayout) {
1011
+ // if (refreshLayout) {
1010
1012
  this.daLayoutTable();
1011
- }
1013
+ // }
1012
1014
  });
1013
1015
  }
1014
1016
  },
@@ -1028,23 +1030,20 @@ export default {
1028
1030
  scrollToTop() {
1029
1031
  const {isAuth} = this.$props;
1030
1032
  if (!isAuth) return;
1031
-
1032
1033
  try {
1033
- // todo
1034
- // let elTable = this.$refs.elTable.$el;
1035
- // let target = elTable.querySelector(".el-table__body-wrapper");
1036
- // if (target) {
1037
- // target.scrollTop = 0;
1038
- // }
1034
+ let tableContent = this.$refs.enhancedTableRef.$el;
1035
+ let target = tableContent.querySelector(`.${tableContentClassName}`);
1036
+ if (target) {
1037
+ target.scrollTop = 0;
1038
+ }
1039
1039
  } catch (error) {
1040
1040
  }
1041
1041
  },
1042
1042
  // element表格的重新渲染方法
1043
1043
  daLayoutTable() {
1044
- // this.$nextTick(() => {
1045
- // todo
1046
- // this.$refs.elTable.doLayout();
1047
- // });
1044
+ this.$nextTick(()=>{
1045
+ console.log(this.$refs.enhancedTableRef);
1046
+ })
1048
1047
  },
1049
1048
  // 清空高级筛选的条件
1050
1049
  cleanProscreenCondition(flag = false) {
@@ -5,7 +5,7 @@
5
5
  v-if="input"
6
6
  v-model="module"
7
7
  :placeholder="placeholder"
8
- size="small"
8
+ size="medium"
9
9
  style="width: 220px"
10
10
  @keyup.enter.native="handleSearch"
11
11
  >
@@ -25,7 +25,7 @@
25
25
  v-for="(item, index) in searchList.list"
26
26
  :key="index"
27
27
  variant="light"
28
- size="small"
28
+ size="medium"
29
29
  :theme="index === searchList.index ? 'primary' : 'default'"
30
30
  @click="handleScreen(index)"
31
31
  >
@@ -7,21 +7,21 @@
7
7
  text-overflow: ellipsis;
8
8
  font-weight: var(--font-weight-m);
9
9
  color: var(--font-color-d) !important;
10
- font-size: var(--font-size-base) !important;
10
+ font-size: var(--font-size-l) !important;
11
11
  }
12
12
 
13
13
  .warn {
14
- font-size: var(--font-size-base) !important;
14
+ font-size: var(--font-size-l) !important;
15
15
  color: var(--color-warn) !important;
16
16
  }
17
17
 
18
18
  .error {
19
- font-size: var(--font-size-base) !important;
19
+ font-size: var(--font-size-l) !important;
20
20
  color: var(--color-error) !important;
21
21
  }
22
22
 
23
23
  .success {
24
- font-size: var(--font-size-base) !important;
24
+ font-size: var(--font-size-l) !important;
25
25
  color: var(--color-success) !important;
26
26
  }
27
27
 
@@ -29,7 +29,7 @@
29
29
  .primary,
30
30
  .fun, .handle-primary {
31
31
  color: var(--color-primary) !important;
32
- font-size: var(--font-size-base) !important;
32
+ font-size: var(--font-size-l) !important;
33
33
  }
34
34
 
35
35
  .fun, .handle-primary {