hd-idevvue3 3.0.2 → 3.0.4

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.
Files changed (147) hide show
  1. package/dist/assets/index.9c127719.css +1 -0
  2. package/dist/hd-idevvue3.mjs +3521 -3305
  3. package/dist/hd-idevvue3.umd.js +29 -29
  4. package/npminstall-debug.log +2 -10
  5. package/package.json +4 -2
  6. package/pnpm-lock.yaml +37 -4
  7. package/src/App.vue +11 -15
  8. package/src/assets/sound/notify.wav +0 -0
  9. package/src/demo/demo.vue +9 -10
  10. package/src/demo/dropdemo.vue +42 -43
  11. package/src/demo/extsets.vue +140 -39
  12. package/src/demo/formedit.vue +157 -145
  13. package/src/demo/hightquery.vue +263 -66
  14. package/src/demo/inlineedit.vue +129 -35
  15. package/src/demo/selfdrop.vue +32 -15
  16. package/src/directive/el-dragDialog/drag.js +13 -13
  17. package/src/directive/el-dragDialog/index.js +13 -13
  18. package/src/errorLog.js +3 -3
  19. package/src/hdcom/BigGrid.js +54 -48
  20. package/src/hdcom/BillShow.vue +84 -63
  21. package/src/hdcom/BillUpload.vue +144 -86
  22. package/src/hdcom/BtnRight.vue +26 -23
  23. package/src/hdcom/ErrHint.vue +36 -24
  24. package/src/hdcom/ExtendColumn.vue +97 -90
  25. package/src/hdcom/ExtendCommon.js +24 -13
  26. package/src/hdcom/ExtendForm.vue +107 -80
  27. package/src/hdcom/FacePicUpload.vue +59 -50
  28. package/src/hdcom/FaceRecTest.vue +87 -77
  29. package/src/hdcom/GridChart.vue +175 -162
  30. package/src/hdcom/GridExField.vue +328 -234
  31. package/src/hdcom/GridShow.vue +89 -39
  32. package/src/hdcom/HdAside.vue +192 -145
  33. package/src/hdcom/HdBtn.vue +44 -32
  34. package/src/hdcom/HdButton.vue +141 -117
  35. package/src/hdcom/HdComFaceRec.vue +80 -32
  36. package/src/hdcom/HdComGrid.vue +329 -229
  37. package/src/hdcom/HdComQuery.vue +179 -90
  38. package/src/hdcom/HdComQueryDetail.vue +159 -115
  39. package/src/hdcom/HdComSortDetail.vue +136 -130
  40. package/src/hdcom/HdDatePicker.vue +32 -16
  41. package/src/hdcom/HdDialog.vue +62 -44
  42. package/src/hdcom/HdDrop.vue +163 -138
  43. package/src/hdcom/HdFileUpload.vue +138 -119
  44. package/src/hdcom/HdFilterBox.vue +62 -62
  45. package/src/hdcom/HdFooter.vue +152 -119
  46. package/src/hdcom/HdForm.vue +276 -203
  47. package/src/hdcom/HdFormBtn.vue +81 -39
  48. package/src/hdcom/HdFormItem.vue +14 -10
  49. package/src/hdcom/HdGrid.vue +353 -156
  50. package/src/hdcom/HdGridEditBtn.vue +34 -20
  51. package/src/hdcom/HdGridExt.js +78 -47
  52. package/src/hdcom/HdGridSel.vue +227 -193
  53. package/src/hdcom/HdHeader.vue +149 -117
  54. package/src/hdcom/HdHotKey.vue +70 -67
  55. package/src/hdcom/HdInputHint.vue +40 -36
  56. package/src/hdcom/HdMain.vue +25 -27
  57. package/src/hdcom/HdMessage.vue +180 -171
  58. package/src/hdcom/HdNum.vue +67 -57
  59. package/src/hdcom/HdPopSel.vue +46 -24
  60. package/src/hdcom/HdRightMenu.vue +63 -61
  61. package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
  62. package/src/hdcom/HdTableColumn.vue +156 -109
  63. package/src/hdcom/HdTempSave.vue +138 -116
  64. package/src/hdcom/HdTree.vue +89 -72
  65. package/src/hdcom/HdTreeTable/eval.js +8 -3
  66. package/src/hdcom/HdTreeTable/index.vue +229 -174
  67. package/src/hdcom/ImportExcel.vue +69 -34
  68. package/src/hdcom/index.js +39 -44
  69. package/src/idev.common.js +54 -47
  70. package/src/index.js +3 -6
  71. package/src/utils/HdQuery.js +25 -14
  72. package/src/utils/comutils.js +50 -28
  73. package/src/utils/gogocodeTransfer.js +59 -0
  74. package/src/utils/utils.js +30 -19
  75. package/src/vendor/Blob.js +187 -179
  76. package/src/vendor/Export2Excel.js +231 -220
  77. package/src/vendor/Export2Zip.js +25 -22
  78. package/src/views/layout/AppMain.vue +34 -32
  79. package/src/views/layout/HdLayout.vue +64 -52
  80. package/src/views/layout/header/ElasticSearch.vue +196 -159
  81. package/src/views/layout/header/HZRecorder.js +163 -135
  82. package/src/views/layout/header/HeaderSearch.vue +165 -145
  83. package/src/views/layout/header/Levelbar.vue +55 -49
  84. package/src/views/layout/header/MainHeader.vue +233 -189
  85. package/src/views/layout/header/Navbar.vue +74 -78
  86. package/src/views/layout/header/ScrollPane.vue +103 -81
  87. package/src/views/layout/header/TagsView.vue +169 -164
  88. package/src/views/layout/header/VocRec.vue +86 -78
  89. package/src/views/layout/header/changepswform.vue +98 -64
  90. package/src/views/layout/index.js +5 -7
  91. package/src/views/layout/menu/Hamburger.vue +63 -45
  92. package/src/views/layout/menu/HdMenu.vue +155 -118
  93. package/src/views/layout/menu/index.vue +21 -19
  94. package/src/views/privilege/commsg/commsg.vue +115 -41
  95. package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
  96. package/src/views/privilege/commsg/commsgRole.vue +180 -109
  97. package/src/views/privilege/commsg/commsgform.vue +125 -101
  98. package/src/views/privilege/commsg/commsgiframe.vue +30 -23
  99. package/src/views/privilege/commsg/commsgto.vue +163 -84
  100. package/src/views/privilege/commsg/commsgtoform.vue +64 -58
  101. package/src/views/privilege/commsg/commsgtrans.vue +187 -115
  102. package/src/views/privilege/exfield/comexcolumn.vue +133 -43
  103. package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
  104. package/src/views/privilege/exfield/comexfield.vue +15 -17
  105. package/src/views/privilege/exfield/comexfieldform.vue +71 -53
  106. package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
  107. package/src/views/privilege/index.js +19 -20
  108. package/src/views/privilege/menu/comMenu.vue +49 -41
  109. package/src/views/privilege/menu/menu.vue +166 -49
  110. package/src/views/privilege/menu/menuinfo.vue +41 -34
  111. package/src/views/privilege/menu/rolelist.vue +78 -33
  112. package/src/views/privilege/menu/userlist.vue +76 -33
  113. package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
  114. package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
  115. package/src/views/privilege/orgDept/authOrgn.vue +157 -65
  116. package/src/views/privilege/orgDept/authorgnform.vue +50 -38
  117. package/src/views/privilege/orgDept/orgDept.vue +38 -37
  118. package/src/views/privilege/orgDept/orgTree.vue +99 -88
  119. package/src/views/privilege/orgDept/orgnselect.vue +132 -111
  120. package/src/views/privilege/personDept/authuser.vue +197 -91
  121. package/src/views/privilege/personDept/authuserform.vue +123 -71
  122. package/src/views/privilege/personDept/facerec.vue +128 -83
  123. package/src/views/privilege/personDept/orgncascader.vue +134 -115
  124. package/src/views/privilege/personDept/personDept.vue +9 -7
  125. package/src/views/privilege/quartz/comquartzjob.vue +123 -38
  126. package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
  127. package/src/views/privilege/quartz/comquartzlog.vue +116 -32
  128. package/src/views/privilege/role/btnRole.vue +123 -67
  129. package/src/views/privilege/role/menuRole.vue +65 -45
  130. package/src/views/privilege/role/orgnRole.vue +63 -41
  131. package/src/views/privilege/role/role.vue +26 -9
  132. package/src/views/privilege/role/rolelist.vue +114 -45
  133. package/src/views/privilege/role/roleselect.vue +34 -17
  134. package/src/views/privilege/search/comsearch.vue +164 -73
  135. package/src/views/privilege/search/menu.vue +38 -22
  136. package/src/views/privilege/syscode/syscode.vue +157 -69
  137. package/src/views/privilege/syscode/sysfield.vue +96 -43
  138. package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
  139. package/src/views/privilege/syslog/menulog.vue +38 -22
  140. package/src/views/privilege/syslog/syslog.vue +145 -78
  141. package/src/views/privilege/syslog/syslogconfig.vue +91 -24
  142. package/src/views/privilege/syslog/syslogform.vue +45 -43
  143. package/src/views/privilege/syslog/syslogframe.vue +26 -26
  144. package/src/views/privilege/userRole/userRole.vue +187 -89
  145. package/vite.config.js +7 -0
  146. package/dist/assets/index.774ef40e.css +0 -1
  147. package/src/views/privilege.zip +0 -0
