t20-common-lib 0.7.7 → 0.7.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "t20-common-lib",
3
- "version": "0.7.7",
3
+ "version": "0.7.10",
4
4
  "description": "T20",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -30,6 +30,7 @@
30
30
  "dependencies": {
31
31
  "core-js": "^2.6.12",
32
32
  "element-ui": "^2.15.13",
33
+ "highlight.js": "^11.11.1",
33
34
  "n20-common-lib": "^2.16.24",
34
35
  "normalize.css": "^8.0.1",
35
36
  "vue": "^2.6.14",
@@ -60,7 +61,8 @@
60
61
  "rimraf": "^3.0.2",
61
62
  "sass-loader": "^8.0.2",
62
63
  "vue-template-compiler": "^2.6.14",
63
- "vuepress": "^1.9.7"
64
+ "vuepress": "^1.9.7",
65
+ "vuepress-plugin-demo-block": "^0.7.2"
64
66
  },
65
67
  "eslintConfig": {
66
68
  "root": true,
@@ -0,0 +1,8 @@
1
+ import FormPage from './src/main';
2
+
3
+ /* istanbul ignore next */
4
+ FormPage.install = function(Vue) {
5
+ Vue.component(FormPage.name, FormPage);
6
+ };
7
+
8
+ export default FormPage;
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <div class="t20-form flex-column">
3
+ <div class="m-b-s" v-if="$slots.header">
4
+ <slot name="header"></slot>
5
+ </div>
6
+ <div class="n20-page-content flex-item">
7
+ <!--
8
+ 锚点 + 表单
9
+ <N20-anchor v-model="action" position="right">
10
+ <el-form
11
+ class="label-width-16em"
12
+ :model="formData"
13
+ :rules="rules"
14
+ label-width="16em"
15
+ >
16
+ <N20-anchor-item :title="$l('基本信息')" id="1">
17
+ <el-form-item :label="$l('支付工具')" prop="settlementTools"></el-form-item>
18
+ </N20-anchor-item>
19
+ </el-form>
20
+ </N20-anchor>
21
+ -->
22
+ <slot></slot>
23
+ </div>
24
+ <div class="t20-page-button-shadow flex-box flex-c flex-v" v-if="$slots.footer">
25
+ <slot name="footer"></slot>
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <script>
31
+ export default {
32
+ name: 'FormPage'
33
+ }
34
+ </script>
35
+
36
+ <style lang="scss" scoped>
37
+ .t20-form {
38
+ padding: 8px 8px 0 !important;
39
+ background-color: #ffffff !important;
40
+ }
41
+
42
+ .t20-page-button-shadow {
43
+ position: relative;
44
+ height: 44px;
45
+ &::before {
46
+ content: "";
47
+ pointer-events: none;
48
+ position: absolute;
49
+ top: 0;
50
+ height: 100%;
51
+ left: -8px;
52
+ right: -8px;
53
+ box-shadow: 0 -2px 6px 0 rgba(0, 0, 0, .08);
54
+ }
55
+ }
56
+ </style>
@@ -0,0 +1,8 @@
1
+ import PageHeader from './src/main';
2
+
3
+ /* istanbul ignore next */
4
+ PageHeader.install = function(Vue) {
5
+ Vue.component(PageHeader.name, PageHeader);
6
+ };
7
+
8
+ export default PageHeader;
@@ -0,0 +1,94 @@
1
+ <template>
2
+ <div class="t20-page-header">
3
+ <div v-if="!disable" class="page-header__left" @click="$emit('back')">
4
+ <i :class="icon"></i>
5
+ <div class="page-header__title">
6
+ <slot name="title">{{ title }}</slot>
7
+ </div>
8
+ </div>
9
+ <div class="page-header__content">
10
+ <slot name="content">{{ content }}</slot>
11
+ </div>
12
+ <div class="header-btn">
13
+ <slot name="headerButtons"></slot>
14
+ </div>
15
+ </div>
16
+ </template>
17
+
18
+ <script>
19
+ export default {
20
+ name: 'PageHeader',
21
+ props: {
22
+ title: {
23
+ type: String,
24
+ default() {
25
+ return ''
26
+ }
27
+ },
28
+ content: {
29
+ type: String,
30
+ default: ''
31
+ },
32
+ disable: {
33
+ type: Boolean,
34
+ default: false
35
+ },
36
+ icon: {
37
+ type: String,
38
+ default: 'n20-icon-yuefenqiehuan-zuoce'
39
+ }
40
+ }
41
+ }
42
+ </script>
43
+
44
+ <style lang="scss" scoped>
45
+ .t20-page-header {
46
+ display: flex;
47
+ line-height: 20px;
48
+ padding-bottom: 2px;
49
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
50
+
51
+ .page-header__left {
52
+ display: flex;
53
+ align-items: center;
54
+ cursor: pointer;
55
+ margin-right: 16px;
56
+ position: relative;
57
+ }
58
+
59
+ .page-header__left:hover {
60
+ color: var(--color-primary);
61
+
62
+ .page-header__title {
63
+ color: var(--color-primary);
64
+ }
65
+ }
66
+
67
+ .page-header__left:after {
68
+ content: '';
69
+ position: absolute;
70
+ width: 1px;
71
+ height: 16px;
72
+ right: -8px;
73
+ top: 50%;
74
+ transform: translateY(-50%);
75
+ background-color: #dcdfe6;
76
+ }
77
+
78
+ .page-header__title {
79
+ font-size: 14px;
80
+ line-height: 20px;
81
+ color: #3d4a57;
82
+ }
83
+
84
+ .page-header__content {
85
+ font-size: 14px;
86
+ line-height: 26px;
87
+ color: #3d4a57;
88
+ }
89
+
90
+ .header-btn {
91
+ margin-left: auto;
92
+ }
93
+ }
94
+ </style>
package/src/index.js CHANGED
@@ -5,17 +5,21 @@ import { getColumnWidth, getCellAlign } from './utils/tableCellUtils'
5
5
  // 导入组件
6
6
  import MainPage from '../packages/main-page/index.js'
7
7
  import TablePage from '../packages/table-page/index.js'
8
+ import FormPage from '../packages/form-page/index.js'
8
9
  import TabPane from '../packages/tab-pane/index.js'
9
10
  import StatisCard from '../packages/statis-card/index.js'
11
+ import PageHeader from '../packages/page-header/index.js'
10
12
  import CommonCollapse from '../packages/common-collapse/index.js'
11
13
 
12
14
  // 存储组件列表
13
15
  const components = [
14
16
  MainPage,
15
17
  TablePage,
18
+ FormPage,
16
19
  TabPane,
17
20
  StatisCard,
18
- CommonCollapse
21
+ CommonCollapse,
22
+ PageHeader
19
23
  ]
20
24
 
21
25
  // 定义 install 方法,接收 Vue 作为参数
@@ -46,9 +50,11 @@ export {
46
50
  // 以下是具体的组件列表
47
51
  MainPage,
48
52
  TablePage,
53
+ FormPage,
49
54
  StatisCard,
50
55
  CommonCollapse,
51
56
  TabPane,
57
+ PageHeader,
52
58
  repairEl,
53
59
  getColumnWidth,
54
60
  getCellAlign