@jetlinks-web/components 2.4.18 → 2.4.19

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.
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
48
48
  "onFieldChange": "setup-const"
49
49
  } */
50
50
  import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
51
- const _withScopeId = n => (_pushScopeId("data-v-1738907934927"), n = n(), _popScopeId(), n);
51
+ const _withScopeId = n => (_pushScopeId("data-v-1739267207949"), n = n(), _popScopeId(), n);
52
52
  const _hoisted_1 = { style: { "color": "#1d2129" } };
53
53
  const _hoisted_2 = {
54
54
  key: 0,
@@ -9,7 +9,7 @@
9
9
  } */
10
10
  import { defineComponent as _defineComponent } from 'vue';
11
11
  import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
12
- const _withScopeId = n => (_pushScopeId("data-v-1738907935129"), n = n(), _popScopeId(), n);
12
+ const _withScopeId = n => (_pushScopeId("data-v-1739267208275"), n = n(), _popScopeId(), n);
13
13
  const _hoisted_1 = { class: "full-page-warp-content" };
14
14
  import { ref, inject } from 'vue';
15
15
  import { useElementBounding } from '@vueuse/core';
@@ -10,7 +10,7 @@
10
10
  "onClick": "setup-const"
11
11
  } */
12
12
  import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
13
- const _withScopeId = n => (_pushScopeId("data-v-1738907936233"), n = n(), _popScopeId(), n);
13
+ const _withScopeId = n => (_pushScopeId("data-v-1739267209902"), n = n(), _popScopeId(), n);
14
14
  const _hoisted_1 = ["onClick"];
