sard-uniapp 1.10.0 → 1.10.1

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 (47) hide show
  1. package/changelog.md +9 -0
  2. package/components/back-top/back-top.vue +1 -1
  3. package/components/back-top/common.d.ts +1 -1
  4. package/components/back-top/common.js +2 -2
  5. package/components/calendar-input/calendar-input.vue +1 -1
  6. package/components/calendar-input/common.d.ts +1 -1
  7. package/components/calendar-input/common.js +2 -2
  8. package/components/checkbox-input/checkbox-input.vue +1 -1
  9. package/components/checkbox-input/common.d.ts +1 -1
  10. package/components/checkbox-input/common.js +2 -2
  11. package/components/datetime-picker-input/common.d.ts +1 -1
  12. package/components/datetime-picker-input/common.js +2 -2
  13. package/components/datetime-picker-input/datetime-picker-input.vue +1 -1
  14. package/components/dialog-agent/common.d.ts +1 -1
  15. package/components/dialog-agent/common.js +2 -2
  16. package/components/dialog-agent/dialog-agent.vue +1 -1
  17. package/components/fab/common.d.ts +1 -1
  18. package/components/fab/common.js +2 -2
  19. package/components/fab/fab.vue +1 -1
  20. package/components/form/common.d.ts +1 -1
  21. package/components/form/common.js +2 -2
  22. package/components/form-item/form-item.vue +1 -1
  23. package/components/loading/common.d.ts +1 -1
  24. package/components/loading/common.js +2 -2
  25. package/components/loading/loading.vue +1 -1
  26. package/components/notify-agent/common.d.ts +1 -1
  27. package/components/notify-agent/common.js +2 -2
  28. package/components/notify-agent/notify-agent.vue +1 -1
  29. package/components/picker/common.d.ts +1 -1
  30. package/components/picker/common.js +2 -2
  31. package/components/picker/picker.vue +1 -1
  32. package/components/picker-input/common.d.ts +1 -1
  33. package/components/picker-input/common.js +3 -3
  34. package/components/picker-input/picker-input.vue +1 -1
  35. package/components/pull-down-refresh/common.d.ts +1 -1
  36. package/components/pull-down-refresh/common.js +2 -2
  37. package/components/pull-down-refresh/pull-down-refresh.vue +1 -1
  38. package/components/radio-input/common.d.ts +1 -1
  39. package/components/radio-input/common.js +2 -2
  40. package/components/radio-input/radio-input.vue +1 -1
  41. package/components/toast-agent/common.d.ts +1 -1
  42. package/components/toast-agent/common.js +2 -2
  43. package/components/toast-agent/toast-agent.vue +1 -1
  44. package/components/tree/common.d.ts +1 -1
  45. package/components/tree/common.js +2 -2
  46. package/components/tree/tree.vue +1 -1
  47. package/package.json +4 -5
package/changelog.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [1.10.1](https://github.com/sutras/sard-uniapp/compare/v1.10.0...v1.10.1) (2025-01-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 修复全局配置问题 ([dcd319c](https://github.com/sutras/sard-uniapp/commit/dcd319c51453c6aa7c13dfedfbc2bf47eb3bb409))
7
+
8
+
9
+
1
10
  # [1.10.0](https://github.com/sutras/sard-uniapp/compare/v1.9.2...v1.10.0) (2025-01-01)
2
11
 
3
12
 
@@ -32,7 +32,7 @@ export default _defineComponent({
32
32
  visibleHeight: { type: Number, required: false },
33
33
  right: { type: String, required: false },
34
34
  bottom: { type: String, required: false }
35
- }, defaultBackTopProps),
35
+ }, defaultBackTopProps()),
36
36
  emits: ["click"],
