sard-uniapp 1.10.1 → 1.10.2

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/README.md CHANGED
@@ -7,8 +7,12 @@
7
7
  <p align="center">sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库。</p>
8
8
 
9
9
  <p align="center">
10
- 📖 <a href="http://sutras.github.io/sard-uniapp-docs">文档 (github)</a>&nbsp;&nbsp;&nbsp;&nbsp;
11
- 🧑🏻‍🏫 <a href="http://sutras.github.io/sard-uniapp-docs/mobile/">案例演示 (github)</a>&nbsp;&nbsp;&nbsp;&nbsp;
10
+ 国内:📖 <a href="http://sard.wzt.zone/sard-uniapp-docs">文档</a>&nbsp;&nbsp;&nbsp;&nbsp;
11
+ 🧑🏻‍🏫 <a href="http://sard.wzt.zone/sard-uniapp-docs/mobile/">案例演示</a>&nbsp;&nbsp;&nbsp;&nbsp;
12
+ </p>
13
+ <p align="center">
14
+ 国外:📖 <a href="http://sutras.github.io/sard-uniapp-docs">文档</a>&nbsp;&nbsp;&nbsp;&nbsp;
15
+ 🧑🏻‍🏫 <a href="http://sutras.github.io/sard-uniapp-docs/mobile/">案例演示</a>&nbsp;&nbsp;&nbsp;&nbsp;
12
16
  </p>
13
17
 
14
18
  ---
package/changelog.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [1.10.2](https://github.com/sutras/sard-uniapp/compare/v1.10.1...v1.10.2) (2025-02-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 修复 cascader, cascader-input 组件 ([e964e40](https://github.com/sutras/sard-uniapp/commit/e964e400452e873713a95b9a07cbe4e1459113cc))
7
+
8
+
9
+
1
10
  ## [1.10.1](https://github.com/sutras/sard-uniapp/compare/v1.10.0...v1.10.1) (2025-01-08)
2
11
 
3
12
 
@@ -138,7 +138,7 @@ export default _defineComponent({
138
138
  options: nextOptions,
139
139
  selected: option
140
140
  };
141
- nextOptions = option.children;
141
+ nextOptions = option[mergedFieldKeys.value.children];
142
142
  return tab;
143
143
  });
