hbte-saas-ui 0.0.2 → 1.0.2

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 (132) hide show
  1. package/README.md +8 -1
  2. package/lib/hbte-ui.common.js +31 -10
  3. package/lib/hbte-ui.umd.js +31 -10
  4. package/lib/hbte-ui.umd.min.js +1 -1
  5. package/package.json +8 -2
  6. package/.browserslistrc +0 -3
  7. package/.editorconfig +0 -7
  8. package/.env.development +0 -1
  9. package/.env.lib +0 -1
  10. package/.eslintrc.js +0 -14
  11. package/.prettierrc +0 -3
  12. package/babel.config.js +0 -3
  13. package/docs/.vuepress/config.js +0 -23
  14. package/docs/.vuepress/styles/index.styl +0 -4
  15. package/docs/AdvQuery.md +0 -26
  16. package/docs/CustomQuery.md +0 -21
  17. package/docs/EditArea.md +0 -16
  18. package/docs/FilterDrop.md +0 -29
  19. package/docs/FullTable.md +0 -68
  20. package/docs/Pagination.md +0 -22
  21. package/docs/QueryForm.md +0 -27
  22. package/docs/README.md +0 -17
  23. package/docs/Table.md +0 -58
  24. package/docs/ToolGroup.md +0 -32
  25. package/examples/App.vue +0 -97
  26. package/examples/image/hb-image-viewer/3k.jpg +0 -0
  27. package/examples/image/hb-image-viewer/a.jpg +0 -0
  28. package/examples/image/hb-image-viewer/b.jpg +0 -0
  29. package/examples/main.js +0 -39
  30. package/examples/mock/authority.js +0 -1108
  31. package/examples/mock/dept.js +0 -4001
  32. package/examples/mock/fulltable.js +0 -407
  33. package/examples/mock/organizeData.js +0 -18965
  34. package/examples/router/index.js +0 -111
  35. package/examples/views/ElementCpTest.vue +0 -299
  36. package/examples/views/Fragment.vue +0 -196
  37. package/examples/views/HBAdvQuery.vue +0 -150
  38. package/examples/views/HBAuthority.vue +0 -339
  39. package/examples/views/HBDialog.vue +0 -39
  40. package/examples/views/HBEditarea.vue +0 -350
  41. package/examples/views/HBFilterDrop.vue +0 -72
  42. package/examples/views/HBFloatFooter.vue +0 -42
  43. package/examples/views/HBFullTable.vue +0 -751
  44. package/examples/views/HBImageViewer.vue +0 -57
  45. package/examples/views/HBNavMenu.vue +0 -37
  46. package/examples/views/HBOrganizeDialog.vue +0 -133
  47. package/examples/views/HBPagination.vue +0 -80
  48. package/examples/views/HBSelectVague.vue +0 -57
  49. package/examples/views/HBToolgroup.vue +0 -29
  50. package/examples/views/HBTopBar.vue +0 -16
  51. package/packages/adv-query/index.js +0 -5
  52. package/packages/adv-query/src/main.vue +0 -294
  53. package/packages/area-select/index.js +0 -7
  54. package/packages/area-select/src/main.vue +0 -37
  55. package/packages/authority/index.js +0 -5
  56. package/packages/authority/src/main.vue +0 -606
  57. package/packages/config.js +0 -3
  58. package/packages/custom-query/index.js +0 -5
  59. package/packages/custom-query/src/main.vue +0 -80
  60. package/packages/dialog/index.js +0 -7
  61. package/packages/dialog/src/main.vue +0 -176
  62. package/packages/edit-area/index.js +0 -13
  63. package/packages/edit-area/src/config.js +0 -3
  64. package/packages/edit-area/src/main.vue +0 -304
  65. package/packages/edit-area/src/simulateEvent.js +0 -219
  66. package/packages/filter-drop/index.js +0 -6
  67. package/packages/filter-drop/src/main.vue +0 -107
  68. package/packages/float-footer/index.js +0 -7
  69. package/packages/float-footer/src/main.vue +0 -40
  70. package/packages/fragment/index.js +0 -7
  71. package/packages/fragment/src/main.vue +0 -74
  72. package/packages/fragment/src/old.vue +0 -144
  73. package/packages/full-table/index.js +0 -6
  74. package/packages/full-table/src/config.js +0 -14
  75. package/packages/full-table/src/main.vue +0 -141
  76. package/packages/image-viewer/index.js +0 -8
  77. package/packages/image-viewer/src/main.js +0 -14
  78. package/packages/image-viewer/src/main.vue +0 -138
  79. package/packages/image-viewer/src/svg/cancel.svg +0 -2
  80. package/packages/image-viewer/src/svg/delete.svg +0 -2
  81. package/packages/image-viewer/src/svg/download.svg +0 -2
  82. package/packages/image-viewer/src/svg/rotate.svg +0 -77
  83. package/packages/image-viewer/src/svg/scaledown.svg +0 -71
  84. package/packages/image-viewer/src/svg/scaleup.svg +0 -72
  85. package/packages/index.js +0 -43
  86. package/packages/nav-menu/index.js +0 -7
  87. package/packages/nav-menu/src/main.vue +0 -277
  88. package/packages/organize-dialog/index.js +0 -5
  89. package/packages/organize-dialog/src/main.vue +0 -427
  90. package/packages/pagination/index.js +0 -6
  91. package/packages/pagination/src/main.vue +0 -146
  92. package/packages/query-form/index.js +0 -5
  93. package/packages/query-form/src/main.vue +0 -142
  94. package/packages/select-vague/index.js +0 -5
  95. package/packages/select-vague/src/main.vue +0 -80
  96. package/packages/table/index.js +0 -5
  97. package/packages/table/src/main.vue +0 -265
  98. package/packages/theme-chalk/adv-query.scss +0 -107
  99. package/packages/theme-chalk/authority.scss +0 -103
  100. package/packages/theme-chalk/common/elementCover.scss +0 -722
  101. package/packages/theme-chalk/common/flex.scss +0 -66
  102. package/packages/theme-chalk/common/global.scss +0 -147
  103. package/packages/theme-chalk/common/reset.scss +0 -92
  104. package/packages/theme-chalk/common/var.scss +0 -46
  105. package/packages/theme-chalk/custom-query.scss +0 -10
  106. package/packages/theme-chalk/dialog.scss +0 -9
  107. package/packages/theme-chalk/edit-area.scss +0 -119
  108. package/packages/theme-chalk/filter-drop.scss +0 -81
  109. package/packages/theme-chalk/float-footer.scss +0 -14
  110. package/packages/theme-chalk/fonts/iconfont.ttf +0 -0
  111. package/packages/theme-chalk/fragment.scss +0 -51
  112. package/packages/theme-chalk/full-table.scss +0 -40
  113. package/packages/theme-chalk/icon.scss +0 -96
  114. package/packages/theme-chalk/image-viewer.scss +0 -94
  115. package/packages/theme-chalk/images/company-logo--default.png +0 -0
  116. package/packages/theme-chalk/images/nodata.png +0 -0
  117. package/packages/theme-chalk/images/user-logo--default.png +0 -0
  118. package/packages/theme-chalk/index.scss +0 -21
  119. package/packages/theme-chalk/nav-menu.scss +0 -205
  120. package/packages/theme-chalk/organize-dialog.scss +0 -170
  121. package/packages/theme-chalk/pagination.scss +0 -91
  122. package/packages/theme-chalk/select.scss +0 -8
  123. package/packages/theme-chalk/table.scss +0 -102
  124. package/packages/theme-chalk/tool-group.scss +0 -105
  125. package/packages/theme-chalk/top-bar.scss +0 -195
  126. package/packages/tool-group/index.js +0 -13
  127. package/packages/tool-group/src/config.js +0 -40
  128. package/packages/tool-group/src/main.vue +0 -93
  129. package/packages/top-bar/index.js +0 -7
  130. package/packages/top-bar/src/main.vue +0 -280
  131. package/public/index.html +0 -20
  132. package/vue.config.js +0 -6
