bkui-vue 0.0.1-beta.331 → 0.0.1-beta.332
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/dist/index.cjs.js +25 -25
- package/dist/index.esm.js +76 -33
- package/dist/index.umd.js +26 -26
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/alert/alert.css +4 -0
- package/lib/alert/alert.less +24 -19
- package/lib/alert/alert.variable.css +4 -0
- package/lib/checkbox/checkbox.css +10 -6
- package/lib/checkbox/checkbox.less +38 -32
- package/lib/checkbox/checkbox.variable.css +10 -6
- package/lib/checkbox/index.js +1 -1
- package/lib/form/form-item.d.ts +14 -3
- package/lib/form/form.css +13 -7
- package/lib/form/form.less +61 -52
- package/lib/form/form.variable.css +13 -7
- package/lib/form/index.d.ts +11 -2
- package/lib/form/index.js +1 -1
- package/lib/form/type.d.ts +1 -2
- package/lib/form/utils.d.ts +2 -0
- package/lib/message/message.css +1 -1
- package/lib/message/message.less +1 -1
- package/lib/message/message.variable.css +1 -1
- package/lib/pagination/pagination.less +9 -7
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio.css +60 -63
- package/lib/radio/radio.less +74 -78
- package/lib/radio/radio.variable.css +60 -63
- package/lib/select/index.js +1 -1
- package/lib/shared/index.js +1 -1
- package/lib/table/index.js +1 -1
- package/lib/table/table.css +13 -6
- package/lib/table/table.less +6 -0
- package/lib/table/table.variable.css +13 -6
- package/lib/tree/tree.css +10 -6
- package/lib/tree/tree.variable.css +10 -6
- package/package.json +1 -1
package/lib/alert/alert.css
CHANGED
package/lib/alert/alert.less
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
@error-background-color: #ffeded;
|
17
17
|
@error-icon-color: #ea3636;
|
18
18
|
|
19
|
-
|
19
|
+
.@{bk-prefix}-alert {
|
20
20
|
position: relative;
|
21
21
|
font-size: @font-size-base;
|
22
22
|
color: #63656e;
|
@@ -25,90 +25,95 @@
|
|
25
25
|
border: @border-width-base @border-style-base;
|
26
26
|
border-radius: @border-radius-base;
|
27
27
|
|
28
|
-
|
28
|
+
.@{bk-prefix}-alert-icon-info {
|
29
29
|
display: flex; // 修复 svg 对不齐的问题(svg 是一个 inline 元素)
|
30
30
|
margin-right: 8px;
|
31
31
|
font-size: 16px;
|
32
32
|
line-height: 1;
|
33
33
|
}
|
34
34
|
|
35
|
-
|
35
|
+
|
36
36
|
}
|
37
37
|
|
38
|
-
|
38
|
+
.@{bk-prefix}-alert-wraper {
|
39
39
|
display: flex;
|
40
40
|
padding: 8px 10px;
|
41
41
|
}
|
42
42
|
|
43
|
-
|
43
|
+
.@{bk-prefix}-alert-info {
|
44
44
|
background-color: @info-background-color;
|
45
45
|
border-color: @info-border-color;
|
46
46
|
|
47
|
-
|
47
|
+
.@{bk-prefix}-alert-icon-info {
|
48
48
|
color: @info-icon-color;
|
49
49
|
}
|
50
50
|
}
|
51
51
|
|
52
|
-
|
52
|
+
.@{bk-prefix}-alert-success {
|
53
53
|
background-color: @success-background-color;
|
54
54
|
border-color: @success-border-color;
|
55
55
|
|
56
|
-
|
56
|
+
.@{bk-prefix}-alert-icon-info {
|
57
57
|
color: @success-icon-color;
|
58
58
|
}
|
59
59
|
}
|
60
60
|
|
61
|
-
|
61
|
+
.@{bk-prefix}-alert-warning {
|
62
62
|
background-color: @warning-background-color;
|
63
63
|
border-color: @warning-border-color;
|
64
64
|
|
65
|
-
|
65
|
+
.@{bk-prefix}-alert-icon-info {
|
66
66
|
color: @warning-icon-color;
|
67
67
|
}
|
68
68
|
}
|
69
69
|
|
70
|
-
|
70
|
+
.@{bk-prefix}-alert-error {
|
71
71
|
background-color: @error-background-color;
|
72
72
|
border-color: @error-border-color;
|
73
73
|
|
74
|
-
|
74
|
+
.@{bk-prefix}-alert-icon-info {
|
75
75
|
color: @error-icon-color;
|
76
76
|
}
|
77
77
|
}
|
78
78
|
|
79
|
-
|
79
|
+
.@{bk-prefix}-alert-content {
|
80
80
|
display: flex;
|
81
81
|
flex: 1;
|
82
82
|
flex-direction: column;
|
83
83
|
overflow: hidden;
|
84
84
|
}
|
85
85
|
|
86
|
-
|
86
|
+
.@{bk-prefix}-alert-title {
|
87
87
|
line-height: 16px;
|
88
88
|
}
|
89
89
|
|
90
|
-
|
90
|
+
.@{bk-prefix}-alert-close {
|
91
91
|
padding: 8px 12px 0 6px;
|
92
92
|
margin-top: -8px;
|
93
93
|
margin-right: -10px;
|
94
94
|
font-size: 12px;
|
95
|
+
color: #c4c6cc;
|
95
96
|
white-space: nowrap;
|
96
97
|
cursor: pointer;
|
98
|
+
|
99
|
+
&:hover {
|
100
|
+
color: #979ba5;
|
101
|
+
}
|
97
102
|
}
|
98
103
|
|
99
|
-
|
104
|
+
.@{bk-prefix}-alert-close-icon {
|
100
105
|
line-height: 1;
|
101
106
|
}
|
102
107
|
|
103
|
-
|
108
|
+
.@{bk-prefix}-alert-leave-leave {
|
104
109
|
opacity: 1;
|
105
110
|
}
|
106
111
|
|
107
|
-
|
112
|
+
.@{bk-prefix}-alert-leave-leave-active {
|
108
113
|
overflow: hidden;
|
109
114
|
transition: opacity .15s, height .2s;
|
110
115
|
}
|
111
116
|
|
112
|
-
|
117
|
+
.@{bk-prefix}-alert-leave-leave-to {
|
113
118
|
opacity: 0;
|
114
119
|
}
|
@@ -178,9 +178,13 @@
|
|
178
178
|
margin-top: -8px;
|
179
179
|
margin-right: -10px;
|
180
180
|
font-size: 12px;
|
181
|
+
color: #c4c6cc;
|
181
182
|
white-space: nowrap;
|
182
183
|
cursor: pointer;
|
183
184
|
}
|
185
|
+
.bk-alert-close:hover {
|
186
|
+
color: #979ba5;
|
187
|
+
}
|
184
188
|
.bk-alert-close-icon {
|
185
189
|
line-height: 1;
|
186
190
|
}
|
@@ -1,8 +1,12 @@
|
|
1
|
+
.bk-checkbox-group {
|
2
|
+
display: inline-block;
|
3
|
+
letter-spacing: normal;
|
4
|
+
}
|
1
5
|
.bk-checkbox {
|
2
6
|
display: inline-flex;
|
3
7
|
justify-self: center;
|
8
|
+
align-items: center;
|
4
9
|
font-size: 14px;
|
5
|
-
line-height: 18px;
|
6
10
|
letter-spacing: normal;
|
7
11
|
color: #63656e;
|
8
12
|
cursor: pointer;
|
@@ -68,21 +72,20 @@
|
|
68
72
|
.bk-checkbox.is-disabled.is-checked .bk-checkbox-input {
|
69
73
|
background: #dcdee5;
|
70
74
|
}
|
71
|
-
.bk-checkbox
|
75
|
+
.bk-checkbox-input {
|
72
76
|
position: relative;
|
73
77
|
display: inline-block;
|
74
78
|
width: 16px;
|
75
79
|
height: 16px;
|
76
|
-
margin-right: 5px;
|
77
80
|
vertical-align: middle;
|
78
81
|
border: 1px solid #979ba5;
|
79
82
|
border-radius: 2px;
|
80
83
|
}
|
81
|
-
.bk-checkbox
|
84
|
+
.bk-checkbox-input.small {
|
82
85
|
width: 14px;
|
83
86
|
height: 14px;
|
84
87
|
}
|
85
|
-
.bk-checkbox
|
88
|
+
.bk-checkbox-original {
|
86
89
|
position: absolute;
|
87
90
|
top: 0;
|
88
91
|
left: 0;
|
@@ -90,7 +93,8 @@
|
|
90
93
|
width: 0;
|
91
94
|
height: 0;
|
92
95
|
}
|
93
|
-
.bk-checkbox
|
96
|
+
.bk-checkbox-label {
|
94
97
|
display: inline-block;
|
98
|
+
margin-left: 5px;
|
95
99
|
vertical-align: middle;
|
96
100
|
}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
@import '../styles/themes/themes.less';
|
2
2
|
|
3
|
+
.@{bk-prefix}-checkbox-group {
|
4
|
+
display: inline-block;
|
5
|
+
letter-spacing: normal;
|
6
|
+
}
|
7
|
+
|
3
8
|
.@{bk-prefix}-checkbox {
|
4
9
|
display: inline-flex;
|
5
10
|
justify-self: center;
|
11
|
+
align-items: center;
|
6
12
|
font-size: 14px;
|
7
|
-
line-height: 18px;
|
8
13
|
letter-spacing: normal;
|
9
14
|
color: #63656e;
|
10
15
|
cursor: pointer;
|
11
16
|
user-select: none;
|
12
|
-
|
17
|
+
|
18
|
+
& ~ .@{bk-prefix}-checkbox {
|
13
19
|
margin-left: 30px;
|
14
20
|
}
|
15
21
|
|
16
22
|
&.is-checked {
|
17
|
-
|
23
|
+
.@{bk-prefix}-checkbox-input {
|
18
24
|
background: @primary-color;
|
19
25
|
border-color: @primary-color;
|
20
26
|
transition: all .1s;
|
@@ -43,7 +49,7 @@
|
|
43
49
|
}
|
44
50
|
|
45
51
|
&.is-indeterminated {
|
46
|
-
|
52
|
+
.@{bk-prefix}-checkbox-input {
|
47
53
|
background: @primary-color;
|
48
54
|
border-color: @primary-color;
|
49
55
|
transition: all .1s;
|
@@ -74,7 +80,7 @@
|
|
74
80
|
color: #c4c6cc;
|
75
81
|
cursor: not-allowed;
|
76
82
|
|
77
|
-
|
83
|
+
.@{bk-prefix}-checkbox-input {
|
78
84
|
background: #fafbfd;
|
79
85
|
border-color: @disable-color;
|
80
86
|
|
@@ -84,39 +90,39 @@
|
|
84
90
|
}
|
85
91
|
|
86
92
|
&.is-checked {
|
87
|
-
|
93
|
+
.@{bk-prefix}-checkbox-input {
|
88
94
|
background: @disable-color;
|
89
95
|
}
|
90
96
|
}
|
91
97
|
}
|
98
|
+
}
|
92
99
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
border-radius: 2px;
|
102
|
-
|
103
|
-
&.small {
|
104
|
-
width: 14px;
|
105
|
-
height: 14px;
|
106
|
-
}
|
107
|
-
}
|
100
|
+
.@{bk-prefix}-checkbox-input {
|
101
|
+
position: relative;
|
102
|
+
display: inline-block;
|
103
|
+
width: 16px;
|
104
|
+
height: 16px;
|
105
|
+
vertical-align: middle;
|
106
|
+
border: 1px solid #979ba5;
|
107
|
+
border-radius: 2px;
|
108
108
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
left: 0;
|
113
|
-
z-index: -1;
|
114
|
-
width: 0;
|
115
|
-
height: 0;
|
109
|
+
&.small {
|
110
|
+
width: 14px;
|
111
|
+
height: 14px;
|
116
112
|
}
|
113
|
+
}
|
117
114
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
115
|
+
.@{bk-prefix}-checkbox-original {
|
116
|
+
position: absolute;
|
117
|
+
top: 0;
|
118
|
+
left: 0;
|
119
|
+
z-index: -1;
|
120
|
+
width: 0;
|
121
|
+
height: 0;
|
122
|
+
}
|
123
|
+
|
124
|
+
.@{bk-prefix}-checkbox-label {
|
125
|
+
display: inline-block;
|
126
|
+
margin-left: 5px;
|
127
|
+
vertical-align: middle;
|
122
128
|
}
|
@@ -117,11 +117,15 @@
|
|
117
117
|
--search-select-placeholder-color: var(--light-gray);
|
118
118
|
--search-select-message-color: var(--danger-color);
|
119
119
|
}
|
120
|
+
.bk-checkbox-group {
|
121
|
+
display: inline-block;
|
122
|
+
letter-spacing: normal;
|
123
|
+
}
|
120
124
|
.bk-checkbox {
|
121
125
|
display: inline-flex;
|
122
126
|
justify-self: center;
|
127
|
+
align-items: center;
|
123
128
|
font-size: 14px;
|
124
|
-
line-height: 18px;
|
125
129
|
letter-spacing: normal;
|
126
130
|
color: #63656e;
|
127
131
|
cursor: pointer;
|
@@ -187,21 +191,20 @@
|
|
187
191
|
.bk-checkbox.is-disabled.is-checked .bk-checkbox-input {
|
188
192
|
background: var(--disable-color);
|
189
193
|
}
|
190
|
-
.bk-checkbox
|
194
|
+
.bk-checkbox-input {
|
191
195
|
position: relative;
|
192
196
|
display: inline-block;
|
193
197
|
width: 16px;
|
194
198
|
height: 16px;
|
195
|
-
margin-right: 5px;
|
196
199
|
vertical-align: middle;
|
197
200
|
border: 1px solid #979ba5;
|
198
201
|
border-radius: 2px;
|
199
202
|
}
|
200
|
-
.bk-checkbox
|
203
|
+
.bk-checkbox-input.small {
|
201
204
|
width: 14px;
|
202
205
|
height: 14px;
|
203
206
|
}
|
204
|
-
.bk-checkbox
|
207
|
+
.bk-checkbox-original {
|
205
208
|
position: absolute;
|
206
209
|
top: 0;
|
207
210
|
left: 0;
|
@@ -209,7 +212,8 @@
|
|
209
212
|
width: 0;
|
210
213
|
height: 0;
|
211
214
|
}
|
212
|
-
.bk-checkbox
|
215
|
+
.bk-checkbox-label {
|
213
216
|
display: inline-block;
|
217
|
+
margin-left: 5px;
|
214
218
|
vertical-align: middle;
|
215
219
|
}
|
package/lib/checkbox/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],r);else{var t="object"==typeof exports?r(require("../shared"),require("vue")):r(e["../shared"],e.vue);for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(self,((e,r)=>(()=>{"use strict";var t={4212:r=>{r.exports=e},748:e=>{e.exports=r}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{n.r(a),n.d(a,{BkCheckbox:()=>c,BkCheckboxGroup:()=>s,default:()=>d});var e=n(4212);function r(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}var t=n(748),o=Symbol("CheckboxGroup"),
|
1
|
+
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],r);else{var t="object"==typeof exports?r(require("../shared"),require("vue")):r(e["../shared"],e.vue);for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(self,((e,r)=>(()=>{"use strict";var t={4212:r=>{r.exports=e},748:e=>{e.exports=r}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{n.r(a),n.d(a,{BkCheckbox:()=>c,BkCheckboxGroup:()=>s,default:()=>d});var e=n(4212);function r(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}var t=n(748),o=Symbol("CheckboxGroup"),l={modelValue:e.PropTypes.oneOfType([String,Number,Boolean]).def(""),label:e.PropTypes.oneOfType([String,Number,Boolean]),trueLabel:e.PropTypes.oneOfType([String,Number,Boolean]).def(!0),falseLabel:e.PropTypes.oneOfType([String,Number,Boolean]).def(""),disabled:e.PropTypes.bool.def(!1),checked:e.PropTypes.bool.def(!1),indeterminate:e.PropTypes.bool,beforeChange:e.PropTypes.func,size:e.PropTypes.size().def("large")};const i=(0,t.defineComponent)({name:"Checkbox",props:l,emits:["update:modelValue","change"],setup:function(n){var a,l,i=function(){var e=(0,t.ref)(!1);return[e,{blur:function(){e.value=!1},focus:function(){e.value=!0}}]}(),u=(l=2,function(e){if(Array.isArray(e))return e}(a=i)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,n,a=[],l=!0,i=!1;try{for(t=t.call(e);!(l=(o=t.next()).done)&&(a.push(o.value),!r||a.length!==r);l=!0);}catch(e){i=!0,n=e}finally{try{l||null==t.return||t.return()}finally{if(i)throw n}}return a}}(a,l)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}}(a,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],c=u[1],d=c.blur,p=c.focus,f=function(){var r=(0,t.getCurrentInstance)(),n=r.props,a=r.emit,l=(0,t.inject)(o,e.EMPTY_OBJ),i=!(0,e.isEmptyObj)(l),u=(0,t.ref)(n.checked),s=(0,t.computed)((function(){return!(!i||!l.props.disabled)||n.disabled}));return i?(0,t.watch)((function(){return l.props.modelValue}),(function(e){u.value=e.includes(n.label)}),{deep:!0}):(0,t.watch)((function(){return n.modelValue}),(function(e){""!==e&&(u.value=e===n.trueLabel)}),{immediate:!0}),(0,t.onMounted)((function(){i&&l.register(r.proxy)})),(0,t.onBeforeUnmount)((function(){i&&l.unregister(r.proxy)})),{isChecked:u,isDisabled:s,setChecked:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];u.value=e},handleChange:function(e){if(!s.value){var r=e.target;u.value=r.checked;var o=u.value?n.trueLabel:n.falseLabel;a("change",o),a("update:modelValue",o),i&&l.handleChange(),(0,t.nextTick)((function(){r.checked!==u.value&&(r.checked=u.value)}))}}}}();return{isFocus:s,isChecked:f.isChecked,isDisabled:f.isDisabled,setChecked:f.setChecked,handleBlur:d,handleFocus:p,handleChange:f.handleChange,size:n.size}},render:function(){var r=this,o=(0,e.classes)({"bk-checkbox":!0,"is-focused":this.isFocus,"is-checked":this.isChecked,"is-disabled":this.isDisabled,"is-indeterminated":this.indeterminate});return(0,t.createVNode)("label",{class:o},[(0,t.createVNode)("span",{class:[(0,e.resolveClassName)("checkbox-input"),this.size]},[(0,t.createVNode)("input",{role:"checkbox",type:"checkbox",class:"bk-checkbox-original",disabled:this.isDisabled,checked:this.isChecked,onChange:this.handleChange},null)]),r.label||r.$slots.default?(0,t.createVNode)("span",{class:"bk-checkbox-label"},[r.$slots.default?r.$slots.default():r.label]):null])}});var u={name:e.PropTypes.string.def(""),modelValue:e.PropTypes.array,disabled:e.PropTypes.bool,withValidate:e.PropTypes.bool.def(!0)};const s=(0,t.defineComponent)({name:"CheckboxGroup",props:u,emits:["change","update:modelValue"],setup:function(r,n){var a=(0,e.useFormItem)(),l=[];return(0,t.provide)(o,{name:"CheckboxGroup",props:r,register:function(e){l.push(e)},unregister:function(e){var r=l.indexOf(e);r>-1&&l.splice(r,1)},handleChange:function(){var e=l.reduce((function(e,r){return r.isChecked&&e.push(r.label),e}),[]);n.emit("update:modelValue",e),n.emit("change",e)}}),(0,t.watch)((function(){return r.modelValue}),(function(){var e;r.withValidate&&(null===(e=null==a?void 0:a.validate)||void 0===e||e.call(a,"change"))})),(0,t.onMounted)((function(){var e=r.modelValue||[];l.forEach((function(r){e.includes(r.label)&&r.setChecked(!0)}))})),{}},render:function(){var e;return(0,t.createVNode)("div",{class:"bk-checkbox-group"},[null===(e=this.$slots)||void 0===e?void 0:e.default()])}});var c=(0,e.withInstallProps)(i,{Group:s});const d=c})(),a})()));
|
package/lib/form/form-item.d.ts
CHANGED
@@ -3,7 +3,9 @@ declare const formItemProps: {
|
|
3
3
|
label: import("vue-types").VueTypeValidableDef<string> & {
|
4
4
|
default: string;
|
5
5
|
};
|
6
|
-
labelWidth: import("vue-types").VueTypeDef<string | number
|
6
|
+
labelWidth: import("vue-types").VueTypeDef<string | number> & {
|
7
|
+
default: string | number;
|
8
|
+
};
|
7
9
|
labelPosition: import("vue-types").VueTypeDef<string>;
|
8
10
|
property: import("vue-types").VueTypeValidableDef<string> & {
|
9
11
|
default: string;
|
@@ -49,7 +51,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
49
51
|
label: import("vue-types").VueTypeValidableDef<string> & {
|
50
52
|
default: string;
|
51
53
|
};
|
52
|
-
labelWidth: import("vue-types").VueTypeDef<string | number
|
54
|
+
labelWidth: import("vue-types").VueTypeDef<string | number> & {
|
55
|
+
default: string | number;
|
56
|
+
};
|
53
57
|
labelPosition: import("vue-types").VueTypeDef<string>;
|
54
58
|
property: import("vue-types").VueTypeValidableDef<string> & {
|
55
59
|
default: string;
|
@@ -90,7 +94,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
90
94
|
default: string;
|
91
95
|
};
|
92
96
|
}, {
|
97
|
+
isShowLabel: import("vue").ComputedRef<boolean>;
|
93
98
|
labelStyles: import("vue").ComputedRef<any>;
|
99
|
+
contentStyles: import("vue").ComputedRef<{
|
100
|
+
"margin-left": any;
|
101
|
+
}>;
|
94
102
|
isFormTypeVertical: import("vue").ComputedRef<boolean>;
|
95
103
|
validate: (trigger?: String) => Promise<boolean>;
|
96
104
|
clearValidate: () => void;
|
@@ -100,7 +108,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
100
108
|
label: import("vue-types").VueTypeValidableDef<string> & {
|
101
109
|
default: string;
|
102
110
|
};
|
103
|
-
labelWidth: import("vue-types").VueTypeDef<string | number
|
111
|
+
labelWidth: import("vue-types").VueTypeDef<string | number> & {
|
112
|
+
default: string | number;
|
113
|
+
};
|
104
114
|
labelPosition: import("vue-types").VueTypeDef<string>;
|
105
115
|
property: import("vue-types").VueTypeValidableDef<string> & {
|
106
116
|
default: string;
|
@@ -145,6 +155,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
145
155
|
required: boolean;
|
146
156
|
property: string;
|
147
157
|
email: boolean;
|
158
|
+
labelWidth: string | number;
|
148
159
|
max: number;
|
149
160
|
min: number;
|
150
161
|
maxlength: number;
|
package/lib/form/form.css
CHANGED
@@ -1,19 +1,18 @@
|
|
1
1
|
.bk-form {
|
2
2
|
text-align: left;
|
3
3
|
}
|
4
|
-
.bk-form--vertical .bk-form-item {
|
5
|
-
flex-direction: column;
|
6
|
-
}
|
7
4
|
.bk-form--vertical .bk-form-label {
|
5
|
+
float: unset;
|
8
6
|
width: auto;
|
9
7
|
padding-right: 0;
|
8
|
+
margin-bottom: 8px;
|
9
|
+
line-height: 20px;
|
10
10
|
text-align: left;
|
11
11
|
}
|
12
12
|
.bk-form--vertical .bk-form-content {
|
13
13
|
text-align: left;
|
14
14
|
}
|
15
15
|
.bk-form-item {
|
16
|
-
display: flex;
|
17
16
|
margin-bottom: 24px;
|
18
17
|
}
|
19
18
|
.bk-form-item.is-required .bk-form-label:after {
|
@@ -31,16 +30,24 @@
|
|
31
30
|
.bk-form-item.is-error .bk-tag-input {
|
32
31
|
border-color: #ea3636;
|
33
32
|
}
|
33
|
+
.bk-form-item:after,
|
34
|
+
.bk-form-item:before {
|
35
|
+
display: table;
|
36
|
+
content: '';
|
37
|
+
}
|
38
|
+
.bk-form-item:after {
|
39
|
+
clear: both;
|
40
|
+
}
|
34
41
|
.bk-form-label {
|
35
42
|
position: relative;
|
36
|
-
|
43
|
+
float: left;
|
37
44
|
padding-right: 24px;
|
38
45
|
font-size: 14px;
|
39
46
|
font-weight: normal;
|
40
47
|
line-height: 32px;
|
41
48
|
color: #63656e;
|
42
49
|
text-align: right;
|
43
|
-
|
50
|
+
vertical-align: middle;
|
44
51
|
}
|
45
52
|
.bk-form-label-description {
|
46
53
|
cursor: pointer;
|
@@ -49,7 +56,6 @@
|
|
49
56
|
.bk-form-content {
|
50
57
|
position: relative;
|
51
58
|
line-height: 32px;
|
52
|
-
flex: 1;
|
53
59
|
}
|
54
60
|
.bk-form-error {
|
55
61
|
position: absolute;
|
package/lib/form/form.less
CHANGED
@@ -4,13 +4,13 @@
|
|
4
4
|
text-align: left;
|
5
5
|
|
6
6
|
&--vertical {
|
7
|
-
.@{bk-prefix}-form-item {
|
8
|
-
flex-direction: column;
|
9
|
-
}
|
10
7
|
|
11
8
|
.@{bk-prefix}-form-label {
|
9
|
+
float: unset;
|
12
10
|
width: auto;
|
13
11
|
padding-right: 0;
|
12
|
+
margin-bottom: 8px;
|
13
|
+
line-height: 20px;
|
14
14
|
text-align: left;
|
15
15
|
}
|
16
16
|
|
@@ -21,7 +21,6 @@
|
|
21
21
|
}
|
22
22
|
|
23
23
|
.@{bk-prefix}-form-item {
|
24
|
-
display: flex;
|
25
24
|
margin-bottom: 24px;
|
26
25
|
|
27
26
|
&.is-required {
|
@@ -46,18 +45,29 @@
|
|
46
45
|
border-color: #ea3636;
|
47
46
|
}
|
48
47
|
}
|
48
|
+
|
49
|
+
&:after,
|
50
|
+
&:before {
|
51
|
+
display: table;
|
52
|
+
content: ''
|
53
|
+
}
|
54
|
+
|
55
|
+
&:after {
|
56
|
+
clear: both
|
57
|
+
}
|
49
58
|
}
|
50
59
|
|
51
60
|
.@{bk-prefix}-form-label {
|
52
61
|
position: relative;
|
53
|
-
|
62
|
+
float: left;
|
54
63
|
padding-right: 24px;
|
55
64
|
font-size: 14px;
|
56
65
|
font-weight: normal;
|
57
66
|
line-height: 32px;
|
58
67
|
color: #63656e;
|
59
68
|
text-align: right;
|
60
|
-
|
69
|
+
text-align: right;
|
70
|
+
vertical-align: middle;
|
61
71
|
}
|
62
72
|
.@{bk-prefix}-form-label-description {
|
63
73
|
cursor: pointer;
|
@@ -67,7 +77,6 @@
|
|
67
77
|
.@{bk-prefix}-form-content {
|
68
78
|
position: relative;
|
69
79
|
line-height: 32px;
|
70
|
-
flex: 1;
|
71
80
|
}
|
72
81
|
|
73
82
|
.@{bk-prefix}-form-error {
|
@@ -92,69 +101,69 @@
|
|
92
101
|
display: inline-block;
|
93
102
|
display: inline-block;
|
94
103
|
|
95
|
-
& >
|
96
|
-
& >
|
97
|
-
& >
|
98
|
-
& >
|
99
|
-
& >
|
100
|
-
& >
|
101
|
-
& >
|
102
|
-
& >
|
103
|
-
& >
|
104
|
+
& > .@{bk-prefix}-input,
|
105
|
+
& > .@{bk-prefix}-textarea,
|
106
|
+
& > .@{bk-prefix}-select,
|
107
|
+
& > .@{bk-prefix}-cascade,
|
108
|
+
& > .@{bk-prefix}-color-picker,
|
109
|
+
& > .@{bk-prefix}-date-picker,
|
110
|
+
& > .@{bk-prefix}-tag-input,
|
111
|
+
& > .@{bk-prefix}-tag-selector,
|
112
|
+
& > .@{bk-prefix}-search-select {
|
104
113
|
float: left;
|
105
114
|
width: auto;
|
106
115
|
margin-left: -1px;
|
107
116
|
}
|
108
117
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
+
.@{bk-prefix}-input,
|
119
|
+
.@{bk-prefix}-form-password,
|
120
|
+
.@{bk-prefix}-textarea,
|
121
|
+
.@{bk-prefix}-select,
|
122
|
+
.@{bk-prefix}-cascade,
|
123
|
+
.@{bk-prefix}-color-picker,
|
124
|
+
.@{bk-prefix}-date-picker .@{bk-prefix}-date-picker-editor,
|
125
|
+
.@{bk-prefix}-tag-input,
|
126
|
+
.@{bk-prefix}-search-select {
|
118
127
|
border-radius: 0;
|
119
128
|
}
|
120
129
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
+
.@{bk-prefix}-input.control-active,
|
131
|
+
.@{bk-prefix}-select.is-focus,
|
132
|
+
.@{bk-prefix}-cascade.is-focus,
|
133
|
+
.@{bk-prefix}-color-picker.@{bk-prefix}-color-picker-show-dropdown,
|
134
|
+
.@{bk-prefix}-color-picker:hover,
|
135
|
+
.@{bk-prefix}-date-picker .@{bk-prefix}-date-picker-editor:focus,
|
136
|
+
.@{bk-prefix}-tag-input.active,
|
137
|
+
.@{bk-prefix}-tag-selector,
|
138
|
+
.@{bk-prefix}-search-select.is-focus {
|
130
139
|
z-index: 1;
|
131
140
|
opacity: 1;
|
132
141
|
}
|
133
142
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
+
.@{bk-prefix}-compose-form-item-head {
|
144
|
+
&.@{bk-prefix}-input,
|
145
|
+
&.@{bk-prefix}-select,
|
146
|
+
&.@{bk-prefix}-cascade,
|
147
|
+
&.@{bk-prefix}-color-picker,
|
148
|
+
&.@{bk-prefix}-date-picker .@{bk-prefix}-date-picker-editor,
|
149
|
+
&.@{bk-prefix}-tag-input,
|
150
|
+
&.@{bk-prefix}-tag-input,
|
151
|
+
&.@{bk-prefix}-search-select {
|
143
152
|
margin-left: 0;
|
144
153
|
border-top-right-radius: 0px;
|
145
154
|
border-bottom-right-radius: 0px;
|
146
155
|
}
|
147
156
|
}
|
148
157
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
+
.@{bk-prefix}-compose-form-item-tail {
|
159
|
+
&.@{bk-prefix}-input,
|
160
|
+
&.@{bk-prefix}-select,
|
161
|
+
&.@{bk-prefix}-cascade,
|
162
|
+
&.@{bk-prefix}-color-picker,
|
163
|
+
&.@{bk-prefix}-date-picker,
|
164
|
+
&.@{bk-prefix}-tag-input,
|
165
|
+
&.@{bk-prefix}-tag-input,
|
166
|
+
&.@{bk-prefix}-search-select {
|
158
167
|
border-top-right-radius: 2px;
|
159
168
|
border-bottom-right-radius: 2px;
|
160
169
|
}
|