144
144
  if (nextOptions) {
@@ -2,13 +2,13 @@ import { type CascaderOption } from '../cascader/common';
2
2
  import { type CascaderInputProps, type CascaderInputSlots } from './common';
3
3
  declare function __VLS_template(): Readonly<CascaderInputSlots> & CascaderInputSlots;
4
4
  declare const __VLS_component: import("vue").DefineComponent<CascaderInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
- "update:model-value": (value: any) => any;
6
- change: (value: any) => any;
5
+ "update:model-value": (value: any, selectedOptions: CascaderOption[]) => any;
6
+ change: (value: any, selectedOptions: CascaderOption[]) => any;
7
7
  select: (option: CascaderOption, tabIndex: number) => any;
8
8
  "update:visible": (visible: boolean) => any;
9
9
  }, string, import("vue").PublicProps, Readonly<CascaderInputProps> & Readonly<{
10
- "onUpdate:model-value"?: ((value: any) => any) | undefined;
11
- onChange?: ((value: any) => any) | undefined;
10
+ "onUpdate:model-value"?: ((value: any, selectedOptions: CascaderOption[]) => any) | undefined;
11
+ onChange?: ((value: any, selectedOptions: CascaderOption[]) => any) | undefined;
12
12
  onSelect?: ((option: CascaderOption, tabIndex: number) => any) | undefined;
13
13
  "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
14
14
  }>, {
@@ -101,11 +101,13 @@ export default _defineComponent({
101
101
  }
102
102
  );
103
103
  const popoutValue = ref(props.modelValue);
104
+ const popoutOptions = ref([]);
104
105
  watch(innerValue, () => {
105
106
  popoutValue.value = innerValue.value;
106
107
  });
107
- const onChange = (value) => {
108
+ const onChange = (value, selectedOptions) => {
108
109
  popoutValue.value = value;
110
+ popoutOptions.value = selectedOptions;
109
111
  if (!props.showConfirm && !isNullish(popoutValue.value)) {
110
112
  onConfirm();
111
113
  innerVisible.value = false;
@@ -113,8 +115,8 @@ export default _defineComponent({
113
115
  };
114
116
  const onConfirm = () => {
115
117
  innerValue.value = popoutValue.value;
116
- emit("update:model-value", popoutValue.value);
117
- emit("change", popoutValue.value);
118
+ emit("update:model-value", popoutValue.value, popoutOptions.value);
119
+ emit("change", popoutValue.value, popoutOptions.value);
118
120
  inputValue.value = getInputValue();
119
121
  };
120
122
  const inputValue = ref("");
@@ -157,7 +159,8 @@ export default _defineComponent({
157
159
  const onClear = () => {
158
160
  inputValue.value = "";
159
161
  innerValue.value = void 0;
160
- emit("update:model-value", void 0);
162
+ emit("update:model-value", void 0, []);
163
+ emit("change", void 0, []);
161
164
  };
162
165
  const innerVisible = ref(props.visible);
163
166
  watch(
@@ -174,7 +177,7 @@ export default _defineComponent({
174
177
  innerVisible.value = true;
175
178
  emit("update:visible", true);
176
179
  };
177
- const __returned__ = { props, emit, formItemContext, innerValue, popoutValue, onChange, onConfirm, inputValue, fieldkeys, getOutletText, getInputValue, onClear, innerVisible, onVisible, onInputClick, SarPopoutInput, SarCascader, SarPopout };
180
+ const __returned__ = { props, emit, formItemContext, innerValue, popoutValue, popoutOptions, onChange, onConfirm, inputValue, fieldkeys, getOutletText, getInputValue, onClear, innerVisible, onVisible, onInputClick, SarPopoutInput, SarCascader, SarPopout };
178
181
  return __returned__;
179
182
  }
180
183
  });
@@ -17,7 +17,7 @@ export interface CascaderInputSlots {
17
17
  }
18
18
  export interface CascaderInputEmits {
19
19
  (e: 'update:visible', visible: boolean): void;
20
- (e: 'update:model-value', value: any): void;
21
- (e: 'change', value: any): void;
20
+ (e: 'update:model-value', value: any, selectedOptions: CascaderOption[]): void;
21
+ (e: 'change', value: any, selectedOptions: CascaderOption[]): void;
22
22
  (e: 'select', option: CascaderOption, tabIndex: number): void;
23
23
  }
@@ -171,6 +171,7 @@ export default _defineComponent({
171
171
  inputValue.value = "";
172
172
  innerValue.value = void 0;
173
173
  emit("update:model-value", void 0);
174
+ emit("change", void 0);
174
175
  };
175
176
  const innerVisible = ref(props.visible);
176
177
  watch(
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.1",
5
+ "version": "1.10.2",
6
6
  "description": "sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库",
7
7
  "main": "index.js",
8
8
  "scripts": {
@@ -115,7 +115,7 @@
115
115
  "lodash-es": "^4.17.21",
116
116
  "prettier": "^2.8.8",
117
117
  "region-data": "^1.2.3",
118
- "sard-cli": "^1.0.7",
118
+ "sard-cli": "^1.0.9",
119
119
  "sass": "^1.49.11",
120
120
  "tel-area-code": "^1.0.1",
121
121
  "ts-custom-error": "^3.3.1",
@@ -216,5 +216,8 @@
216
216
  },
217
217
  "engines": {
218
218
  "HBuilderX": "^3.6.0"
219
+ },
220
+ "pnpm": {
221
+ "overrides": {}
219
222
  }
220
223
  }