37
37
  setup(__props, { expose: __expose, emit: __emit }) {
38
38
  __expose();
@@ -7,7 +7,7 @@ export interface BackTopProps {
7
7
  right?: string;
8
8
  bottom?: string;
9
9
  }
10
- export declare const defaultBackTopProps: {
10
+ export declare const defaultBackTopProps: () => {
11
11
  scrollTop: number;
12
12
  visibleHeight: number;
13
13
  };
@@ -1,5 +1,5 @@
1
1
  import { defaultConfig } from '../config';
2
- export const defaultBackTopProps = {
2
+ export const defaultBackTopProps = () => ({
3
3
  ...defaultConfig.backTop,
4
4
  scrollTop: 0,
5
- };
5
+ });
@@ -92,7 +92,7 @@ export default _defineComponent({
92
92
  disabled: { type: Boolean, required: false },
93
93
  clearable: { type: Boolean, required: false },
94
94
  multiline: { type: Boolean, required: false }
95
- }, defaultCalendarInputProps),
95
+ }, defaultCalendarInputProps()),
96
96
  emits: ["update:visible", "update:model-value", "change"],
97
97
  setup(__props, { expose: __expose, emit: __emit }) {
98
98
  __expose();
@@ -7,7 +7,7 @@ export interface CalendarInputProps extends CalendarProps, Omit<PopoutInputProps
7
7
  outletFormat?: string;
8
8
  validateEvent?: boolean;
9
9
  }
10
- export declare const defaultCalendarInputProps: {
10
+ export declare const defaultCalendarInputProps: () => {
11
11
  type: CalendarProps["type"];
12
12
  maxDays: number;
13
13
  weekStartsOn: number;
@@ -1,5 +1,5 @@
1
1
  import { defaultConfig } from '../config';
2
- export const defaultCalendarInputProps = {
2
+ export const defaultCalendarInputProps = () => ({
3
3
  ...defaultConfig.calendarInput,
4
4
  ...defaultConfig.calendar,
5
- };
5
+ });
@@ -106,7 +106,7 @@ export default _defineComponent({
106
106
  clearable: { type: Boolean, required: false },
107
107
  loading: { type: Boolean, required: false },
108
108
  multiline: { type: Boolean, required: false }
109
- }, defaultCheckboxInputProps),
109
+ }, defaultCheckboxInputProps()),
110
110
  emits: ["update:visible", "update:model-value", "change"],
111
111
  setup(__props, { expose: __expose, emit: __emit }) {
112
112
  __expose();
@@ -5,7 +5,7 @@ export interface CheckboxInputProps extends CheckboxGroupProps, Omit<PopoutInput
5
5
  visible?: boolean;
6
6
  title?: string;
7
7
  }
8
- export declare const defaultCheckboxInputProps: {
8
+ export declare const defaultCheckboxInputProps: () => {
9
9
  options: () => never[];
10
10
  validateEvent: boolean;
11
11
  };
@@ -1,5 +1,5 @@
1
1
  import { defaultConfig } from '../config';
2
- export const defaultCheckboxInputProps = {
2
+ export const defaultCheckboxInputProps = () => ({
3
3
  ...defaultConfig.checkboxInput,
4
4
  options: () => [],
5
- };
5
+ });
@@ -7,7 +7,7 @@ export interface DatetimePickerInputProps extends DatetimePickerProps, Omit<Popo
7
7
  valueFormat?: string;
8
8
  validateEvent?: boolean;
9
9
  }
10
- export declare const defaultDatetimePickerInputProps: {
10
+ export declare const defaultDatetimePickerInputProps: () => {
11
11
  validateEvent: boolean;
12
12
  type: string;
13
13
  };
@@ -1,8 +1,8 @@
1
1
  import { defaultConfig } from '../config';
2
- export const defaultDatetimePickerInputProps = {
2
+ export const defaultDatetimePickerInputProps = () => ({
3
3
  ...defaultConfig.datetimePicker,
4
4
  ...defaultConfig.datetimePickerInput,
5
- };
5
+ });
6
6
  export const mapTypeFormat = {
7
7
  y: 'YYYY',
8
8
  yM: 'YYYY-MM',
@@ -83,7 +83,7 @@ export default _defineComponent({
83
83
  disabled: { type: Boolean, required: false },
84
84
  clearable: { type: Boolean, required: false },
85
85
  multiline: { type: Boolean, required: false }
86
- }, defaultDatetimePickerInputProps),
86
+ }, defaultDatetimePickerInputProps()),
87
87
  emits: ["update:visible", "update:model-value", "change"],
