vue-super-crud 1.7.1 → 1.7.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 (269) hide show
  1. package/README.md +42 -10
  2. package/lib/index.css +1 -1
  3. package/lib/super-crud.min.js +2 -2
  4. package/package.json +21 -16
  5. package/.browserslistrc +0 -3
  6. package/.versionrc.json +0 -36
  7. package/CHANGELOG.md +0 -232
  8. package/babel.config.js +0 -12
  9. package/build/alias.js +0 -10
  10. package/build/build.js +0 -52
  11. package/build/config.js +0 -70
  12. package/deploy.bat +0 -14
  13. package/docs/.vuepress/components/button/base.vue +0 -88
  14. package/docs/.vuepress/components/common/code-format.vue +0 -331
  15. package/docs/.vuepress/components/commonConfig/presetCodeTemplate/base.vue +0 -68
  16. package/docs/.vuepress/components/commonConfig/presetCodeTemplate/customParams.vue +0 -73
  17. package/docs/.vuepress/components/commonConfig/renderType/component.vue +0 -160
  18. package/docs/.vuepress/components/commonConfig/renderType/formatter.vue +0 -49
  19. package/docs/.vuepress/components/commonConfig/renderType/render.vue +0 -91
  20. package/docs/.vuepress/components/commonConfig/renderType/slot.vue +0 -63
  21. package/docs/.vuepress/components/crud/baseUse/baseUse.vue +0 -98
  22. package/docs/.vuepress/components/crud/baseUse/columnAction.vue +0 -72
  23. package/docs/.vuepress/components/crud/baseUse/columnWidth.vue +0 -107
  24. package/docs/.vuepress/components/crud/baseUse/handleRow.vue +0 -65
  25. package/docs/.vuepress/components/crud/baseUse/height.vue +0 -82
  26. package/docs/.vuepress/components/crud/baseUse/index.vue +0 -54
  27. package/docs/.vuepress/components/crud/baseUse/loading.vue +0 -70
  28. package/docs/.vuepress/components/crud/baseUse/pagination.vue +0 -108
  29. package/docs/.vuepress/components/crud/baseUse/selection.vue +0 -114
  30. package/docs/.vuepress/components/crud/baseUse/summaryMethod.vue +0 -118
  31. package/docs/.vuepress/components/crud/baseUse/title.vue +0 -54
  32. package/docs/.vuepress/components/crud/baseUse/toolbar.vue +0 -69
  33. package/docs/.vuepress/components/crud/buttons/common.vue +0 -115
  34. package/docs/.vuepress/components/crud/buttons/fast.vue +0 -82
  35. package/docs/.vuepress/components/crud/contextMenu/base.vue +0 -72
  36. package/docs/.vuepress/components/crud/copy.vue +0 -52
  37. package/docs/.vuepress/components/crud/crudEvents/api.vue +0 -157
  38. package/docs/.vuepress/components/crud/crudEvents/deleteTip.vue +0 -93
  39. package/docs/.vuepress/components/crud/crudEvents/events.vue +0 -188
  40. package/docs/.vuepress/components/crud/dataSort/base.vue +0 -142
  41. package/docs/.vuepress/components/crud/genDynamicColumns/base.vue +0 -53
  42. package/docs/.vuepress/components/crud/genDynamicColumns/dynamicAndFixed.vue +0 -111
  43. package/docs/.vuepress/components/crud/genDynamicColumns/treeDynamic.vue +0 -68
  44. package/docs/.vuepress/components/crud/handleBar/handleRow.vue +0 -65
  45. package/docs/.vuepress/components/crud/handleBar/toolbar.vue +0 -69
  46. package/docs/.vuepress/components/crud/renderType/1.vue +0 -57
  47. package/docs/.vuepress/components/crud/renderType/2.vue +0 -63
  48. package/docs/.vuepress/components/crud/renderType/3.vue +0 -105
  49. package/docs/.vuepress/components/crud/renderType/5.vue +0 -91
  50. package/docs/.vuepress/components/crud/search/1.vue +0 -90
  51. package/docs/.vuepress/components/crud/search/2.vue +0 -78
  52. package/docs/.vuepress/components/crud/search/3.vue +0 -107
  53. package/docs/.vuepress/components/crud/search/base.vue +0 -123
  54. package/docs/.vuepress/components/crud/search/localSearch.vue +0 -124
  55. package/docs/.vuepress/components/crud/search/special.vue +0 -148
  56. package/docs/.vuepress/components/crud/selection/events.vue +0 -47
  57. package/docs/.vuepress/components/crud/selection/pagination.vue +0 -94
  58. package/docs/.vuepress/components/crud/selection/singleSelection.vue +0 -64
  59. package/docs/.vuepress/components/crud/span/base.vue +0 -69
  60. package/docs/.vuepress/components/crud/span/special.vue +0 -75
  61. package/docs/.vuepress/components/crud/summary/base.vue +0 -99
  62. package/docs/.vuepress/components/crud/tableEdit/addDeleteBtn.vue +0 -174
  63. package/docs/.vuepress/components/crud/tableEdit/cellEdit.vue +0 -194
  64. package/docs/.vuepress/components/crud/tableEdit/controlEdit.vue +0 -219
  65. package/docs/.vuepress/components/crud/tableEdit/dialog.vue +0 -172
  66. package/docs/.vuepress/components/crud/tableEdit/free.vue +0 -88
  67. package/docs/.vuepress/components/crud/tableEdit/freeColumn.vue +0 -82
  68. package/docs/.vuepress/components/crud/tableEdit/methods.vue +0 -154
  69. package/docs/.vuepress/components/crud/tableEdit/rowAction.vue +0 -107
  70. package/docs/.vuepress/components/crud/tableEdit/rowBatch.vue +0 -116
  71. package/docs/.vuepress/components/crud/tableEdit/rowClick.vue +0 -98
  72. package/docs/.vuepress/components/crud/validate/base.vue +0 -122
  73. package/docs/.vuepress/components/crud/validate/custom.vue +0 -82
  74. package/docs/.vuepress/components/crud/validate/regulars.vue +0 -88
  75. package/docs/.vuepress/components/crud/validate/relation.vue +0 -91
  76. package/docs/.vuepress/components/crud/validate/tree.vue +0 -82
  77. package/docs/.vuepress/components/dialog/baseUse/base.vue +0 -92
  78. package/docs/.vuepress/components/dialog/baseUse/beforeConfirm.vue +0 -78
  79. package/docs/.vuepress/components/dialog/baseUse/control.vue +0 -79
  80. package/docs/.vuepress/components/dialog/baseUse/drawer.vue +0 -59
  81. package/docs/.vuepress/components/dialog/baseUse/footer.vue +0 -87
  82. package/docs/.vuepress/components/dialog/baseUse/insertSlot.vue +0 -79
  83. package/docs/.vuepress/components/dict/DictLinkage.vue +0 -91
  84. package/docs/.vuepress/components/dict/baseUse.vue +0 -72
  85. package/docs/.vuepress/components/dict/component.vue +0 -82
  86. package/docs/.vuepress/components/dict/localDict.vue +0 -68
  87. package/docs/.vuepress/components/form/baseUse/base.vue +0 -48
  88. package/docs/.vuepress/components/form/baseUse/dataFormat.vue +0 -92
  89. package/docs/.vuepress/components/form/baseUse/deep.vue +0 -57
  90. package/docs/.vuepress/components/form/baseUse/gridLayout.vue +0 -47
  91. package/docs/.vuepress/components/form/baseUse/group.vue +0 -66
  92. package/docs/.vuepress/components/form/baseUse/hidden.vue +0 -40
  93. package/docs/.vuepress/components/form/baseUse/inlineLayout.vue +0 -48
  94. package/docs/.vuepress/components/form/baseUse/label.vue +0 -51
  95. package/docs/.vuepress/components/form/baseUse/tooltip.vue +0 -40
  96. package/docs/.vuepress/components/form/baseUse/validate.vue +0 -52
  97. package/docs/.vuepress/components/form/detail/base.vue +0 -78
  98. package/docs/.vuepress/components/form/detail/border.vue +0 -90
  99. package/docs/.vuepress/components/form/detail/singleDetail.vue +0 -72
  100. package/docs/.vuepress/components/formatData/baseUse.vue +0 -131
  101. package/docs/.vuepress/components/mock/index.js +0 -347
  102. package/docs/.vuepress/components/mockData/custom.vue +0 -69
  103. package/docs/.vuepress/components/mockData/example.vue +0 -290
  104. package/docs/.vuepress/components/positionSlot/base.vue +0 -24
  105. package/docs/.vuepress/components/positionSlot/form.vue +0 -71
  106. package/docs/.vuepress/components/positionSlot/table.vue +0 -85
  107. package/docs/.vuepress/components/tabs/base.vue +0 -57
  108. package/docs/.vuepress/components/temp.js +0 -195
  109. package/docs/.vuepress/config.js +0 -146
  110. package/docs/.vuepress/enhanceApp.js +0 -142
  111. package/docs/.vuepress/public/favicon.ico +0 -0
  112. package/docs/.vuepress/public/super.png +0 -0
  113. package/docs/.vuepress/styles/index.styl +0 -25
  114. package/docs/.vuepress/styles/palette.styl +0 -6
  115. package/docs/README.md +0 -14
  116. package/docs/guide/button/base.md +0 -31
  117. package/docs/guide/commonConfig/jsx.md +0 -166
  118. package/docs/guide/commonConfig/presetCodeTemplate.md +0 -68
  119. package/docs/guide/commonConfig/renderType.md +0 -181
  120. package/docs/guide/crud/baseUse.md +0 -120
  121. package/docs/guide/crud/buttons.md +0 -18
  122. package/docs/guide/crud/config.md +0 -217
  123. package/docs/guide/crud/contextMenu.md +0 -18
  124. package/docs/guide/crud/dataSort.md +0 -66
  125. package/docs/guide/crud/genDynamicColumns.md +0 -145
  126. package/docs/guide/crud/handleBar.md +0 -26
  127. package/docs/guide/crud/renderType.md +0 -4
  128. package/docs/guide/crud/search.md +0 -150
  129. package/docs/guide/crud/selection.md +0 -73
  130. package/docs/guide/crud/span.md +0 -98
  131. package/docs/guide/crud/summary.md +0 -167
  132. package/docs/guide/crud/tableEdit.md +0 -377
  133. package/docs/guide/crud/validate.md +0 -158
  134. package/docs/guide/dialog/baseUse.md +0 -81
  135. package/docs/guide/dict/baseUse.md +0 -174
  136. package/docs/guide/dict/component.md +0 -88
  137. package/docs/guide/dict/config.md +0 -44
  138. package/docs/guide/form/baseUse.md +0 -142
  139. package/docs/guide/form/detail.md +0 -38
  140. package/docs/guide/formatData/baseUse.md +0 -98
  141. package/docs/guide/formatData/config.md +0 -142
  142. package/docs/guide/mockData/base.md +0 -26
  143. package/docs/guide/positionSlot/base.md +0 -41
  144. package/docs/guide/question/base.md +0 -44
  145. package/docs/guide/start/base.md +0 -30
  146. package/docs/guide/tabs/base.md +0 -63
  147. package/examples/App.vue +0 -52
  148. package/examples/Layout/components/AppMain.vue +0 -40
  149. package/examples/Layout/components/Item.vue +0 -29
  150. package/examples/Layout/components/Link.vue +0 -44
  151. package/examples/Layout/components/SidebarItem.vue +0 -93
  152. package/examples/Layout/index.vue +0 -69
  153. package/examples/assets/logo.png +0 -0
  154. package/examples/favicon.ico +0 -0
  155. package/examples/index.html +0 -18
  156. package/examples/main.js +0 -54
  157. package/examples/router/index.js +0 -140
  158. package/examples/store/index.js +0 -0
  159. package/examples/styles/index.scss +0 -63
  160. package/examples/styles/sidebar.scss +0 -226
  161. package/examples/styles/transition.scss +0 -48
  162. package/examples/styles/variables.scss +0 -25
  163. package/examples/views/crud/base.vue +0 -68
  164. package/examples/views/crud/handleRow.vue +0 -84
  165. package/examples/views/crud/search.vue +0 -116
  166. package/examples/views/dashboard/index.vue +0 -244
  167. package/examples/views/dashboard/index1.vue +0 -234
  168. package/examples/views/dashboard/test.vue +0 -9
  169. package/examples/views/formTest/index.vue +0 -168
  170. package/examples/views/nested/menu1/index.vue +0 -7
  171. package/examples/views/nested/menu1/menu1-1/index.vue +0 -7
  172. package/examples/views/nested/menu1/menu1-2/index.vue +0 -7
  173. package/examples/views/nested/menu1/menu1-2/menu1-2-1/index.vue +0 -5
  174. package/examples/views/nested/menu1/menu1-2/menu1-2-2/index.vue +0 -5
  175. package/examples/views/nested/menu1/menu1-3/index.vue +0 -5
  176. package/examples/views/nested/menu2/index.vue +0 -5
  177. package/gulpfile.js +0 -84
  178. package/packages/button/index.vue +0 -189
  179. package/packages/core/components/comp.vue +0 -223
  180. package/packages/core/components/position.vue +0 -135
  181. package/packages/core/components/render.vue +0 -460
  182. package/packages/core/configManager.js +0 -302
  183. package/packages/core/create.js +0 -8
  184. package/packages/core/defaultRender.js +0 -64
  185. package/packages/core/dict/global.js +0 -10
  186. package/packages/core/dict/index.js +0 -432
  187. package/packages/core/dict/mixin.js +0 -94
  188. package/packages/core/event.js +0 -60
  189. package/packages/core/index.js +0 -6
  190. package/packages/core/init.js +0 -122
  191. package/packages/core/mock/genConfig.js +0 -228
  192. package/packages/core/mock/genData.js +0 -422
  193. package/packages/core/mock/index.js +0 -4
  194. package/packages/core/rules.js +0 -111
  195. package/packages/crud/column.vue +0 -205
  196. package/packages/crud/columnAction.vue +0 -207
  197. package/packages/crud/columnCell.vue +0 -146
  198. package/packages/crud/defaultColumn.vue +0 -130
  199. package/packages/crud/drawerColumn.vue +0 -225
  200. package/packages/crud/form.vue +0 -69
  201. package/packages/crud/index.vue +0 -564
  202. package/packages/crud/menuBar.vue +0 -298
  203. package/packages/crud/mixins/cacheHandler.js +0 -36
  204. package/packages/crud/mixins/calcColumnWidth.js +0 -79
  205. package/packages/crud/mixins/calcHeight.js +0 -105
  206. package/packages/crud/mixins/columnHandler.js +0 -128
  207. package/packages/crud/mixins/contextMenu.js +0 -98
  208. package/packages/crud/mixins/dataProcessor.js +0 -202
  209. package/packages/crud/mixins/dialog.js +0 -109
  210. package/packages/crud/mixins/excelHandler.js +0 -150
  211. package/packages/crud/mixins/exposeMethods.js +0 -107
  212. package/packages/crud/mixins/generateDynamicColumns.js +0 -250
  213. package/packages/crud/mixins/props.js +0 -38
  214. package/packages/crud/mixins/searchHandler.js +0 -151
  215. package/packages/crud/mixins/select.js +0 -359
  216. package/packages/crud/mixins/spanMethod.js +0 -288
  217. package/packages/crud/mixins/summary.js +0 -177
  218. package/packages/crud/mixins/tableEdit.js +0 -547
  219. package/packages/crud/mixins/validate.js +0 -219
  220. package/packages/crud/pagination.vue +0 -110
  221. package/packages/crud/search.vue +0 -119
  222. package/packages/crud/searchHeader.vue +0 -231
  223. package/packages/crud/selectBanner.vue +0 -138
  224. package/packages/crud/utils/EditState.js +0 -319
  225. package/packages/crud/utils/excelExport.js +0 -112
  226. package/packages/crud/utils/excelImport.js +0 -112
  227. package/packages/crud/utils/index.js +0 -98
  228. package/packages/dialog/dialog.js +0 -233
  229. package/packages/dialog/dialog.vue +0 -15
  230. package/packages/dialog/index.js +0 -22
  231. package/packages/dict/cascadeFormat.vue +0 -179
  232. package/packages/dict/dateFormat.vue +0 -40
  233. package/packages/dict/form/cascade.vue +0 -61
  234. package/packages/dict/form/checkbox.vue +0 -90
  235. package/packages/dict/form/extendMethod.js +0 -22
  236. package/packages/dict/form/input-base.js +0 -31
  237. package/packages/dict/form/input.js +0 -20
  238. package/packages/dict/form/radio.vue +0 -69
  239. package/packages/dict/form/select.vue +0 -118
  240. package/packages/dict/form/switch.vue +0 -75
  241. package/packages/dict/valueFormat.vue +0 -188
  242. package/packages/directive/dialog/drag.js +0 -86
  243. package/packages/directive/dialog/dragSize.js +0 -42
  244. package/packages/directive/index.js +0 -9
  245. package/packages/directive/insertSlot.js +0 -10
  246. package/packages/form/contextMenu.js +0 -192
  247. package/packages/form/draftDrawer.vue +0 -391
  248. package/packages/form/formAction.vue +0 -97
  249. package/packages/form/formItem.vue +0 -259
  250. package/packages/form/index.vue +0 -451
  251. package/packages/form/props.js +0 -15
  252. package/packages/grid/cell.vue +0 -65
  253. package/packages/grid/index.vue +0 -130
  254. package/packages/group/index.vue +0 -96
  255. package/packages/tabs/index.vue +0 -290
  256. package/packages/tooltip/index.js +0 -9
  257. package/packages/tooltip/tooltip.vue +0 -32
  258. package/packages/tooltip/tooltipComponent.js +0 -38
  259. package/packages/verifyInput/index.vue +0 -131
  260. package/styles/button.scss +0 -3
  261. package/styles/crud.scss +0 -425
  262. package/styles/dialog.scss +0 -95
  263. package/styles/form.scss +0 -532
  264. package/styles/group.scss +0 -78
  265. package/styles/index.scss +0 -94
  266. package/styles/tabs.scss +0 -139
  267. package/styles/verifyInput.scss +0 -56
  268. package/vue-jsx-sync.js +0 -90
  269. package/vue.config.js +0 -54