@@ -1,103 +1,127 @@
1
1
  <template>
2
2
  <span>
3
-
4
- <el-dropdown @command="handleCommand">
5
- <span class="el-dropdown-link">
6
- <a @click="save">{{$t('存盘')}}</a>
7
- <i class="el-icon-arrow-down el-icon--right"></i></span>
8
- <el-dropdown-menu slot="dropdown" style="max-height: 400px;overflow: auto">
9
- <el-dropdown-item :command="lastAuto" v-if="lastAuto">{{lastAuto.title}}</el-dropdown-item>
10
- <el-dropdown-item divided></el-dropdown-item>
11
- <el-dropdown-item v-for="(item, key, index) in allTemp" :key="item.id" :command="item">
12
- <div v-if="!item.isEdit">
13
- {{item.title}} &nbsp;&nbsp;<i class="el-icon-edit" @click.stop="rename(item)"></i>
14
- &nbsp; <i class="el-icon-delete" @click.stop="remove(item)"></i>
15
- </div>
16
- </el-dropdown-item>
17
- </el-dropdown-menu>
18
- </el-dropdown>
19
- </span>
3
+ <el-dropdown @command="handleCommand">
4
+ <span class="el-dropdown-link">
5
+ <a @click="save">{{ $t('存盘') }}</a>
6
+ <el-icon class="el-icon--right"><el-icon-arrow-down /></el-icon
7
+ ></span>
8
+ <el-dropdown-menu
9
+ slot="dropdown"
10
+ style="max-height: 400px; overflow: auto"
11
+ >
12
+ <el-dropdown-item :command="lastAuto" v-if="lastAuto">{{
13
+ lastAuto.title
14
+ }}</el-dropdown-item>
15
+ <el-dropdown-item divided></el-dropdown-item>
16
+ <el-dropdown-item
17
+ v-for="(item, key, index) in allTemp"
18
+ :key="item.id"
19
+ :command="item"
20
+ >
21
+ <div v-if="!item.isEdit">
22
+ {{ item.title }} &nbsp;&nbsp;<el-icon><el-icon-edit /></el-icon>
23
+ &nbsp; <el-icon><el-icon-delete /></el-icon>
24
+ </div>
25
+ </el-dropdown-item>
26
+ </el-dropdown-menu>
27
+ </el-dropdown>
28
+ </span>
20
29
  </template>
