sadais-piui 1.2.2-beta2 → 1.2.2-beta5
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/components/pi-button/index.vue +12 -2
- package/components/pi-form-item/index.vue +10 -12
- package/config/button.js +1 -1
- package/package.json +1 -1
- package/scss/common.scss +20 -21
- package/tools/index.js +8 -0
|
@@ -62,12 +62,12 @@ export default {
|
|
|
62
62
|
},
|
|
63
63
|
// 按钮的预置样式
|
|
64
64
|
type: {
|
|
65
|
-
// `'default'` `'primary'` `'warn'` `'secondary'` `'line'`
|
|
65
|
+
// `'default'` `'primary'` `'warn'` `'secondary'` `'line'` `text`
|
|
66
66
|
type: String,
|
|
67
67
|
// 'default'
|
|
68
68
|
default: button.type,
|
|
69
69
|
validator: function(value) {
|
|
70
|
-
return ['default', 'primary', 'warn', 'secondary', 'line'].includes(value)
|
|
70
|
+
return ['default', 'primary', 'warn', 'secondary', 'line', 'text'].includes(value)
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
// 按钮是否镂空
|
|
@@ -461,6 +461,16 @@ export default {
|
|
|
461
461
|
background-color: rgba($pi-primary-color, 0.08);
|
|
462
462
|
}
|
|
463
463
|
|
|
464
|
+
&[type='text'] {
|
|
465
|
+
background-color: transparent;
|
|
466
|
+
&::after {
|
|
467
|
+
border: none;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
&.button-hover[type='line'] {
|
|
471
|
+
background-color: rgba($pi-primary-color, 0.08);
|
|
472
|
+
}
|
|
473
|
+
|
|
464
474
|
.wave-ripple {
|
|
465
475
|
position: absolute;
|
|
466
476
|
z-index: 0;
|
|
@@ -246,19 +246,17 @@ export default {
|
|
|
246
246
|
},
|
|
247
247
|
computed: {
|
|
248
248
|
getShowRightIcon() {
|
|
249
|
-
return this.inheritProps.showRightIcon
|
|
250
|
-
? this.inheritProps.showRightIcon
|
|
251
|
-
: this.showRightIcon
|
|
249
|
+
return this.$pi.expand.getPropValue(this.inheritProps.showRightIcon, this.showRightIcon)
|
|
252
250
|
},
|
|
253
251
|
getRightIcon() {
|
|
254
252
|
const rightIcon = this.$pi.lang.mergeDeep(this.inheritProps.rightIcon, this.rightIcon)
|
|
255
253
|
return this.$pi.lang.mergeDeep(formItem.rightIcon, rightIcon)
|
|
256
254
|
},
|
|
257
255
|
getBorder() {
|
|
258
|
-
return this.
|
|
256
|
+
return this.$pi.expand.getPropValue(this.inheritProps.border, this.border)
|
|
259
257
|
},
|
|
260
258
|
getWrap() {
|
|
261
|
-
return this.
|
|
259
|
+
return this.$pi.expand.getPropValue(this.inheritProps.wrap, this.wrap)
|
|
262
260
|
},
|
|
263
261
|
getLabelWrapBorder() {
|
|
264
262
|
return this.inheritProps.labelWrapBorder !== null
|
|
@@ -266,26 +264,26 @@ export default {
|
|
|
266
264
|
: this.labelWrapBorder
|
|
267
265
|
},
|
|
268
266
|
getColon() {
|
|
269
|
-
return this.
|
|
267
|
+
return this.$pi.expand.getPropValue(this.inheritProps.colon, this.colon)
|
|
270
268
|
},
|
|
271
269
|
getDisabled() {
|
|
272
|
-
return this.
|
|
270
|
+
return this.$pi.expand.getPropValue(this.inheritProps.disabled, this.disabled)
|
|
273
271
|
},
|
|
274
272
|
getLabelAlign() {
|
|
275
|
-
return this.
|
|
273
|
+
return this.$pi.expand.getPropValue(this.inheritProps.labelAlign, this.labelAlign)
|
|
276
274
|
},
|
|
277
275
|
getInputAlign() {
|
|
278
|
-
return this.
|
|
276
|
+
return this.$pi.expand.getPropValue(this.inheritProps.inputAlign, this.inputAlign)
|
|
279
277
|
},
|
|
280
278
|
getErrorType() {
|
|
281
279
|
return this.inheritProps.errorType
|
|
282
280
|
},
|
|
283
281
|
getPadding() {
|
|
284
|
-
const padding = this.
|
|
282
|
+
const padding = this.$pi.expand.getPropValue(this.inheritProps.padding, this.padding)
|
|
285
283
|
return this.$pi.common.addUnit(padding)
|
|
286
284
|
},
|
|
287
285
|
getHeight() {
|
|
288
|
-
const height = this.
|
|
286
|
+
const height = this.$pi.expand.getPropValue(this.inheritProps.height, this.height)
|
|
289
287
|
return this.$pi.common.addUnit(height)
|
|
290
288
|
},
|
|
291
289
|
itemStyle() {
|
|
@@ -296,7 +294,7 @@ export default {
|
|
|
296
294
|
return style
|
|
297
295
|
},
|
|
298
296
|
getLabelStyle() {
|
|
299
|
-
return this.
|
|
297
|
+
return this.$pi.expand.getPropValue(this.inheritProps.labelStyle, this.labelStyle)
|
|
300
298
|
},
|
|
301
299
|
computedLabelStyle() {
|
|
302
300
|
const style = {}
|
package/config/button.js
CHANGED
|
@@ -3,7 +3,7 @@ export default {
|
|
|
3
3
|
customStyle: {}, // 自定义样式,对象形式(默认值:{})
|
|
4
4
|
width: '', // 按钮宽度,不设置默认自动撑开,如果需要占满一行,填写’100%‘
|
|
5
5
|
size: 'default', // 按钮尺寸,default,large medium small tiny mini
|
|
6
|
-
type: 'default', //
|
|
6
|
+
type: 'default', // 按钮的预置样式,`'default'` `'primary'` `'warn'` `'secondary'` `'line'` `text`(默认值:'default')
|
|
7
7
|
plain: false, // 按钮是否镂空(默认值:false)
|
|
8
8
|
disabled: false, // 是否禁止状态(默认值:false)
|
|
9
9
|
loading: false, // 是否加载中(默认值:false)
|
package/package.json
CHANGED
package/scss/common.scss
CHANGED
|
@@ -6,27 +6,6 @@
|
|
|
6
6
|
* 颜色
|
|
7
7
|
* -------------------------------------------------------------------------------------------------
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
// 主要颜色
|
|
11
|
-
.pi-primary {
|
|
12
|
-
color: $pi-primary-color;
|
|
13
|
-
}
|
|
14
|
-
// 次级颜色
|
|
15
|
-
.pi-secondary {
|
|
16
|
-
color: $pi-secondary-color;
|
|
17
|
-
}
|
|
18
|
-
// 第三级颜色
|
|
19
|
-
.pi-tertiary {
|
|
20
|
-
color: $pi-tertiary-color;
|
|
21
|
-
}
|
|
22
|
-
// 第四级颜色
|
|
23
|
-
.pi-fourth {
|
|
24
|
-
color: $pi-fourth-color;
|
|
25
|
-
}
|
|
26
|
-
// 第五级颜色
|
|
27
|
-
.pi-fifth {
|
|
28
|
-
color: $pi-fifth-color;
|
|
29
|
-
}
|
|
30
9
|
// 黑色
|
|
31
10
|
.pi-black {
|
|
32
11
|
color: #000000;
|
|
@@ -47,6 +26,26 @@
|
|
|
47
26
|
.pi-light-gray {
|
|
48
27
|
color: #999999;
|
|
49
28
|
}
|
|
29
|
+
// 主要颜色
|
|
30
|
+
.pi-primary {
|
|
31
|
+
color: $pi-primary-color;
|
|
32
|
+
}
|
|
33
|
+
// 次级颜色
|
|
34
|
+
.pi-secondary {
|
|
35
|
+
color: $pi-secondary-color;
|
|
36
|
+
}
|
|
37
|
+
// 第三级颜色
|
|
38
|
+
.pi-tertiary {
|
|
39
|
+
color: $pi-tertiary-color;
|
|
40
|
+
}
|
|
41
|
+
// 第四级颜色
|
|
42
|
+
.pi-fourth {
|
|
43
|
+
color: $pi-fourth-color;
|
|
44
|
+
}
|
|
45
|
+
// 第五级颜色
|
|
46
|
+
.pi-fifth {
|
|
47
|
+
color: $pi-fifth-color;
|
|
48
|
+
}
|
|
50
49
|
|
|
51
50
|
/**
|
|
52
51
|
* 背景颜色
|
package/tools/index.js
CHANGED