zydx-plus 1.0.11 → 1.0.12

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,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -43,6 +43,10 @@ export default {
43
43
  border: {
44
44
  type: String,
45
45
  default: 'none'
46
+ },
47
+ height: {
48
+ type: String,
49
+ default: '30px'
46
50
  }
47
51
  },
48
52
  data() {
@@ -98,6 +102,10 @@ export default {
98
102
  },
99
103
  updateSelect: function (tree) {
100
104
  this.$emit('update:select', tree)
105
+ },
106
+ textStyle: function (tree) {
107
+ const { fontSize = 16 } = tree
108
+ return `font-size: ${fontSize}px`
101
109
  }
102
110
  },
103
111
  }
@@ -114,14 +122,20 @@ export default {
114
122
  <div class="tree_node_indent"
115
123
  v-for="i in tree.level"
116
124
  :key="i">
117
- <div style="width: 16px;"></div>
125
+ <div :style="`width: ${tree.indent}px`"></div>
118
126
  </div>
119
127
  </template>
120
128
  <template v-if="tree.icon">
121
- <span class="tree_icon"
122
- v-html="tree.icon"></span>
129
+ <template v-if="['svg', 'image'].includes(tree.icon.type)">
130
+ <span class="tree_icon"
131
+ v-html="tree.icon.value"></span>
132
+ </template>
133
+ <template v-else>
134
+ <i :class="`iconfont' 'tree_icon' ${tree.icon.value}`"></i>
135
+ </template>
123
136
  </template>
124
- <span class="tree_text">
137
+ <span class="tree_text"
138
+ :style="textStyle(tree)">
125
139
  {{ tree.name }}
126
140
  </span>
127
141
  </div>
@@ -153,9 +167,9 @@ export default {
153
167
  align-items: center;
154
168
  justify-content: flex-start;
155
169
  text-align: left;
156
- height: 30px;
170
+ height: v-bind(height);
157
171
  cursor: pointer;
158
- gap: 6px;
172
+ gap: 16px;
159
173
  border-bottom: v-bind(border)
160
174
  }
161
175
 
package/src/index.js CHANGED
@@ -21,7 +21,7 @@ function install(app) {
21
21
  }
22
22
 
23
23
  export default {
24
- version: '1.0.11',
24
+ version: '1.0.12',
25
25
  install,
26
26
  Calendar,
27
27
  Message,