@netang/quasar 0.0.107 → 0.1.8

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.
@@ -588,7 +588,6 @@ export default {
588
588
  * 加载已选数据
589
589
  */
590
590
  async function loadSelected() {
591
-
592
591
  if (
593
592
  // 如果值类型不是数组对象
594
593
  props.valueType !== 'objectArray'
@@ -600,7 +599,6 @@ export default {
600
599
  // 获取值数组
601
600
  const values = valueToSelected(props.modelValue, false, false)
602
601
  if (values.length) {
603
-
604
602
  // 初始的已选数据
605
603
  const _selected = await onRequestSelected(values)
606
604
  const _value = selectedToValue(_selected)
@@ -791,7 +789,7 @@ export default {
791
789
  }
792
790
  ),
793
791
  // 是否开启防抖(防止重复请求)
794
- debounce: false,
792
+ // debounce: false,
795
793
  }
796
794
 
797
795
  // 请求数据
@@ -165,6 +165,7 @@
165
165
  :options="tableSearchOptions"
166
166
  :on-search="tableReload"
167
167
  :on-reset="tableSearchReset"
168
+ v-if="showSearch"
168
169
  >
169
170
  <!-- 插槽 -->
170
171
  <template
@@ -180,7 +181,7 @@
180
181
  </template>
181
182
 
182
183
  <script>
183
- import { ref, watch, computed, inject } from 'vue'
184
+ import { ref, watch, computed, inject, onMounted } from 'vue'
184
185
 
185
186
  import $n_isFunction from 'lodash/isFunction'
186
187
 
@@ -290,8 +291,6 @@ export default {
290
291
  // 获取表格注入
291
292
  const $table = inject(NTableKey)
292
293
 
293
- // console.log('----$table222---', $table, $table.tableSearchValue.value)
294
-
295
294
  // 获取对话框注入
296
295
  const $dialog = inject(NDialogKey)
297
296
  const inDialog = !! $dialog
@@ -327,6 +326,9 @@ export default {
327
326
  // 树选择数据
328
327
  const treeSelected = ref(null)
329
328
 
329
+ // 是否显示搜索
330
+ const showSearch = ref(false)
331
+
330
332
  // ==========【计算属性】==========================================================================================
331
333
 
332
334
  /**
@@ -432,6 +434,17 @@ export default {
432
434
  })
433
435
  }
434
436
 
437
+ // ==========【生命周期】=========================================================================================
438
+
439
+ /**
440
+ * 实例被挂载后调用
441
+ */
442
+ onMounted( async function() {
443
+
444
+ // 显示搜索
445
+ showSearch.value = true
446
+ })
447
+
435
448
  // ==========【返回】=============================================================================================
436
449
 
437
450
  return {
@@ -444,6 +457,8 @@ export default {
444
457
  treeFilterValue,
445
458
  // 树选择数据
446
459
  treeSelected,
460
+ // 是否显示搜索
461
+ showSearch,
447
462
 
448
463
  // 插槽 body 单元格标识
449
464
  slotNames,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netang/quasar",
3
- "version": "0.0.107",
3
+ "version": "0.1.8",
4
4
  "description": "netang-quasar",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"