21
30
 
22
31
  <script>
32
+ import {
33
+ ArrowDown as ElIconArrowDown,
34
+ Edit as ElIconEdit,
35
+ Delete as ElIconDelete,
36
+ } from '@element-plus/icons'
37
+ export default {
38
+ components: {
39
+ ElIconArrowDown,
40
+ ElIconEdit,
41
+ ElIconDelete,
42
+ },
43
+ name: 'HdTempSave',
44
+ data() {
45
+ return {
46
+ allTemp: [],
47
+ lastAuto: {},
48
+ timeInterval: null,
49
+ }
50
+ },
51
+ inheritAttrs: false,
23
52
  /**
24
- * 页面暂存,实现模板和定时save,由于有定时任务,在页面关闭时需要写v-if,触发关闭定时任务
25
- * @module HdTempSave
53
+ * Props
54
+ * @prop {Function} saveFun 备份时的存储
55
+ * @prop {event} reload 还原时的触发事件
56
+ * @prop {boolean} auto true会自动保存(5秒),弹窗必须加v-if 来关闭定时
26
57
  */
27
- export default {
28
- name: 'HdTempSave',
29
- data() {
30
- return {
31
- allTemp: [],
32
- lastAuto: {},
33
- timeInterval: null
58
+ props: ['saveFun', 'auto'],
59
+ mounted() {
60
+ this.find()
61
+ this.findAuto()
62
+ },
63
+ beforeDestroy() {
64
+ console.info('close')
65
+ this.close()
66
+ },
67
+ methods: {
68
+ save() {
69
+ let ts = new Date().getTime()
70
+ //id是唯一标识,disName是当前页面区分
71
+ let obj = {
72
+ id: ts,
73
+ disName: this.$route.name,
74
+ title: new Date().format('MM-dd HH:mm'),
75
+ result: this.saveFun(),
34
76
  }
35
- },
36
- inheritAttrs: false,
37
- /**
38
- * Props
39
- * @prop {Function} saveFun 备份时的存储
40
- * @prop {event} reload 还原时的触发事件
41
- * @prop {boolean} auto true会自动保存(5秒),弹窗必须加v-if 来关闭定时
42
- */
43
- props: ['saveFun', 'auto'],
44
- mounted() {
77
+ let tempStore = localStorage.getItem('HdTempStore')
78
+ let storeObj = []
79
+ if (tempStore) {
80
+ storeObj = JSON.parse(tempStore)
81
+ }
82
+ storeObj.unshift(obj)
83
+ localStorage.setItem('HdTempStore', JSON.stringify(storeObj))
45
84
  this.find()
46
- this.findAuto()
47
85
  },
48
- beforeDestroy() {
49
- console.info("close")
50
- this.close()
86
+ saveForAuto() {
87
+ let ts = new Date().getTime()
88
+ //id是唯一标识,disName是当前页面区分
89
+ let obj = {
90
+ id: ts,
91
+ disName: this.$route.name,
92
+ title: this.$t('自动存盘') + new Date().format('MM-dd HH:mm'),
93
+ result: this.saveFun(),
94
+ }
95
+ localStorage.setItem(
96
+ 'HdTempAutoStore' + this.$route.name,
97
+ JSON.stringify(obj)
98
+ )
51
99
  },
52
- methods: {
53
- save() {
54
- let ts = new Date().getTime()
55
- //id是唯一标识,disName是当前页面区分
56
- let obj = {id: ts, disName: this.$route.name, title: new Date().format("MM-dd HH:mm"), result: this.saveFun()}
57
- let tempStore = localStorage.getItem('HdTempStore')
58
- let storeObj = []
59
- if (tempStore) {
60
- storeObj = JSON.parse(tempStore)
61
- }
62
- storeObj.unshift(obj)
63
- localStorage.setItem('HdTempStore', JSON.stringify(storeObj))
64
- this.find()
65
- },
66
- saveForAuto() {
67
- let ts = new Date().getTime()
68
- //id是唯一标识,disName是当前页面区分
69
- let obj = {
70
- id: ts,
71
- disName: this.$route.name,
72
- title: this.$t('自动存盘') + new Date().format("MM-dd HH:mm"),
73
- result: this.saveFun()
74
- }
75
- localStorage.setItem('HdTempAutoStore' + this.$route.name, JSON.stringify(obj))
76
- },
77
- find() {
78
- let tempStore = localStorage.getItem('HdTempStore')
79
- if (!tempStore) {
80
- return;
81
- }
82
- let storeObj = JSON.parse(tempStore)
83
- this.allTemp = storeObj.filter(v => v.disName == this.$route.name)
84
- },
85
- findAuto() {
86
- let tempStore = localStorage.getItem('HdTempAutoStore' + this.$route.name)
87
- this.lastAuto = JSON.parse(tempStore)
88
- },
89
- remove(item) {
90
- let tempStore = localStorage.getItem('HdTempStore')
91
- let storeObj = JSON.parse(tempStore)
92
- let newSt = storeObj.filter(v => v.id != item.id)
93
- localStorage.setItem('HdTempStore', JSON.stringify(newSt))
94
- this.find()
95
- },
96
- rename(item) {
97
- this.$prompt(this.$t('请输入名称'), this.$t('提示'), {}).then(({value}) => {
100
+ find() {
101
+ let tempStore = localStorage.getItem('HdTempStore')
102
+ if (!tempStore) {
103
+ return
104
+ }
105
+ let storeObj = JSON.parse(tempStore)
106
+ this.allTemp = storeObj.filter((v) => v.disName == this.$route.name)
107
+ },
108
+ findAuto() {
109
+ let tempStore = localStorage.getItem('HdTempAutoStore' + this.$route.name)
110
+ this.lastAuto = JSON.parse(tempStore)
111
+ },
112
+ remove(item) {
113
+ let tempStore = localStorage.getItem('HdTempStore')
114
+ let storeObj = JSON.parse(tempStore)
115
+ let newSt = storeObj.filter((v) => v.id != item.id)
116
+ localStorage.setItem('HdTempStore', JSON.stringify(newSt))
117
+ this.find()
118
+ },
119
+ rename(item) {
120
+ this.$prompt(this.$t('请输入名称'), this.$t('提示'), {})
121
+ .then(({ value }) => {
98
122
  let tempStore = localStorage.getItem('HdTempStore')
99
123
  let storeObj = JSON.parse(tempStore)
100
- let newSt = storeObj.map(v => {
124
+ let newSt = storeObj.map((v) => {
101
125
  if (v.id == item.id) {
102
126
  v.title = value
103
127
  }
@@ -105,36 +129,34 @@
105
129
  })
106
130
  localStorage.setItem('HdTempStore', JSON.stringify(newSt))
107
131
  this.find()
108
- }).catch(() => {
109
132
  })
110
- },
111
- autoSave() {
112
- this.timeInterval = setInterval(() => {
113
- this.saveForAuto()
114
- }, 5000)
115
- },
116
- close() {
117
- if (this.timeInterval)
118
- clearInterval(this.timeInterval)
119
- this.timeInterval = null
120
- },
121
- handleCommand(cmd) {
122
- if (cmd && cmd.result)
123
- this.$emit('reload', cmd.result)
124
- }
133
+ .catch(() => {})
134
+ },
135
+ autoSave() {
136
+ this.timeInterval = setInterval(() => {
137
+ this.saveForAuto()
138
+ }, 5000)
125
139
  },
126
- watch: {
127
- 'auto': {//定时执行
128
- immediate: true,
129
- handler(newVal) {
130
- if (newVal) {
131
- this.autoSave()
132
- } else {
133
- this.close()
134
- }
140
+ close() {
141
+ if (this.timeInterval) clearInterval(this.timeInterval)
142
+ this.timeInterval = null
143
+ },
144
+ handleCommand(cmd) {
145
+ if (cmd && cmd.result) this.$emit('reload', cmd.result)
146
+ },
147
+ },
148
+ watch: {
149
+ auto: {
150
+ //定时执行
151
+ immediate: true,
152
+ handler(newVal) {
153
+ if (newVal) {
154
+ this.autoSave()
155
+ } else {
156
+ this.close()
135
157
  }
136
- }
137
- }
138
- }
139
-
158
+ },
159
+ },
160
+ },
161
+ }
140
162
  </script>
@@ -1,86 +1,103 @@
1
1
  <template>
2
- <div style="height: 100%;overflow: auto">
3
- <el-tree :expand-on-click-node="false" :renderContent="myrenderContent" highlight-current node-key="id" ref="eltree"
4
- v-bind="$attrs" v-on="$listeners">
2
+ <div style="height: 100%; overflow: auto">
3
+ <el-tree
4
+ :expand-on-click-node="false"
5
+ :renderContent="myrenderContent"
6
+ highlight-current
7
+ node-key="id"
8
+ ref="eltree"
9
+ v-bind="$attrs"
10
+ v-on="$listeners"
11
+ >
5
12
  </el-tree>
6
13
  </div>
7
14
  </template>
8
15
 
9
16
  <script>
10
- /**
11
- * HdTree 对 ElTree 封装了一些样式 idev8请使用EzTreeBean,能控制到展示与伸缩 可参考orgTree和orgnselect(下拉树)
12
- * @module HdNum
13
- */
14
- export default {
15
- name: 'HdTree',
16
- data() {
17
- return {}
17
+ /**
18
+ * HdTree 对 ElTree 封装了一些样式 idev8请使用EzTreeBean,能控制到展示与伸缩 可参考orgTree和orgnselect(下拉树)
19
+ * @module HdNum
20
+ */
21
+ export default {
22
+ name: 'HdTree',
23
+ data() {
24
+ return {}
25
+ },
26
+ inheritAttrs: false,
27
+ updated() {
28
+ const treeData = this.$attrs.data
29
+ const rs = []
30
+ this.initChecked(treeData, rs)
31
+ if (rs) {
32
+ this.$refs.eltree.setCheckedNodes(rs)
33
+ }
34
+ },
35
+ methods: {
36
+ getCheckedNodes(onlyLeaf = true) {
37
+ return this.$refs.eltree.getCheckedNodes(onlyLeaf)
18
38
  },
19
- inheritAttrs: false,
20
- updated() {
21
- const treeData = this.$attrs.data
22
- const rs = []
23
- this.initChecked(treeData, rs)
24
- if (rs) {
25
- this.$refs.eltree.setCheckedNodes(rs)
39
+ initChecked(treeData, rs) {
40
+ if (!treeData) {
41
+ return false
26
42
  }
27
- },
28
- methods: {
29
- getCheckedNodes(onlyLeaf = true) {
30
- return this.$refs.eltree.getCheckedNodes(onlyLeaf)
31
- },
32
- initChecked(treeData, rs) {
33
- if (!treeData) {
34
- return false
35
- }
36
- for (let i = 0; i < treeData.length; i++) {
37
- const one = treeData[i]
38
- if (one.checked == 'Y') {
39
- rs.push(one)
40
- }
41
- if (one.children) {
42
- this.initChecked(one.children, rs)
43
- }
43
+ for (let i = 0; i < treeData.length; i++) {
44
+ const one = treeData[i]
45
+ if (one.checked == 'Y') {
46
+ rs.push(one)
44
47
  }
45
- },
46
- myrenderContent(h, {node, data, store}) {
47
- if (data.state == 'open') {
48
- node.expanded = true
48
+ if (one.children) {
49
+ this.initChecked(one.children, rs)
49
50
  }
50
- // if (data.checked == 'Y') {
51
- //
52
- // //node.checked = true
53
- // // let par = node.parent
54
- // // while (par) {
55
- // // if (par.checked) {
56
- // // break;
57
- // // }
58
- // // par.indeterminate = true
59
- // // par = par.parent
60
- // // }
61
- // }
62
- return h('span', {
63
- 'class': {
64
- 'el-tree-node__label': true
51
+ }
52
+ },
53
+ myrenderContent(h, { node, data, store }) {
54
+ if (data.state == 'open') {
55
+ node.expanded = true
56
+ }
57
+ // if (data.checked == 'Y') {
58
+ //
59
+ // //node.checked = true
60
+ // // let par = node.parent
61
+ // // while (par) {
62
+ // // if (par.checked) {
63
+ // // break;
64
+ // // }
65
+ // // par.indeterminate = true
66
+ // // par = par.parent
67
+ // // }
68
+ // }
69
+ return h(
70
+ 'span',
71
+ {
72
+ class: {
73
+ 'el-tree-node__label': true,
65
74
  },
66
75
  style: {
67
- 'width': 'auto',
68
- 'padding-right': '10px'
69
- }
70
- }, [h('i', {
71
- 'class': {
72
- 'el-icon-star-off': true
76
+ width: 'auto',
77
+ 'padding-right': '10px',
73
78
  },
74
- style: {
75
- 'paddingRight': '4px'
76
- }
77
- }), h('span', {
78
- 'class': {
79
- 'el-tree-node__label': true
80
- }
81
- }, data.text)])
82
- }
83
- }
84
- }
85
-
79
+ },
80
+ [
81
+ h('i', {
82
+ class: {
83
+ 'el-icon-star-off': true,
84
+ },
85
+ style: {
86
+ paddingRight: '4px',
87
+ },
88
+ }),
89
+ h(
90
+ 'span',
91
+ {
92
+ class: {
93
+ 'el-tree-node__label': true,
94
+ },
95
+ },
96
+ data.text
97
+ ),
98
+ ]
99
+ )
100
+ },
101
+ },
102
+ }
86
103
  </script>
@@ -3,12 +3,17 @@
3
3
  * @Date: 2017-10-12 12:06:49
4
4
  */
5
5
  'use strict'
6
- import {createApp} from 'vue'
6
+ import { createApp } from 'vue'
7
7
  const Vue = createApp({})
8
8
 
9
- export default function treeToArray(data, expandAll, parent = null, level = null) {
9
+ export default function treeToArray(
10
+ data,
11
+ expandAll,
12
+ parent = null,
13
+ level = null
14
+ ) {
10
15
  let tmp = []
11
- Array.from(data).forEach(function(record) {
16
+ Array.from(data).forEach(function (record) {
12
17
  if (record.state === 'open') {
13
18
  record._expanded = true
14
19
  }