bri-components 1.4.95 → 1.4.96

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.4.95",
3
+ "version": "1.4.96",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -43,20 +43,20 @@
43
43
  },
44
44
  computed: {
45
45
  selfPropsObj () {
46
- const defaultType = this.propsObj.btnType || this.type;
47
- let setType = defaultType;
48
- if (["cancel"].includes(defaultType)) {
49
- setType = "primary";
50
- } else if (["errorLine", "primaryLine"].includes(defaultType)) {
51
- setType = "default";
52
- } else if (["linkText", "primaryText", "errorText"].includes(defaultType)) {
53
- setType = "text";
46
+ const originBtnType = this.propsObj.btnType || this.type;
47
+ let btnType = originBtnType;
48
+ if (["cancel"].includes(originBtnType)) {
49
+ btnType = "primary";
50
+ } else if (["errorLine", "primaryLine"].includes(originBtnType)) {
51
+ btnType = "default";
52
+ } else if (["linkText", "primaryText", "errorText", "successText"].includes(originBtnType)) {
53
+ btnType = "text";
54
54
  }
55
55
 
56
56
  return {
57
- class: ["cancel", "errorLine", "primaryLine", "linkText", "primaryText", "errorText"].includes(defaultType) ? `ivu-btn-${defaultType}` : "",
57
+ class: ["cancel", "errorLine", "primaryLine", "linkText", "primaryText", "errorText", "successText"].includes(originBtnType) ? `ivu-btn-${originBtnType}` : "",
58
58
  ...this.propsObj,
59
- btnType: setType,
59
+ btnType: btnType,
60
60
  customIcon: this.propsObj.customIcon ? `bico-font ${this.propsObj.customIcon}` : undefined
61
61
  };
62
62
  }
@@ -133,6 +133,21 @@
133
133
  }
134
134
  }
135
135
  }
136
+ .ivu-btn-successText {
137
+ color: @success-color;
138
+ &:hover {
139
+ color: @success-color;
140
+ }
141
+ &:active {
142
+ color: @success-color;
143
+ }
144
+ &[disabled] {
145
+ color: @textColor-disabled;
146
+ &:hover, &:active {
147
+ color: @textColor-disabled;
148
+ }
149
+ }
150
+ }
136
151
 
137
152
  .ivu-btn-error {
138
153
  color: @textWhColor;
@@ -1,15 +1,24 @@
1
1
  // 可替换样式 https://github.com/view-design/ViewUI/blob/master/src/styles/custom.less
2
2
  @primary-color : @themeColor;
3
+ @info-color : #2db7f5;
4
+ @success-color : #19be6b;
5
+ @processing-color : @themeColor;
6
+ @warning-color : #ff9900;
7
+ @error-color : #ed4014;
8
+ @normal-color : #ff0000;
9
+ @link-color : @themeColor;
10
+
11
+ // Base
12
+ @font-family : "PingFang SC","Microsoft YaHei","微软雅黑";
3
13
  @text-color : rgba(0, 0, 0, 0.9);
4
14
  @border-radius-base : 4px;
5
- @border-color-split : #E5E5E5;
15
+
16
+ // Border color
6
17
  @border-color-base : #E5E5E5;
18
+ @border-color-split : #E5E5E5;
19
+
20
+ // Background color
7
21
  @background-color-base : #F5F5F5;
8
- @font-family : "PingFang SC","Microsoft YaHei","微软雅黑";
9
- @processing-color : @themeColor;
10
- @normal-color : red;
11
- @link-color : @themeColor;
12
- @info-color : #2db7f5;
13
22
 
14
23
  // Button
15
24
  @btn-primary-color : rgba(255, 255,255, 0.9);