@netang/quasar 0.1.31 → 0.1.33

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.
@@ -789,7 +789,7 @@ export default {
789
789
  }
790
790
  ),
791
791
  // 是否开启防抖(防止重复请求)
792
- // debounce: false,
792
+ debounce: false,
793
793
  }
794
794
 
795
795
  // 请求数据
@@ -12,7 +12,7 @@
12
12
  <div
13
13
  :class="item.classes"
14
14
  :key="item.key"
15
- :style="{ paddingLeft: (item.level * 16) + 'px' }"
15
+ :style="{ paddingLeft: (item.level * arrowSize) + 'px' }"
16
16
  @mousedown.self="onMouseDown($event, item)"
17
17
  @mouseup="onDragEnd"
18
18
  @dragstart.stop="onDragStart($event, item)"
@@ -36,10 +36,19 @@
36
36
  class="q-tree__arrow q-ml-sm"
37
37
  :name="computedIcon"
38
38
  :class="`${item.m.expanded ? 'q-tree__arrow--rotate' : ''}`"
39
+ :size="arrowSize + 'px'"
39
40
  @click="onExpandClick(item.node, item.m, $event)"
41
+ v-bind="iconProps"
40
42
  v-if="item.isParent === true"
41
43
  />
42
- <div class="n-tree__arrow--noop q-ml-sm" v-else></div>
44
+ <div
45
+ class="n-tree__arrow--noop q-ml-sm"
46
+ :style="{
47
+ width: arrowSize + 'px',
48
+ height: arrowSize + 'px',
49
+ }"
50
+ v-else
51
+ ></div>
43
52
 
44
53
  <!-- 复选框-->
45
54
  <q-checkbox
@@ -138,6 +147,7 @@ export default {
138
147
  selectedColor: String,
139
148
 
140
149
  icon: String,
150
+ iconProps: Object,
141
151
 
142
152
  tickStrategy: {
143
153
  type: String,
@@ -192,6 +202,12 @@ export default {
192
202
  },
193
203
  // 虚拟滚动声明
194
204
  virtualScrollProps: Object,
205
+
206
+ // 箭头大小
207
+ arrowSize: {
208
+ type: Number,
209
+ default: 16,
210
+ },
195
211
  },
196
212
 
197
213
  /**
@@ -1491,8 +1507,8 @@ export default {
1491
1507
 
1492
1508
  // 空箭头
1493
1509
  &__arrow--noop {
1494
- width: 16px;
1495
- height: 16px;
1510
+ //width: 16px;
1511
+ //height: 16px;
1496
1512
  margin-right: 4px;
1497
1513
  }
1498
1514
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netang/quasar",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "description": "netang-quasar",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/utils/dict.js CHANGED
@@ -1,21 +1,21 @@
1
- import $n_has from 'lodash/has'
2
-
3
- import { configs } from './config'
4
-
5
- /**
6
- * 获取字典值对应的文字
7
- */
8
- export default function dict(key, value, defaultValue = '') {
9
- if (
10
- key
11
- && $n_has(configs.userDict, key)
12
- ) {
13
- for (const item of configs.userDict[key]) {
14
- if (item[1] === value) {
15
- return item[0]
16
- }
17
- }
18
- }
19
-
20
- return defaultValue
21
- }
1
+ import $n_has from 'lodash/has'
2
+
3
+ import { configs } from './config'
4
+
5
+ /**
6
+ * 获取字典值对应的文字
7
+ */
8
+ export default function dict(key, value, defaultValue = '') {
9
+ if (
10
+ key
11
+ && $n_has(configs.userDict, key)
12
+ ) {
13
+ for (const item of configs.userDict[key]) {
14
+ if (item[1] === value) {
15
+ return item[0]
16
+ }
17
+ }
18
+ }
19
+
20
+ return defaultValue
21
+ }