@@ -1,350 +0,0 @@
1
- <template>
2
- <div>
3
- <ul class="editarea-ul">
4
- <li class="editarea-li">
5
- <h3>文本输入(无提交)</h3>
6
- <p>
7
- <hb-editarea type="input" :value.sync="baseData.code"></hb-editarea>
8
- </p>
9
- </li>
10
- <li class="editarea-li">
11
- <h3>文本输入(无提交,有异步校验)</h3>
12
- <hb-editarea
13
- type="input"
14
- :value.sync="baseData.code"
15
- :validate="validate.asyncCode"
16
- ></hb-editarea>
17
- </li>
18
- <li class="editarea-li">
19
- <h3>文本输入(无提交,有同步校验)</h3>
20
- <hb-editarea
21
- type="input"
22
- :value.sync="baseData.code"
23
- :validate="validate.code"
24
- ></hb-editarea>
25
- </li>
26
- <li class="editarea-li">
27
- <h3>文本输入(有提交)</h3>
28
- <hb-editarea
29
- type="input"
30
- :value.sync="baseData.code"
31
- :change="changeEdit('code')"
32
- ></hb-editarea>
33
- </li>
34
- <li class="editarea-li">
35
- <h3>单选下拉(无提交)</h3>
36
- <hb-editarea
37
- type="select"
38
- :insert="(value) => value"
39
- :value.sync="baseData.name"
40
- :optList="optList.nameText"
41
- >
42
- </hb-editarea>
43
- </li>
44
- <li class="editarea-li">
45
- <h3>单选下拉(有提交)</h3>
46
- <hb-editarea
47
- type="select"
48
- :value.sync="baseData.name"
49
- :insert="insertEdit('name')"
50
- :change="changeEdit('name')"
51
- :optList="optList.name"
52
- >
53
- </hb-editarea>
54
- </li>
55
- <li class="editarea-li">
56
- <h3>多选下拉(有提交)</h3>
57
- <hb-editarea
58
- type="select"
59
- :multiple="true"
60
- :value.sync="baseData.word"
61
- :insert="insertEdit('word')"
62
- :change="changeEdit('word')"
63
- :optList="optList.word"
64
- >
65
- </hb-editarea>
66
- </li>
67
- <li class="editarea-li">
68
- <h3>开关(无提交)</h3>
69
- <hb-editarea
70
- type="switch"
71
- :value.sync="baseData.open"
72
- :optList="optList.open"
73
- >
74
- </hb-editarea>
75
- </li>
76
- <li class="editarea-li">
77
- <h3>单选(无提交)</h3>
78
- <hb-editarea
79
- type="radio"
80
- :value.sync="baseData.size"
81
- :optList="optList.size"
82
- :insert="insertEdit('size')"
83
- :change="changeEdit('size')"
84
- >
85
- </hb-editarea>
86
- </li>
87
- <li class="editarea-li">
88
- <h3>多选(无提交)</h3>
89
- <hb-editarea
90
- type="checkbox"
91
- :value.sync="baseData.color"
92
- :optList="optList.color"
93
- :insert="insertEdit('color')"
94
- :change="changeEdit('color')"
95
- >
96
- </hb-editarea>
97
- </li>
98
- <li class="editarea-li">
99
- <h3>时间(无提交)</h3>
100
- <hb-editarea type="date" :value.sync="baseData.date"> </hb-editarea>
101
- </li>
102
- <li class="editarea-li">
103
- <h3>时间范围(无提交)</h3>
104
- <hb-editarea
105
- type="daterange"
106
- :value.sync="baseData.dateRange"
107
- :insert="insertEdit('dateRange')"
108
- :change="changeEdit('dateRange')"
109
- >
110
- </hb-editarea>
111
- </li>
112
- </ul>
113
- </div>
114
- </template>
115
-
116
- <script>
117
- export default {
118
- data() {
119
- return {
120
- // 基本数据
121
- baseData: {
122
- code: "123456",
123
- name: "小红",
124
- word: "A,B,C",
125
- open: true,
126
- size: "小",
127
- color: "红,绿",
128
- date: "2020-10-10",
129
- dateRange: "2020-10-10,2021-12-01",
130
- },
131
- // insert配置
132
- // 注意,以下示例代码都是label无重复的情况下的演示,如果存在重复的label,需要另外去find/filter对应数据
133
- insertConfig: {
134
- // 从list找到当前name的value填充而非label
135
- name: (value) => {
136
- const currentName = this.optList.name.find(
137
- (item) => item.label === value
138
- ); //
139
- return currentName ? currentName.value : "";
140
- },
141
- // 填充多个value而非label
142
- word: (value) => {
143
- const currentWords = this.optList.word.filter(
144
- (item) => value.split(",").indexOf(item.label) !== -1
145
- );
146
- return currentWords.length
147
- ? currentWords.map((item) => item.value)
148
- : [];
149
- },
150
- // 从list找到当前size的value传入
151
- size: (value) => {
152
- const currentSize = this.optList.size.find(
153
- (item) => item.label === value
154
- );
155
- return currentSize ? currentSize.value : "";
156
- },
157
- // 从list找到当前color的value传入
158
- color: (value) => {
159
- const currentColor = this.optList.color.filter(
160
- (item) => value.split(",").indexOf(item.label) !== -1
161
- );
162
- return currentColor ? currentColor.map((item) => item.value) : [];
163
- },
164
- //
165
- dateRange: (value) => {
166
- return value ? value.split(",") : [];
167
- },
168
- },
169
- // change配置
170
- changeConfig: {
171
- // 模拟提交code修改
172
- code: (next, value) => {
173
- console.log("code", value);
174
- setTimeout(() => {
175
- this.$set(this.baseData, "code", value);
176
- next();
177
- }, 800);
178
- },
179
- // 模拟提交name的id
180
- name: (next, value) => {
181
- const currentName = this.optList.name.find(
182
- (item) => item.value === value
183
- ); // 从list找到当前name
184
- setTimeout(() => {
185
- if (currentName) {
186
- this.$set(this.baseData, "name", currentName.label);
187
- }
188
- next();
189
- }, 800);
190
- },
191
- // 模拟提交word的多个id
192
- word: (next, value) => {
193
- console.log("value", value);
194
- const currentWords = this.optList.word.filter(
195
- (item) => value.indexOf(item.value) !== -1
196
- );
197
- setTimeout(() => {
198
- if (value.length) {
199
- this.$set(
200
- this.baseData,
201
- "word",
202
- currentWords.map((item) => item.label).join(",")
203
- );
204
- }
205
- next();
206
- }, 800);
207
- },
208
- // 切换大小
209
- size: (next, value) => {
210
- const currentSize = this.optList.size.find(
211
- (item) => item.value === value
212
- ); // 从list找到当前size
213
- this.$set(this.baseData, "size", currentSize.label);
214
- next();
215
- },
216
- // 切换颜色
217
- color: (next, value) => {
218
- const currentColor = this.optList.color.filter(
219
- (item) => value.indexOf(item.value) !== -1
220
- );
221
- this.$set(
222
- this.baseData,
223
- "color",
224
- currentColor.map((item) => item.label).join(",")
225
- );
226
- next();
227
- },
228
- dateRange: (next, value) => {
229
- this.$set(this.baseData, "dateRange", value ? value.join(",") : "");
230
- next();
231
- },
232
- },
233
- // 校验
234
- validate: {
235
- asyncCode: (next, value) => {
236
- setTimeout(() => {
237
- next(value.length < 5 ? null : new Error("最多不能超过4个字"));
238
- }, 500);
239
- },
240
- code: (next, value) => {
241
- next(value.length < 5 ? null : new Error("最多不能超过4个字"));
242
- },
243
- },
244
- // 数据依赖
245
- optList: {
246
- nameText: [
247
- {
248
- label: "小红",
249
- value: "小红",
250
- },
251
- {
252
- label: "小白",
253
- value: "小白",
254
- },
255
- {
256
- label: "小黑",
257
- value: "小黑",
258
- },
259
- ],
260
- name: [
261
- {
262
- label: "小红",
263
- value: "1",
264
- },
265
- {
266
- label: "小白",
267
- value: "2",
268
- },
269
- {
270
- label: "小黑",
271
- value: "3",
272
- },
273
- ],
274
- word: [
275
- {
276
- label: "A",
277
- value: "a",
278
- },
279
- {
280
- label: "B",
281
- value: "b",
282
- },
283
- {
284
- label: "C",
285
- value: "c",
286
- },
287
- ],
288
- open: ["开", "关"],
289
- size: [
290
- { value: "small", label: "小" },
291
- { value: "middle", label: "中" },
292
- { value: "big", label: "大" },
293
- ],
294
- color: [
295
- {
296
- label: "红",
297
- value: "red",
298
- },
299
- {
300
- label: "蓝",
301
- value: "blue",
302
- },
303
- {
304
- label: "绿",
305
- value: "green",
306
- },
307
- ],
308
- },
309
- };
310
- },
311
- methods: {
312
- /**
313
- * @function insertEdit 手动填充编辑区域
314
- * @param {String} key 关键字
315
- */
316
- insertEdit(key) {
317
- return this.insertConfig[key];
318
- },
319
- /**
320
- * @function insertEdit 手动处理编辑结果
321
- * @param {String} key 关键字
322
- */
323
- changeEdit(key) {
324
- return this.changeConfig[key];
325
- },
326
- },
327
- mounted() {},
328
- };
329
- </script>
330
-
331
- <style lang="scss">
332
- .editarea-ul {
333
- .editarea-li {
334
- float: left;
335
- box-sizing: border-box;
336
- margin-right: 10%;
337
- padding: 12px 24px 0 24px;
338
- width: 15%;
339
- h3 {
340
- height: 24px;
341
- line-height: 24px;
342
- }
343
- p {
344
- height: 28px;
345
- line-height: 28px;
346
- // background-color: #e6e6e6;
347
- }
348
- }
349
- }
350
- </style>
@@ -1,72 +0,0 @@
1
- <template>
2
- <div>
3
- <hb-filterdrop :columns="columns" @changeColumn="handleChangeColumn">
4
- <i slot="dropdown" class="fd-icon el-icon-s-operation"></i>
5
- </hb-filterdrop>
6
- </div>
7
- </template>
8
-
9
- <script>
10
- export default {
11
- data() {
12
- return {
13
- columns: [
14
- {
15
- prop: "name",
16
- label: "名称",
17
- currentSelect: true,
18
- },
19
- {
20
- prop: "code",
21
- label: "编码",
22
- currentSelect: true,
23
- },
24
- {
25
- prop: "company",
26
- label: "公司",
27
- currentSelect: true,
28
- },
29
- {
30
- prop: "addr",
31
- label: "地址",
32
- currentSelect: true,
33
- },
34
- {
35
- prop: "desc",
36
- label: "简介",
37
- currentSelect: true,
38
- },
39
- {
40
- prop: "remark",
41
- label: "说明",
42
- currentSelect: true,
43
- },
44
- ],
45
- };
46
- },
47
- methods: {
48
- /**
49
- * @function handleChangeColumn 列改变
50
- */
51
- handleChangeColumn(newColumns) {
52
- this.$message.success("列改变");
53
- this.columns = newColumns;
54
- console.log(newColumns);
55
- },
56
- },
57
- mounted() {},
58
- };
59
- </script>
60
-
61
- <style lang="scss">
62
- .fd-icon {
63
- width: 24px;
64
- min-width: 24px;
65
- height: 24px;
66
- border: 1px solid #dbdbdb;
67
- border-radius: 4px;
68
- line-height: 24px !important;
69
- text-align: center;
70
- background: #fff;
71
- }
72
- </style>
@@ -1,42 +0,0 @@
1
- <template>
2
- <div class="wrapper">
3
- <hb-float-footer
4
- @confirm="confirm"
5
- @exist="exist"
6
- :label="label"
7
- :zIndex="zIndex"
8
- ></hb-float-footer>
9
- </div>
10
- </template>
11
- <script>
12
- export default {
13
- data() {
14
- return {
15
- zIndex: 200, //组件内默认100
16
- label: {
17
- confirm: "保存",
18
- exist: "重置",
19
- },
20
- };
21
- },
22
- methods: {
23
- confirm() {
24
- console.log("点击了确定按钮");
25
- },
26
- exist() {
27
- console.log("点击了取消按钮");
28
- },
29
- },
30
- };
31
- </script>
32
-
33
- <style lang="scss" scoped>
34
- .wrapper {
35
- background: #999;
36
- width: 800px;
37
- height: 300px;
38
- position: relative;
39
- margin: auto;
40
- top: 100px;
41
- }
42
- </style>