bri-components 1.5.1 → 1.5.2

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": "bri-components",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -216,6 +216,9 @@ export default {
216
216
  appKey () {
217
217
  return this.propsObj.appKey;
218
218
  },
219
+ controlThemeColor () {
220
+ return this.propsObj.controlThemeColor;
221
+ },
219
222
  entityKey () {
220
223
  return this.propsObj.entityKey;
221
224
  },
@@ -137,7 +137,6 @@ export default {
137
137
  btnType: "errorText",
138
138
  icon: "md-trash",
139
139
  size: "small",
140
- color: "#E83636",
141
140
  disabled: false,
142
141
  event: "clickDelete"
143
142
  }
@@ -199,13 +198,10 @@ export default {
199
198
  };
200
199
  },
201
200
  computed: {
202
- appObj () {
203
- return this.$store.getters.appThemeColor;
204
- },
205
-
206
201
  dshRender () {
207
202
  return this[this.dshRenderName];
208
203
  },
204
+
209
205
  controlKey () {
210
206
  return this.propsObj._key;
211
207
  },
@@ -715,8 +711,7 @@ export default {
715
711
  : this.baseOperationMap.canInsert.name,
716
712
  tip: this.showMode === "form"
717
713
  ? this.baseOperationMap.canInsert.tip.replace("行", "条")
718
- : this.baseOperationMap.canInsert.tip,
719
- color: this.appThemeColor
714
+ : this.baseOperationMap.canInsert.tip
720
715
  },
721
716
  canHideOrShow: {
722
717
  ...this.topOperationMap.canHideOrShow,
@@ -1344,13 +1339,13 @@ export default {
1344
1339
 
1345
1340
  return operationItem && operationItem.disabled !== true
1346
1341
  ? h("div", {
1342
+ class: `dsh-color-border-${operationItem.btnType.includes("error") ? "error" : "primary"}`,
1347
1343
  style: {
1348
1344
  position: "absolute",
1349
1345
  bottom: "0px",
1350
1346
  right: isLeft ? `${iconSize + 3}px` : "0px",
1351
1347
  width: `${iconSize + 2}px`,
1352
1348
  height: `${iconSize + 2}px`,
1353
- border: `1px solid ${operationItem.color}`,
1354
1349
  borderRadius: "2px",
1355
1350
  backgroundColor: "#ffffff",
1356
1351
  lineHeight: `${iconSize - 2}px`,
@@ -1367,9 +1362,9 @@ export default {
1367
1362
  }
1368
1363
  }, [
1369
1364
  h("Icon", {
1365
+ class: `dsh-color-${operationItem.btnType.includes("error") ? "error" : "primary"}`,
1370
1366
  style: {
1371
- fontWeight: "500",
1372
- color: operationItem.color
1367
+ fontWeight: "500"
1373
1368
  },
1374
1369
  props: {
1375
1370
  type: operationItem.icon,
@@ -78,8 +78,7 @@ export default {
78
78
  : this.baseOperationMap.canCreateChild.name,
79
79
  tip: this.showMode === "form"
80
80
  ? this.baseOperationMap.canCreateChild.tip.replace("行", "条")
81
- : this.baseOperationMap.canCreateChild.tip,
82
- color: this.appThemeColor
81
+ : this.baseOperationMap.canCreateChild.tip
83
82
  }
84
83
  };
85
84
  }
@@ -9,4 +9,19 @@
9
9
  // @import "./global/global.less"; // 全局公共css
10
10
 
11
11
  @import "./iconfont/iconfont.css"; // 字体图标样式
12
- @import "./components/index.less"; // 组件样式
12
+ @import "./components/index.less"; // 组件样式
13
+
14
+ .dsh-color-primary {
15
+ color: @themeColor;
16
+ }
17
+ .dsh-color-error {
18
+ color: @error-color;
19
+ }
20
+ .dsh-color-border-primary {
21
+ border: 1px solid @themeColor;
22
+ color: @themeColor;
23
+ }
24
+ .dsh-color-border-error {
25
+ color: @error-color;
26
+ border: 1px solid @error-color;
27
+ }