@ecolovo/uniapp-components 1.0.6 → 1.0.9

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.
Files changed (72) hide show
  1. package/README.md +117 -0
  2. package/components/aspect/aspect.vue +3 -3
  3. package/components/badge/badge.vue +1 -1
  4. package/components/button/button.vue +6 -2
  5. package/components/checkbox/checkbox.vue +18 -4
  6. package/components/checkbox-group/checkbox-group.vue +1 -1
  7. package/components/checkbox-group2/checkbox-group2.vue +1 -1
  8. package/components/checkbox-group2/checkbox.vue +1 -1
  9. package/components/data-list/data-list.vue +1 -1
  10. package/components/date-picker/date-picker-view.vue +1 -1
  11. package/components/date-picker/date-picker.vue +1 -1
  12. package/components/datetime-picker/datetime-picker-view.vue +1 -1
  13. package/components/datetime-picker/datetime-picker.vue +1 -1
  14. package/components/dialog/dialog-content.vue +11 -7
  15. package/components/dialog/dialog.vue +22 -14
  16. package/components/dropdown/dropdown.vue +1 -1
  17. package/components/empty/empty.vue +1 -1
  18. package/components/flex/flex.vue +1 -1
  19. package/components/form/form.vue +1 -1
  20. package/components/form-item/form-item.vue +1 -1
  21. package/components/icon/icon.vue +1 -1
  22. package/components/image/image.vue +1 -1
  23. package/components/input/input.vue +1 -1
  24. package/components/input/password-input.vue +1 -1
  25. package/components/list-page/list-page.vue +1 -1
  26. package/components/load-more/load-more.vue +1 -1
  27. package/components/loading/animations/loading-animation1.vue +1 -1
  28. package/components/loading/animations/loading-animation2.vue +1 -1
  29. package/components/loading/animations/loading-animation3.vue +1 -1
  30. package/components/loading/animations/loading-animation4.vue +1 -1
  31. package/components/loading/loading.vue +1 -1
  32. package/components/message-box/message-box.vue +1 -1
  33. package/components/number-dialog/number-dialog.vue +1 -1
  34. package/components/number-input/number-input.vue +1 -1
  35. package/components/numpad/numpad.vue +1 -1
  36. package/components/page/page-body.vue +8 -3
  37. package/components/page/page-footer.vue +1 -1
  38. package/components/page/page-header.vue +24 -8
  39. package/components/page/page.vue +7 -7
  40. package/components/picker/picker-popup.vue +1 -1
  41. package/components/picker/picker.vue +1 -1
  42. package/components/popover/popover-content.vue +1 -1
  43. package/components/popover/popover-mask.vue +1 -1
  44. package/components/popover/popover.vue +1 -1
  45. package/components/popup/popup-content.vue +1 -1
  46. package/components/popup/popup.vue +1 -1
  47. package/components/price/price.vue +1 -1
  48. package/components/search/search.vue +1 -1
  49. package/components/searching/searching.vue +1 -1
  50. package/components/selector/selector.vue +1 -1
  51. package/components/switch/switch.vue +1 -1
  52. package/components/tab/tab.vue +1 -1
  53. package/components/table/table.vue +1 -1
  54. package/components/textarea/textarea.vue +1 -1
  55. package/components/time-picker/time-picker-view.vue +1 -1
  56. package/components/time-picker/time-picker.vue +1 -1
  57. package/components/uploader/file-uploader.vue +1 -1
  58. package/components/uploader/media-uploader.vue +1 -1
  59. package/components/uploader/upload-button.vue +1 -1
  60. package/components/uploader/uploader.vue +1 -1
  61. package/configs/index.d.ts +22 -0
  62. package/configs/index.js +31 -4
  63. package/init.d.ts +19 -0
  64. package/init.js +4 -1
  65. package/mixins/componentName.js +2 -2
  66. package/package.json +15 -1
  67. package/styles/global.scss +4 -4
  68. package/styles/utils/css-var.scss +7 -2
  69. package/styles/utils/z-index.scss +1 -1
  70. package/styles/var/component.scss +5 -2
  71. package/styles/var/theme.scss +20 -10
  72. package/utils/windowInfo.js +0 -4
