ct-component-plus 0.0.41 → 0.0.42

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,7 +1,7 @@
1
1
  {
2
2
  "name": "ct-component-plus",
3
3
  "private": false,
4
- "version": "0.0.41",
4
+ "version": "0.0.42",
5
5
  "type": "module",
6
6
  "main": "packages/components/index.js",
7
7
  "files": [
@@ -15,7 +15,7 @@
15
15
  "docs:build": "vuepress build docs"
16
16
  },
17
17
  "dependencies": {
18
- "cingta-icon": "^2.1.3",
18
+ "cingta-icon": "^2.1.6",
19
19
  "element-plus": "~2.3.4",
20
20
  "vue": "^3.2.47"
21
21
  },
@@ -92,7 +92,7 @@ defineExpose({
92
92
  background-color: #fff;
93
93
  color: var(--ct-color-primary);
94
94
  &:hover:not(.is-disabled) {
95
- background-color: var(--ct-color-primary-bg);
95
+ background-color: #f3f4ff;
96
96
  }
97
97
  &.is-disabled {
98
98
  border-color: var(--ct-color-disabled);
@@ -210,7 +210,7 @@ onMounted(() => {});
210
210
  box-shadow: 0 0 0 1px var(--ct-search-box-border-color);
211
211
  border-radius: var(--ct-border-radius);
212
212
  &:hover {
213
- --ct-search-box-border-color: var(--ct-color-grey-transition);
213
+ --ct-search-box-border-color: var(--ct-color-grey-sub);
214
214
  }
215
215
  &:focus-within {
216
216
  --ct-search-box-border-color: var(--ct-color-primary);
@@ -40,6 +40,10 @@ export const tableProps = {
40
40
  }
41
41
  }
42
42
  },
43
+ selectableFn: {
44
+ //判断每行是否可选
45
+ type: Function
46
+ },
43
47
  teleportDom: {
44
48
  type: [String, Object],
45
49
  },
@@ -14,7 +14,8 @@
14
14
  type="selection"
15
15
  width="88"
16
16
  v-bind="multiSelectAttr"
17
- :reserve-selection="true">
17
+ :reserve-selection="true"
18
+ :selectable="judgeSelectable">
18
19
  </el-table-column>
19
20
  <el-table-column
20
21
  v-for="(column, index) in columnData"
@@ -247,6 +248,13 @@ watch(
247
248
  function handleSelectChange(val) {
248
249
  selectedArr.value = copyObj(val);
249
250
  }
251
+ function judgeSelectable(row) {
252
+ if (props.selectableFn) {
253
+ return props.selectableFn(row);
254
+ } else {
255
+ return true;
256
+ }
257
+ }
250
258
 
251
259
  const teleportStatus = ref(false);
252
260
  const sortObj = computed({
@@ -32,6 +32,10 @@ export const baseOption = {
32
32
  bottom: 0,
33
33
  itemWidth: 14,
34
34
  itemHeight: 14,
35
+ itemStyle: {
36
+ borderWidth: 0,
37
+ },
38
+ inactiveBorderWidth: 0,
35
39
  itemGap: 32,
36
40
  borderRadius: 2,
37
41
  icon: "roundRect",
@@ -589,7 +589,8 @@
589
589
  font-size: 15px;
590
590
  --el-table-header-text-color: var(--ct-font-color);
591
591
  --el-table-header-bg-color: #F0F3F9;
592
- --el-table-row-hover-bg-color: #F7F9FD;
592
+ // --el-table-row-hover-bg-color: #F7F9FD;
593
+ --el-table-row-hover-bg-color: #FAFAFC;
593
594
 
594
595
  .cell {}
595
596