vue-super-crud 1.7.1 → 1.7.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.
- 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/src/config/common.js +2 -1
- package/src/config/crud.js +3 -3
- package/src/index.js +4 -0
- package/src/template/formatData.js +75 -87
- 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
package/examples/index.html
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="">
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
7
|
-
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
8
|
-
<title><%= htmlWebpackPlugin.options.title %></title>
|
9
|
-
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
10
|
-
</head>
|
11
|
-
<body>
|
12
|
-
<noscript>
|
13
|
-
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
14
|
-
</noscript>
|
15
|
-
<div id="app"></div>
|
16
|
-
<!-- built files will be auto injected -->
|
17
|
-
</body>
|
18
|
-
</html>
|
package/examples/main.js
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
import Vue from "vue";
|
2
|
-
import App from "./App.vue";
|
3
|
-
import router from "./router";
|
4
|
-
import store from "./store";
|
5
|
-
|
6
|
-
import ElementUI from "element-ui";
|
7
|
-
import "element-ui/lib/theme-chalk/index.css";
|
8
|
-
import "#/styles/index.scss";
|
9
|
-
import "../styles/index.scss";
|
10
|
-
|
11
|
-
// import Package from "../lib/super-crud.min.js";
|
12
|
-
import Package from "../src/index";
|
13
|
-
|
14
|
-
Vue.use(ElementUI);
|
15
|
-
Vue.use(Package, {
|
16
|
-
dict: {
|
17
|
-
request: (key = "sys_notice_status", cb) => {
|
18
|
-
console.log("req");
|
19
|
-
axios({
|
20
|
-
url: "api/system/dict/data/type/" + key,
|
21
|
-
method: "get",
|
22
|
-
headers: {
|
23
|
-
Authorization:
|
24
|
-
"Bearer " +
|
25
|
-
"eyJhbGciOiJIUzUxMiJ9.eyJ0ZW5hbnRfaWQiOjEsInVzZXJfaWQiOjEsInVzZXJfa2V5IjoiNTA0N2JjNDctMjViMS00NDhhLWFlNTUtN2UxMzUwNDVhMDFlIiwidXNlcm5hbWUiOiJhZG1pbiJ9.EKQ4YAUjk0_TNcLNCM5WRU52gxAYQOEuhDQ7WotmgYfCPZvTbdgehs8KhJdfEU6casSR4FvGDi-q8TOG_HLJKQ",
|
26
|
-
},
|
27
|
-
}).then((res) => {
|
28
|
-
cb(res.data.data);
|
29
|
-
});
|
30
|
-
},
|
31
|
-
value: "dictValue",
|
32
|
-
label: "dictLabel",
|
33
|
-
color: "listClass",
|
34
|
-
},
|
35
|
-
template: {
|
36
|
-
render: {
|
37
|
-
test: (item) => {
|
38
|
-
return {
|
39
|
-
render: (h) => {
|
40
|
-
return h("div", "1111");
|
41
|
-
},
|
42
|
-
};
|
43
|
-
},
|
44
|
-
},
|
45
|
-
},
|
46
|
-
});
|
47
|
-
|
48
|
-
Vue.config.productionTip = false;
|
49
|
-
|
50
|
-
new Vue({
|
51
|
-
router,
|
52
|
-
store,
|
53
|
-
render: (h) => h(App),
|
54
|
-
}).$mount("#app");
|
package/examples/router/index.js
DELETED
@@ -1,140 +0,0 @@
|
|
1
|
-
import Vue from "vue";
|
2
|
-
import VueRouter from "vue-router";
|
3
|
-
import Layout from "../Layout";
|
4
|
-
|
5
|
-
Vue.use(VueRouter);
|
6
|
-
|
7
|
-
const routes = [
|
8
|
-
{
|
9
|
-
path: "/crud",
|
10
|
-
component: Layout,
|
11
|
-
redirect: "/crud/index",
|
12
|
-
children: [
|
13
|
-
{
|
14
|
-
path: "base",
|
15
|
-
name: "base",
|
16
|
-
component: () => import("#/views/crud/base"),
|
17
|
-
meta: { title: "基本使用" },
|
18
|
-
},
|
19
|
-
{
|
20
|
-
path: "search",
|
21
|
-
name: "search",
|
22
|
-
component: () => import("#/views/crud/search"),
|
23
|
-
meta: { title: "搜索" },
|
24
|
-
},
|
25
|
-
{
|
26
|
-
path: "handleRow",
|
27
|
-
name: "handleRow",
|
28
|
-
component: () => import("#/views/crud/handleRow"),
|
29
|
-
meta: { title: "表头操作栏" },
|
30
|
-
},
|
31
|
-
],
|
32
|
-
},
|
33
|
-
{
|
34
|
-
path: "/",
|
35
|
-
component: Layout,
|
36
|
-
redirect: "/dashboard",
|
37
|
-
children: [
|
38
|
-
{
|
39
|
-
path: "dashboard",
|
40
|
-
name: "Dashboard",
|
41
|
-
component: () => import("#/views/dashboard/index"),
|
42
|
-
meta: { title: "Dashboard", icon: "dashboard" },
|
43
|
-
},
|
44
|
-
{
|
45
|
-
path: "dashboard1",
|
46
|
-
name: "Dashboard1",
|
47
|
-
component: () => import("#/views/dashboard/index1"),
|
48
|
-
meta: { title: "Dashboard", icon: "dashboard" },
|
49
|
-
},
|
50
|
-
{
|
51
|
-
path: "formTest",
|
52
|
-
name: "formTest",
|
53
|
-
component: () => import("#/views/formTest/index"),
|
54
|
-
meta: { title: "formTest" },
|
55
|
-
},
|
56
|
-
],
|
57
|
-
},
|
58
|
-
|
59
|
-
{
|
60
|
-
path: "/nested",
|
61
|
-
component: Layout,
|
62
|
-
redirect: "/nested/menu1",
|
63
|
-
name: "Nested",
|
64
|
-
meta: {
|
65
|
-
title: "Nested",
|
66
|
-
icon: "nested",
|
67
|
-
},
|
68
|
-
children: [
|
69
|
-
{
|
70
|
-
path: "menu1",
|
71
|
-
component: () => import("#/views/nested/menu1/index"), // Parent router-view
|
72
|
-
name: "Menu1",
|
73
|
-
meta: { title: "Menu1" },
|
74
|
-
children: [
|
75
|
-
{
|
76
|
-
path: "menu1-1",
|
77
|
-
component: () => import("#/views/nested/menu1/menu1-1"),
|
78
|
-
name: "Menu1-1",
|
79
|
-
meta: { title: "Menu1-1" },
|
80
|
-
},
|
81
|
-
{
|
82
|
-
path: "menu1-2",
|
83
|
-
component: () => import("#/views/nested/menu1/menu1-2"),
|
84
|
-
name: "Menu1-2",
|
85
|
-
meta: { title: "Menu1-2" },
|
86
|
-
children: [
|
87
|
-
{
|
88
|
-
path: "menu1-2-1",
|
89
|
-
component: () =>
|
90
|
-
import("#/views/nested/menu1/menu1-2/menu1-2-1"),
|
91
|
-
name: "Menu1-2-1",
|
92
|
-
meta: { title: "Menu1-2-1" },
|
93
|
-
},
|
94
|
-
{
|
95
|
-
path: "menu1-2-2",
|
96
|
-
component: () =>
|
97
|
-
import("#/views/nested/menu1/menu1-2/menu1-2-2"),
|
98
|
-
name: "Menu1-2-2",
|
99
|
-
meta: { title: "Menu1-2-2" },
|
100
|
-
},
|
101
|
-
],
|
102
|
-
},
|
103
|
-
{
|
104
|
-
path: "menu1-3",
|
105
|
-
component: () => import("#/views/nested/menu1/menu1-3"),
|
106
|
-
name: "Menu1-3",
|
107
|
-
meta: { title: "Menu1-3" },
|
108
|
-
},
|
109
|
-
],
|
110
|
-
},
|
111
|
-
{
|
112
|
-
path: "menu2",
|
113
|
-
name: "Menu2",
|
114
|
-
meta: { title: "menu2" },
|
115
|
-
},
|
116
|
-
],
|
117
|
-
},
|
118
|
-
|
119
|
-
{
|
120
|
-
path: "external-link",
|
121
|
-
component: Layout,
|
122
|
-
children: [
|
123
|
-
{
|
124
|
-
path: "https://panjiachen.github.io/vue-element-admin-site/#/",
|
125
|
-
meta: { title: "External Link", icon: "link" },
|
126
|
-
},
|
127
|
-
],
|
128
|
-
},
|
129
|
-
|
130
|
-
// 404 page must be placed at the end !!!
|
131
|
-
{ path: "*", redirect: "/404", hidden: true },
|
132
|
-
];
|
133
|
-
|
134
|
-
const router = new VueRouter({
|
135
|
-
mode: "history",
|
136
|
-
base: process.env.BASE_URL,
|
137
|
-
routes,
|
138
|
-
});
|
139
|
-
|
140
|
-
export default router;
|
package/examples/store/index.js
DELETED
File without changes
|
@@ -1,63 +0,0 @@
|
|
1
|
-
@import './variables.scss';
|
2
|
-
@import './transition.scss';
|
3
|
-
@import './sidebar.scss';
|
4
|
-
|
5
|
-
body {
|
6
|
-
height: 100%;
|
7
|
-
-moz-osx-font-smoothing: grayscale;
|
8
|
-
-webkit-font-smoothing: antialiased;
|
9
|
-
text-rendering: optimizeLegibility;
|
10
|
-
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
11
|
-
}
|
12
|
-
|
13
|
-
label {
|
14
|
-
font-weight: 700;
|
15
|
-
}
|
16
|
-
|
17
|
-
html {
|
18
|
-
height: 100%;
|
19
|
-
box-sizing: border-box;
|
20
|
-
}
|
21
|
-
|
22
|
-
#app {
|
23
|
-
height: 100%;
|
24
|
-
}
|
25
|
-
|
26
|
-
*,
|
27
|
-
*:before,
|
28
|
-
*:after {
|
29
|
-
box-sizing: inherit;
|
30
|
-
}
|
31
|
-
|
32
|
-
a:focus,
|
33
|
-
a:active {
|
34
|
-
outline: none;
|
35
|
-
}
|
36
|
-
|
37
|
-
a,
|
38
|
-
a:focus,
|
39
|
-
a:hover {
|
40
|
-
cursor: pointer;
|
41
|
-
color: inherit;
|
42
|
-
text-decoration: none;
|
43
|
-
}
|
44
|
-
|
45
|
-
div:focus {
|
46
|
-
outline: none;
|
47
|
-
}
|
48
|
-
|
49
|
-
.clearfix {
|
50
|
-
&:after {
|
51
|
-
visibility: hidden;
|
52
|
-
display: block;
|
53
|
-
font-size: 0;
|
54
|
-
content: " ";
|
55
|
-
clear: both;
|
56
|
-
height: 0;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
// main-container global css
|
61
|
-
.app-container {
|
62
|
-
padding: 20px;
|
63
|
-
}
|
@@ -1,226 +0,0 @@
|
|
1
|
-
#app {
|
2
|
-
|
3
|
-
.main-container {
|
4
|
-
min-height: 100%;
|
5
|
-
transition: margin-left .28s;
|
6
|
-
margin-left: $sideBarWidth;
|
7
|
-
position: relative;
|
8
|
-
}
|
9
|
-
|
10
|
-
.sidebar-container {
|
11
|
-
transition: width 0.28s;
|
12
|
-
width: $sideBarWidth !important;
|
13
|
-
background-color: $menuBg;
|
14
|
-
height: 100%;
|
15
|
-
position: fixed;
|
16
|
-
font-size: 0px;
|
17
|
-
top: 0;
|
18
|
-
bottom: 0;
|
19
|
-
left: 0;
|
20
|
-
z-index: 1001;
|
21
|
-
overflow: hidden;
|
22
|
-
|
23
|
-
// reset element-ui css
|
24
|
-
.horizontal-collapse-transition {
|
25
|
-
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
|
26
|
-
}
|
27
|
-
|
28
|
-
.scrollbar-wrapper {
|
29
|
-
overflow-x: hidden !important;
|
30
|
-
}
|
31
|
-
|
32
|
-
.el-scrollbar__bar.is-vertical {
|
33
|
-
right: 0px;
|
34
|
-
}
|
35
|
-
|
36
|
-
.el-scrollbar {
|
37
|
-
height: 100%;
|
38
|
-
}
|
39
|
-
|
40
|
-
&.has-logo {
|
41
|
-
.el-scrollbar {
|
42
|
-
height: calc(100% - 50px);
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
.is-horizontal {
|
47
|
-
display: none;
|
48
|
-
}
|
49
|
-
|
50
|
-
a {
|
51
|
-
display: inline-block;
|
52
|
-
width: 100%;
|
53
|
-
overflow: hidden;
|
54
|
-
}
|
55
|
-
|
56
|
-
.svg-icon {
|
57
|
-
margin-right: 16px;
|
58
|
-
}
|
59
|
-
|
60
|
-
.sub-el-icon {
|
61
|
-
margin-right: 12px;
|
62
|
-
margin-left: -2px;
|
63
|
-
}
|
64
|
-
|
65
|
-
.el-menu {
|
66
|
-
border: none;
|
67
|
-
height: 100%;
|
68
|
-
width: 100% !important;
|
69
|
-
}
|
70
|
-
|
71
|
-
// menu hover
|
72
|
-
.submenu-title-noDropdown,
|
73
|
-
.el-submenu__title {
|
74
|
-
&:hover {
|
75
|
-
background-color: $menuHover !important;
|
76
|
-
}
|
77
|
-
}
|
78
|
-
|
79
|
-
.is-active>.el-submenu__title {
|
80
|
-
color: $subMenuActiveText !important;
|
81
|
-
}
|
82
|
-
|
83
|
-
& .nest-menu .el-submenu>.el-submenu__title,
|
84
|
-
& .el-submenu .el-menu-item {
|
85
|
-
min-width: $sideBarWidth !important;
|
86
|
-
background-color: $subMenuBg !important;
|
87
|
-
|
88
|
-
&:hover {
|
89
|
-
background-color: $subMenuHover !important;
|
90
|
-
}
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
|
-
.hideSidebar {
|
95
|
-
.sidebar-container {
|
96
|
-
width: 54px !important;
|
97
|
-
}
|
98
|
-
|
99
|
-
.main-container {
|
100
|
-
margin-left: 54px;
|
101
|
-
}
|
102
|
-
|
103
|
-
.submenu-title-noDropdown {
|
104
|
-
padding: 0 !important;
|
105
|
-
position: relative;
|
106
|
-
|
107
|
-
.el-tooltip {
|
108
|
-
padding: 0 !important;
|
109
|
-
|
110
|
-
.svg-icon {
|
111
|
-
margin-left: 20px;
|
112
|
-
}
|
113
|
-
|
114
|
-
.sub-el-icon {
|
115
|
-
margin-left: 19px;
|
116
|
-
}
|
117
|
-
}
|
118
|
-
}
|
119
|
-
|
120
|
-
.el-submenu {
|
121
|
-
overflow: hidden;
|
122
|
-
|
123
|
-
&>.el-submenu__title {
|
124
|
-
padding: 0 !important;
|
125
|
-
|
126
|
-
.svg-icon {
|
127
|
-
margin-left: 20px;
|
128
|
-
}
|
129
|
-
|
130
|
-
.sub-el-icon {
|
131
|
-
margin-left: 19px;
|
132
|
-
}
|
133
|
-
|
134
|
-
.el-submenu__icon-arrow {
|
135
|
-
display: none;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
}
|
139
|
-
|
140
|
-
.el-menu--collapse {
|
141
|
-
.el-submenu {
|
142
|
-
&>.el-submenu__title {
|
143
|
-
&>span {
|
144
|
-
height: 0;
|
145
|
-
width: 0;
|
146
|
-
overflow: hidden;
|
147
|
-
visibility: hidden;
|
148
|
-
display: inline-block;
|
149
|
-
}
|
150
|
-
}
|
151
|
-
}
|
152
|
-
}
|
153
|
-
}
|
154
|
-
|
155
|
-
.el-menu--collapse .el-menu .el-submenu {
|
156
|
-
min-width: $sideBarWidth !important;
|
157
|
-
}
|
158
|
-
|
159
|
-
// mobile responsive
|
160
|
-
.mobile {
|
161
|
-
.main-container {
|
162
|
-
margin-left: 0px;
|
163
|
-
}
|
164
|
-
|
165
|
-
.sidebar-container {
|
166
|
-
transition: transform .28s;
|
167
|
-
width: $sideBarWidth !important;
|
168
|
-
}
|
169
|
-
|
170
|
-
&.hideSidebar {
|
171
|
-
.sidebar-container {
|
172
|
-
pointer-events: none;
|
173
|
-
transition-duration: 0.3s;
|
174
|
-
transform: translate3d(-$sideBarWidth, 0, 0);
|
175
|
-
}
|
176
|
-
}
|
177
|
-
}
|
178
|
-
|
179
|
-
.withoutAnimation {
|
180
|
-
|
181
|
-
.main-container,
|
182
|
-
.sidebar-container {
|
183
|
-
transition: none;
|
184
|
-
}
|
185
|
-
}
|
186
|
-
}
|
187
|
-
|
188
|
-
// when menu collapsed
|
189
|
-
.el-menu--vertical {
|
190
|
-
&>.el-menu {
|
191
|
-
.svg-icon {
|
192
|
-
margin-right: 16px;
|
193
|
-
}
|
194
|
-
.sub-el-icon {
|
195
|
-
margin-right: 12px;
|
196
|
-
margin-left: -2px;
|
197
|
-
}
|
198
|
-
}
|
199
|
-
|
200
|
-
.nest-menu .el-submenu>.el-submenu__title,
|
201
|
-
.el-menu-item {
|
202
|
-
&:hover {
|
203
|
-
// you can use $subMenuHover
|
204
|
-
background-color: $menuHover !important;
|
205
|
-
}
|
206
|
-
}
|
207
|
-
|
208
|
-
// the scroll bar appears when the subMenu is too long
|
209
|
-
>.el-menu--popup {
|
210
|
-
max-height: 100vh;
|
211
|
-
overflow-y: auto;
|
212
|
-
|
213
|
-
&::-webkit-scrollbar-track-piece {
|
214
|
-
background: #d3dce6;
|
215
|
-
}
|
216
|
-
|
217
|
-
&::-webkit-scrollbar {
|
218
|
-
width: 6px;
|
219
|
-
}
|
220
|
-
|
221
|
-
&::-webkit-scrollbar-thumb {
|
222
|
-
background: #99a9bf;
|
223
|
-
border-radius: 20px;
|
224
|
-
}
|
225
|
-
}
|
226
|
-
}
|
@@ -1,48 +0,0 @@
|
|
1
|
-
// global transition css
|
2
|
-
|
3
|
-
/* fade */
|
4
|
-
.fade-enter-active,
|
5
|
-
.fade-leave-active {
|
6
|
-
transition: opacity 0.28s;
|
7
|
-
}
|
8
|
-
|
9
|
-
.fade-enter,
|
10
|
-
.fade-leave-active {
|
11
|
-
opacity: 0;
|
12
|
-
}
|
13
|
-
|
14
|
-
/* fade-transform */
|
15
|
-
.fade-transform-leave-active,
|
16
|
-
.fade-transform-enter-active {
|
17
|
-
transition: all .5s;
|
18
|
-
}
|
19
|
-
|
20
|
-
.fade-transform-enter {
|
21
|
-
opacity: 0;
|
22
|
-
transform: translateX(-30px);
|
23
|
-
}
|
24
|
-
|
25
|
-
.fade-transform-leave-to {
|
26
|
-
opacity: 0;
|
27
|
-
transform: translateX(30px);
|
28
|
-
}
|
29
|
-
|
30
|
-
/* breadcrumb transition */
|
31
|
-
.breadcrumb-enter-active,
|
32
|
-
.breadcrumb-leave-active {
|
33
|
-
transition: all .5s;
|
34
|
-
}
|
35
|
-
|
36
|
-
.breadcrumb-enter,
|
37
|
-
.breadcrumb-leave-active {
|
38
|
-
opacity: 0;
|
39
|
-
transform: translateX(20px);
|
40
|
-
}
|
41
|
-
|
42
|
-
.breadcrumb-move {
|
43
|
-
transition: all .5s;
|
44
|
-
}
|
45
|
-
|
46
|
-
.breadcrumb-leave-active {
|
47
|
-
position: absolute;
|
48
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
// sidebar
|
2
|
-
$menuText:#bfcbd9;
|
3
|
-
$menuActiveText:#409EFF;
|
4
|
-
$subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951
|
5
|
-
|
6
|
-
$menuBg:#304156;
|
7
|
-
$menuHover:#263445;
|
8
|
-
|
9
|
-
$subMenuBg:#1f2d3d;
|
10
|
-
$subMenuHover:#001528;
|
11
|
-
|
12
|
-
$sideBarWidth: 210px;
|
13
|
-
|
14
|
-
// the :export directive is the magic sauce for webpack
|
15
|
-
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
16
|
-
:export {
|
17
|
-
menuText: $menuText;
|
18
|
-
menuActiveText: $menuActiveText;
|
19
|
-
subMenuActiveText: $subMenuActiveText;
|
20
|
-
menuBg: $menuBg;
|
21
|
-
menuHover: $menuHover;
|
22
|
-
subMenuBg: $subMenuBg;
|
23
|
-
subMenuHover: $subMenuHover;
|
24
|
-
sideBarWidth: $sideBarWidth;
|
25
|
-
}
|
@@ -1,68 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<sc-crud :options="options" :data="data">
|
3
|
-
<template #slot="{row}">
|
4
|
-
<div>
|
5
|
-
{{ row.slot + "slot" }}
|
6
|
-
</div>
|
7
|
-
</template>
|
8
|
-
</sc-crud>
|
9
|
-
</template>
|
10
|
-
|
11
|
-
<script>
|
12
|
-
export default {
|
13
|
-
/**
|
14
|
-
* 1
|
15
|
-
*
|
16
|
-
* **/
|
17
|
-
data() {
|
18
|
-
return {
|
19
|
-
data: [
|
20
|
-
{
|
21
|
-
id: "1",
|
22
|
-
default: "默认渲染",
|
23
|
-
formatter: "formatter",
|
24
|
-
slot: "插槽渲染",
|
25
|
-
comp: "组件渲染",
|
26
|
-
render: "",
|
27
|
-
},
|
28
|
-
],
|
29
|
-
options: {
|
30
|
-
pagination: true,
|
31
|
-
action: [
|
32
|
-
{
|
33
|
-
label: "操作",
|
34
|
-
icon: "el-icon-edit",
|
35
|
-
onClick: () => {},
|
36
|
-
},
|
37
|
-
],
|
38
|
-
renderColumns: [
|
39
|
-
{ prop: "default", label: "默认渲染" },
|
40
|
-
{
|
41
|
-
prop: "formatter",
|
42
|
-
label: "展示数据格式化",
|
43
|
-
formatter: (row) => row.formatter + "111",
|
44
|
-
},
|
45
|
-
{
|
46
|
-
prop: "slot",
|
47
|
-
label: "插槽渲染",
|
48
|
-
},
|
49
|
-
{
|
50
|
-
prop: "comp",
|
51
|
-
label: "组件渲染",
|
52
|
-
comp: {
|
53
|
-
name: "el-input",
|
54
|
-
},
|
55
|
-
},
|
56
|
-
{
|
57
|
-
prop: "render",
|
58
|
-
label: "render函数渲染",
|
59
|
-
render: (h, { row }) => <div>render渲染</div>,
|
60
|
-
},
|
61
|
-
],
|
62
|
-
},
|
63
|
-
};
|
64
|
-
},
|
65
|
-
};
|
66
|
-
</script>
|
67
|
-
|
68
|
-
<style lang="scss" scoped></style>
|