@tuya-miniapp/smart-ui 1.3.0-beta-1 → 1.3.1-beta-1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. package/dist/bottom-sheet/index.css +1 -0
  2. package/dist/bottom-sheet/index.d.ts +1 -0
  3. package/dist/bottom-sheet/index.js +70 -0
  4. package/dist/bottom-sheet/index.json +8 -0
  5. package/dist/bottom-sheet/index.wxml +26 -0
  6. package/dist/bottom-sheet/index.wxss +1 -0
  7. package/dist/button/index.js +1 -0
  8. package/dist/button/index.wxml +1 -1
  9. package/dist/calendar/calendar.wxml +53 -52
  10. package/dist/calendar/components/header/index.css +1 -1
  11. package/dist/calendar/components/header/index.js +18 -0
  12. package/dist/calendar/components/header/index.json +4 -1
  13. package/dist/calendar/components/header/index.wxml +15 -4
  14. package/dist/calendar/components/header/index.wxss +1 -1
  15. package/dist/calendar/components/month/index.css +1 -1
  16. package/dist/calendar/components/month/index.js +7 -2
  17. package/dist/calendar/components/month/index.wxml +0 -13
  18. package/dist/calendar/components/month/index.wxs +13 -7
  19. package/dist/calendar/components/month/index.wxss +1 -1
  20. package/dist/calendar/components/month-list/index.css +1 -0
  21. package/dist/calendar/components/month-list/index.d.ts +1 -0
  22. package/dist/calendar/components/month-list/index.js +112 -0
  23. package/dist/calendar/components/month-list/index.json +7 -0
  24. package/dist/calendar/components/month-list/index.wxml +9 -0
  25. package/dist/calendar/components/month-list/index.wxss +1 -0
  26. package/dist/calendar/components/year-list/index.css +1 -0
  27. package/dist/calendar/components/year-list/index.d.ts +1 -0
  28. package/dist/calendar/components/year-list/index.js +100 -0
  29. package/dist/calendar/components/year-list/index.json +7 -0
  30. package/dist/calendar/components/year-list/index.wxml +9 -0
  31. package/dist/calendar/components/year-list/index.wxss +1 -0
  32. package/dist/calendar/index.css +1 -1
  33. package/dist/calendar/index.js +101 -42
  34. package/dist/calendar/index.json +3 -1
  35. package/dist/calendar/index.wxml +1 -1
  36. package/dist/calendar/index.wxs +20 -2
  37. package/dist/calendar/index.wxss +1 -1
  38. package/dist/calendar/utils.d.ts +7 -1
  39. package/dist/calendar/utils.js +48 -2
  40. package/dist/checkbox/index.css +1 -1
  41. package/dist/checkbox/index.js +1 -1
  42. package/dist/checkbox/index.wxml +2 -2
  43. package/dist/checkbox/index.wxss +1 -1
  44. package/dist/config-provider/index.wxs +2 -7
  45. package/dist/dropdown-item/index.css +1 -1
  46. package/dist/dropdown-item/index.js +10 -0
  47. package/dist/dropdown-item/index.wxml +9 -4
  48. package/dist/dropdown-item/index.wxss +1 -1
  49. package/dist/dropdown-menu/index.css +1 -1
  50. package/dist/dropdown-menu/index.js +15 -0
  51. package/dist/dropdown-menu/index.json +4 -1
  52. package/dist/dropdown-menu/index.wxml +2 -1
  53. package/dist/dropdown-menu/index.wxss +1 -1
  54. package/dist/empty/index.css +1 -1
  55. package/dist/empty/index.js +20 -1
  56. package/dist/empty/index.wxml +7 -7
  57. package/dist/empty/index.wxs +3 -16
  58. package/dist/empty/index.wxss +1 -1
  59. package/dist/field/index.css +1 -1
  60. package/dist/field/index.wxss +1 -1
  61. package/dist/loading/index.css +1 -1
  62. package/dist/loading/index.js +4 -4
  63. package/dist/loading/index.wxml +4 -6
  64. package/dist/loading/index.wxs +39 -8
  65. package/dist/loading/index.wxss +1 -1
  66. package/dist/nav-bar/index.css +1 -1
  67. package/dist/nav-bar/index.js +19 -1
  68. package/dist/nav-bar/index.wxml +16 -6
  69. package/dist/nav-bar/index.wxss +1 -1
  70. package/dist/normal-slider/index.css +1 -1
  71. package/dist/normal-slider/index.wxss +1 -1
  72. package/dist/notice-bar/index.css +1 -1
  73. package/dist/notice-bar/index.js +55 -2
  74. package/dist/notice-bar/index.wxml +28 -10
  75. package/dist/notice-bar/index.wxs +1 -5
  76. package/dist/notice-bar/index.wxss +1 -1
  77. package/dist/picker-column/index.js +8 -1
  78. package/dist/radio/index.css +1 -1
  79. package/dist/radio/index.js +1 -1
  80. package/dist/radio/index.wxml +2 -1
  81. package/dist/radio/index.wxss +1 -1
  82. package/dist/search/index.css +1 -1
  83. package/dist/search/index.js +14 -9
  84. package/dist/search/index.json +2 -1
  85. package/dist/search/index.wxml +7 -4
  86. package/dist/search/index.wxss +1 -1
  87. package/dist/switch/index.css +1 -1
  88. package/dist/switch/index.wxml +1 -0
  89. package/dist/switch/index.wxss +1 -1
  90. package/dist/tabs/index.css +1 -1
  91. package/dist/tabs/index.js +10 -7
  92. package/dist/tabs/index.wxml +1 -0
  93. package/dist/tabs/index.wxs +17 -0
  94. package/dist/tabs/index.wxss +1 -1
  95. package/dist/tag/index.css +1 -1
  96. package/dist/tag/index.wxss +1 -1
  97. package/dist/toast/icons.d.ts +3 -0
  98. package/dist/toast/icons.js +6 -0
  99. package/dist/toast/index.js +8 -4
  100. package/dist/toast/index.wxml +3 -7
  101. package/dist/toast/toast.d.ts +2 -0
  102. package/dist/toast/toast.js +2 -0
  103. package/dist/wxs/style.wxs +11 -5
  104. package/dist/wxs/utils.wxs +1 -3
  105. package/lib/bottom-sheet/index.css +1 -0
  106. package/lib/bottom-sheet/index.d.ts +1 -0
  107. package/lib/bottom-sheet/index.js +75 -0
  108. package/lib/bottom-sheet/index.json +8 -0
  109. package/lib/bottom-sheet/index.wxml +26 -0
  110. package/lib/bottom-sheet/index.wxss +1 -0
  111. package/lib/button/index.js +1 -0
  112. package/lib/button/index.wxml +1 -1
  113. package/lib/calendar/calendar.wxml +53 -52
  114. package/lib/calendar/components/header/index.css +1 -1
  115. package/lib/calendar/components/header/index.js +21 -0
  116. package/lib/calendar/components/header/index.json +4 -1
  117. package/lib/calendar/components/header/index.wxml +15 -4
  118. package/lib/calendar/components/header/index.wxss +1 -1
  119. package/lib/calendar/components/month/index.css +1 -1
  120. package/lib/calendar/components/month/index.js +7 -2
  121. package/lib/calendar/components/month/index.wxml +0 -13
  122. package/lib/calendar/components/month/index.wxs +13 -7
  123. package/lib/calendar/components/month/index.wxss +1 -1
  124. package/lib/calendar/components/month-list/index.css +1 -0
  125. package/lib/calendar/components/month-list/index.d.ts +1 -0
  126. package/lib/calendar/components/month-list/index.js +114 -0
  127. package/lib/calendar/components/month-list/index.json +7 -0
  128. package/lib/calendar/components/month-list/index.wxml +9 -0
  129. package/lib/calendar/components/month-list/index.wxss +1 -0
  130. package/lib/calendar/components/year-list/index.css +1 -0
  131. package/lib/calendar/components/year-list/index.d.ts +1 -0
  132. package/lib/calendar/components/year-list/index.js +102 -0
  133. package/lib/calendar/components/year-list/index.json +7 -0
  134. package/lib/calendar/components/year-list/index.wxml +9 -0
  135. package/lib/calendar/components/year-list/index.wxss +1 -0
  136. package/lib/calendar/index.css +1 -1
  137. package/lib/calendar/index.js +100 -43
  138. package/lib/calendar/index.json +3 -1
  139. package/lib/calendar/index.wxml +1 -1
  140. package/lib/calendar/index.wxs +20 -2
  141. package/lib/calendar/index.wxss +1 -1
  142. package/lib/calendar/utils.d.ts +7 -1
  143. package/lib/calendar/utils.js +52 -3
  144. package/lib/checkbox/index.css +1 -1
  145. package/lib/checkbox/index.js +1 -1
  146. package/lib/checkbox/index.wxml +2 -2
  147. package/lib/checkbox/index.wxss +1 -1
  148. package/lib/config-provider/index.wxs +2 -7
  149. package/lib/dropdown-item/index.css +1 -1
  150. package/lib/dropdown-item/index.js +13 -0
  151. package/lib/dropdown-item/index.wxml +9 -4
  152. package/lib/dropdown-item/index.wxss +1 -1
  153. package/lib/dropdown-menu/index.css +1 -1
  154. package/lib/dropdown-menu/index.js +18 -0
  155. package/lib/dropdown-menu/index.json +4 -1
  156. package/lib/dropdown-menu/index.wxml +2 -1
  157. package/lib/dropdown-menu/index.wxss +1 -1
  158. package/lib/empty/index.css +1 -1
  159. package/lib/empty/index.js +20 -1
  160. package/lib/empty/index.wxml +7 -7
  161. package/lib/empty/index.wxs +3 -16
  162. package/lib/empty/index.wxss +1 -1
  163. package/lib/field/index.css +1 -1
  164. package/lib/field/index.wxss +1 -1
  165. package/lib/loading/index.css +1 -1
  166. package/lib/loading/index.js +4 -4
  167. package/lib/loading/index.wxml +4 -6
  168. package/lib/loading/index.wxs +39 -8
  169. package/lib/loading/index.wxss +1 -1
  170. package/lib/nav-bar/index.css +1 -1
  171. package/lib/nav-bar/index.js +19 -1
  172. package/lib/nav-bar/index.wxml +16 -6
  173. package/lib/nav-bar/index.wxss +1 -1
  174. package/lib/normal-slider/index.css +1 -1
  175. package/lib/normal-slider/index.wxss +1 -1
  176. package/lib/notice-bar/index.css +1 -1
  177. package/lib/notice-bar/index.js +58 -2
  178. package/lib/notice-bar/index.wxml +28 -10
  179. package/lib/notice-bar/index.wxs +1 -5
  180. package/lib/notice-bar/index.wxss +1 -1
  181. package/lib/picker-column/index.js +8 -1
  182. package/lib/radio/index.css +1 -1
  183. package/lib/radio/index.js +1 -1
  184. package/lib/radio/index.wxml +2 -1
  185. package/lib/radio/index.wxss +1 -1
  186. package/lib/search/index.css +1 -1
  187. package/lib/search/index.js +17 -9
  188. package/lib/search/index.json +2 -1
  189. package/lib/search/index.wxml +7 -4
  190. package/lib/search/index.wxss +1 -1
  191. package/lib/switch/index.css +1 -1
  192. package/lib/switch/index.wxml +1 -0
  193. package/lib/switch/index.wxss +1 -1
  194. package/lib/tabs/index.css +1 -1
  195. package/lib/tabs/index.js +10 -7
  196. package/lib/tabs/index.wxml +1 -0
  197. package/lib/tabs/index.wxs +17 -0
  198. package/lib/tabs/index.wxss +1 -1
  199. package/lib/tag/index.css +1 -1
  200. package/lib/tag/index.wxss +1 -1
  201. package/lib/toast/icons.d.ts +3 -0
  202. package/lib/toast/icons.js +12 -0
  203. package/lib/toast/index.js +8 -7
  204. package/lib/toast/index.wxml +3 -7
  205. package/lib/toast/toast.d.ts +2 -0
  206. package/lib/toast/toast.js +2 -0
  207. package/lib/wxs/style.wxs +11 -5
  208. package/lib/wxs/utils.wxs +1 -3
  209. package/package.json +4 -8
  210. package/dist/common/theme/dark.d.ts +0 -344
  211. package/dist/common/theme/dark.js +0 -343
  212. package/dist/common/theme/light.d.ts +0 -344
  213. package/dist/common/theme/light.js +0 -343
  214. package/dist/wxs/is-app-theme-var.wxs +0 -8
  215. package/lib/common/theme/dark.d.ts +0 -344
  216. package/lib/common/theme/dark.js +0 -345
  217. package/lib/common/theme/light.d.ts +0 -344
  218. package/lib/common/theme/light.js +0 -345
  219. package/lib/wxs/is-app-theme-var.wxs +0 -8
