ct-component-plus 0.0.16 → 0.0.18

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ct-component-plus",
3
3
  "private": false,
4
- "version": "0.0.16",
4
+ "version": "0.0.18",
5
5
  "type": "module",
6
6
  "main": "packages/components/index.js",
7
7
  "files": [
@@ -54,6 +54,13 @@ const showValue = computed({
54
54
  },
55
55
  set(newValue) {
56
56
  emit("update:modelValue", newValue);
57
+ if (isFunction(props.cbs.change)) {
58
+ const checkedNodes = cascaderRef.value?.getCheckedNodes() || [];
59
+ const dataList = checkedNodes.map((item) => {
60
+ return item.data;
61
+ });
62
+ props.cbs.change(dataList, cascaderRef.value);
63
+ }
57
64
  },
58
65
  });
59
66
  const popperClassShow = computed(() => {
@@ -146,6 +153,10 @@ watchEffect(async () => {
146
153
  } catch (error) {}
147
154
  }
148
155
  });
156
+
157
+ defineExpose({
158
+ ref: cascaderRef,
159
+ });
149
160
  onMounted(() => {
150
161
  appendDom2Panel();
151
162
  });