@ecolovo/uniapp-components 1.0.0
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/aspect/aspect.vue +43 -0
- package/components/badge/badge.vue +88 -0
- package/components/button/button.vue +409 -0
- package/components/checkbox/checkbox.vue +183 -0
- package/components/checkbox-group/checkbox-group.vue +101 -0
- package/components/checkbox-group2/checkbox-group2.vue +138 -0
- package/components/checkbox-group2/checkbox.vue +103 -0
- package/components/data-list/data-list.vue +130 -0
- package/components/date-picker/date-picker-view.vue +181 -0
- package/components/date-picker/date-picker.vue +237 -0
- package/components/datetime-picker/datetime-picker-view.vue +209 -0
- package/components/datetime-picker/datetime-picker.vue +235 -0
- package/components/dialog/dialog-content.vue +162 -0
- package/components/dialog/dialog.vue +166 -0
- package/components/dropdown/dropdown.vue +145 -0
- package/components/empty/empty.vue +102 -0
- package/components/flex/flex.vue +76 -0
- package/components/form/form.vue +43 -0
- package/components/form/mixin.js +13 -0
- package/components/form-item/form-item.vue +141 -0
- package/components/icon/icon.vue +114 -0
- package/components/image/image.vue +61 -0
- package/components/input/input.vue +154 -0
- package/components/input/password-input.vue +95 -0
- package/components/list-page/list-page.js +10 -0
- package/components/list-page/list-page.vue +150 -0
- package/components/load-more/load-more.vue +97 -0
- package/components/loading/animations/loading-animation1.vue +92 -0
- package/components/loading/animations/loading-animation2.vue +28 -0
- package/components/loading/animations/loading-animation3.vue +81 -0
- package/components/loading/animations/loading-animation4.vue +74 -0
- package/components/loading/loading.vue +91 -0
- package/components/message-box/message-box.vue +60 -0
- package/components/number-dialog/number-dialog.vue +360 -0
- package/components/number-input/number-input.vue +352 -0
- package/components/numpad/numpad.vue +224 -0
- package/components/page/page-body.vue +227 -0
- package/components/page/page-footer.vue +75 -0
- package/components/page/page-header.vue +222 -0
- package/components/page/page.vue +128 -0
- package/components/picker/picker-popup.vue +295 -0
- package/components/picker/picker.vue +151 -0
- package/components/popover/popover-content.vue +255 -0
- package/components/popover/popover-mask.vue +113 -0
- package/components/popover/popover.vue +84 -0
- package/components/popup/popup-content.vue +162 -0
- package/components/popup/popup.vue +168 -0
- package/components/price/price.vue +104 -0
- package/components/search/search.vue +220 -0
- package/components/searching/searching.vue +86 -0
- package/components/selector/selector.vue +86 -0
- package/components/switch/switch.vue +180 -0
- package/components/tab/tab.vue +235 -0
- package/components/table/table.vue +112 -0
- package/components/textarea/textarea.vue +192 -0
- package/components/time-picker/time-picker-view.vue +127 -0
- package/components/time-picker/time-picker.vue +140 -0
- package/components/uploader/download.js +81 -0
- package/components/uploader/file-uploader.vue +52 -0
- package/components/uploader/files.js +225 -0
- package/components/uploader/media-uploader.vue +133 -0
- package/components/uploader/mixin.js +106 -0
- package/components/uploader/uni.js +38 -0
- package/components/uploader/upload-button.vue +29 -0
- package/components/uploader/uploader copy.vue +547 -0
- package/components/uploader/uploader.vue +117 -0
- package/configs/index.js +41 -0
- package/easyCom.js +25 -0
- package/init.js +17 -0
- package/mixins/componentName.js +32 -0
- package/mixins/listPage.js +1 -0
- package/mixins/windowInfo.js +1 -0
- package/package.json +12 -0
- package/resources/iconfont/uniapp_ui_icon/demo.css +539 -0
- package/resources/iconfont/uniapp_ui_icon/demo_index.html +555 -0
- package/resources/iconfont/uniapp_ui_icon/iconfont.css +78 -0
- package/resources/iconfont/uniapp_ui_icon/iconfont.js +1 -0
- package/resources/iconfont/uniapp_ui_icon/iconfont.json +121 -0
- package/resources/iconfont/uniapp_ui_icon/iconfont.woff2 +0 -0
- package/resources/image/empty.svg +13 -0
- package/styles/global.scss +24 -0
- package/styles/index.scss +2 -0
- package/styles/utils/css-var.scss +87 -0
- package/styles/utils/ellipsis.scss +26 -0
- package/styles/utils/global-var.scss +11 -0
- package/styles/utils/index.scss +5 -0
- package/styles/utils/selector.scss +5 -0
- package/styles/utils/z-index.scss +10 -0
- package/styles/var/component.scss +242 -0
- package/styles/var/index.scss +2 -0
- package/styles/var/theme.scss +40 -0
- package/utils/date.js +151 -0
- package/utils/floor.js +20 -0
- package/utils/freezeDeep.js +19 -0
- package/utils/price.js +32 -0
- package/utils/round.js +22 -0
- package/utils/windowInfo.js +77 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "5081622",
|
|
3
|
+
"name": "小程序组件库图标",
|
|
4
|
+
"font_family": "uniapp_ui_icon",
|
|
5
|
+
"css_prefix_text": "ui_icon__",
|
|
6
|
+
"description": "仅包含在小程序组件库中用到的图标",
|
|
7
|
+
"glyphs": [
|
|
8
|
+
{
|
|
9
|
+
"icon_id": "36858635",
|
|
10
|
+
"name": "勾选",
|
|
11
|
+
"font_class": "checked",
|
|
12
|
+
"unicode": "e69b",
|
|
13
|
+
"unicode_decimal": 59035
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"icon_id": "36340731",
|
|
17
|
+
"name": "编辑",
|
|
18
|
+
"font_class": "textarea-edit",
|
|
19
|
+
"unicode": "e630",
|
|
20
|
+
"unicode_decimal": 58928
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"icon_id": "38860112",
|
|
24
|
+
"name": "加",
|
|
25
|
+
"font_class": "step-plus",
|
|
26
|
+
"unicode": "e6e1",
|
|
27
|
+
"unicode_decimal": 59105
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"icon_id": "38860221",
|
|
31
|
+
"name": "减",
|
|
32
|
+
"font_class": "step-minus",
|
|
33
|
+
"unicode": "e6e4",
|
|
34
|
+
"unicode_decimal": 59108
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"icon_id": "43179150",
|
|
38
|
+
"name": "选择器-箭头",
|
|
39
|
+
"font_class": "picker-arrow",
|
|
40
|
+
"unicode": "e70e",
|
|
41
|
+
"unicode_decimal": 59150
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"icon_id": "15908697",
|
|
45
|
+
"name": "密码-明文",
|
|
46
|
+
"font_class": "password-show",
|
|
47
|
+
"unicode": "e60e",
|
|
48
|
+
"unicode_decimal": 58894
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"icon_id": "15908700",
|
|
52
|
+
"name": "密码-密文",
|
|
53
|
+
"font_class": "password-hide",
|
|
54
|
+
"unicode": "e60f",
|
|
55
|
+
"unicode_decimal": 58895
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"icon_id": "36340727",
|
|
59
|
+
"name": "关闭",
|
|
60
|
+
"font_class": "close",
|
|
61
|
+
"unicode": "e62c",
|
|
62
|
+
"unicode_decimal": 58924
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"icon_id": "41647659",
|
|
66
|
+
"name": "关闭",
|
|
67
|
+
"font_class": "close-filled",
|
|
68
|
+
"unicode": "e70c",
|
|
69
|
+
"unicode_decimal": 59148
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"icon_id": "33519",
|
|
73
|
+
"name": "导航-首页",
|
|
74
|
+
"font_class": "nav-home",
|
|
75
|
+
"unicode": "e6bb",
|
|
76
|
+
"unicode_decimal": 59067
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"icon_id": "43179149",
|
|
80
|
+
"name": "导航-回退",
|
|
81
|
+
"font_class": "nav-back",
|
|
82
|
+
"unicode": "e70d",
|
|
83
|
+
"unicode_decimal": 59149
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"icon_id": "46322002",
|
|
87
|
+
"name": "多选-勾选",
|
|
88
|
+
"font_class": "checkbox-checked",
|
|
89
|
+
"unicode": "e629",
|
|
90
|
+
"unicode_decimal": 58921
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"icon_id": "46322001",
|
|
94
|
+
"name": "多选-未勾选",
|
|
95
|
+
"font_class": "checkbox-unchecked",
|
|
96
|
+
"unicode": "e62a",
|
|
97
|
+
"unicode_decimal": 58922
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"icon_id": "46319790",
|
|
101
|
+
"name": "单选-勾选",
|
|
102
|
+
"font_class": "radio-checked",
|
|
103
|
+
"unicode": "e628",
|
|
104
|
+
"unicode_decimal": 58920
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"icon_id": "36340729",
|
|
108
|
+
"name": "单选-未勾选",
|
|
109
|
+
"font_class": "radio-unchecked",
|
|
110
|
+
"unicode": "e62e",
|
|
111
|
+
"unicode_decimal": 58926
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"icon_id": "46276469",
|
|
115
|
+
"name": "加载动画-spinner",
|
|
116
|
+
"font_class": "loading-dot-spinner",
|
|
117
|
+
"unicode": "e627",
|
|
118
|
+
"unicode_decimal": 58919
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg width="1024" height="1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill="#dee0e4" d="M 515.4 453 l -327.7 -41 l 273.1 -58 l 351.6 30.7 l -297 68.3 z" />
|
|
3
|
+
<path fill="#bbc0c9" d="M 515.4 846.5 v -393 l 286.7 -64.4 v 372.7 l -286.7 84.7 z" />
|
|
4
|
+
<path fill="#dcdfe3" d="M 515.4 846.5 v -393 L 187.7 413 v 369.3 l 327.7 64.2 z" />
|
|
5
|
+
<path fill="#e9eaee" d="M 610.2 600.8 L 515.4 454 l 297 -68.3 l 99 133.1 l -301.2 81.9 z" />
|
|
6
|
+
<path fill="#eaecf0" d="M 443.7 614.4 L 515.4 454 l -327.7 -41 l -78.5 143.4 l 334.5 58 z" />
|
|
7
|
+
<path fill="#ccd2db"
|
|
8
|
+
d="M 290.1 276.5 c -54.6 -5.5 -79.6 -61.4 -85.3 -88.8 c 44.4 44.4 64.8 30.7 85.3 34.1 c 35.5 35.5 96.7 35.3 122.9 30.7 c -13.7 6.8 -54.6 30.7 -122.9 23.9 z" />
|
|
9
|
+
<path fill="#e8eaee"
|
|
10
|
+
d="M 208.2 198 c -8.2 -13.7 -14.8 -51.2 -17.1 -68.3 c 49.1 41 95.6 33 112.6 23.9 c 34.1 71.7 133.1 95.6 122.9 95.6 c -78.5 30.7 -133.1 -6.8 -139.9 -20.5 c -47.8 3.4 -68.3 -13.7 -78.5 -30.7 z M 696.3 331.1 c 20.5 -37.5 30.7 -81.9 34.1 -116 c 17.1 -3.4 37.5 -17.1 47.8 -30.7 c 6.8 71.7 -20.5 119.5 -30.7 126.3 c -8.2 5.5 -37.5 17.1 -51.2 20.5 z" />
|
|
11
|
+
<path fill="#bdc1c9"
|
|
12
|
+
d="M 88.8 570 c -19.1 0 -37.5 -10.2 -47.8 -20.5 c 34.1 -10.2 61.4 -23.9 71.7 -30.7 c 13.7 10.2 34.1 17.1 44.4 20.5 C 140 556.4 108 570 88.8 570 z" />
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use './var' as *;
|
|
3
|
+
@use './utils' as *;
|
|
4
|
+
|
|
5
|
+
page {
|
|
6
|
+
@each $name, $value in $component-themes {
|
|
7
|
+
@for $i from 9 through 1 {
|
|
8
|
+
#{DO_NOT_USE__global-var-name(theme, $name + '-dark' + $i)}: #{color.scale($value, $blackness: $i * 10%)};
|
|
9
|
+
}
|
|
10
|
+
#{DO_NOT_USE__global-var-name(theme, $name)}: #{$value};
|
|
11
|
+
@for $i from 1 through 9 {
|
|
12
|
+
#{DO_NOT_USE__global-var-name(theme, $name + '-light' + $i)}: #{color.scale($value, $whiteness: $i * 10%)};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
@each $name, $value in $component-colors {
|
|
16
|
+
#{DO_NOT_USE__global-var-name(color, $name)}: #{$value};
|
|
17
|
+
}
|
|
18
|
+
@each $name, $value in $component-font-sizes {
|
|
19
|
+
#{DO_NOT_USE__global-var-name(font-size, $name)}: #{$value};
|
|
20
|
+
}
|
|
21
|
+
@each $name, $value in $component-vars {
|
|
22
|
+
#{DO_NOT_USE__global-var-name(other, $name)}: #{$value};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
@use 'sass:string';
|
|
5
|
+
@use '../var/theme' as *;
|
|
6
|
+
|
|
7
|
+
$component-name: null !default;
|
|
8
|
+
$component-vars: null !default;
|
|
9
|
+
|
|
10
|
+
// 返回组件外部变量名
|
|
11
|
+
@function UTILS__VAR_NAME($name, $component: $component-name) {
|
|
12
|
+
@return string.unquote('--#{$component-prefix}-#{$component}--#{$name}');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// 设置组件外部变量值
|
|
16
|
+
@mixin UTILS__SET_VAR($component, $values) {
|
|
17
|
+
@each $name, $value in $values {
|
|
18
|
+
#{UTILS__VAR_NAME($name, $component)}: $value;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 返回组件外部变量值
|
|
23
|
+
@function UTILS__VAR($name, $component: $component-name, $default: null) {
|
|
24
|
+
@if $default != null {
|
|
25
|
+
@return var(UTILS__VAR_NAME($name, $component), $default);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@return var(UTILS__VAR_NAME($name, $component));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// 返回组件内部变量值
|
|
32
|
+
@function UTILS__LOCAL_VAR($name, $default: null) {
|
|
33
|
+
@if $default != null {
|
|
34
|
+
@return var(__DO_NOT_USE__local-var-name($name), $default);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@return var(__DO_NOT_USE__local-var-name($name));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 定义组件变量
|
|
41
|
+
@mixin UTILS__DEFINE_COMPONENT_VARS() {
|
|
42
|
+
@if not $component-name {
|
|
43
|
+
@error "请在调用 UTILS__DEFINE_COMPONENT_VARS 之前设置 $component-name";
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@if (not $component-vars) or (meta.type-of($component-vars) != 'map') {
|
|
47
|
+
@error "请在调用 UTILS__DEFINE_COMPONENT_VARS 之前设置 $component-vars";
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@each $key, $value in $component-vars {
|
|
51
|
+
@include __DO_NOT_USE__define-component-var($key, $value);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
56
|
+
|
|
57
|
+
// 返回组件内部变量名
|
|
58
|
+
@function __DO_NOT_USE__local-var-name($name) {
|
|
59
|
+
@return string.unquote('--#{$name}');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// 定义单个组件变量,不要直接调用
|
|
63
|
+
@mixin __DO_NOT_USE__define-component-var($name, $value) {
|
|
64
|
+
@if not $component-prefix {
|
|
65
|
+
@error "请在调用 __DO_NOT_USE__define-component-var 之前设置 component-prefix";
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
$var-prefix: '#{$component-prefix}-#{$component-name}';
|
|
69
|
+
|
|
70
|
+
$default: false;
|
|
71
|
+
|
|
72
|
+
@if string.slice('' + $value, -3) == 'rpx' {
|
|
73
|
+
$default: true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
$var-name: UTILS__VAR_NAME($name);
|
|
77
|
+
$local-name: __DO_NOT_USE__local-var-name($name);
|
|
78
|
+
|
|
79
|
+
@if $default {
|
|
80
|
+
#{$var-name}--default: #{$value};
|
|
81
|
+
#{$local-name}: var(#{$var-name}, var(#{$var-name}--default));
|
|
82
|
+
} @else if $value == null {
|
|
83
|
+
#{$local-name}: var(#{$var-name});
|
|
84
|
+
} @else {
|
|
85
|
+
#{$local-name}: var(#{$var-name}, #{$value});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// 单行
|
|
2
|
+
.ellipsis {
|
|
3
|
+
overflow-x: hidden;
|
|
4
|
+
text-overflow: ellipsis;
|
|
5
|
+
white-space: nowrap;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@mixin UTILS__ELLIPSIS($line: 1) {
|
|
9
|
+
@if $line < 1 {
|
|
10
|
+
@error "$line 必须为非 0 正整数";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@if $line == 1 {
|
|
14
|
+
overflow-x: hidden;
|
|
15
|
+
text-overflow: ellipsis;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
} @else {
|
|
18
|
+
display: -webkit-box;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
text-overflow: ellipsis;
|
|
21
|
+
word-break: break-all;
|
|
22
|
+
-webkit-box-orient: vertical; /*设置对齐模式*/
|
|
23
|
+
-webkit-line-clamp: $line; /*设置多行的行数*/
|
|
24
|
+
line-clamp: $line; /*设置多行的行数*/
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@use 'sass:string';
|
|
2
|
+
@use '../var/theme' as *;
|
|
3
|
+
|
|
4
|
+
@function DO_NOT_USE__global-var-name($type-name, $name) {
|
|
5
|
+
@return string.unquote('--#{$component-prefix}--#{$type-name}--#{$name}');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// 返回主题变量
|
|
9
|
+
@function UTILS__GLOBAL_VAR($type-name, $name) {
|
|
10
|
+
@return var(#{DO_NOT_USE__global-var-name($type-name, $name)});
|
|
11
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../utils' as *;
|
|
3
|
+
|
|
4
|
+
$badge: () !default;
|
|
5
|
+
$badge-default: (
|
|
6
|
+
// 相对于右上角偏移量
|
|
7
|
+
translate: 40% -40%,
|
|
8
|
+
// 字号
|
|
9
|
+
font-size: UTILS__GLOBAL_VAR(font-size, small),
|
|
10
|
+
// 文字颜色
|
|
11
|
+
color: #fff,
|
|
12
|
+
// 背景色
|
|
13
|
+
background: #ff0000,
|
|
14
|
+
// 边框
|
|
15
|
+
border: none,
|
|
16
|
+
// 高度
|
|
17
|
+
height: calc(#{UTILS__LOCAL_VAR(font-size)} + 12rpx),
|
|
18
|
+
// 圆角
|
|
19
|
+
border-radius: 40rpx
|
|
20
|
+
);
|
|
21
|
+
$badge: map.merge($badge-default, $badge);
|
|
22
|
+
|
|
23
|
+
$page-header: () !default;
|
|
24
|
+
$page-header-default: (
|
|
25
|
+
// 背景色
|
|
26
|
+
background: #fff,
|
|
27
|
+
// 字体大小
|
|
28
|
+
font-size: 28rpx,
|
|
29
|
+
// 标题栏下的额外内容高度,有内容时需设置次值
|
|
30
|
+
extra-height: 0px,
|
|
31
|
+
// 亮色主题下的文本颜色
|
|
32
|
+
color-light: #000,
|
|
33
|
+
// 暗色主题下的文本颜色
|
|
34
|
+
color-dark: #fff
|
|
35
|
+
);
|
|
36
|
+
$page-header: map.merge($page-header-default, $page-header);
|
|
37
|
+
|
|
38
|
+
$page-body: () !default;
|
|
39
|
+
$page-body-default: (
|
|
40
|
+
// 可视区域背景
|
|
41
|
+
background: transparent,
|
|
42
|
+
padding-x: 20rpx,
|
|
43
|
+
padding-y: 20rpx
|
|
44
|
+
);
|
|
45
|
+
$page-body: map.merge($page-body-default, $page-body);
|
|
46
|
+
|
|
47
|
+
$page-footer: () !default;
|
|
48
|
+
$page-footer-default: (
|
|
49
|
+
// 背景色
|
|
50
|
+
background: #fff,
|
|
51
|
+
// 高度
|
|
52
|
+
height: 100rpx,
|
|
53
|
+
// 横向两端间距
|
|
54
|
+
spacing-horizontal: 30rpx
|
|
55
|
+
);
|
|
56
|
+
$page-footer: map.merge($page-footer-default, $page-footer);
|
|
57
|
+
|
|
58
|
+
$page: () !default;
|
|
59
|
+
$page-default: (
|
|
60
|
+
// 页面背景
|
|
61
|
+
background: transparent
|
|
62
|
+
);
|
|
63
|
+
$page: map.merge($page-default, $page);
|
|
64
|
+
|
|
65
|
+
$button: () !default;
|
|
66
|
+
$button-default: (
|
|
67
|
+
// 按钮主题颜色,默认取值组件 props 中的 type
|
|
68
|
+
theme: var(--theme-from-prop),
|
|
69
|
+
// 按钮文本颜色
|
|
70
|
+
text-color: #fff,
|
|
71
|
+
// 按钮激活态遮罩颜色
|
|
72
|
+
active-mask: #ffffff,
|
|
73
|
+
// plain 按钮的边框宽度
|
|
74
|
+
border-width: 3rpx
|
|
75
|
+
);
|
|
76
|
+
$button: map.merge($button-default, $button);
|
|
77
|
+
|
|
78
|
+
$data-list: () !default;
|
|
79
|
+
$data-list-default: (
|
|
80
|
+
// 触发加载更多的区域高度
|
|
81
|
+
observer-height: 100vh
|
|
82
|
+
);
|
|
83
|
+
$data-list: map.merge($data-list-default, $data-list);
|
|
84
|
+
|
|
85
|
+
$empty: () !default;
|
|
86
|
+
$empty-default: (
|
|
87
|
+
image-size: 300rpx,
|
|
88
|
+
image-width: UTILS__LOCAL_VAR(image-size),
|
|
89
|
+
image-height: UTILS__LOCAL_VAR(image-size),
|
|
90
|
+
space: 20rpx,
|
|
91
|
+
color: #ccc,
|
|
92
|
+
font-size: UTILS__GLOBAL_VAR(font-size, normal),
|
|
93
|
+
);
|
|
94
|
+
$empty: map.merge($empty-default, $empty);
|
|
95
|
+
|
|
96
|
+
$load-more: () !default;
|
|
97
|
+
$load-more-default: (
|
|
98
|
+
height: 60rpx,
|
|
99
|
+
space: 40rpx,
|
|
100
|
+
color: #ccc,
|
|
101
|
+
font-size: UTILS__GLOBAL_VAR(font-size, normal),
|
|
102
|
+
);
|
|
103
|
+
$load-more: map.merge($load-more-default, $load-more);
|
|
104
|
+
|
|
105
|
+
$checkbox: () !default;
|
|
106
|
+
$checkbox-default: (
|
|
107
|
+
checked-color: UTILS__GLOBAL_VAR(theme, primary),
|
|
108
|
+
unchecked-color: UTILS__GLOBAL_VAR(color, foreground),
|
|
109
|
+
);
|
|
110
|
+
$checkbox: map.merge($checkbox-default, $checkbox);
|
|
111
|
+
|
|
112
|
+
$popover: () !default;
|
|
113
|
+
$popover-default: (
|
|
114
|
+
// 遮罩层颜色
|
|
115
|
+
mask-color: #00000080,
|
|
116
|
+
// 背景色
|
|
117
|
+
background: #fff,
|
|
118
|
+
// 位置,position 为 center 时有效
|
|
119
|
+
position: 50% auto auto 50%,
|
|
120
|
+
// 宽度,position 为 left 、 right 或 center 时有效
|
|
121
|
+
width: 80vw,
|
|
122
|
+
// 最小高度,position 为 top 、 bottom 或 center 时有效
|
|
123
|
+
min-height: 0px,
|
|
124
|
+
// 最大高度,position 为 top 、 bottom 或 center 时有效
|
|
125
|
+
max-height: 75vh,
|
|
126
|
+
// 内边距
|
|
127
|
+
padding: 20rpx,
|
|
128
|
+
// 边框圆角
|
|
129
|
+
radius: 20rpx,
|
|
130
|
+
// 头高度
|
|
131
|
+
header-height: 0px,
|
|
132
|
+
// 尾高度
|
|
133
|
+
footer-height: 0px
|
|
134
|
+
);
|
|
135
|
+
$popover: map.merge($popover-default, $popover);
|
|
136
|
+
|
|
137
|
+
$dialog: () !default;
|
|
138
|
+
$dialog-default: (
|
|
139
|
+
// 标题栏高度
|
|
140
|
+
header-height: 100rpx,
|
|
141
|
+
// 操作栏高度
|
|
142
|
+
footer-height: 134rpx
|
|
143
|
+
);
|
|
144
|
+
$dialog: map.merge($dialog-default, $dialog);
|
|
145
|
+
|
|
146
|
+
$popup: () !default;
|
|
147
|
+
$popup-default: (
|
|
148
|
+
// 标题栏高度
|
|
149
|
+
header-height: 100rpx,
|
|
150
|
+
// 操作栏高度
|
|
151
|
+
footer-height: 102rpx
|
|
152
|
+
);
|
|
153
|
+
$popup: map.merge($popup-default, $popup);
|
|
154
|
+
|
|
155
|
+
$form-item: () !default;
|
|
156
|
+
$form-item-default: (
|
|
157
|
+
// label 宽度
|
|
158
|
+
label-width: 6em,
|
|
159
|
+
// 高度
|
|
160
|
+
height: 80rpx
|
|
161
|
+
);
|
|
162
|
+
$form-item: map.merge($form-item-default, $form-item);
|
|
163
|
+
|
|
164
|
+
$switch: () !default;
|
|
165
|
+
$switch-default: (
|
|
166
|
+
width: 92rpx,
|
|
167
|
+
height: 48rpx,
|
|
168
|
+
active-color: UTILS__GLOBAL_VAR(theme, primary),
|
|
169
|
+
indicator-size: 42rpx,
|
|
170
|
+
);
|
|
171
|
+
$switch: map.merge($switch-default, $switch);
|
|
172
|
+
|
|
173
|
+
$number-input: () !default;
|
|
174
|
+
$number-input-default: (
|
|
175
|
+
font-size: inherit,
|
|
176
|
+
text-align: center,
|
|
177
|
+
);
|
|
178
|
+
$number-input: map.merge($number-input-default, $number-input);
|
|
179
|
+
|
|
180
|
+
$numpad: () !default;
|
|
181
|
+
$numpad-default: (
|
|
182
|
+
row-gap: 20rpx,
|
|
183
|
+
col-gap: 20rpx,
|
|
184
|
+
);
|
|
185
|
+
$numpad: map.merge($numpad-default, $numpad);
|
|
186
|
+
|
|
187
|
+
$number-dialog: () !default;
|
|
188
|
+
$number-dialog-default: (
|
|
189
|
+
// 按钮尺寸
|
|
190
|
+
button-size: 48rpx
|
|
191
|
+
);
|
|
192
|
+
$number-dialog: map.merge($number-dialog-default, $number-dialog);
|
|
193
|
+
|
|
194
|
+
$tab: () !default;
|
|
195
|
+
$tab-default: (
|
|
196
|
+
height: 88rpx,
|
|
197
|
+
tab-padding: 0 10rpx,
|
|
198
|
+
tab-gaps: 0,
|
|
199
|
+
color: UTILS__GLOBAL_VAR(color, foreground),
|
|
200
|
+
font-size: UTILS__GLOBAL_VAR(font-size, large),
|
|
201
|
+
font-weight: 600,
|
|
202
|
+
background: #ffffff,
|
|
203
|
+
border-radius: 0,
|
|
204
|
+
active-color: UTILS__LOCAL_VAR(color),
|
|
205
|
+
indicator-color: UTILS__GLOBAL_VAR(theme, primary),
|
|
206
|
+
indicator-width: null,
|
|
207
|
+
);
|
|
208
|
+
$tab: map.merge($tab-default, $tab);
|
|
209
|
+
|
|
210
|
+
$search: () !default;
|
|
211
|
+
$search-default: (
|
|
212
|
+
background: UTILS__GLOBAL_VAR(color, background),
|
|
213
|
+
border-radius: 8rpx,
|
|
214
|
+
height: 64rpx,
|
|
215
|
+
padding: 0 20rpx,
|
|
216
|
+
);
|
|
217
|
+
$search: map.merge($search-default, $search);
|
|
218
|
+
|
|
219
|
+
$price: () !default;
|
|
220
|
+
$price-default: (
|
|
221
|
+
color: inherit,
|
|
222
|
+
font-size: inherit,
|
|
223
|
+
font-weight: inherit,
|
|
224
|
+
integer-color: UTILS__LOCAL_VAR(color),
|
|
225
|
+
integer-font-size: UTILS__LOCAL_VAR(font-size),
|
|
226
|
+
integer-font-weight: UTILS__LOCAL_VAR(font-weight),
|
|
227
|
+
decimal-color: UTILS__LOCAL_VAR(color),
|
|
228
|
+
decimal-font-size: UTILS__LOCAL_VAR(font-size),
|
|
229
|
+
decimal-font-weight: UTILS__LOCAL_VAR(font-weight),
|
|
230
|
+
unit-color: UTILS__LOCAL_VAR(color),
|
|
231
|
+
unit-font-size: UTILS__LOCAL_VAR(font-size),
|
|
232
|
+
unit-font-weight: UTILS__LOCAL_VAR(font-weight),
|
|
233
|
+
);
|
|
234
|
+
$price: map.merge($price-default, $price);
|
|
235
|
+
|
|
236
|
+
// $page: () !default;
|
|
237
|
+
// $page-default: ();
|
|
238
|
+
// $page: map.merge($page-default, $page);
|
|
239
|
+
|
|
240
|
+
// $page: () !default;
|
|
241
|
+
// $page-default: ();
|
|
242
|
+
// $page: map.merge($page-default, $page);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$component-prefix: 'app' !default;
|
|
4
|
+
|
|
5
|
+
$component-z-index-maps: (
|
|
6
|
+
loading: 9999,
|
|
7
|
+
dialog: 4000,
|
|
8
|
+
dropdown: 3000,
|
|
9
|
+
popover: 3000,
|
|
10
|
+
page-header: 2000,
|
|
11
|
+
page-footer: 2000,
|
|
12
|
+
) !default;
|
|
13
|
+
|
|
14
|
+
$component-themes: (
|
|
15
|
+
primary: #f26f24,
|
|
16
|
+
secondary: #1e87e9,
|
|
17
|
+
success: #6fe633,
|
|
18
|
+
warning: #f3bb2d,
|
|
19
|
+
danger: #ff0000,
|
|
20
|
+
info: #9a9a99,
|
|
21
|
+
) !default;
|
|
22
|
+
|
|
23
|
+
$component-colors: (
|
|
24
|
+
foreground: #333,
|
|
25
|
+
background: #f4f5f6,
|
|
26
|
+
placeholder: #9a9a99,
|
|
27
|
+
disabled: c3c4c5,
|
|
28
|
+
) !default;
|
|
29
|
+
|
|
30
|
+
$component-font-sizes: (
|
|
31
|
+
small: 24rpx,
|
|
32
|
+
normal: 28rpx,
|
|
33
|
+
large: 32rpx,
|
|
34
|
+
) !default;
|
|
35
|
+
|
|
36
|
+
$component-vars: (
|
|
37
|
+
font-size-small: 24rpx,
|
|
38
|
+
font-size-normal: 28rpx,
|
|
39
|
+
font-size-large: 32rpx,
|
|
40
|
+
) !default;
|