88
88
  setup(__props, { expose: __expose, emit: __emit }) {
89
89
  __expose();
@@ -2,7 +2,7 @@ import { type DialogProps } from '../dialog/common';
2
2
  export interface DialogAgentProps extends DialogProps {
3
3
  id?: string;
4
4
  }
5
- export declare const defaultDialogAgentProps: {
5
+ export declare const defaultDialogAgentProps: () => {
6
6
  id: string;
7
7
  headed: boolean;
8
8
  buttonType: DialogProps["buttonType"];
@@ -1,10 +1,10 @@
1
1
  import { defaultDialogProps } from '../dialog/common';
2
2
  import { defaultConfig } from '../config';
3
3
  import { getAllImperatives, getAvailableImperative, getImperatives, } from '../../use/useImperative';
4
- export const defaultDialogAgentProps = {
4
+ export const defaultDialogAgentProps = () => ({
5
5
  ...defaultDialogProps,
6
6
  ...defaultConfig.dialogAgent,
7
- };
7
+ });
8
8
  export const imperativeName = 'dialog';
9
9
  const defaultDialogOptions = {
10
10
  headed: false,
@@ -40,7 +40,7 @@ export default _defineComponent({
40
40
  duration: { type: Number, required: false },
41
41
  cancelProps: { type: Object, required: false },
42
42
  confirmProps: { type: Object, required: false }
43
- }, defaultDialogAgentProps),
43
+ }, defaultDialogAgentProps()),
44
44
  setup(__props, { expose: __expose }) {
45
45
  __expose();
46
46
  const props = __props;
@@ -15,7 +15,7 @@ export interface FabProps {
15
15
  overlayClosable?: boolean;
16
16
  duration?: number;
17
17
  }
18
- export declare const defaultFabProps: {
18
+ export declare const defaultFabProps: () => {
19
19
  itemList: () => never[];
20
20
  overlayClosable: boolean;
21
21
  hideName: boolean;
@@ -1,5 +1,5 @@
1
1
  import { defaultConfig } from '../config';
2
- export const defaultFabProps = {
2
+ export const defaultFabProps = () => ({
3
3
  ...defaultConfig.fab,
4
4
  itemList: () => [],
5
- };
5
+ });
@@ -76,7 +76,7 @@ export default _defineComponent({
76
76
  hideName: { type: Boolean, required: false },
77
77
  overlayClosable: { type: Boolean, required: false },
78
78
  duration: { type: Number, required: false }
79
- }, defaultFabProps),
79
+ }, defaultFabProps()),
80
80
  emits: ["click", "select"],
81
81
  setup(__props, { expose: __expose, emit: __emit }) {
82
82
  __expose();
@@ -62,7 +62,7 @@ export interface FormItemProps {
62
62
  showError?: boolean;
63
63
  inlaid?: boolean;
64
64
  }
65
- export declare const defaultFormItemProps: {
65
+ export declare const defaultFormItemProps: () => {
66
66
  required: undefined;
67
67
  showError: boolean;
68
68
  };
@@ -1,10 +1,10 @@
1
1
  import { inject } from 'vue';
2
2
  import { defaultConfig } from '../config';
3
3
  export const defaultFormProps = defaultConfig.form;
4
- export const defaultFormItemProps = {
4
+ export const defaultFormItemProps = () => ({
5
5
  ...defaultConfig.formItem,
6
6
  required: undefined,
7
- };
7
+ });
8
8
  export const formContextSymbol = Symbol('form-context');
9
9
  export const formItemContextSymbol = Symbol('form-item-context');
10
10
  export function useFormContext() {
@@ -78,7 +78,7 @@ export default _defineComponent({
78
78
  error: { type: String, required: false },
79
79
  showError: { type: Boolean, required: false },
80
80
  inlaid: { type: Boolean, required: false }
81
- }, defaultFormItemProps),
81
+ }, defaultFormItemProps()),
82
82
  setup(__props, { expose: __expose }) {
83
83
  const props = __props;
84
84
  const bem = createBem("form-item");
@@ -12,7 +12,7 @@ export interface LoadingProps {
12
12
  animated?: boolean;
13
13
  progress?: number;
14
14
  }
15
- export declare const defaultLoadingProps: {
15
+ export declare const defaultLoadingProps: () => {
16
16
  animated: boolean;
17
17
  progress: number;
18
18
  type: LoadingProps["type"];
@@ -1,6 +1,6 @@
1
1
  import { defaultConfig } from '../config';
2
- export const defaultLoadingProps = {
2
+ export const defaultLoadingProps = () => ({
3
3
  ...defaultConfig.loading,
4
4
  animated: true,
5
5
  progress: 1,
6
- };
6
+ });
@@ -67,7 +67,7 @@ export default _defineComponent({
67
67
  vertical: { type: Boolean, required: false },
68
68
  animated: { type: Boolean, required: false },
69
69
  progress: { type: Number, required: false }
70
- }, defaultLoadingProps),
70
+ }, defaultLoadingProps()),
71
71
  setup(__props, { expose: __expose }) {
72
72
  __expose();
73
73
  const props = __props;
@@ -2,7 +2,7 @@ import { type NotifyProps } from '../notify/common';
2
2
  export interface NotifyAgentProps extends NotifyProps {
3
3
  id?: string;
4
4
  }
5
- export declare const defaultNotifyAgentProps: {
5
+ export declare const defaultNotifyAgentProps: () => {
6
6
  id: string;
7
7
  type: NotifyProps["type"];
8
8
  position: NotifyProps["position"];
@@ -1,10 +1,10 @@
1
1
  import { defaultNotifyProps } from '../notify/common';
2
2
  import { defaultConfig } from '../config';
3
3
  import { getAllImperatives, getAvailableImperative, getImperatives, } from '../../use/useImperative';
4
- export const defaultNotifyAgentProps = {
4
+ export const defaultNotifyAgentProps = () => ({
5
5
  ...defaultNotifyProps,
6
6
  ...defaultConfig.notifyAgent,
7
- };
7
+ });
8
8
  export const imperativeName = 'notify';
9
9
  const show = (optionsOrMessage, options = {}, internalType) => {
10
10
  if (optionsOrMessage && typeof optionsOrMessage === 'object') {
@@ -45,7 +45,7 @@ export default _defineComponent({
45
45
  position: { type: String, required: false },
46
46
  timeout: { type: Number, required: false },
47
47
  duration: { type: Number, required: false }
48
- }, defaultNotifyAgentProps),
48
+ }, defaultNotifyAgentProps()),
49
49
  setup(__props, { expose: __expose }) {
50
50
  __expose();
51
51
  const props = __props;
@@ -16,7 +16,7 @@ export interface PickerProps {
16
16
  modelValue?: any;
17
17
  immediateChange?: boolean;
18
18
  }
19
- export declare const defaultPickerProps: {
19
+ export declare const defaultPickerProps: () => {
20
20
  columns: () => never[];
21
21
  immediateChange: boolean;
22
22
  };
@@ -1,8 +1,8 @@
1
1
  import { defaultConfig } from '../config';
2
- export const defaultPickerProps = {
2
+ export const defaultPickerProps = () => ({
3
3
  ...defaultConfig.picker,
4
4
  columns: () => [],
5
- };
5
+ });
6
6
  export const defaultOptionKeys = {
7
7
  label: 'label',
8
8
  value: 'value',
@@ -54,7 +54,7 @@ export default _defineComponent({
54
54
  optionKeys: { type: Object, required: false },
55
55
  modelValue: { type: null, required: false },
56
56
  immediateChange: { type: Boolean, required: false }
57
- }, defaultPickerProps),
57
+ }, defaultPickerProps()),
58
58
  emits: ["update:model-value", "change"],
59
59
  setup(__props, { expose: __expose, emit: __emit }) {
60
60
  __expose();
@@ -5,7 +5,7 @@ export interface PickerInputProps extends PickerProps, Omit<PopoutInputProps, 'm
5
5
  title?: string;
6
6
  validateEvent?: boolean;
7
7
  }
8
- export declare const defaultPickerInputProps: {
8
+ export declare const defaultPickerInputProps: () => {
9
9
  validateEvent: boolean;
10
10
  columns: () => never[];
11
11
  immediateChange: boolean;
@@ -1,6 +1,6 @@
1
1
  import { defaultPickerProps } from '../picker/common';
2
2
  import { defaultConfig } from '../config';
3
- export const defaultPickerInputProps = {
4
- ...defaultPickerProps,
3
+ export const defaultPickerInputProps = () => ({
4
+ ...defaultPickerProps(),
5
5
  ...defaultConfig.pickerInput,
6
- };
6
+ });
@@ -78,7 +78,7 @@ export default _defineComponent({
78
78
  clearable: { type: Boolean, required: false },
79
79
  loading: { type: Boolean, required: false },
80
80
  multiline: { type: Boolean, required: false }
81
- }, defaultPickerInputProps),
81
+ }, defaultPickerInputProps()),
82
82
  emits: ["update:visible", "update:model-value", "change"],
83
83
  setup(__props, { expose: __expose, emit: __emit }) {
84
84
  __expose();
@@ -10,7 +10,7 @@ export interface PullDownRefreshProps {
10
10
  doneDuration?: number;
11
11
  disabled?: boolean;
12
12
  }
13
- export declare const defaultPullDownRefreshProps: {
13
+ export declare const defaultPullDownRefreshProps: () => {
14
14
  loading: boolean;
15
15
  disabled: boolean;
16
16
  threshold: number;
@@ -1,9 +1,9 @@
1
1
  import { defaultConfig } from '../config';
2
- export const defaultPullDownRefreshProps = {
2
+ export const defaultPullDownRefreshProps = () => ({
3
3
  ...defaultConfig.pullDownRefresh,
4
4
  loading: false,
5
5
  disabled: false,
6
- };
6
+ });
7
7
  export const pullDownRefreshProps = {
8
8
  rootStyle: [String, Object, Array],
9
9
  rootClass: String,
@@ -101,7 +101,7 @@ export default _defineComponent({
101
101
  transitionDuration: { type: Number, required: false },
102
102
  doneDuration: { type: Number, required: false },
103
103
  disabled: { type: Boolean, required: false }
104
- }, defaultPullDownRefreshProps),
104
+ }, defaultPullDownRefreshProps()),
105
105
  emits: ["refresh"],
106
106
  setup(__props, { expose: __expose, emit: __emit }) {
107
107
  const touch = {};
@@ -5,7 +5,7 @@ export interface RadioInputProps extends RadioGroupProps, Omit<PopoutInputProps,
5
5
  visible?: boolean;
6
6
  title?: string;
7
7
  }
8
- export declare const defaultRadioInputProps: {
8
+ export declare const defaultRadioInputProps: () => {
9
9
  options: () => never[];
10
10
  validateEvent: boolean;
11
11
  type: RadioInputProps["type"];
@@ -1,5 +1,5 @@
1
1
  import { defaultConfig } from '../config';
2
- export const defaultRadioInputProps = {
2
+ export const defaultRadioInputProps = () => ({
3
3
  ...defaultConfig.radioInput,
4
4
  options: () => [],
5
- };
5
+ });
@@ -103,7 +103,7 @@ export default _defineComponent({
103
103
  clearable: { type: Boolean, required: false },
104
104
  loading: { type: Boolean, required: false },
105
105
  multiline: { type: Boolean, required: false }
106
- }, defaultRadioInputProps),
106
+ }, defaultRadioInputProps()),
107
107
  emits: ["update:visible", "update:model-value", "change"],
108
108
  setup(__props, { expose: __expose, emit: __emit }) {
109
109
  __expose();
@@ -2,7 +2,7 @@ import { type ToastProps } from '../toast/common';
2
2
  export interface ToastAgentProps extends ToastProps {
3
3
  id?: string;
4
4
  }
5
- export declare const defaultToastAgentProps: {
5
+ export declare const defaultToastAgentProps: () => {
6
6
  id: string;
7
7
  type: ToastProps["type"];
8
8
  position: ToastProps["position"];
@@ -1,10 +1,10 @@
1
1
  import { getAllImperatives, getAvailableImperative, getImperatives, } from '../../use/useImperative';
2
2
  import { defaultConfig } from '../config';
3
3
  import { defaultToastProps } from '../toast/common';
4
- export const defaultToastAgentProps = {
4
+ export const defaultToastAgentProps = () => ({
5
5
  ...defaultToastProps,
6
6
  ...defaultConfig.toastAgent,
7
- };
7
+ });
8
8
  export const imperativeName = 'toast';
9
9
  const show = (optionsOrTitle, options = {}, internalType) => {
10
10
  if (optionsOrTitle && typeof optionsOrTitle === 'object') {
@@ -44,7 +44,7 @@ export default _defineComponent({
44
44
  transparent: { type: Boolean, required: false },
45
45
  timeout: { type: Number, required: false },
46
46
  duration: { type: Number, required: false }
47
- }, defaultToastAgentProps),
47
+ }, defaultToastAgentProps()),
48
48
  setup(__props, { expose: __expose }) {
49
49
  __expose();
50
50
  const props = __props;
@@ -51,7 +51,7 @@ export interface TreeProps {
51
51
  filterMode?: 'lenient' | 'strict';
52
52
  filterMethod?: (value: string, node: TreeStateNode) => boolean;
53
53
  }
54
- export declare const defaultTreeProps: {
54
+ export declare const defaultTreeProps: () => {
55
55
  data: () => never[];
56
56
  defaultExpandAll: boolean;
57
57
  filterMode: TreeProps["filterMode"];
@@ -4,8 +4,8 @@ export const defaultNodeKeys = {
4
4
  key: 'key',
5
5
  children: 'children',
6
6
  };
7
- export const defaultTreeProps = {
7
+ export const defaultTreeProps = () => ({
8
8
  ...defaultConfig.tree,
9
9
  data: () => [],
10
- };
10
+ });
11
11
  export const treeContextSymbol = Symbol('tree-context');
@@ -83,7 +83,7 @@ export default _defineComponent({
83
83
  editable: { type: Boolean, required: false },
84
84
  filterMode: { type: String, required: false },
85
85
  filterMethod: { type: Function, required: false }
86
- }, defaultTreeProps),
86
+ }, defaultTreeProps()),
87
87
  setup(__props, { expose: __expose }) {
88
88
  const props = __props;
89
89
  const bem = createBem("tree");
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "sard-uniapp",
3
3
  "name": "sard-uniapp",
4
4
  "displayName": "sard-uniapp",
5
- "version": "1.10.0",
5
+ "version": "1.10.1",
6
6
  "description": "sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库",
7
7
  "main": "index.js",
8
8
  "scripts": {
@@ -101,7 +101,6 @@
101
101
  "@vitejs/plugin-vue-jsx": "^3.1.0",
102
102
  "@vue/runtime-core": "^3.5.12",
103
103
  "@vue/test-utils": "^2.4.6",
104
- "canvas": "^2.11.2",
105
104
  "consola": "^3.2.3",
106
105
  "conventional-changelog-cli": "^4.1.0",
107
106
  "eslint": "^9.16.0",
@@ -116,14 +115,14 @@
116
115
  "lodash-es": "^4.17.21",
117
116
  "prettier": "^2.8.8",
118
117
  "region-data": "^1.2.3",
119
- "sard-cli": "^1.0.4",
120
- "sass": "^1.43.4",
118
+ "sard-cli": "^1.0.7",
119
+ "sass": "^1.49.11",
121
120
  "tel-area-code": "^1.0.1",
122
121
  "ts-custom-error": "^3.3.1",
123
122
  "tsx": "^4.19.2",
124
123
  "typescript": "~5.6.2",
125
124
  "typescript-eslint": "^8.17.0",
126
- "vite": "5.4.11",
125
+ "vite": "6.0.6",
127
126
  "vite-plugin-eslint": "^1.8.1",
128
127
  "vitest": "^1.6.0",
129
128
  "vue": "^3.5.12",