@@ -15,12 +15,14 @@ interface ToastOptions {
15
15
  loadingType?: string;
16
16
  message?: ToastMessage;
17
17
  onClose?: () => void;
18
+ width?: number;
18
19
  }
19
20
  declare function Toast(toastOptions: ToastOptions | ToastMessage): WechatMiniprogram.Component.TrivialInstance | undefined;
20
21
  declare namespace Toast {
21
22
  var loading: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;
22
23
  var success: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;
23
24
  var fail: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;
25
+ var warn: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;
24
26
  var clear: () => void;
25
27
  var setDefaultOptions: (options: ToastOptions) => void;
26
28
  var resetDefaultOptions: () => void;
@@ -10,6 +10,7 @@ const defaultOptions = {
10
10
  forbidClick: false,
11
11
  loadingType: 'circular',
12
12
  selector: '#smart-toast',
13
+ width: '100%',
13
14
  };
14
15
  let queue = [];
15
16
  let currentOptions = Object.assign({}, defaultOptions);
@@ -53,6 +54,7 @@ const createMethod = (type) => (options) => Toast(Object.assign({ type }, parseO
53
54
  Toast.loading = createMethod('loading');
54
55
  Toast.success = createMethod('success');
55
56
  Toast.fail = createMethod('fail');
57
+ Toast.warn = createMethod('warn');
56
58
  Toast.clear = () => {
57
59
  queue.forEach((toast) => {
58
60
  toast.clear();
@@ -1,5 +1,11 @@
1
+ /*
2
+ * @Author: mjh
3
+ * @Date: 2024-08-02 11:38:15
4
+ * @LastEditors: mjh
5
+ * @LastEditTime: 2024-10-31 15:52:59
6
+ * @Description:
7
+ */
1
8
  /* eslint-disable */
2
- var utils = require('./utils.wxs');
3
9
  var object = require('./object.wxs');
4
10
  var array = require('./array.wxs');
5
11
 
@@ -32,15 +38,15 @@ function style(styles) {
32
38
  return styles[key] != null && styles[key] !== '';
33
39
  })
34
40
  .map(function (key) {
35
- if (utils.isAppThemeVar(key)) {
36
- return [key, styles[key]].join(':');
37
- }
38
41
  return [kebabCase(key), [styles[key]]].join(':');
39
42
  })
40
43
  .join(';');
41
44
  }
45
+ if (typeof styles === 'string') {
46
+ return styles
47
+ }
42
48
 
43
- return styles;
49
+ return styles || '';
44
50
  }
45
51
 
46
52
  module.exports = style;
@@ -2,11 +2,9 @@
2
2
  var bem = require('./bem.wxs');
3
3
  var memoize = require('./memoize.wxs');
4
4
  var addUnit = require('./add-unit.wxs');
5
- var isAppThemeVar = require('./is-app-theme-var.wxs');
6
5
 
7
6
  module.exports = {
8
7
  bem: memoize(bem),
9
8
  memoize: memoize,
10
- addUnit: addUnit,
11
- isAppThemeVar: isAppThemeVar,
9
+ addUnit: addUnit
12
10
  };
@@ -0,0 +1 @@
1
+ @import '../common/index.css';.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));max-height:var(--bottom-sheet-max-height,50%)!important;min-height:var(--bottom-sheet-min-height,auto);padding:var(--bottom-sheet-padding,0 16px);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)!important}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);text-align:center}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var Xmark_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Xmark"));
7
+ var component_1 = require("../common/component");
8
+ (0, component_1.SmartComponent)({
9
+ props: {
10
+ show: Boolean,
11
+ title: String,
12
+ iconSize: {
13
+ type: null,
14
+ value: 24,
15
+ },
16
+ round: {
17
+ type: Boolean,
18
+ value: true,
19
+ },
20
+ zIndex: {
21
+ type: Number,
22
+ value: 100,
23
+ },
24
+ overlay: {
25
+ type: Boolean,
26
+ value: true,
27
+ },
28
+ closeOnClickOverlay: {
29
+ type: Boolean,
30
+ value: true,
31
+ },
32
+ rootPortal: {
33
+ type: Boolean,
34
+ value: false,
35
+ },
36
+ },
37
+ data: {
38
+ xmarkIcon: Xmark_1.default,
39
+ xmarkIconColor: '#3678E3',
40
+ },
41
+ mounted: function () {
42
+ var _a;
43
+ // @ts-ignore
44
+ var themeInfo = (_a = ty === null || ty === void 0 ? void 0 : ty.getThemeInfo()) !== null && _a !== void 0 ? _a : {};
45
+ var xmarkIconColor = this.data.activeColor || themeInfo['--app-B4-N3'] || 'rgba(0, 0, 0, 0.5)';
46
+ this.setData({ xmarkIconColor: xmarkIconColor });
47
+ },
48
+ methods: {
49
+ onClose: function () {
50
+ this.$emit('close');
51
+ },
52
+ onClickOverlay: function () {
53
+ this.$emit('click-overlay');
54
+ this.onClose();
55
+ },
56
+ onBeforeEnter: function () {
57
+ this.$emit('before-enter');
58
+ },
59
+ onEnter: function () {
60
+ this.$emit('enter');
61
+ },
62
+ onAfterEnter: function () {
63
+ this.$emit('after-enter');
64
+ },
65
+ onBeforeLeave: function () {
66
+ this.$emit('before-leave');
67
+ },
68
+ onLeave: function () {
69
+ this.$emit('leave');
70
+ },
71
+ onAfterLeave: function () {
72
+ this.$emit('after-leave');
73
+ },
74
+ },
75
+ });
@@ -0,0 +1,8 @@
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "smart-icon": "../icon/index",
5
+ "smart-popup": "../popup/index",
6
+ "smart-loading": "../loading/index"
7
+ }
8
+ }
@@ -0,0 +1,26 @@
1
+ <wxs src="../wxs/utils.wxs" module="utils" />
2
+
3
+ <smart-popup
4
+ show="{{ show }}"
5
+ position="bottom"
6
+ round="{{ round }}"
7
+ z-index="{{ zIndex }}"
8
+ overlay="{{ overlay }}"
9
+ custom-class="smart-bottom-sheet custom-class"
10
+ safe-area-inset-bottom="{{false}}"
11
+ close-on-click-overlay="{{ closeOnClickOverlay }}"
12
+ root-portal="{{ rootPortal }}"
13
+ bind:close="onClickOverlay"
14
+ bind:before-enter="onBeforeEnter"
15
+ bind:enter="onEnter"
16
+ bind:after-enter="onAfterEnter"
17
+ bind:before-leave="onBeforeLeave"
18
+ bind:leave="onLeave"
19
+ bind:after-leave="onAfterLeave"
20
+ >
21
+ <view wx:if="{{ title }}" class="smart-bottom-sheet__header">
22
+ {{ title }}
23
+ <smart-icon bind:click="onClose" name="{{ xmarkIcon }}" class="smart-bottom-sheet__icon" size="{{ iconSize }}" color="{{ xmarkIconColor }}" />
24
+ </view>
25
+ <slot />
26
+ </smart-popup>
@@ -0,0 +1 @@
1
+ @import '../common/index.wxss';.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));max-height:var(--bottom-sheet-max-height,50%)!important;min-height:var(--bottom-sheet-min-height,auto);padding:var(--bottom-sheet-padding,0 16px);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)!important}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);text-align:center}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
@@ -30,6 +30,7 @@ var mixins = [button_1.button];
30
30
  disabled: Boolean,
