qidian-vue-ui 2.0.0 → 2.0.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.
@@ -41,6 +41,7 @@ function resolveVModelBinding(context, vModel, defaultValue) {
41
41
  return bindings;
42
42
  }
43
43
  const RENDERER_INTERNAL_KEYS = /* @__PURE__ */ new Set(["context", "config", "crudMode", "fnInjectCtx"]);
44
+ const RENDERER_VNODE_PRIORITY_KEYS = /* @__PURE__ */ new Set(["placeholder", "clearable"]);
44
45
  const functionalRendererCache = /* @__PURE__ */ new WeakMap();
45
46
  function wrapFunctionalRenderer(fn) {
46
47
  const cached = functionalRendererCache.get(fn);
@@ -54,9 +55,13 @@ function wrapFunctionalRenderer(fn) {
54
55
  if (!vnode || typeof vnode !== "object" || Array.isArray(vnode)) {
55
56
  return vnode;
56
57
  }
58
+ const vnodeProps = vnode.props;
57
59
  const transferable = {};
58
60
  for (const key in attrs) {
59
61
  if (RENDERER_INTERNAL_KEYS.has(key)) continue;
62
+ if (RENDERER_VNODE_PRIORITY_KEYS.has(key) && vnodeProps && Object.prototype.hasOwnProperty.call(vnodeProps, key)) {
63
+ continue;
64
+ }
60
65
  transferable[key] = attrs[key];
61
66
  }
62
67
  return cloneVNode(vnode, transferable);
@@ -1,4 +1,4 @@
1
- .qd-service-select__load[data-v-ab140ebb] {
1
+ .qd-service-select__load[data-v-b5b98d92] {
2
2
  width: 100%;
3
3
  border-top: 1px solid var(--td-component-stroke);
4
4
  padding: 6px;
@@ -2,7 +2,7 @@ import './index.css'
2
2
  import _sfc_main from "./index.vue2.mjs";
3
3
  /* empty css */
4
4
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
5
- const QdServiceSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ab140ebb"]]);
5
+ const QdServiceSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b5b98d92"]]);
6
6
  export {
7
7
  QdServiceSelect as default
8
8
  };
@@ -195,11 +195,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
195
195
  const reOnSearch = (filterWords, context) => {
196
196
  onSearch?.(filterWords, context);
197
197
  search.value = filterWords.trim();
198
+ if (!service) return;
198
199
  refresh();
199
200
  };
200
201
  const reOnPopupVisibleChange = (visible, context) => {
201
202
  onPopupVisibleChange?.(visible, context);
202
- if (loading.value) return;
203
+ if (!service || loading.value) return;
203
204
  if (visible && (search.value || !options.value?.length || triggerServiceMerged && checkSameObject(options.value, markedFillOptions.value))) {
204
205
  search.value = "";
205
206
  refresh();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-vue-ui",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "基于 TDesign 的 QiDian Vue UI 组件库",
5
5
  "author": "qidian",
6
6
  "license": "MIT",