@@ -57,9 +57,10 @@
57
57
  import componentName from '../../mixins/componentName';
58
58
  import windowInfoMixin from '../../mixins/windowInfo';
59
59
  import IconCpn from '../icon/icon.vue';
60
+ import { homePath } from '../../configs';
60
61
 
61
62
  export default {
62
- name: 'AppPageHeader',
63
+ name: 'PageHeader',
63
64
  options: {
64
65
  virtualHost: true,
65
66
  styleIsolation: 'shared',
@@ -84,27 +85,42 @@ export default {
84
85
  },
85
86
  /** 导航按钮类型: 0 = 不显示,1 = 返回,2 = 首页,3 = 返回|首页 */
86
87
  navType: {
87
- type: Number,
88
- default: 1,
88
+ type: [Number, null],
89
+ default: null,
89
90
  },
90
91
  },
91
92
  computed: {
92
93
  /** 首页路径 */
93
94
  homePageUrl() {
94
- // TODO HOME_PATH
95
- return process.env.VUE_APP_HOME_PATH;
95
+ return homePath;
96
96
  },
97
97
  /** 是否显示返回按钮 */
98
98
  hasBack() {
99
- return this.navType & 1;
99
+ // 如果指定了导航按钮类型,则根据类型判断
100
+ if (this.navType !== null) return !!(this.navType & 1);
101
+ const pages = getCurrentPages();
102
+ // 在首页不显示返回按钮
103
+ if (this.homePageUrl === '/' + pages[0].route) return false;
104
+ // 页面栈只有一个时不显示返回按钮
105
+ if (pages.length === 1) return false;
106
+ // 其他情况均显示返回按钮
107
+ return true;
100
108
  },
101
109
  /** 是否显示首页按钮 */
102
110
  hasHome() {
103
- return this.navType & 2;
111
+ // 如果指定了导航按钮类型,则根据类型判断
112
+ if (this.navType !== null) return !!(this.navType & 2);
113
+ const pages = getCurrentPages();
114
+ // 在首页不显示返回首页按钮
115
+ if (this.homePageUrl === '/' + pages[0].route) return false;
116
+ // 页面栈只有一个时显示返回按钮
117
+ if (pages.length === 1) return true;
118
+ // 其他情况均不显示返回按钮
119
+ return false;
104
120
  },
105
121
  /** 导航按钮个数 */
106
122
  iconCount() {
107
- return Math.ceil(this.navType / 2);
123
+ return (this.hasBack ? 1 : 0) + (this.hasHome ? 1 : 0);
108
124
  },
109
125
  styleStr() {
110
126
  return [
@@ -11,7 +11,7 @@
11
11
  :has-custom-nav="custom"
12
12
  :has-footer="hasFooter && $slots.footer"
13
13
  :use-scroll="useScroll"
14
- :is-tab-page="isTabPage"
14
+ :is-tab-page="tabbar"
15
15
  :enable-refresh="enableRefresh"
16
16
  :refreshing="refreshing"
17
17
  @scroll="$emit('scroll', $event)"
@@ -21,7 +21,7 @@
21
21
  <slot></slot>
22
22
  </page-body-cpn>
23
23
 
24
- <page-footer-cpn v-if="hasFooter && $slots.footer" :is-tab-page="isTabPage">
24
+ <page-footer-cpn v-if="hasFooter && $slots.footer" :is-tab-page="tabbar">
25
25
  <slot name="footer"></slot>
26
26
  </page-footer-cpn>
27
27
 
@@ -37,7 +37,7 @@ import PageFooterCpn from './page-footer.vue';
37
37
  import PageHeaderCpn from './page-header.vue';
38
38
 
39
39
  export default {
40
- name: 'AppPage',
40
+ name: 'Page',
41
41
  options: {
42
42
  virtualHost: true,
43
43
  styleIsolation: 'shared',
@@ -95,10 +95,10 @@ export default {
95
95
  type: String,
96
96
  default: 'light',
97
97
  },
98
- },
99
- computed: {
100
- isTabPage() {
101
- return false;
98
+ /** 是否是 tabbar 页面,且 tabbar 未隐藏 */
99
+ tabbar: {
100
+ type: Boolean,
101
+ default: false,
102
102
  },
103
103
  },
104
104
  };
@@ -74,7 +74,7 @@ import PopupContentCpn from '../popup/popup-content.vue';
74
74
  import SearchCpn from '../search/search.vue';
75
75
 
76
76
  export default {
77
- name: 'AppPickerPopup',
77
+ name: 'PickerPopup',
78
78
  options: {
79
79
  virtualHost: true,
80
80
  styleIsolation: 'shared',
@@ -32,7 +32,7 @@ import SelectorCpn from '../selector/selector.vue';
32
32
  import PickerPopupCpn from './picker-popup.vue';
33
33
 
34
34
  export default {
35
- name: 'AppPicker',
35
+ name: 'Picker',
36
36
  options: {
37
37
  virtualHost: true,
38
38
  styleIsolation: 'shared',
@@ -41,7 +41,7 @@ import windowInfoMixin from '../../mixins/windowInfo';
41
41
  import IconCpn from '../icon/icon.vue';
42
42
 
43
43
  export default {
44
- name: 'AppPopoverContent',
44
+ name: 'PopoverContent',
45
45
  options: {
46
46
  virtualHost: true,
47
47
  styleIsolation: 'shared',
@@ -20,7 +20,7 @@
20
20
  import componentName from '../../mixins/componentName';
21
21
 
22
22
  export default {
23
- name: 'AppPopoverMask',
23
+ name: 'PopoverMask',
24
24
  options: {
25
25
  virtualHost: true,
26
26
  styleIsolation: 'shared',
@@ -36,7 +36,7 @@ import popoverContentCpn from './popover-content.vue';
36
36
  import popoverMaskCpn from './popover-mask.vue';
37
37
 
38
38
  export default {
39
- name: 'AppPopover',
39
+ name: 'Popover',
40
40
  options: {
41
41
  virtualHost: true,
42
42
  styleIsolation: 'shared',
@@ -51,7 +51,7 @@ import IconCpn from '../icon/icon.vue';
51
51
  import PopoverContentCpn from '../popover/popover-content.vue';
52
52
 
53
53
  export default {
54
- name: 'AppPopupContent',
54
+ name: 'PopupContent',
55
55
  options: {
56
56
  virtualHost: true,
57
57
  styleIsolation: 'shared',
@@ -33,7 +33,7 @@ import PopoverMaskCpn from '../popover/popover-mask.vue';
33
33
  import PopupContentCpn from './popup-content.vue';
34
34
 
35
35
  export default {
36
- name: 'AppPopup',
36
+ name: 'Popup',
37
37
  options: {
38
38
  virtualHost: true,
39
39
  styleIsolation: 'shared',
@@ -25,7 +25,7 @@ import componentName from '../../mixins/componentName';
25
25
  import { formatPrice } from '../../utils/price';
26
26
 
27
27
  export default {
28
- name: 'AppPrice',
28
+ name: 'Price',
29
29
  options: {
30
30
  virtualHost: true,
31
31
  styleIsolation: 'shared',
@@ -49,7 +49,7 @@ import ButtonCpn from '../button/button.vue';
49
49
  import IconCpn from '../icon/icon.vue';
50
50
 
51
51
  export default {
52
- name: 'AppSearch',
52
+ name: 'Search',
53
53
  options: {
54
54
  virtualHost: true,
55
55
  styleIsolation: 'shared',
@@ -15,7 +15,7 @@ import componentName from '../../mixins/componentName';
15
15
  import IconCpn from '../icon/icon.vue';
16
16
 
17
17
  export default {
18
- name: 'AppSearching',
18
+ name: 'Searching',
19
19
  options: {
20
20
  virtualHost: true,
21
21
  styleIsolation: 'shared',
@@ -19,7 +19,7 @@ import { isFormReadonly } from '../form/mixin';
19
19
  import IconCpn from '../icon/icon.vue';
20
20
 
21
21
  export default {
22
- name: 'AppSelector',
22
+ name: 'Selector',
23
23
  options: {
24
24
  virtualHost: true,
25
25
  styleIsolation: 'shared',
@@ -21,7 +21,7 @@ import { isFormReadonly } from '../form/mixin';
21
21
  import IconCpn from '../icon/icon.vue';
22
22
 
23
23
  export default {
24
- name: 'AppSwitch',
24
+ name: 'Switch',
25
25
  options: {
26
26
  virtualHost: true,
27
27
  styleIsolation: 'shared',
@@ -24,7 +24,7 @@
24
24
  import componentName from '../../mixins/componentName';
25
25
 
26
26
  export default {
27
- name: 'AppTab',
27
+ name: 'Tab',
28
28
  options: {
29
29
  virtualHost: true,
30
30
  styleIsolation: 'shared',
@@ -27,7 +27,7 @@ import componentName from '../../mixins/componentName';
27
27
  import { floor2 } from '../../utils/floor';
28
28
 
29
29
  export default {
30
- name: 'AppTable',
30
+ name: 'Table',
31
31
  options: {
32
32
  virtualHost: true,
33
33
  styleIsolation: 'shared',
@@ -40,7 +40,7 @@ import { isFormReadonly } from '../form/mixin';
40
40
  import IconCpn from '../icon/icon.vue';
41
41
 
42
42
  export default {
43
- name: 'AppTextarea',
43
+ name: 'Textarea',
44
44
  options: {
45
45
  virtualHost: true,
46
46
  styleIsolation: 'shared',
@@ -27,7 +27,7 @@ import { formatDate } from '../../utils/date';
27
27
  const hourOptions = range(0, 24).map((item) => ('' + item).padStart(2, '0'));
28
28
 
29
29
  export default {
30
- name: 'AppTimePickerView',
30
+ name: 'TimePickerView',
31
31
  options: {
32
32
  virtualHost: true,
33
33
  styleIsolation: 'shared',
@@ -37,7 +37,7 @@ import SelectorCpn from '../selector/selector.vue';
37
37
  import TimePickerViewCpn from './time-picker-view.vue';
38
38
 
39
39
  export default {
40
- name: 'AppTimePicker',
40
+ name: 'TimePicker',
41
41
  options: {
42
42
  virtualHost: true,
43
43
  styleIsolation: 'shared',
@@ -17,7 +17,7 @@ import ButtonCpn from '../button/button.vue';
17
17
  import UploadMixin from './mixin';
18
18
 
19
19
  export default {
20
- name: 'AppUploader',
20
+ name: 'Uploader',
21
21
  options: {
22
22
  virtualHost: true,
23
23
  styleIsolation: 'shared',
@@ -66,7 +66,7 @@ import LoadingCpn from '../loading/animations/loading-animation4.vue';
66
66
  import UploadMixin from './mixin';
67
67
 
68
68
  export default {
69
- name: 'AppUploader',
69
+ name: 'Uploader',
70
70
  options: {
71
71
  virtualHost: true,
72
72
  styleIsolation: 'shared',
@@ -9,7 +9,7 @@ import componentName from '../../mixins/componentName';
9
9
  import ButtonCpn from '../button/button.vue';
10
10
 
11
11
  export default {
12
- name: 'AppUploadButton',
12
+ name: 'UploadButton',
13
13
  options: {
14
14
  virtualHost: true,
15
15
  styleIsolation: 'shared',
@@ -40,7 +40,7 @@ import ButtonCpn from '../button/button.vue';
40
40
  import ImageCpn from '../image/image.vue';
41
41
 
42
42
  export default {
43
- name: 'AppUploader',
43
+ name: 'Uploader',
44
44
  options: {
45
45
  virtualHost: true,
46
46
  styleIsolation: 'shared',
@@ -0,0 +1,22 @@
1
+ /** 组件前缀 */
2
+ declare let componentPrefix: string;
3
+ /** 首页路径 */
4
+ declare let homePath: string;
5
+ /** 设置组件前缀 */
6
+ declare const setComponentPrefix: (prefix: string) => void;
7
+ /** 设置首页路径 */
8
+ declare const setHomePath: (path: string) => void;
9
+ /** iconfont 图标 map */
10
+ declare let iconMap: Map<string, { fontFamily: string; prefix: string; name: string }>;
11
+ interface IconFontJson {
12
+ font_family: string;
13
+ css_prefix_text: string;
14
+ glyphs: { font_class: string }[];
15
+ }
16
+ /**
17
+ * 添加一组图标,传入 iconfont.json 文件内容
18
+ * @param iconJson iconfont.json 文件内容
19
+ */
20
+ declare const addIcons: (iconJson: IconFontJson) => void;
21
+
22
+ export { componentPrefix, homePath, IconFontJson, setComponentPrefix, setHomePath, iconMap, addIcons };
package/configs/index.js CHANGED
@@ -1,17 +1,36 @@
1
1
  /** 组件前缀 */
2
2
  let componentPrefix = 'app';
3
+ /** 首页路径 */
4
+ let homePath = '/pages/index/index';
3
5
 
4
- /** 设置组件前缀 */
6
+ /**
7
+ * 设置组件前缀
8
+ * @param {string} prefix 组件前缀
9
+ */
5
10
  function setComponentPrefix(prefix) {
6
11
  componentPrefix = prefix;
7
12
  }
8
13
 
14
+ /**
15
+ * 设置首页路径
16
+ * @param {string} path 首页路径
17
+ */
18
+ function setHomePath(path) {
19
+ homePath = path;
20
+ }
21
+
9
22
  /** iconfont 图标 map */
10
23
  const iconMap = new Map();
11
24
 
12
- /** 添加单个图标 */
25
+ /**
26
+ * 添加单个图标
27
+ * @param {string} fontFamily 字体文件名
28
+ * @param {string} prefix 图标前缀
29
+ * @param {string} name 图标名称
30
+ */
13
31
  function addIconToMap(fontFamily, prefix, name) {
14
32
  if (iconMap.has(name)) {
33
+ // eslint-disable-next-line no-console
15
34
  console.error(
16
35
  `图标库 "${fontFamily}" 中的图标 "${name}" 在图标库 "${
17
36
  iconMap.get(name).fontFamily
@@ -26,7 +45,14 @@ function addIconToMap(fontFamily, prefix, name) {
26
45
  });
27
46
  }
28
47
 
29
- /** 添加一组图标,传入 iconfont.json 文件内容 */
48
+ /**
49
+ * 添加一组图标,传入 iconfont.json 文件内容
50
+ * @param {object} iconJson iconfont.json 文件内容
51
+ * @param {string} iconJson.font_family
52
+ * @param {string} iconJson.css_prefix_text
53
+ * @param {object[]} iconJson.glyphs
54
+ * @param {string} iconJson.glyphs.font_class
55
+ */
30
56
  function addIcons(iconJson) {
31
57
  const fontFamily = iconJson.font_family;
32
58
  const prefix = iconJson.css_prefix_text;
@@ -36,6 +62,7 @@ function addIcons(iconJson) {
36
62
  });
37
63
  }
38
64
 
65
+ // 添加内部图标库
39
66
  addIcons(require('../resources/iconfont/uniapp_ui_icon/iconfont.json'));
40
67
 
41
- export { componentPrefix, setComponentPrefix, iconMap, addIcons };
68
+ export { componentPrefix, homePath, setComponentPrefix, setHomePath, iconMap, addIcons };
package/init.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ import { IconFontJson } from './configs';
2
+
3
+ /** 组件库初始化配置 */
4
+ interface InitOptions {
5
+ /** 组件前缀 */
6
+ componentPrefix?: string;
7
+ /** 首页路径 */
8
+ homePath?: string;
9
+ /** iconfont 图标 json 文件 */
10
+ iconfont?: IconFontJson | IconFontJson[];
11
+ }
12
+
13
+ /**
14
+ * 初始化组件库
15
+ * @param {InitOptions} options 组件库初始化配置
16
+ */
17
+ declare const init: (options: InitOptions) => void;
18
+
19
+ export default init;
package/init.js CHANGED
@@ -1,10 +1,13 @@
1
- const { setComponentPrefix, addIcons } = require('./configs');
1
+ const { setComponentPrefix, setHomePath, addIcons } = require('./configs');
2
2
 
3
3
  /** 组件库初始化方法,在 main.js 中调用 */
4
4
  function init(options = {}) {
5
5
  if (options.componentPrefix) {
6
6
  setComponentPrefix(options.componentPrefix);
7
7
  }
8
+ if (options.homePath) {
9
+ setHomePath(options.homePath);
10
+ }
8
11
  if (options.iconfont) {
9
12
  if (Array.isArray(options.iconfont)) {
10
13
  options.iconfont.forEach(addIcons);
@@ -17,7 +17,7 @@ export default {
17
17
  },
18
18
  /** 添加前缀后的组件名-大驼峰模式 */
19
19
  componentClass() {
20
- return this.componentPrefix + this.$options.name.replace(/^App/, '');
20
+ return this.componentPrefix + this.$options.name;
21
21
  },
22
22
  /** 添加前缀后的组件名-短横线模式 */
23
23
  componentKebabClass() {
@@ -25,7 +25,7 @@ export default {
25
25
  },
26
26
  /** 合并后的组件类名 */
27
27
  componentClassNames() {
28
- const baseClass = this.$style?.[this.$options.name.replace(/^App/, '')];
28
+ const baseClass = this.$style?.[this.$options.name];
29
29
  return [...(baseClass ? [baseClass] : []), this.componentClass, this.componentKebabClass];
30
30
  },
31
31
  },
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@ecolovo/uniapp-components",
3
- "version": "1.0.6",
3
+ "version": "1.0.9",
4
4
  "description": "Ecolovo UniApp 组件库",
5
+ "scripts": {
6
+ "lint": "eslint . --fix"
7
+ },
5
8
  "keywords": [
6
9
  "uniapp",
7
10
  "components"
@@ -11,5 +14,16 @@
11
14
  "dependencies": {
12
15
  "case-anything": "3.1.2",
13
16
  "lodash-es": "4.17.21"
17
+ },
18
+ "devDependencies": {
19
+ "@dcloudio/types": "^3.4.30",
20
+ "@eslint/js": "^10.0.1",
21
+ "eslint": "^10.0.3",
22
+ "eslint-config-prettier": "^10.1.8",
23
+ "eslint-plugin-prettier": "^5.5.5",
24
+ "eslint-plugin-vue": "^10.8.0",
25
+ "globals": "^17.4.0",
26
+ "prettier": "^2.8.8",
27
+ "vue-eslint-parser": "^10.4.0"
14
28
  }
15
29
  }
@@ -3,7 +3,7 @@
3
3
  @use './utils' as *;
4
4
 
5
5
  page {
6
- @each $name, $value in $component-themes {
6
+ @each $name, $value in $themes {
7
7
  @for $i from 9 through 1 {
8
8
  #{DO_NOT_USE__global-var-name(theme, $name + '-dark' + $i)}: #{color.scale($value, $blackness: $i * 10%)};
9
9
  }
@@ -12,13 +12,13 @@ page {
12
12
  #{DO_NOT_USE__global-var-name(theme, $name + '-light' + $i)}: #{color.scale($value, $whiteness: $i * 10%)};
13
13
  }
14
14
  }
15
- @each $name, $value in $component-colors {
15
+ @each $name, $value in $colors {
16
16
  #{DO_NOT_USE__global-var-name(color, $name)}: #{$value};
17
17
  }
18
- @each $name, $value in $component-font-sizes {
18
+ @each $name, $value in $font-sizes {
19
19
  #{DO_NOT_USE__global-var-name(font-size, $name)}: #{$value};
20
20
  }
21
- @each $name, $value in $component-vars {
21
+ @each $name, $value in $others {
22
22
  #{DO_NOT_USE__global-var-name(other, $name)}: #{$value};
23
23
  }
24
24
  }
@@ -12,8 +12,13 @@ $component-vars: null !default;
12
12
  @return string.unquote('--#{$component-prefix}-#{$component}--#{$name}');
13
13
  }
14
14
 
15
- // 设置组件外部变量值
16
- @mixin UTILS__SET_VAR($component, $values) {
15
+ // 设置组件单个外部变量值
16
+ @mixin UTILS__SET_VAR($component, $name, $value) {
17
+ #{UTILS__VAR_NAME($name, $component)}: $value;
18
+ }
19
+
20
+ // 设置组件一组外部变量值
21
+ @mixin UTILS__SET_VAR_LIST($component, $values) {
17
22
  @each $name, $value in $values {
18
23
  #{UTILS__VAR_NAME($name, $component)}: $value;
19
24
  }
@@ -6,5 +6,5 @@
6
6
  @use './css-var' as *;
7
7
 
8
8
  @function UTILS__z-index($key: $component-name) {
9
- @return map.get($component-z-index-maps, $key);
9
+ @return map.get($z-index-maps, $key);
10
10
  }
@@ -39,8 +39,11 @@ $page-body: () !default;
39
39
  $page-body-default: (
40
40
  // 可视区域背景
41
41
  background: transparent,
42
- padding-x: 20rpx,
43
- padding-y: 20rpx
42
+ padding: 20rpx,
43
+ padding-top: null,
44
+ padding-right: null,
45
+ padding-bottom: null,
46
+ padding-left: null
44
47
  );
45
48
  $page-body: map.merge($page-body-default, $page-body);
46
49
 
@@ -2,39 +2,49 @@
2
2
 
3
3
  $component-prefix: 'app' !default;
4
4
 
5
- $component-z-index-maps: (
5
+ $z-index-maps: () !default;
6
+ $z-index-maps-default: (
6
7
  loading: 9999,
7
8
  dialog: 4000,
8
9
  dropdown: 3000,
9
10
  popover: 3000,
10
11
  page-header: 2000,
11
12
  page-footer: 2000,
12
- ) !default;
13
+ );
14
+ $z-index-maps: map.merge($z-index-maps-default, $z-index-maps);
13
15
 
14
- $component-themes: (
16
+ $themes: () !default;
17
+ $themes-default: (
15
18
  primary: #f26f24,
16
19
  secondary: #1e87e9,
17
20
  success: #6fe633,
18
21
  warning: #f3bb2d,
19
22
  danger: #ff0000,
20
23
  info: #9a9a99,
21
- ) !default;
24
+ );
25
+ $themes: map.merge($themes-default, $themes);
22
26
 
23
- $component-colors: (
27
+ $colors: () !default;
28
+ $colors-default: (
24
29
  foreground: #333,
25
30
  background: #f4f5f6,
26
31
  placeholder: #9a9a99,
27
32
  disabled: c3c4c5,
28
- ) !default;
33
+ );
34
+ $colors: map.merge($colors-default, $colors);
29
35
 
30
- $component-font-sizes: (
36
+ $font-sizes: () !default;
37
+ $font-sizes-default: (
31
38
  small: 24rpx,
32
39
  normal: 28rpx,
33
40
  large: 32rpx,
34
- ) !default;
41
+ );
42
+ $font-sizes: map.merge($font-sizes-default, $font-sizes);
35
43
 
36
- $component-vars: (
44
+ $others: () !default;
45
+ $others-default: (
37
46
  font-size-small: 24rpx,
38
47
  font-size-normal: 28rpx,
39
48
  font-size-large: 32rpx,
40
- ) !default;
49
+ );
50
+ $others: map.merge($others-default, $others);
@@ -62,10 +62,6 @@ const windowInfoMixin = {
62
62
  },
63
63
  };
64
64
 
65
- /**
66
- * @typedef {ComponentDefinition<{}, {}, ComputedDefinition<typeof windowInfoMixin['computed']>>['$vm']} WindowInfoMixin
67
- */
68
-
69
65
  export {
70
66
  menuButton,
71
67
  windowInfo,