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.
- package/README.md +42 -10
- package/lib/index.css +1 -1
- package/lib/super-crud.min.js +2 -2
- package/package.json +21 -16
- package/.browserslistrc +0 -3
- package/.versionrc.json +0 -36
- package/CHANGELOG.md +0 -232
- package/babel.config.js +0 -12
- package/build/alias.js +0 -10
- package/build/build.js +0 -52
- package/build/config.js +0 -70
- package/deploy.bat +0 -14
- package/docs/.vuepress/components/button/base.vue +0 -88
- package/docs/.vuepress/components/common/code-format.vue +0 -331
- package/docs/.vuepress/components/commonConfig/presetCodeTemplate/base.vue +0 -68
- package/docs/.vuepress/components/commonConfig/presetCodeTemplate/customParams.vue +0 -73
- package/docs/.vuepress/components/commonConfig/renderType/component.vue +0 -160
- package/docs/.vuepress/components/commonConfig/renderType/formatter.vue +0 -49
- package/docs/.vuepress/components/commonConfig/renderType/render.vue +0 -91
- package/docs/.vuepress/components/commonConfig/renderType/slot.vue +0 -63
- package/docs/.vuepress/components/crud/baseUse/baseUse.vue +0 -98
- package/docs/.vuepress/components/crud/baseUse/columnAction.vue +0 -72
- package/docs/.vuepress/components/crud/baseUse/columnWidth.vue +0 -107
- package/docs/.vuepress/components/crud/baseUse/handleRow.vue +0 -65
- package/docs/.vuepress/components/crud/baseUse/height.vue +0 -82
- package/docs/.vuepress/components/crud/baseUse/index.vue +0 -54
- package/docs/.vuepress/components/crud/baseUse/loading.vue +0 -70
- package/docs/.vuepress/components/crud/baseUse/pagination.vue +0 -108
- package/docs/.vuepress/components/crud/baseUse/selection.vue +0 -114
- package/docs/.vuepress/components/crud/baseUse/summaryMethod.vue +0 -118
- package/docs/.vuepress/components/crud/baseUse/title.vue +0 -54
- package/docs/.vuepress/components/crud/baseUse/toolbar.vue +0 -69
- package/docs/.vuepress/components/crud/buttons/common.vue +0 -115
- package/docs/.vuepress/components/crud/buttons/fast.vue +0 -82
- package/docs/.vuepress/components/crud/contextMenu/base.vue +0 -72
- package/docs/.vuepress/components/crud/copy.vue +0 -52
- package/docs/.vuepress/components/crud/crudEvents/api.vue +0 -157
- package/docs/.vuepress/components/crud/crudEvents/deleteTip.vue +0 -93
- package/docs/.vuepress/components/crud/crudEvents/events.vue +0 -188
- package/docs/.vuepress/components/crud/dataSort/base.vue +0 -142
- package/docs/.vuepress/components/crud/genDynamicColumns/base.vue +0 -53
- package/docs/.vuepress/components/crud/genDynamicColumns/dynamicAndFixed.vue +0 -111
- package/docs/.vuepress/components/crud/genDynamicColumns/treeDynamic.vue +0 -68
- package/docs/.vuepress/components/crud/handleBar/handleRow.vue +0 -65
- package/docs/.vuepress/components/crud/handleBar/toolbar.vue +0 -69
- package/docs/.vuepress/components/crud/renderType/1.vue +0 -57
- package/docs/.vuepress/components/crud/renderType/2.vue +0 -63
- package/docs/.vuepress/components/crud/renderType/3.vue +0 -105
- package/docs/.vuepress/components/crud/renderType/5.vue +0 -91
- package/docs/.vuepress/components/crud/search/1.vue +0 -90
- package/docs/.vuepress/components/crud/search/2.vue +0 -78
- package/docs/.vuepress/components/crud/search/3.vue +0 -107
- package/docs/.vuepress/components/crud/search/base.vue +0 -123
- package/docs/.vuepress/components/crud/search/localSearch.vue +0 -124
- package/docs/.vuepress/components/crud/search/special.vue +0 -148
- package/docs/.vuepress/components/crud/selection/events.vue +0 -47
- package/docs/.vuepress/components/crud/selection/pagination.vue +0 -94
- package/docs/.vuepress/components/crud/selection/singleSelection.vue +0 -64
- package/docs/.vuepress/components/crud/span/base.vue +0 -69
- package/docs/.vuepress/components/crud/span/special.vue +0 -75
- package/docs/.vuepress/components/crud/summary/base.vue +0 -99
- package/docs/.vuepress/components/crud/tableEdit/addDeleteBtn.vue +0 -174
- package/docs/.vuepress/components/crud/tableEdit/cellEdit.vue +0 -194
- package/docs/.vuepress/components/crud/tableEdit/controlEdit.vue +0 -219
- package/docs/.vuepress/components/crud/tableEdit/dialog.vue +0 -172
- package/docs/.vuepress/components/crud/tableEdit/free.vue +0 -88
- package/docs/.vuepress/components/crud/tableEdit/freeColumn.vue +0 -82
- package/docs/.vuepress/components/crud/tableEdit/methods.vue +0 -154
- package/docs/.vuepress/components/crud/tableEdit/rowAction.vue +0 -107
- package/docs/.vuepress/components/crud/tableEdit/rowBatch.vue +0 -116
- package/docs/.vuepress/components/crud/tableEdit/rowClick.vue +0 -98
- package/docs/.vuepress/components/crud/validate/base.vue +0 -122
- package/docs/.vuepress/components/crud/validate/custom.vue +0 -82
- package/docs/.vuepress/components/crud/validate/regulars.vue +0 -88
- package/docs/.vuepress/components/crud/validate/relation.vue +0 -91
- package/docs/.vuepress/components/crud/validate/tree.vue +0 -82
- package/docs/.vuepress/components/dialog/baseUse/base.vue +0 -92
- package/docs/.vuepress/components/dialog/baseUse/beforeConfirm.vue +0 -78
- package/docs/.vuepress/components/dialog/baseUse/control.vue +0 -79
- package/docs/.vuepress/components/dialog/baseUse/drawer.vue +0 -59
- package/docs/.vuepress/components/dialog/baseUse/footer.vue +0 -87
- package/docs/.vuepress/components/dialog/baseUse/insertSlot.vue +0 -79
- package/docs/.vuepress/components/dict/DictLinkage.vue +0 -91
- package/docs/.vuepress/components/dict/baseUse.vue +0 -72
- package/docs/.vuepress/components/dict/component.vue +0 -82
- package/docs/.vuepress/components/dict/localDict.vue +0 -68
- package/docs/.vuepress/components/form/baseUse/base.vue +0 -48
- package/docs/.vuepress/components/form/baseUse/dataFormat.vue +0 -92
- package/docs/.vuepress/components/form/baseUse/deep.vue +0 -57
- package/docs/.vuepress/components/form/baseUse/gridLayout.vue +0 -47
- package/docs/.vuepress/components/form/baseUse/group.vue +0 -66
- package/docs/.vuepress/components/form/baseUse/hidden.vue +0 -40
- package/docs/.vuepress/components/form/baseUse/inlineLayout.vue +0 -48
- package/docs/.vuepress/components/form/baseUse/label.vue +0 -51
- package/docs/.vuepress/components/form/baseUse/tooltip.vue +0 -40
- package/docs/.vuepress/components/form/baseUse/validate.vue +0 -52
- package/docs/.vuepress/components/form/detail/base.vue +0 -78
- package/docs/.vuepress/components/form/detail/border.vue +0 -90
- package/docs/.vuepress/components/form/detail/singleDetail.vue +0 -72
- package/docs/.vuepress/components/formatData/baseUse.vue +0 -131
- package/docs/.vuepress/components/mock/index.js +0 -347
- package/docs/.vuepress/components/mockData/custom.vue +0 -69
- package/docs/.vuepress/components/mockData/example.vue +0 -290
- package/docs/.vuepress/components/positionSlot/base.vue +0 -24
- package/docs/.vuepress/components/positionSlot/form.vue +0 -71
- package/docs/.vuepress/components/positionSlot/table.vue +0 -85
- package/docs/.vuepress/components/tabs/base.vue +0 -57
- package/docs/.vuepress/components/temp.js +0 -195
- package/docs/.vuepress/config.js +0 -146
- package/docs/.vuepress/enhanceApp.js +0 -142
- package/docs/.vuepress/public/favicon.ico +0 -0
- package/docs/.vuepress/public/super.png +0 -0
- package/docs/.vuepress/styles/index.styl +0 -25
- package/docs/.vuepress/styles/palette.styl +0 -6
- package/docs/README.md +0 -14
- package/docs/guide/button/base.md +0 -31
- package/docs/guide/commonConfig/jsx.md +0 -166
- package/docs/guide/commonConfig/presetCodeTemplate.md +0 -68
- package/docs/guide/commonConfig/renderType.md +0 -181
- package/docs/guide/crud/baseUse.md +0 -120
- package/docs/guide/crud/buttons.md +0 -18
- package/docs/guide/crud/config.md +0 -217
- package/docs/guide/crud/contextMenu.md +0 -18
- package/docs/guide/crud/dataSort.md +0 -66
- package/docs/guide/crud/genDynamicColumns.md +0 -145
- package/docs/guide/crud/handleBar.md +0 -26
- package/docs/guide/crud/renderType.md +0 -4
- package/docs/guide/crud/search.md +0 -150
- package/docs/guide/crud/selection.md +0 -73
- package/docs/guide/crud/span.md +0 -98
- package/docs/guide/crud/summary.md +0 -167
- package/docs/guide/crud/tableEdit.md +0 -377
- package/docs/guide/crud/validate.md +0 -158
- package/docs/guide/dialog/baseUse.md +0 -81
- package/docs/guide/dict/baseUse.md +0 -174
- package/docs/guide/dict/component.md +0 -88
- package/docs/guide/dict/config.md +0 -44
- package/docs/guide/form/baseUse.md +0 -142
- package/docs/guide/form/detail.md +0 -38
- package/docs/guide/formatData/baseUse.md +0 -98
- package/docs/guide/formatData/config.md +0 -142
- package/docs/guide/mockData/base.md +0 -26
- package/docs/guide/positionSlot/base.md +0 -41
- package/docs/guide/question/base.md +0 -44
- package/docs/guide/start/base.md +0 -30
- package/docs/guide/tabs/base.md +0 -63
- package/examples/App.vue +0 -52
- package/examples/Layout/components/AppMain.vue +0 -40
- package/examples/Layout/components/Item.vue +0 -29
- package/examples/Layout/components/Link.vue +0 -44
- package/examples/Layout/components/SidebarItem.vue +0 -93
- package/examples/Layout/index.vue +0 -69
- package/examples/assets/logo.png +0 -0
- package/examples/favicon.ico +0 -0
- package/examples/index.html +0 -18
- package/examples/main.js +0 -54
- package/examples/router/index.js +0 -140
- package/examples/store/index.js +0 -0
- package/examples/styles/index.scss +0 -63
- package/examples/styles/sidebar.scss +0 -226
- package/examples/styles/transition.scss +0 -48
- package/examples/styles/variables.scss +0 -25
- package/examples/views/crud/base.vue +0 -68
- package/examples/views/crud/handleRow.vue +0 -84
- package/examples/views/crud/search.vue +0 -116
- package/examples/views/dashboard/index.vue +0 -244
- package/examples/views/dashboard/index1.vue +0 -234
- package/examples/views/dashboard/test.vue +0 -9
- package/examples/views/formTest/index.vue +0 -168
- package/examples/views/nested/menu1/index.vue +0 -7
- package/examples/views/nested/menu1/menu1-1/index.vue +0 -7
- package/examples/views/nested/menu1/menu1-2/index.vue +0 -7
- package/examples/views/nested/menu1/menu1-2/menu1-2-1/index.vue +0 -5
- package/examples/views/nested/menu1/menu1-2/menu1-2-2/index.vue +0 -5
- package/examples/views/nested/menu1/menu1-3/index.vue +0 -5
- package/examples/views/nested/menu2/index.vue +0 -5
- package/gulpfile.js +0 -84
- package/packages/button/index.vue +0 -189
- package/packages/core/components/comp.vue +0 -223
- package/packages/core/components/position.vue +0 -135
- package/packages/core/components/render.vue +0 -460
- package/packages/core/configManager.js +0 -302
- package/packages/core/create.js +0 -8
- package/packages/core/defaultRender.js +0 -64
- package/packages/core/dict/global.js +0 -10
- package/packages/core/dict/index.js +0 -432
- package/packages/core/dict/mixin.js +0 -94
- package/packages/core/event.js +0 -60
- package/packages/core/index.js +0 -6
- package/packages/core/init.js +0 -122
- package/packages/core/mock/genConfig.js +0 -228
- package/packages/core/mock/genData.js +0 -422
- package/packages/core/mock/index.js +0 -4
- package/packages/core/rules.js +0 -111
- package/packages/crud/column.vue +0 -205
- package/packages/crud/columnAction.vue +0 -207
- package/packages/crud/columnCell.vue +0 -146
- package/packages/crud/defaultColumn.vue +0 -130
- package/packages/crud/drawerColumn.vue +0 -225
- package/packages/crud/form.vue +0 -69
- package/packages/crud/index.vue +0 -564
- package/packages/crud/menuBar.vue +0 -298
- package/packages/crud/mixins/cacheHandler.js +0 -36
- package/packages/crud/mixins/calcColumnWidth.js +0 -79
- package/packages/crud/mixins/calcHeight.js +0 -105
- package/packages/crud/mixins/columnHandler.js +0 -128
- package/packages/crud/mixins/contextMenu.js +0 -98
- package/packages/crud/mixins/dataProcessor.js +0 -202
- package/packages/crud/mixins/dialog.js +0 -109
- package/packages/crud/mixins/excelHandler.js +0 -150
- package/packages/crud/mixins/exposeMethods.js +0 -107
- package/packages/crud/mixins/generateDynamicColumns.js +0 -250
- package/packages/crud/mixins/props.js +0 -38
- package/packages/crud/mixins/searchHandler.js +0 -151
- package/packages/crud/mixins/select.js +0 -359
- package/packages/crud/mixins/spanMethod.js +0 -288
- package/packages/crud/mixins/summary.js +0 -177
- package/packages/crud/mixins/tableEdit.js +0 -547
- package/packages/crud/mixins/validate.js +0 -219
- package/packages/crud/pagination.vue +0 -110
- package/packages/crud/search.vue +0 -119
- package/packages/crud/searchHeader.vue +0 -231
- package/packages/crud/selectBanner.vue +0 -138
- package/packages/crud/utils/EditState.js +0 -319
- package/packages/crud/utils/excelExport.js +0 -112
- package/packages/crud/utils/excelImport.js +0 -112
- package/packages/crud/utils/index.js +0 -98
- package/packages/dialog/dialog.js +0 -233
- package/packages/dialog/dialog.vue +0 -15
- package/packages/dialog/index.js +0 -22
- package/packages/dict/cascadeFormat.vue +0 -179
- package/packages/dict/dateFormat.vue +0 -40
- package/packages/dict/form/cascade.vue +0 -61
- package/packages/dict/form/checkbox.vue +0 -90
- package/packages/dict/form/extendMethod.js +0 -22
- package/packages/dict/form/input-base.js +0 -31
- package/packages/dict/form/input.js +0 -20
- package/packages/dict/form/radio.vue +0 -69
- package/packages/dict/form/select.vue +0 -118
- package/packages/dict/form/switch.vue +0 -75
- package/packages/dict/valueFormat.vue +0 -188
- package/packages/directive/dialog/drag.js +0 -86
- package/packages/directive/dialog/dragSize.js +0 -42
- package/packages/directive/index.js +0 -9
- package/packages/directive/insertSlot.js +0 -10
- package/packages/form/contextMenu.js +0 -192
- package/packages/form/draftDrawer.vue +0 -391
- package/packages/form/formAction.vue +0 -97
- package/packages/form/formItem.vue +0 -259
- package/packages/form/index.vue +0 -451
- package/packages/form/props.js +0 -15
- package/packages/grid/cell.vue +0 -65
- package/packages/grid/index.vue +0 -130
- package/packages/group/index.vue +0 -96
- package/packages/tabs/index.vue +0 -290
- package/packages/tooltip/index.js +0 -9
- package/packages/tooltip/tooltip.vue +0 -32
- package/packages/tooltip/tooltipComponent.js +0 -38
- package/packages/verifyInput/index.vue +0 -131
- package/styles/button.scss +0 -3
- package/styles/crud.scss +0 -425
- package/styles/dialog.scss +0 -95
- package/styles/form.scss +0 -532
- package/styles/group.scss +0 -78
- package/styles/index.scss +0 -94
- package/styles/tabs.scss +0 -139
- package/styles/verifyInput.scss +0 -56
- package/vue-jsx-sync.js +0 -90
- package/vue.config.js +0 -54
@@ -1,91 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<sc-crud :options="options" :data="data"> </sc-crud>
|
3
|
-
</template>
|
4
|
-
|
5
|
-
<script>
|
6
|
-
export default {
|
7
|
-
data() {
|
8
|
-
return {
|
9
|
-
options: {
|
10
|
-
pagination: true,
|
11
|
-
action: [
|
12
|
-
{
|
13
|
-
label: "操作",
|
14
|
-
icon: "el-icon-edit",
|
15
|
-
onClick: () => {},
|
16
|
-
},
|
17
|
-
],
|
18
|
-
renderColumns: [
|
19
|
-
{
|
20
|
-
prop: "name",
|
21
|
-
label: "昵称",
|
22
|
-
render: (h, scope) => {
|
23
|
-
// 安装了jsx相关转换插件可以使用vue-jsx语法
|
24
|
-
return <div>{scope.row.name + "render"}</div>;
|
25
|
-
},
|
26
|
-
},
|
27
|
-
{
|
28
|
-
prop: "username",
|
29
|
-
label: "名称",
|
30
|
-
render: (h, scope) => {
|
31
|
-
// 否则使用h函数渲染
|
32
|
-
return h("div", {}, scope.row.username + "h");
|
33
|
-
},
|
34
|
-
},
|
35
|
-
{
|
36
|
-
prop: "gender",
|
37
|
-
label: "性别",
|
38
|
-
render: (h, scope) => {
|
39
|
-
return (
|
40
|
-
<el-select
|
41
|
-
v-model={scope.row.gender} // 与v-model相同
|
42
|
-
onChange={() => {
|
43
|
-
console.log("change");
|
44
|
-
}} // 事件加on前缀
|
45
|
-
clearable // 组件的属性
|
46
|
-
props={{
|
47
|
-
// 约等于模板语法的v-bind
|
48
|
-
multiple: true,
|
49
|
-
}}
|
50
|
-
on={{
|
51
|
-
// 约等于模板语法的v-on
|
52
|
-
"visible-change": () => {
|
53
|
-
console.log("visible-change");
|
54
|
-
},
|
55
|
-
}}
|
56
|
-
scopedSlots={{
|
57
|
-
// 作用域插槽
|
58
|
-
prefix: () => "prefix",
|
59
|
-
}}
|
60
|
-
>
|
61
|
-
<i slot="prefix">具名插槽</i>
|
62
|
-
<el-option value="111" label="111"></el-option>
|
63
|
-
</el-select>
|
64
|
-
);
|
65
|
-
},
|
66
|
-
},
|
67
|
-
],
|
68
|
-
},
|
69
|
-
data: [
|
70
|
-
{
|
71
|
-
createTime: "2018-06-02 12:28:47",
|
72
|
-
createUser: 94,
|
73
|
-
id: 56,
|
74
|
-
idNumber: "8",
|
75
|
-
name: "识间华中张认",
|
76
|
-
password: "sed laboris",
|
77
|
-
phone: "18157668675",
|
78
|
-
gender: "男",
|
79
|
-
age: 20,
|
80
|
-
status: 35,
|
81
|
-
updateTime: "2018-09-08 16:33:19",
|
82
|
-
updateUser: 58,
|
83
|
-
username: "石洋",
|
84
|
-
},
|
85
|
-
],
|
86
|
-
};
|
87
|
-
},
|
88
|
-
};
|
89
|
-
</script>
|
90
|
-
|
91
|
-
<style lang="scss" scoped></style>
|
@@ -1,63 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<sc-crud :options="options" :data="data">
|
3
|
-
<!-- 根据prop渲染插槽 -->
|
4
|
-
<template #name="{row}">
|
5
|
-
{{ row.name + "slot" }}
|
6
|
-
</template>
|
7
|
-
<template #username="{row}">
|
8
|
-
{{ row.username + "slot" }}
|
9
|
-
</template>
|
10
|
-
</sc-crud>
|
11
|
-
</template>
|
12
|
-
|
13
|
-
<script>
|
14
|
-
export default {
|
15
|
-
data() {
|
16
|
-
return {
|
17
|
-
options: {
|
18
|
-
pagination: true,
|
19
|
-
action: [
|
20
|
-
{
|
21
|
-
label: "操作",
|
22
|
-
icon: "el-icon-edit",
|
23
|
-
onClick: () => {},
|
24
|
-
},
|
25
|
-
],
|
26
|
-
renderColumns: [
|
27
|
-
{
|
28
|
-
prop: "name",
|
29
|
-
label: "昵称",
|
30
|
-
},
|
31
|
-
{
|
32
|
-
prop: "username",
|
33
|
-
label: "名称",
|
34
|
-
},
|
35
|
-
{
|
36
|
-
prop: "gender",
|
37
|
-
label: "性别",
|
38
|
-
},
|
39
|
-
],
|
40
|
-
},
|
41
|
-
data: [
|
42
|
-
{
|
43
|
-
createTime: "2018-06-02 12:28:47",
|
44
|
-
createUser: 94,
|
45
|
-
id: 56,
|
46
|
-
idNumber: "8",
|
47
|
-
name: "识间华中张认",
|
48
|
-
password: "sed laboris",
|
49
|
-
phone: "18157668675",
|
50
|
-
gender: "男",
|
51
|
-
age: 20,
|
52
|
-
status: 35,
|
53
|
-
updateTime: "2018-09-08 16:33:19",
|
54
|
-
updateUser: 58,
|
55
|
-
username: "石洋",
|
56
|
-
},
|
57
|
-
],
|
58
|
-
};
|
59
|
-
},
|
60
|
-
};
|
61
|
-
</script>
|
62
|
-
|
63
|
-
<style lang="scss" scoped></style>
|
@@ -1,98 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<sc-crud
|
4
|
-
:loading="loading"
|
5
|
-
:search.sync="searchForm"
|
6
|
-
:options="options"
|
7
|
-
:data="data"
|
8
|
-
:total="total"
|
9
|
-
@getList="getList"
|
10
|
-
>
|
11
|
-
</sc-crud>
|
12
|
-
</div>
|
13
|
-
</template>
|
14
|
-
|
15
|
-
<script>
|
16
|
-
export default {
|
17
|
-
data() {
|
18
|
-
return {
|
19
|
-
loading: false,
|
20
|
-
searchForm: {},
|
21
|
-
options: {
|
22
|
-
init: true,
|
23
|
-
renderColumns: [
|
24
|
-
{
|
25
|
-
prop: "name",
|
26
|
-
label: "昵称",
|
27
|
-
search: true,
|
28
|
-
},
|
29
|
-
{
|
30
|
-
prop: "username",
|
31
|
-
label: "姓名",
|
32
|
-
search: true,
|
33
|
-
},
|
34
|
-
{
|
35
|
-
prop: "gender",
|
36
|
-
label: "性别",
|
37
|
-
search: true,
|
38
|
-
},
|
39
|
-
],
|
40
|
-
},
|
41
|
-
data: [],
|
42
|
-
total: 0,
|
43
|
-
};
|
44
|
-
},
|
45
|
-
methods: {
|
46
|
-
async getList() {
|
47
|
-
this.loading = true;
|
48
|
-
const { data, total } = await this.listApi(this.searchForm);
|
49
|
-
this.loading = false;
|
50
|
-
this.data = data;
|
51
|
-
this.total = total;
|
52
|
-
},
|
53
|
-
listApi() {
|
54
|
-
// 模拟请求api
|
55
|
-
return new Promise((resolve, reject) => {
|
56
|
-
setTimeout(() => {
|
57
|
-
resolve({
|
58
|
-
code: 200,
|
59
|
-
data: [
|
60
|
-
{
|
61
|
-
createTime: "2018-06-02 12:28:47",
|
62
|
-
createUser: 94,
|
63
|
-
id: 56,
|
64
|
-
idNumber: "8",
|
65
|
-
name: "识间华中张认",
|
66
|
-
password: "sed laboris",
|
67
|
-
phone: "18157668675",
|
68
|
-
gender: "男",
|
69
|
-
age: 20,
|
70
|
-
status: 35,
|
71
|
-
updateTime: "2018-09-08 16:33:19",
|
72
|
-
updateUser: 58,
|
73
|
-
username: "石洋",
|
74
|
-
},
|
75
|
-
{
|
76
|
-
createTime: "2018-06-02 12:28:47",
|
77
|
-
createUser: 94,
|
78
|
-
id: 57,
|
79
|
-
idNumber: "8",
|
80
|
-
name: "识间华中张认1",
|
81
|
-
password: "sed laboris",
|
82
|
-
phone: "18157668675",
|
83
|
-
gender: "男",
|
84
|
-
age: 20,
|
85
|
-
status: 35,
|
86
|
-
updateTime: "2018-09-08 16:33:19",
|
87
|
-
updateUser: 58,
|
88
|
-
username: "石洋11",
|
89
|
-
},
|
90
|
-
],
|
91
|
-
total: 2,
|
92
|
-
});
|
93
|
-
}, 1000);
|
94
|
-
});
|
95
|
-
},
|
96
|
-
},
|
97
|
-
};
|
98
|
-
</script>
|
@@ -1,72 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<sc-crud :search.sync="searchForm" :options="options" :data="data">
|
4
|
-
</sc-crud>
|
5
|
-
</div>
|
6
|
-
</template>
|
7
|
-
|
8
|
-
<script>
|
9
|
-
export default {
|
10
|
-
data() {
|
11
|
-
return {
|
12
|
-
searchForm: {},
|
13
|
-
options: {
|
14
|
-
handleRow: [
|
15
|
-
{
|
16
|
-
label: "操作列隐藏",
|
17
|
-
type: "primary",
|
18
|
-
onClick: () => {
|
19
|
-
this.options.action = false;
|
20
|
-
},
|
21
|
-
},
|
22
|
-
],
|
23
|
-
action: {
|
24
|
-
width: "auto", // auto: 自动计算宽度
|
25
|
-
calcWidth: 20, // 增加的宽度,默认20
|
26
|
-
handles: [
|
27
|
-
{
|
28
|
-
icon: "el-icon-search",
|
29
|
-
type: "primary",
|
30
|
-
onClick: () => {
|
31
|
-
console.log("search");
|
32
|
-
},
|
33
|
-
},
|
34
|
-
],
|
35
|
-
},
|
36
|
-
renderColumns: [
|
37
|
-
{ prop: "name", label: "昵称", search: true },
|
38
|
-
{
|
39
|
-
prop: "username",
|
40
|
-
label: "姓名",
|
41
|
-
search: {
|
42
|
-
name: "el-date-picker",
|
43
|
-
},
|
44
|
-
},
|
45
|
-
{
|
46
|
-
prop: "gender",
|
47
|
-
label: "性别",
|
48
|
-
},
|
49
|
-
],
|
50
|
-
},
|
51
|
-
data: [
|
52
|
-
{
|
53
|
-
createTime: "2018-06-02 12:28:47",
|
54
|
-
createUser: 94,
|
55
|
-
id: 56,
|
56
|
-
idNumber: "8",
|
57
|
-
name: "识间华中张认",
|
58
|
-
password: "sed laboris",
|
59
|
-
phone: "18157668675",
|
60
|
-
gender: "男",
|
61
|
-
age: 20,
|
62
|
-
status: 35,
|
63
|
-
updateTime: "2018-09-08 16:33:19",
|
64
|
-
updateUser: 58,
|
65
|
-
username: "石洋",
|
66
|
-
},
|
67
|
-
],
|
68
|
-
};
|
69
|
-
},
|
70
|
-
methods: {},
|
71
|
-
};
|
72
|
-
</script>
|
@@ -1,107 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<sc-crud :search.sync="searchForm" :options="options" :data="data">
|
4
|
-
</sc-crud>
|
5
|
-
</div>
|
6
|
-
</template>
|
7
|
-
|
8
|
-
<script>
|
9
|
-
export default {
|
10
|
-
data() {
|
11
|
-
return {
|
12
|
-
searchForm: {},
|
13
|
-
options: {
|
14
|
-
// 列宽度自动计算规则
|
15
|
-
calcColumnWidth: {
|
16
|
-
widthType: "first", // first为默认值,仅计算第一个有内容的宽度
|
17
|
-
widthFont: "12px Ubuntu", //自定义计算的字体大小和类型(有助于更精确的计算)
|
18
|
-
calcWidth: 20, // 增加的宽度,默认单元格内边距20px
|
19
|
-
},
|
20
|
-
renderColumns: [
|
21
|
-
{
|
22
|
-
prop: "name",
|
23
|
-
width: "auto", // 列自动计算宽度
|
24
|
-
label: "昵称1",
|
25
|
-
search: true,
|
26
|
-
},
|
27
|
-
{
|
28
|
-
prop: "name",
|
29
|
-
width: "auto",
|
30
|
-
calcWidth: 200, // 增加的宽度
|
31
|
-
label: "昵称2",
|
32
|
-
search: true,
|
33
|
-
},
|
34
|
-
{
|
35
|
-
prop: "name",
|
36
|
-
minWidth: "auto", // 列自动计算最小宽度
|
37
|
-
label: "昵称3",
|
38
|
-
search: true,
|
39
|
-
},
|
40
|
-
{
|
41
|
-
prop: "username",
|
42
|
-
label: "姓名",
|
43
|
-
width: "auto",
|
44
|
-
widthType: "max", // 计算所有内容的最大宽度(数据量大存在性能问题),独立设置,覆盖calcColumnWidth
|
45
|
-
widthFont: "12px Ubuntu",
|
46
|
-
search: {
|
47
|
-
name: "el-date-picker",
|
48
|
-
},
|
49
|
-
},
|
50
|
-
{
|
51
|
-
prop: "gender",
|
52
|
-
label: "性别",
|
53
|
-
},
|
54
|
-
],
|
55
|
-
},
|
56
|
-
data: [
|
57
|
-
{
|
58
|
-
createTime: "2018-06-02 12:28:47",
|
59
|
-
createUser: 94,
|
60
|
-
id: 56,
|
61
|
-
idNumber: "8",
|
62
|
-
name: "识间华中张认",
|
63
|
-
password: "sed laboris",
|
64
|
-
phone: "18157668675",
|
65
|
-
gender: "男",
|
66
|
-
age: 20,
|
67
|
-
status: 35,
|
68
|
-
updateTime: "2018-09-08 16:33:19",
|
69
|
-
updateUser: 58,
|
70
|
-
username: "石洋ooooooo",
|
71
|
-
},
|
72
|
-
{
|
73
|
-
createTime: "2018-06-02 12:28:47",
|
74
|
-
createUser: 94,
|
75
|
-
id: 56,
|
76
|
-
idNumber: "8",
|
77
|
-
name: "识间华中张认ooooooooooooooo",
|
78
|
-
password: "sed laboris",
|
79
|
-
phone: "18157668675",
|
80
|
-
gender: "男",
|
81
|
-
age: 20,
|
82
|
-
status: 35,
|
83
|
-
updateTime: "2018-09-08 16:33:19",
|
84
|
-
updateUser: 58,
|
85
|
-
username: "石洋oooooooooooooooo",
|
86
|
-
},
|
87
|
-
{
|
88
|
-
createTime: "2018-06-02 12:28:47",
|
89
|
-
createUser: 94,
|
90
|
-
id: 56,
|
91
|
-
idNumber: "8",
|
92
|
-
name: "识间华中张认oooooooooooooooooooooooooooooooooo",
|
93
|
-
password: "sed laboris",
|
94
|
-
phone: "18157668675",
|
95
|
-
gender: "男",
|
96
|
-
age: 20,
|
97
|
-
status: 35,
|
98
|
-
updateTime: "2018-09-08 16:33:19",
|
99
|
-
updateUser: 58,
|
100
|
-
username: "石洋312312312______-----ooooooooooooooooooo",
|
101
|
-
},
|
102
|
-
],
|
103
|
-
};
|
104
|
-
},
|
105
|
-
methods: {},
|
106
|
-
};
|
107
|
-
</script>
|
@@ -1,65 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<sc-crud :search.sync="searchForm" :options="options" :data="data">
|
4
|
-
<template #handleRow-left="{size}">
|
5
|
-
<el-button :size="size">handleRow插槽</el-button>
|
6
|
-
</template>
|
7
|
-
</sc-crud>
|
8
|
-
</div>
|
9
|
-
</template>
|
10
|
-
|
11
|
-
<script>
|
12
|
-
export default {
|
13
|
-
data() {
|
14
|
-
return {
|
15
|
-
searchForm: {},
|
16
|
-
options: {
|
17
|
-
rowEdit: true,
|
18
|
-
handleRow: {
|
19
|
-
add: {
|
20
|
-
label: "自定义弹窗新增",
|
21
|
-
}, // 自定义弹窗新增按钮
|
22
|
-
batchDelete: {
|
23
|
-
label: "自定义批量删除",
|
24
|
-
}, // 自定义批量删除按钮
|
25
|
-
rowAdd: {
|
26
|
-
label: "定义行新增",
|
27
|
-
}, // 自定义行新增按钮
|
28
|
-
},
|
29
|
-
renderColumns: [
|
30
|
-
{ prop: "name", label: "昵称", search: true },
|
31
|
-
{
|
32
|
-
prop: "username",
|
33
|
-
label: "姓名",
|
34
|
-
search: {
|
35
|
-
name: "el-date-picker",
|
36
|
-
},
|
37
|
-
},
|
38
|
-
{
|
39
|
-
prop: "gender",
|
40
|
-
label: "性别",
|
41
|
-
},
|
42
|
-
],
|
43
|
-
},
|
44
|
-
data: [
|
45
|
-
{
|
46
|
-
createTime: "2018-06-02 12:28:47",
|
47
|
-
createUser: 94,
|
48
|
-
id: 56,
|
49
|
-
idNumber: "8",
|
50
|
-
name: "识间华中张认",
|
51
|
-
password: "sed laboris",
|
52
|
-
phone: "18157668675",
|
53
|
-
gender: "男",
|
54
|
-
age: 20,
|
55
|
-
status: 35,
|
56
|
-
updateTime: "2018-09-08 16:33:19",
|
57
|
-
updateUser: 58,
|
58
|
-
username: "石洋",
|
59
|
-
},
|
60
|
-
],
|
61
|
-
};
|
62
|
-
},
|
63
|
-
methods: {},
|
64
|
-
};
|
65
|
-
</script>
|
@@ -1,82 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<sc-crud :search.sync="searchForm" :options="options" :data="data">
|
4
|
-
</sc-crud>
|
5
|
-
</div>
|
6
|
-
</template>
|
7
|
-
|
8
|
-
<script>
|
9
|
-
export default {
|
10
|
-
data() {
|
11
|
-
return {
|
12
|
-
searchForm: {},
|
13
|
-
options: {
|
14
|
-
height: "300px", // 设置为`auto`,会自适应窗口高度,配合calcHeight参数去调节范围
|
15
|
-
calcHeight: 0, // 值为应减去的底部高度
|
16
|
-
renderColumns: [
|
17
|
-
{ prop: "name", label: "昵称", search: true },
|
18
|
-
{
|
19
|
-
label: "信息",
|
20
|
-
children: [
|
21
|
-
// 表头子级
|
22
|
-
{
|
23
|
-
prop: "username",
|
24
|
-
label: "姓名",
|
25
|
-
search: {
|
26
|
-
comp: {
|
27
|
-
name: "el-date-picker",
|
28
|
-
},
|
29
|
-
},
|
30
|
-
children: [
|
31
|
-
{
|
32
|
-
prop: "username",
|
33
|
-
label: "姓名",
|
34
|
-
search: {
|
35
|
-
comp: {
|
36
|
-
name: "el-date-picker",
|
37
|
-
},
|
38
|
-
},
|
39
|
-
},
|
40
|
-
{
|
41
|
-
prop: "gender",
|
42
|
-
label: "性别",
|
43
|
-
},
|
44
|
-
],
|
45
|
-
},
|
46
|
-
{
|
47
|
-
prop: "gender",
|
48
|
-
label: "性别",
|
49
|
-
},
|
50
|
-
],
|
51
|
-
},
|
52
|
-
],
|
53
|
-
},
|
54
|
-
data: [
|
55
|
-
{
|
56
|
-
createTime: "2018-06-02 12:28:47",
|
57
|
-
createUser: 94,
|
58
|
-
id: 56,
|
59
|
-
idNumber: "8",
|
60
|
-
name: "识间华中张认",
|
61
|
-
password: "sed laboris",
|
62
|
-
phone: "18157668675",
|
63
|
-
gender: "男",
|
64
|
-
age: 20,
|
65
|
-
status: 35,
|
66
|
-
updateTime: "2018-09-08 16:33:19",
|
67
|
-
updateUser: 58,
|
68
|
-
username: "石洋",
|
69
|
-
},
|
70
|
-
],
|
71
|
-
};
|
72
|
-
},
|
73
|
-
mounted() {
|
74
|
-
const dataRepeated = [];
|
75
|
-
for (let i = 0; i < 50; i++) {
|
76
|
-
dataRepeated.push(Object.assign({}, this.data[0]));
|
77
|
-
}
|
78
|
-
this.data = dataRepeated;
|
79
|
-
},
|
80
|
-
methods: {},
|
81
|
-
};
|
82
|
-
</script>
|
@@ -1,54 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<sc-crud :search.sync="searchForm" :options="options" :data="data">
|
4
|
-
</sc-crud>
|
5
|
-
</div>
|
6
|
-
</template>
|
7
|
-
|
8
|
-
<script>
|
9
|
-
export default {
|
10
|
-
data() {
|
11
|
-
return {
|
12
|
-
searchForm: {},
|
13
|
-
options: {
|
14
|
-
index: {
|
15
|
-
label: "序号",
|
16
|
-
},
|
17
|
-
expand: true,
|
18
|
-
renderColumns: [
|
19
|
-
{ prop: "name", label: "昵称", search: true },
|
20
|
-
{
|
21
|
-
prop: "username",
|
22
|
-
label: "姓名",
|
23
|
-
search: {
|
24
|
-
name: "el-date-picker",
|
25
|
-
},
|
26
|
-
},
|
27
|
-
{
|
28
|
-
prop: "gender",
|
29
|
-
label: "性别",
|
30
|
-
},
|
31
|
-
],
|
32
|
-
},
|
33
|
-
data: [
|
34
|
-
{
|
35
|
-
createTime: "2018-06-02 12:28:47",
|
36
|
-
createUser: 94,
|
37
|
-
id: 56,
|
38
|
-
idNumber: "8",
|
39
|
-
name: "识间华中张认",
|
40
|
-
password: "sed laboris",
|
41
|
-
phone: "18157668675",
|
42
|
-
gender: "男",
|
43
|
-
age: 20,
|
44
|
-
status: 35,
|
45
|
-
updateTime: "2018-09-08 16:33:19",
|
46
|
-
updateUser: 58,
|
47
|
-
username: "石洋",
|
48
|
-
},
|
49
|
-
],
|
50
|
-
};
|
51
|
-
},
|
52
|
-
methods: {},
|
53
|
-
};
|
54
|
-
</script>
|
@@ -1,70 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<el-button type="primary" @click="loading = !loading"
|
4
|
-
>切换loading</el-button
|
5
|
-
>
|
6
|
-
<sc-crud
|
7
|
-
:search.sync="searchForm"
|
8
|
-
:options="options"
|
9
|
-
:data="data"
|
10
|
-
:loading.sync="loading"
|
11
|
-
>
|
12
|
-
</sc-crud>
|
13
|
-
</div>
|
14
|
-
</template>
|
15
|
-
|
16
|
-
<script>
|
17
|
-
export default {
|
18
|
-
data() {
|
19
|
-
return {
|
20
|
-
loading: true,
|
21
|
-
searchForm: {},
|
22
|
-
options: {
|
23
|
-
loadingText: "拼命加载中...",
|
24
|
-
loadingSpinner: "el-icon-loading",
|
25
|
-
loadingBackground: "rgba(0, 0, 0, 0.8)",
|
26
|
-
disableLoading: true, //禁用组件内部控制加载状态
|
27
|
-
handleRow: [
|
28
|
-
{
|
29
|
-
label: "组件按钮",
|
30
|
-
type: "primary",
|
31
|
-
},
|
32
|
-
],
|
33
|
-
renderColumns: [
|
34
|
-
{ prop: "name", label: "昵称", search: true },
|
35
|
-
{
|
36
|
-
prop: "username",
|
37
|
-
label: "姓名",
|
38
|
-
search: {
|
39
|
-
name: "el-date-picker",
|
40
|
-
},
|
41
|
-
},
|
42
|
-
{
|
43
|
-
prop: "gender",
|
44
|
-
label: "性别",
|
45
|
-
},
|
46
|
-
],
|
47
|
-
},
|
48
|
-
data: [
|
49
|
-
{
|
50
|
-
createTime: "2018-06-02 12:28:47",
|
51
|
-
createUser: 94,
|
52
|
-
id: 56,
|
53
|
-
idNumber: "8",
|
54
|
-
name: "识间华中张认",
|
55
|
-
password: "sed laboris",
|
56
|
-
phone: "18157668675",
|
57
|
-
gender: "男",
|
58
|
-
age: 20,
|
59
|
-
status: 35,
|
60
|
-
updateTime: "2018-09-08 16:33:19",
|
61
|
-
updateUser: 58,
|
62
|
-
username: "石洋",
|
63
|
-
},
|
64
|
-
],
|
65
|
-
};
|
66
|
-
},
|
67
|
-
mounted() {},
|
68
|
-
methods: {},
|
69
|
-
};
|
70
|
-
</script>
|