@@ -1,290 +0,0 @@
1
- <template>
2
- <div>
3
- <h3>表单</h3>
4
- <sc-form v-model="form" :options="options"> </sc-form>
5
- <h3 style="margin-top: 20px;">表格</h3>
6
- <sc-crud :data="data" :options="crudOptions"> </sc-crud>
7
- </div>
8
- </template>
9
-
10
- <script>
11
- export default {
12
- data() {
13
- return {
14
- form: {
15
- multiSelect: [],
16
- daterange: [],
17
- checkbox: [],
18
- cascader: [],
19
- transfer: [],
20
- },
21
- data: [
22
- {
23
- id: 1,
24
- input: "",
25
- select: "",
26
- },
27
- {
28
- id: 2,
29
- input: "",
30
- select: "",
31
- },
32
- {
33
- id: 3,
34
- input: "",
35
- select: "",
36
- },
37
- {
38
- id: 4,
39
- input: "",
40
- select: "",
41
- },
42
- ],
43
- };
44
- },
45
- computed: {
46
- options() {
47
- return {
48
- renderColumns: [
49
- // 1. 输入框类
50
- {
51
- prop: "input",
52
- label: "普通输入框",
53
- comp: {
54
- name: "el-input",
55
- maxlength: 20,
56
- "show-word-limit": true,
57
- },
58
- },
59
- {
60
- prop: "input2",
61
- label: "校验规则生成",
62
- rules: ["email"],
63
- },
64
- {
65
- prop: "textarea",
66
- label: "文本域",
67
- comp: {
68
- name: "el-input",
69
- type: "textarea",
70
- rows: 3,
71
- placeholder: "请输入多行文本",
72
- },
73
- },
74
- {
75
- prop: "number",
76
- label: "数字输入框",
77
- comp: {
78
- name: "el-input-number",
79
- min: 0,
80
- max: 100,
81
- step: 1,
82
- },
83
- },
84
-
85
- // 2. 选择器类
86
- {
87
- prop: "select",
88
- label: "下拉选择",
89
- comp: {
90
- name: "el-select",
91
- options: [
92
- { label: "选项1", value: "1" },
93
- { label: "选项2", value: "2" },
94
- { label: "选项3", value: "3" },
95
- { label: "选项4", value: "4" },
96
- ],
97
- },
98
- },
99
- {
100
- prop: "multiSelect",
101
- label: "多选选择器",
102
- comp: {
103
- name: "el-select",
104
- multiple: true,
105
- options: [
106
- { label: "选项A", value: "A" },
107
- { label: "选项B", value: "B" },
108
- { label: "选项C", value: "C" },
109
- { label: "选项D", value: "D" },
110
- ],
111
- },
112
- },
113
-
114
- // 3. 日期时间类
115
- {
116
- prop: "date",
117
- label: "日期选择",
118
- comp: {
119
- name: "el-date-picker",
120
- type: "date",
121
- valueFormat: "yyyy-MM-dd",
122
- },
123
- },
124
- {
125
- prop: "daterange",
126
- label: "日期范围",
127
- comp: {
128
- name: "el-date-picker",
129
- type: "daterange",
130
- startPlaceholder: "开始日期",
131
- endPlaceholder: "结束日期",
132
- valueFormat: "yyyy-MM-dd",
133
- },
134
- },
135
- {
136
- prop: "time",
137
- label: "时间选择",
138
- comp: {
139
- name: "el-time-picker",
140
- valueFormat: "HH:mm:ss",
141
- },
142
- },
143
-
144
- // 4. 单选复选类
145
- {
146
- prop: "radio",
147
- label: "单选组",
148
- comp: {
149
- name: "el-radio-group",
150
- options: [
151
- { label: "选项1", value: "1" },
152
- { label: "选项2", value: "2" },
153
- { label: "选项3", value: "3" },
154
- { label: "选项4", value: "4" },
155
- ],
156
- },
157
- },
158
- {
159
- prop: "checkbox",
160
- label: "复选框组",
161
- comp: {
162
- name: "el-checkbox-group",
163
- options: [
164
- { label: "选项A", value: "A" },
165
- { label: "选项B", value: "B" },
166
- { label: "选项C", value: "C" },
167
- { label: "选项D", value: "D" },
168
- ],
169
- },
170
- },
171
-
172
- // 5. 级联选择器
173
- {
174
- prop: "cascader",
175
- label: "级联选择",
176
- comp: {
177
- name: "el-cascader",
178
- options: [
179
- {
180
- value: "1",
181
- label: "一级1",
182
- children: [
183
- { value: "1-1", label: "二级1-1" },
184
- { value: "1-2", label: "二级1-2" },
185
- ],
186
- },
187
- {
188
- value: "2",
189
- label: "一级2",
190
- children: [
191
- { value: "2-1", label: "二级2-1" },
192
- { value: "2-2", label: "二级2-2" },
193
- ],
194
- },
195
- ],
196
- },
197
- },
198
-
199
- // 6. 开关、滑块、评分类
200
- {
201
- prop: "switch",
202
- label: "开关",
203
- comp: {
204
- name: "el-switch",
205
- "active-text": "开启",
206
- "inactive-text": "关闭",
207
- },
208
- },
209
- {
210
- prop: "slider",
211
- label: "滑块",
212
- comp: {
213
- name: "el-slider",
214
- min: 0,
215
- max: 100,
216
- step: 10,
217
- "show-stops": true,
218
- },
219
- },
220
- {
221
- prop: "rate",
222
- label: "评分",
223
- comp: {
224
- name: "el-rate",
225
- max: 5,
226
- "allow-half": true,
227
- "show-text": true,
228
- },
229
- },
230
-
231
- // 7. 穿梭框
232
- {
233
- prop: "transfer",
234
- label: "穿梭框",
235
- comp: {
236
- name: "el-transfer",
237
- data: [
238
- { key: 1, label: "选项1" },
239
- { key: 2, label: "选项2" },
240
- { key: 3, label: "选项3" },
241
- ],
242
- titles: ["待选列表", "已选列表"],
243
- },
244
- },
245
- ],
246
- };
247
- },
248
- crudOptions() {
249
- return {
250
- toolbar: false,
251
- renderColumns: [
252
- {
253
- prop: "id",
254
- label: "ID",
255
- isEdit: false,
256
- },
257
- {
258
- prop: "input",
259
- label: "普通输入框",
260
- isEdit: true,
261
- form: {
262
- comp: {
263
- name: "el-input",
264
- maxlength: 20,
265
- "show-word-limit": true,
266
- },
267
- },
268
- },
269
- {
270
- prop: "select",
271
- label: "下拉选择",
272
- isEdit: true,
273
- form: {
274
- comp: {
275
- name: "el-select",
276
- options: [
277
- { label: "选项1", value: "1" },
278
- { label: "选项2", value: "2" },
279
- { label: "选项3", value: "3" },
280
- { label: "选项4", value: "4" },
281
- ],
282
- },
283
- },
284
- },
285
- ],
286
- };
287
- },
288
- },
289
- };
290
- </script>
@@ -1,24 +0,0 @@
1
- <template>
2
- <sc-position>
3
- <template #left>
4
- <el-button type="primary">左侧</el-button>
5
- </template>
6
- <template #right>
7
- <el-button type="primary">右侧</el-button>
8
- </template>
9
- <template #top>
10
- <el-button style="width: 100%;" type="primary">顶部</el-button>
11
- </template>
12
- <template #bottom>
13
- <el-button style="width: 100%;" type="primary">底部</el-button>
14
- </template>
15
- <el-input v-model="value" placeholder="请输入内容" />
16
- </sc-position>
17
- </template>
18
- <script>
19
- export default {
20
- data() {
21
- return { value: "" };
22
- },
23
- };
24
- </script>
@@ -1,71 +0,0 @@
1
- <template>
2
- <div>
3
- <h3>表单</h3>
4
- <sc-form v-model="form" :options="options">
5
- <template #test-left>
6
- <el-button>渲染单元格左侧</el-button>
7
- </template>
8
- <template #test-right>
9
- <el-button>渲染单元格右侧</el-button>
10
- </template>
11
- <template #test-top="scope">
12
- <el-button style="width: 100%;">{{
13
- scope.row.test || "渲染单元格顶部"
14
- }}</el-button>
15
- </template>
16
- <template #test-bottom>
17
- <el-button style="width: 100%;">渲染单元格底部</el-button>
18
- </template>
19
- </sc-form>
20
- <h3>表格</h3>
21
- <sc-crud :options="options" :data="data"
22
- ><template #test-left>
23
- <el-button>渲染单元格左侧 </el-button>
24
- </template>
25
- <template #test-right>
26
- <el-button>渲染单元格右侧</el-button>
27
- </template>
28
- <template #test-top="scope">
29
- <el-button style="width: 100%;">{{
30
- scope.row.test || "渲染单元格顶部"
31
- }}</el-button>
32
- </template>
33
- <template #test-bottom>
34
- <el-button style="width: 100%;">渲染单元格底部</el-button>
35
- </template>
36
- </sc-crud>
37
- </div>
38
- </template>
39
-
40
- <script>
41
- export default {
42
- data() {
43
- return {
44
- form: {},
45
- data: [
46
- {
47
- test: "",
48
- test2: "11111",
49
- },
50
- ],
51
- options: {
52
- labelWidth: "160px",
53
- renderColumns: [
54
- {
55
- label: "渲染单元格",
56
- prop: "test",
57
- position: true,
58
- comp: {
59
- name: "el-input",
60
- },
61
- },
62
- {
63
- label: "普通单元格",
64
- prop: "test2",
65
- },
66
- ],
67
- },
68
- };
69
- },
70
- };
71
- </script>
@@ -1,85 +0,0 @@
1
- <template>
2
- <sc-crud
3
- :loading.sync="loading"
4
- :search.sync="search"
5
- :options="options"
6
- :data="data"
7
- :total="total"
8
- @getList="getList"
9
- >
10
- <template #handleRow>
11
- <el-button>操作栏</el-button>
12
- </template>
13
- <template #handleRow-left>
14
- <el-button type="primary">操作栏左侧</el-button>
15
- </template>
16
- <template #handleRow-right>
17
- <el-button type="primary">操作栏右侧</el-button>
18
- </template>
19
- <template #handleRow-top>
20
- <el-button type="primary" style="width: 100%;">操作栏顶部</el-button>
21
- </template>
22
- <template #handleRow-bottom>
23
- <el-button type="primary" style="width: 100%;">操作栏底部</el-button>
24
- </template>
25
- <template #name-header-left>
26
- <el-button type="primary">左侧</el-button>
27
- </template>
28
- <template #name-header-right>
29
- <el-button type="primary">右侧</el-button>
30
- </template>
31
- <template #name-header-top>
32
- <el-button type="primary" style="width: 100%;">顶部</el-button>
33
- </template>
34
- <template #name-header-bottom>
35
- <el-button type="primary" style="width: 100%;">底部</el-button>
36
- </template>
37
- <template #pagination-left>
38
- <el-button type="primary">左侧</el-button>
39
- </template>
40
- <template #pagination-right>
41
- <el-button type="primary">右侧</el-button>
42
- </template>
43
- <template #pagination-top>
44
- <el-button type="primary" style="width: 100%;">顶部</el-button>
45
- </template>
46
- <template #pagination-bottom>
47
- <el-button type="primary" style="width: 100%;">底部</el-button>
48
- </template>
49
- </sc-crud>
50
- </template>
51
-
52
- <script>
53
- import { mockApi } from "../mock";
54
- export default {
55
- data() {
56
- return {
57
- loading: false,
58
- search: {
59
- pageNum: 1,
60
- pageSize: 2,
61
- },
62
- options: {
63
- init: true,
64
- renderColumns: [
65
- { prop: "name", label: "姓名" },
66
- { prop: "gender", label: "性别" },
67
- { prop: "age", label: "年龄" },
68
- { prop: "city", label: "城市" },
69
- ],
70
- },
71
- data: [],
72
- total: 0,
73
- };
74
- },
75
- methods: {
76
- async getList() {
77
- this.loading = true;
78
- const { data, total } = await mockApi.getList(this.search);
79
- this.data = data;
80
- this.total = total;
81
- this.loading = false;
82
- },
83
- },
84
- };
85
- </script>
@@ -1,57 +0,0 @@
1
- <template>
2
- <sc-tabs
3
- v-model="activeTab"
4
- :tab-list="tabList"
5
- all
6
- refresh
7
- type="card"
8
- @tab-click="handleTabClick"
9
- >
10
- <template #tab1>
11
- <div>标签1的内容</div>
12
- </template>
13
-
14
- <template #tab2-label="scope">
15
- <i class="el-icon-date"></i>
16
- {{ scope.label }}
17
- </template>
18
-
19
- <template #tab2>
20
- <div>标签2的内容</div>
21
- </template>
22
- </sc-tabs>
23
- </template>
24
-
25
- <script>
26
- export default {
27
- data() {
28
- return {
29
- activeTab: "tab1",
30
- tabList: [
31
- {
32
- label: "标签1",
33
- name: "tab1",
34
- icon: "el-icon-date",
35
- cache: true,
36
- },
37
- {
38
- label: "标签2",
39
- name: "tab2",
40
- },
41
- {
42
- label: "标签3",
43
- name: "tab3",
44
- render: () => {
45
- return <div>标签3的内容</div>;
46
- },
47
- },
48
- ],
49
- };
50
- },
51
- methods: {
52
- handleTabClick(tab, item) {
53
- console.log("点击的标签:", tab, item);
54
- },
55
- },
56
- };
57
- </script>