31
31
  loadingText: String,
32
32
  customStyle: String,
33
+ textStyle: String,
33
34
  loadingType: {
34
35
  type: String,
35
36
  value: 'circular',
@@ -49,7 +49,7 @@
49
49
  class="smart-button__icon"
50
50
  custom-style="line-height: inherit;"
51
51
  />
52
- <view class="smart-button__text">
52
+ <view class="smart-button__text" style="{{textStyle}}">
53
53
  <slot />
54
54
  </view>
55
55
  <smart-icon
@@ -4,73 +4,74 @@
4
4
  <header
5
5
  title="{{ title }}"
6
6
  showTitle="{{ showTitle }}"
7
- subtitle="{{ subtitle }}"
7
+ subtitle="{{ mode === 'year' ? '' : mode === 'month' ? computed.formatYearTitle(currentDate, visibleIndex, locale.yearFormatter) : computed.formatMonthTitle(months[visibleIndex], subFormatter) }}"
8
+ subFormatter="{{locale.subFormatter || 'YYYY-MM'}}"
8
9
  showSubtitle="{{ showSubtitle }}"
9
10
  firstDayOfWeek="{{ firstDayOfWeek }}"
10
11
  bind:click-subtitle="onClickSubtitle"
11
12
  defaultWeeks="{{locale.shortWeekDays || ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']}}"
13
+ bind:click-prev="onPrev"
14
+ bind:click-next="onNext"
15
+ bind:click-save="onConfirm"
16
+ hideWeek="{{ mode !== 'day' }}"
12
17
  >
13
18
  <slot name="title" slot="title"></slot>
14
19
  </header>
15
20
 
16
- <scroll-view
17
- class="smart-calendar__body"
18
- scroll-y
19
- scroll-into-view="{{ scrollIntoView }}"
20
- >
21
- <month
22
- wx:for="{{ computed.getMonths(minDate, maxDate) }}"
23
- wx:key="index"
24
- id="month{{ index }}"
25
- class="month"
26
- visible="{{ computed.getVisible(visibleIndex, index) }}"
27
- subFormatter="{{locale.subFormatter || 'YYYY-MM'}}"
28
- rangeStart="{{locale.rangeStart || 'Start'}}"
29
- rangeEnd="{{locale.rangeEnd || 'End'}}"
30
- data-date="{{ item }}"
31
- data-index="{{index}}"
32
- date="{{ item }}"
33
- type="{{ type }}"
34
- color="{{ color }}"
21
+ <block wx:if="{{mode === 'day'}}">
22
+ <view class="smart-calendar-month_wrap" wx:for="{{ months }}" wx:key="index">
23
+ <month
24
+ id="month{{ index }}"
25
+ class="smart-calendar-month month"
26
+ wx:if="{{ computed.getVisible(visibleIndex, index) }}"
27
+ subFormatter="{{locale.subFormatter || 'YYYY-MM'}}"
28
+ rangeStart="{{locale.rangeStart || 'Start'}}"
29
+ rangeEnd="{{locale.rangeEnd || 'End'}}"
30
+ data-date="{{ item }}"
31
+ data-index="{{index}}"
32
+ date="{{ item }}"
33
+ type="{{ type }}"
34
+ color="{{ color }}"
35
+ minDate="{{ minDate }}"
36
+ maxDate="{{ maxDate }}"
37
+ showMark="{{ showMark }}"
38
+ formatter="{{ formatter }}"
39
+ rowHeight="{{ rowHeight }}"
40
+ currentDate="{{ currentDate }}"
41
+ showSubtitle="{{ showSubtitle }}"
42
+ allowSameDay="{{ allowSameDay }}"
43
+ showMonthTitle="{{ index !== 0 || !showSubtitle }}"
44
+ firstDayOfWeek="{{ firstDayOfWeek }}"
45
+ bind:click="onClickDay"
46
+ />
47
+ </view>
48
+ </block>
49
+
50
+ <block wx:if="{{mode === 'month'}}">
51
+ <month-list
35
52
  minDate="{{ minDate }}"
36
53
  maxDate="{{ maxDate }}"
37
- showMark="{{ showMark }}"
38
- formatter="{{ formatter }}"
39
- rowHeight="{{ rowHeight }}"
40
- currentDate="{{ currentDate }}"
41
- showSubtitle="{{ showSubtitle }}"
42
- allowSameDay="{{ allowSameDay }}"
43
- showMonthTitle="{{ index !== 0 || !showSubtitle }}"
44
- firstDayOfWeek="{{ firstDayOfWeek }}"
45
- bind:click="onClickDay"
54
+ monthsFormatter="{{ locale.monthsFormatter }}"
55
+ bind:click="onClickDate"
56
+ date="{{defaultDate}}"
57
+ visibleIndex="{{visibleIndex}}"
46
58
  />
47
- </scroll-view>
59
+ </block>
48
60
 
49
- <view
50
- class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
51
- >
52
- <slot name="footer"></slot>
53
- </view>
61
+ <block wx:if="{{mode === 'year'}}">
62
+ <year-list
63
+ minDate="{{ minDate }}"
64
+ maxDate="{{ maxDate }}"
65
+ yearFormatter="{{ locale.yearFormatter }}"
66
+ bind:click="onClickDate"
67
+ date="{{defaultDate}}"
68
+ visibleIndex="{{visibleIndex}}"
69
+ />
70
+ </block>
54
71
 
55
72
  <view
56
73
  class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
57
74
  >
58
- <smart-button
59
- wx:if="{{ showConfirm }}"
60
- round
61
- block
62
- type="danger"
63
- color="{{ color }}"
64
- custom-class="smart-calendar__confirm"
65
- disabled="{{ computed.getButtonDisabled(type, currentDate, minRange) }}"
66
- nativeType="text"
67
- bind:click="onConfirm"
68
- >
69
- {{
70
- computed.getButtonDisabled(type, currentDate, minRange)
71
- ? confirmDisabledText
72
- : confirmText
73
- }}
74
- </smart-button>
75
+ <slot name="footer"></slot>
75
76
  </view>
76
77
  </view>
@@ -1 +1 @@
1
- @import '../../../common/index.css';.smart-calendar__header{box-shadow:var(--calendar-header-box-shadow,0 2px 10px hsla(220,1%,50%,.16));flex-shrink:0}.smart-calendar__header-subtitle,.smart-calendar__header-title{font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__header-title+.smart-calendar__header-title,.smart-calendar__header-title:empty{display:none}.smart-calendar__header-title:empty+.smart-calendar__header-title{display:block!important}.smart-calendar__weekdays{display:flex}.smart-calendar__weekday{flex:1;font-size:var(--calendar-weekdays-font-size,12px);line-height:var(--calendar-weekdays-height,30px);text-align:center}
1
+ @import '../../../common/index.css';.smart-calendar__header{flex-shrink:0}.smart-calendar__header-title{position:relative}.smart-calendar__header-title-save{color:var(--calendar-header-title-save-color,#1989fa);font-size:16px;font-weight:400;letter-spacing:0;line-height:24px;position:absolute;right:48rpx;text-align:right;top:50%;transform:translateY(-50%)}.smart-calendar__header-subtitle,.smart-calendar__header-title{font-size:16px;font-weight:var(--font-weight-bold,500);font-weight:500;height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__header-subtitle_wrap{align-items:center;display:flex;justify-content:center;position:relative}.smart-calendar__header-subtitle_left{left:52rpx}.smart-calendar__header-subtitle_left,.smart-calendar__header-subtitle_right{align-items:center;background:rgba(0,0,0,.05);border-radius:50%;display:flex;height:48rpx;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:48rpx}.smart-calendar__header-subtitle_right{right:52rpx}.smart-calendar__header-title+.smart-calendar__header-title,.smart-calendar__header-title:empty{display:none}.smart-calendar__header-title:empty+.smart-calendar__header-title{display:block!important}.smart-calendar__weekdays{display:flex;margin-bottom:16rpx;margin-top:16rpx}.smart-calendar__weekday{color:var(--calendar-weekdays-font-color,var(--app-B4-N1,#000));flex:1;font-size:var(--calendar-weekdays-font-size,12px);font-weight:500;line-height:var(--calendar-weekdays-height,30px);opacity:.5;text-align:center}
@@ -8,18 +8,28 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
8
8
  }
9
9
  return to.concat(ar || Array.prototype.slice.call(from));
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  var component_1 = require("../../../common/component");
16
+ var Left_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Left"));
17
+ var Right_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Right"));
13
18
  (0, component_1.SmartComponent)({
14
19
  props: {
15
20
  title: {
16
21
  type: String,
17
22
  value: '日期选择',
18
23
  },
24
+ rightText: {
25
+ type: String,
26
+ value: '保存',
27
+ },
19
28
  subtitle: String,
20
29
  showTitle: Boolean,
21
30
  showSubtitle: Boolean,
22
31
  defaultWeeks: Array,
32
+ hideWeek: Boolean,
23
33
  firstDayOfWeek: {
24
34
  type: Number,
25
35
  observer: 'initWeekDay',
@@ -27,6 +37,8 @@ var component_1 = require("../../../common/component");
27
37
  },
28
38
  data: {
29
39
  weekdays: [],
40
+ LeftIcon: Left_1.default,
41
+ RightIcon: Right_1.default,
30
42
  },
31
43
  created: function () {
32
44
  this.initWeekDay();
@@ -42,5 +54,14 @@ var component_1 = require("../../../common/component");
42
54
  onClickSubtitle: function (event) {
43
55
  this.$emit('click-subtitle', event);
44
56
  },
57
+ onPrev: function () {
58
+ this.$emit('click-prev');
59
+ },
60
+ onNext: function () {
61
+ this.$emit('click-next');
62
+ },
63
+ onSave: function () {
64
+ this.$emit('click-save');
65
+ },
45
66
  },
46
67
  });
@@ -1,3 +1,6 @@
1
1
  {
2
- "component": true
2
+ "component": true,
3
+ "usingComponents": {
4
+ "smart-icon": "../../../icon/index"
5
+ }
3
6
  }
@@ -1,14 +1,25 @@
1
1
  <view class="smart-calendar__header">
2
2
  <block wx:if="{{ showTitle }}">
3
3
  <view class="smart-calendar__header-title"><slot name="title"></slot></view>
4
- <view class="smart-calendar__header-title">{{ title }}</view>
4
+ <view class="smart-calendar__header-title">
5
+ {{ title }}
6
+ <view class="smart-calendar__header-title-save" bind:tap=="onSave">{{ rightText }}</view>
7
+ </view>
5
8
  </block>
6
9
 
7
- <view wx:if="{{ showSubtitle }}" class="smart-calendar__header-subtitle" bind:tap="onClickSubtitle">
8
- {{ subtitle }}
10
+ <view class="smart-calendar__header-subtitle_wrap">
11
+ <view class="smart-calendar__header-subtitle_left" bind:tap="onPrev">
12
+ <smart-icon name="{{LeftIcon}}" />
13
+ </view>
14
+ <view wx:if="{{ showSubtitle }}" class="smart-calendar__header-subtitle" bind:tap="onClickSubtitle">
15
+ {{ subtitle }}
16
+ </view>
17
+ <view class="smart-calendar__header-subtitle_right" bind:tap="onNext">
18
+ <smart-icon name="{{RightIcon}}" />
19
+ </view>
9
20
  </view>
10
21
 
11
- <view class="smart-calendar__weekdays">
22
+ <view class="smart-calendar__weekdays" wx:if="{{!hideWeek}}">
12
23
  <view wx:for="{{ weekdays }}" wx:key="index" class="smart-calendar__weekday">
13
24
  {{ item }}
14
25
  </view>
@@ -1 +1 @@
1
- @import '../../../common/index.wxss';.smart-calendar__header{box-shadow:var(--calendar-header-box-shadow,0 2px 10px hsla(220,1%,50%,.16));flex-shrink:0}.smart-calendar__header-subtitle,.smart-calendar__header-title{font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__header-title+.smart-calendar__header-title,.smart-calendar__header-title:empty{display:none}.smart-calendar__header-title:empty+.smart-calendar__header-title{display:block!important}.smart-calendar__weekdays{display:flex}.smart-calendar__weekday{flex:1;font-size:var(--calendar-weekdays-font-size,12px);line-height:var(--calendar-weekdays-height,30px);text-align:center}
1
+ @import '../../../common/index.wxss';.smart-calendar__header{flex-shrink:0}.smart-calendar__header-title{position:relative}.smart-calendar__header-title-save{color:var(--calendar-header-title-save-color,#1989fa);font-size:16px;font-weight:400;letter-spacing:0;line-height:24px;position:absolute;right:48rpx;text-align:right;top:50%;transform:translateY(-50%)}.smart-calendar__header-subtitle,.smart-calendar__header-title{font-size:16px;font-weight:var(--font-weight-bold,500);font-weight:500;height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__header-subtitle_wrap{align-items:center;display:flex;justify-content:center;position:relative}.smart-calendar__header-subtitle_left{left:52rpx}.smart-calendar__header-subtitle_left,.smart-calendar__header-subtitle_right{align-items:center;background:rgba(0,0,0,.05);border-radius:50%;display:flex;height:48rpx;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:48rpx}.smart-calendar__header-subtitle_right{right:52rpx}.smart-calendar__header-title+.smart-calendar__header-title,.smart-calendar__header-title:empty{display:none}.smart-calendar__header-title:empty+.smart-calendar__header-title{display:block!important}.smart-calendar__weekdays{display:flex;margin-bottom:16rpx;margin-top:16rpx}.smart-calendar__weekday{color:var(--calendar-weekdays-font-color,var(--app-B4-N1,#000));flex:1;font-size:var(--calendar-weekdays-font-size,12px);font-weight:500;line-height:var(--calendar-weekdays-height,30px);opacity:.5;text-align:center}
@@ -1 +1 @@
1
- @import '../../../common/index.css';.smart-calendar{background-color:var(--calendar-background-color,var(--app-B6,#fff));display:flex;flex-direction:column;height:100%}.smart-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.smart-calendar__month-mark{color:var(--calendar-month-mark-color,hsla(210,6%,87%,.6));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.smart-calendar__day,.smart-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.smart-calendar__day{font-size:var(--calendar-day-font-size,16px);height:var(--calendar-day-height,64px);position:relative;width:14.285%}.smart-calendar__day--end,.smart-calendar__day--multiple-middle,.smart-calendar__day--multiple-selected,.smart-calendar__day--start,.smart-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#ee0a24);color:var(--calendar-range-edge-color,#fff)}.smart-calendar__day--start{border-radius:4px 0 0 4px}.smart-calendar__day--end{border-radius:0 4px 4px 0}.smart-calendar__day--multiple-selected,.smart-calendar__day--start-end{border-radius:4px}.smart-calendar__day--middle{color:var(--calendar-range-middle-color,#ee0a24)}.smart-calendar__day--middle:after{background-color:currentColor;bottom:0;content:"";left:0;opacity:var(--calendar-range-middle-background-opacity,.1);position:absolute;right:0;top:0}.smart-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:9px}}.smart-calendar__top-info{top:6px}.smart-calendar__bottom-info{bottom:6px}.smart-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#ee0a24);border-radius:4px;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,54px);width:var(--calendar-selected-day-size,54px)}
1
+ @import '../../../common/index.css';.smart-calendar{background-color:var(--calendar-background-color,var(--app-B6,#fff));display:flex;flex-direction:column;height:100%}.smart-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.smart-calendar__month-mark{color:var(--calendar-month-mark-color,hsla(210,6%,87%,.6));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.smart-calendar__day,.smart-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.smart-calendar__day{font-size:var(--calendar-day-font-size,15px);font-weight:500;height:var(--calendar-day-height,100rpx);position:relative;width:14.285%}.smart-calendar__day--end,.smart-calendar__day--multiple-middle,.smart-calendar__day--multiple-selected,.smart-calendar__day--start,.smart-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-edge-color,#fff)}.smart-calendar__day--start{border-bottom-left-radius:34rpx;border-top-left-radius:34rpx}.smart-calendar__day--end{border-bottom-right-radius:34rpx;border-top-right-radius:34rpx}.smart-calendar__day--multiple-selected,.smart-calendar__day--start-end{border-radius:4px}.smart-calendar__day--middle{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-middle-color,var(--app-B3,#fff))}.smart-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:9px}}.smart-calendar__top-info{top:6px}.smart-calendar__bottom-info{bottom:6px}.smart-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#3678e3);border-radius:50%;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,34px);width:var(--calendar-selected-day-size,34px)}
@@ -37,7 +37,7 @@ var utils_1 = require("../../utils");
37
37
  },
38
38
  visible: {
39
39
  type: Boolean,
40
- value: true
40
+ value: true,
41
41
  },
42
42
  subFormatter: String,
43
43
  rangeStart: String,
@@ -145,6 +145,9 @@ var utils_1 = require("../../utils");
145
145
  if (type === 'range') {
146
146
  return this.getRangeDayType(day);
147
147
  }
148
+ if (type === 'week') {
149
+ return this.getRangeDayType(day);
150
+ }
148
151
  return '';
149
152
  },
150
153
  getBottomInfo: function (type) {
@@ -156,7 +159,9 @@ var utils_1 = require("../../utils");
156
159
  return this.properties.rangeEnd || 'End';
157
160
  }
158
161
  if (type === 'start-end') {
159
- return (this.properties.rangeStart || 'Start') + '/' + (this.properties.rangeEnd || 'End');
162
+ return ((this.properties.rangeStart || 'Start') +
163
+ '/' +
164
+ (this.properties.rangeEnd || 'End'));
160
165
  }
161
166
  }
162
167
  },
@@ -2,14 +2,7 @@
2
2
  <wxs src="../../../wxs/utils.wxs" module="utils" />
3
3
 
4
4
  <view class="smart-calendar__month" style="{{ computed.getMonthStyle(visible, date, rowHeight) }}">
5
- <view wx:if="{{ showMonthTitle }}" class="smart-calendar__month-title">
6
- {{ computed.formatMonthTitle(date, subFormatter) }}
7
- </view>
8
-
9
5
  <view wx:if="{{ visible }}" class="smart-calendar__days">
10
- <view wx:if="{{ showMark }}" class="smart-calendar__month-mark">
11
- {{ computed.getMark(date) }}
12
- </view>
13
6
 
14
7
  <view
15
8
  wx:for="{{ days }}"
@@ -22,16 +15,10 @@
22
15
  <view wx:if="{{ item.type === 'selected' }}" class="smart-calendar__selected-day" style="width: {{ rowHeight }}px; height: {{ rowHeight }}px; background: {{ color }}">
23
16
  <view wx:if="{{ item.topInfo }}" class="smart-calendar__top-info">{{ item.topInfo }}</view>
24
17
  {{ item.text }}
25
- <view wx:if="{{ item.bottomInfo }}" class="smart-calendar__bottom-info">
26
- {{ item.bottomInfo }}
27
- </view>
28
18
  </view>
29
19
  <block wx:else>
30
20
  <view wx:if="{{ item.topInfo }}" class="smart-calendar__top-info">{{ item.topInfo }}</view>
31
21
  {{ item.text }}
32
- <view wx:if="{{ item.bottomInfo }}" class="smart-calendar__bottom-info">
33
- {{ item.bottomInfo }}
34
- </view>
35
22
  </block>
36
23
  </view>
37
24
  </view>
@@ -10,9 +10,12 @@ var ROW_HEIGHT = 64;
10
10
  function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
11
11
  var style = [];
12
12
  var current = getDate(date).getDay() || 7;
13
- var offset = current < firstDayOfWeek ? (7 - firstDayOfWeek + current) :
14
- current === 7 && firstDayOfWeek === 0 ? 0 :
15
- (current - firstDayOfWeek);
13
+ var offset =
14
+ current < firstDayOfWeek
15
+ ? 7 - firstDayOfWeek + current
16
+ : current === 7 && firstDayOfWeek === 0
17
+ ? 0
18
+ : current - firstDayOfWeek;
16
19
 
17
20
  if (index === 0) {
18
21
  style.push(['margin-left', (100 * offset) / 7 + '%']);
@@ -32,7 +35,7 @@ function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
32
35
  ) {
33
36
  style.push(['background', color]);
34
37
  } else if (type === 'middle') {
35
- style.push(['color', color]);
38
+ style.push(['background', color]);
36
39
  }
37
40
  }
38
41
 
@@ -43,10 +46,13 @@ function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
43
46
  .join(';');
44
47
  }
45
48
 
46
- function formatMonthTitle(date, formatter = "YYYY-MM") {
49
+ function formatMonthTitle(date, formatter = 'YYYY-MM') {
47
50
  date = getDate(date);
48
51
  const year = date.getFullYear();
49
- const month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1 + "";
52
+ const month =
53
+ date.getMonth() + 1 < 10
54
+ ? `0${date.getMonth() + 1}`
55
+ : date.getMonth() + 1 + '';
50
56
  return formatter.replace('YYYY', year + '').replace('MM', month);
51
57
  }
52
58
 
@@ -69,5 +75,5 @@ module.exports = {
69
75
  getMark: getMark,
70
76
  getDayStyle: getDayStyle,
71
77
  formatMonthTitle: formatMonthTitle,
72
- getMonthStyle: getMonthStyle
78
+ getMonthStyle: getMonthStyle,
73
79
  };
@@ -1 +1 @@
1
- @import '../../../common/index.wxss';.smart-calendar{background-color:var(--calendar-background-color,var(--app-B6,#fff));display:flex;flex-direction:column;height:100%}.smart-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.smart-calendar__month-mark{color:var(--calendar-month-mark-color,hsla(210,6%,87%,.6));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.smart-calendar__day,.smart-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.smart-calendar__day{font-size:var(--calendar-day-font-size,16px);height:var(--calendar-day-height,64px);position:relative;width:14.285%}.smart-calendar__day--end,.smart-calendar__day--multiple-middle,.smart-calendar__day--multiple-selected,.smart-calendar__day--start,.smart-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#ee0a24);color:var(--calendar-range-edge-color,#fff)}.smart-calendar__day--start{border-radius:4px 0 0 4px}.smart-calendar__day--end{border-radius:0 4px 4px 0}.smart-calendar__day--multiple-selected,.smart-calendar__day--start-end{border-radius:4px}.smart-calendar__day--middle{color:var(--calendar-range-middle-color,#ee0a24)}.smart-calendar__day--middle:after{background-color:currentColor;bottom:0;content:"";left:0;opacity:var(--calendar-range-middle-background-opacity,.1);position:absolute;right:0;top:0}.smart-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:9px}}.smart-calendar__top-info{top:6px}.smart-calendar__bottom-info{bottom:6px}.smart-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#ee0a24);border-radius:4px;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,54px);width:var(--calendar-selected-day-size,54px)}
1
+ @import '../../../common/index.wxss';.smart-calendar{background-color:var(--calendar-background-color,var(--app-B6,#fff));display:flex;flex-direction:column;height:100%}.smart-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.smart-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.smart-calendar__month-mark{color:var(--calendar-month-mark-color,hsla(210,6%,87%,.6));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.smart-calendar__day,.smart-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.smart-calendar__day{font-size:var(--calendar-day-font-size,15px);font-weight:500;height:var(--calendar-day-height,100rpx);position:relative;width:14.285%}.smart-calendar__day--end,.smart-calendar__day--multiple-middle,.smart-calendar__day--multiple-selected,.smart-calendar__day--start,.smart-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-edge-color,#fff)}.smart-calendar__day--start{border-bottom-left-radius:34rpx;border-top-left-radius:34rpx}.smart-calendar__day--end{border-bottom-right-radius:34rpx;border-top-right-radius:34rpx}.smart-calendar__day--multiple-selected,.smart-calendar__day--start-end{border-radius:4px}.smart-calendar__day--middle{background-color:var(--calendar-range-edge-background-color,#3678e3);color:var(--calendar-range-middle-color,var(--app-B3,#fff))}.smart-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.smart-calendar__bottom-info,.smart-calendar__top-info{font-size:9px}}.smart-calendar__top-info{top:6px}.smart-calendar__bottom-info{bottom:6px}.smart-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#3678e3);border-radius:50%;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,34px);width:var(--calendar-selected-day-size,34px)}
@@ -0,0 +1 @@
1
+ @import '../../../common/index.css';.item{border-radius:50%;color:rgba(0,0,0,.9);font-size:15px;font-weight:500;line-height:104rpx;text-align:center}.item,.item_active{height:104rpx;width:104rpx}.item_active{background:#3678e3;color:#fff}.item_disabled{opacity:.5}
@@ -0,0 +1 @@
1
+ export {};