15
15
  const __sfc_main__ = Object.assign({
16
16
  name: 'JRadioButton',
@@ -23,7 +23,7 @@
23
23
  } */
24
24
  import { defineComponent as _defineComponent } from 'vue';
25
25
  import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
26
- const _withScopeId = n => (_pushScopeId("data-v-1738907937000"), n = n(), _popScopeId(), n);
26
+ const _withScopeId = n => (_pushScopeId("data-v-1739267210360"), n = n(), _popScopeId(), n);
27
27
  const _hoisted_1 = {
28
28
  key: 0,
29
29
  style: { "width": "240px" }
@@ -77,7 +77,8 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
77
77
  "historyItemClick": "setup-const",
78
78
  "handleUrlParams": "setup-const",
79
79
  "handleDefaultValues": "setup-const",
80
- "handleItems": "setup-const"
80
+ "handleItems": "setup-const",
81
+ "clearValue": "setup-const"
81
82
  } */
82
83
  import { defineComponent as _defineComponent } from 'vue';
83
84
  import { createCommentVNode as _createCommentVNode, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createElementVNode as _createElementVNode, unref as _unref, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, normalizeStyle as _normalizeStyle } from "vue";
@@ -214,8 +215,10 @@ const __sfc_main__ = _defineComponent({
214
215
  }
215
216
  };
216
217
  const addUrlParams = () => {
217
- q.value = encodeURI(JSON.stringify(termsData));
218
- target.value = props.target;
218
+ if (props.target) {
219
+ q.value = encodeURI(JSON.stringify(termsData));
220
+ target.value = props.target;
221
+ }
219
222
  };
220
223
  const submitData = () => {
221
224
  emit('search', termsParamsFormat(termsData, columnOptionMap.value));
@@ -332,19 +335,28 @@ const __sfc_main__ = _defineComponent({
332
335
  handleUrlParams({ q: q.value, target: target.value });
333
336
  }
334
337
  };
338
+ const clearValue = () => {
339
+ if (props.type === 'advanced' && props.target !== target.value) {
340
+ q.value = null;
341
+ target.value = null;
342
+ }
343
+ };
335
344
  watch(() => props.columns, () => {
336
345
  termsData.terms = [
337
346
  { terms: [null, null, null] },
338
347
  { terms: [null, null, null], type: 'and' },
339
348
  ];
340
349
  expand.value = false;
341
- if (props.type === 'advanced') {
342
- q.value = null;
343
- target.value = null;
344
- }
345
350
  handleItems();
351
+ clearValue();
352
+ }, {
353
+ deep: true,
354
+ });
355
+ watch(() => props.target, () => {
356
+ clearValue();
346
357
  }, {
347
358
  deep: true,
359
+ immediate: true
348
360
  });
349
361
  watch(width, (value) => {
350
362
  if (value < 1000) {
package/es/Search/Item.js CHANGED
@@ -80,7 +80,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
80
80
  } */
81
81
  import { defineComponent as _defineComponent } from 'vue';
82
82
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
83
- const _withScopeId = n => (_pushScopeId("data-v-1738907936445"), n = n(), _popScopeId(), n);
83
+ const _withScopeId = n => (_pushScopeId("data-v-1739267209737"), n = n(), _popScopeId(), n);
84
84
  const _hoisted_1 = { class: "JSearch-item" };
85
85
  const _hoisted_2 = {
86
86
  key: 0,
@@ -45,7 +45,7 @@
45
45
  } */
46
46
  import { defineComponent as _defineComponent } from 'vue';
47
47
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
48
- const _withScopeId = n => (_pushScopeId("data-v-1738907936594"), n = n(), _popScopeId(), n);
48
+ const _withScopeId = n => (_pushScopeId("data-v-1739267209817"), n = n(), _popScopeId(), n);
49
49
  const _hoisted_1 = { class: "JSearch-content simple" };
50
50
  const _hoisted_2 = { class: "JSearch-items" };
51
51
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
48
48
  "onFieldChange": "setup-const"
49
49
  } */
50
50
  import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
51
- const _withScopeId = n => (_pushScopeId("data-v-1738907934905"), n = n(), _popScopeId(), n);
51
+ const _withScopeId = n => (_pushScopeId("data-v-1739267207923"), n = n(), _popScopeId(), n);
52
52
  const _hoisted_1 = { style: { "color": "#1d2129" } };
53
53
  const _hoisted_2 = {
54
54
  key: 0,
@@ -9,7 +9,7 @@
9
9
  } */
10
10
  import { defineComponent as _defineComponent } from 'vue';
11
11
  import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
12
- const _withScopeId = n => (_pushScopeId("data-v-1738907935123"), n = n(), _popScopeId(), n);
12
+ const _withScopeId = n => (_pushScopeId("data-v-1739267208269"), n = n(), _popScopeId(), n);
13
13
  const _hoisted_1 = { class: "full-page-warp-content" };
14
14
  import { ref, inject } from 'vue';
15
15
  import { useElementBounding } from '@vueuse/core';
@@ -10,7 +10,7 @@
10
10
  "onClick": "setup-const"
11
11
  } */
12
12
  import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
13
- const _withScopeId = n => (_pushScopeId("data-v-1738907936243"), n = n(), _popScopeId(), n);
13
+ const _withScopeId = n => (_pushScopeId("data-v-1739267209911"), n = n(), _popScopeId(), n);
14
14
  const _hoisted_1 = ["onClick"];
15
15
  const __sfc_main__ = Object.assign({
16
16
  name: 'JRadioButton',
@@ -23,7 +23,7 @@
23
23
  } */
24
24
  import { defineComponent as _defineComponent } from 'vue';
25
25
  import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
26
- const _withScopeId = n => (_pushScopeId("data-v-1738907936988"), n = n(), _popScopeId(), n);
26
+ const _withScopeId = n => (_pushScopeId("data-v-1739267210376"), n = n(), _popScopeId(), n);
27
27
  const _hoisted_1 = {
28
28
  key: 0,
29
29
  style: { "width": "240px" }
@@ -77,7 +77,8 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
77
77
  "historyItemClick": "setup-const",
78
78
  "handleUrlParams": "setup-const",
79
79
  "handleDefaultValues": "setup-const",
80
- "handleItems": "setup-const"
80
+ "handleItems": "setup-const",
81
+ "clearValue": "setup-const"
81
82
  } */
82
83
  import { defineComponent as _defineComponent } from 'vue';
83
84
  import { createCommentVNode as _createCommentVNode, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createElementVNode as _createElementVNode, unref as _unref, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, normalizeStyle as _normalizeStyle } from "vue";
@@ -214,8 +215,10 @@ const __sfc_main__ = _defineComponent({
214
215
  }
215
216
  };
216
217
  const addUrlParams = () => {
217
- q.value = encodeURI(JSON.stringify(termsData));
218
- target.value = props.target;
218
+ if (props.target) {
219
+ q.value = encodeURI(JSON.stringify(termsData));
220
+ target.value = props.target;
221
+ }
219
222
  };
220
223
  const submitData = () => {
221
224
  emit('search', termsParamsFormat(termsData, columnOptionMap.value));
@@ -332,19 +335,28 @@ const __sfc_main__ = _defineComponent({
332
335
  handleUrlParams({ q: q.value, target: target.value });
333
336
  }
334
337
  };
338
+ const clearValue = () => {
339
+ if (props.type === 'advanced' && props.target !== target.value) {
340
+ q.value = null;
341
+ target.value = null;
342
+ }
343
+ };
335
344
  watch(() => props.columns, () => {
336
345
  termsData.terms = [
337
346
  { terms: [null, null, null] },
338
347
  { terms: [null, null, null], type: 'and' },
339
348
  ];
340
349
  expand.value = false;
341
- if (props.type === 'advanced') {
342
- q.value = null;
343
- target.value = null;
344
- }
345
350
  handleItems();
351
+ clearValue();
352
+ }, {
353
+ deep: true,
354
+ });
355
+ watch(() => props.target, () => {
356
+ clearValue();
346
357
  }, {
347
358
  deep: true,
359
+ immediate: true
348
360
  });
349
361
  watch(width, (value) => {
350
362
  if (value < 1000) {
@@ -80,7 +80,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
80
80
  } */
81
81
  import { defineComponent as _defineComponent } from 'vue';
82
82
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
83
- const _withScopeId = n => (_pushScopeId("data-v-1738907936497"), n = n(), _popScopeId(), n);
83
+ const _withScopeId = n => (_pushScopeId("data-v-1739267209673"), n = n(), _popScopeId(), n);
84
84
  const _hoisted_1 = { class: "JSearch-item" };
85
85
  const _hoisted_2 = {
86
86
  key: 0,
@@ -45,7 +45,7 @@
45
45
  } */
46
46
  import { defineComponent as _defineComponent } from 'vue';
47
47
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
48
- const _withScopeId = n => (_pushScopeId("data-v-1738907936568"), n = n(), _popScopeId(), n);
48
+ const _withScopeId = n => (_pushScopeId("data-v-1739267209842"), n = n(), _popScopeId(), n);
49
49
  const _hoisted_1 = { class: "JSearch-content simple" };
50
50
  const _hoisted_2 = { class: "JSearch-items" };
51
51
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/components",
3
- "version": "2.4.18",
3
+ "version": "2.4.19",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -153,8 +153,8 @@
153
153
  "webpack-merge": "^5.0.0",
154
154
  "webpackbar": "^5.0.2",
155
155
  "@jetlinks-web/constants": "^1.0.7",
156
- "@jetlinks-web/utils": "^1.2.5",
157
- "@jetlinks-web/hooks": "^1.0.21"
156
+ "@jetlinks-web/hooks": "^1.0.21",
157
+ "@jetlinks-web/utils": "^1.2.5"
158
158
  },
159
159
  "publishConfig": {
160
160
  "registry": "https://registry.npmjs.org/",