haiwei-ui 1.0.1 → 1.0.3
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/.prettierrc +6 -4
- package/README.md +95 -11
- package/package.json +1 -1
- package/packages/components/list/components/querybar/index.vue +32 -11
- package/packages/components/list/index.vue +9 -14
- package/src/api/config.js +1 -1
- package/src/components/code-preview/index.vue +56 -56
- package/src/components/tmpl/components/attributes/index.vue +3 -3
- package/src/components/tmpl/components/events/index.vue +3 -3
- package/src/components/tmpl/components/methods/index.vue +3 -3
- package/src/components/tmpl/components/slots/index.vue +3 -3
- package/src/components/tmpl/index.vue +42 -42
- package/src/style/element-ui.scss +4 -4
- package/src/views/components/advanced/details/_index/index.vue +16 -16
- package/src/views/components/advanced/details/demo1/demo.vue +42 -42
- package/src/views/components/advanced/details/demo1/index.vue +11 -11
- package/src/views/components/advanced/drag-sort/_index/index.vue +16 -16
- package/src/views/components/advanced/drag-sort/demo1/demo.vue +18 -18
- package/src/views/components/advanced/drag-sort/demo1/index.vue +11 -11
- package/src/views/components/advanced/drag-sort-dialog/_index/index.vue +16 -16
- package/src/views/components/advanced/drag-sort-dialog/demo1/demo.vue +24 -24
- package/src/views/components/advanced/drag-sort-dialog/demo1/index.vue +11 -11
- package/src/views/components/advanced/list/_index/index.vue +21 -21
- package/src/views/components/advanced/list/demo1/demo.vue +65 -65
- package/src/views/components/advanced/list/demo1/index.vue +11 -11
- package/src/views/components/advanced/list/demo2/demo.vue +52 -52
- package/src/views/components/advanced/list/demo2/index.vue +11 -11
- package/src/views/components/advanced/list/demo4/demo.vue +28 -28
- package/src/views/components/advanced/list/demo4/index.vue +11 -11
- package/src/views/components/advanced/list-dialog/_index/index.vue +21 -21
- package/src/views/components/advanced/list-dialog/demo1/demo.vue +48 -48
- package/src/views/components/advanced/list-dialog/demo1/index.vue +11 -11
- package/src/views/components/advanced/listbox/_index/index.vue +19 -19
- package/src/views/components/advanced/listbox/demo1/demo.vue +47 -47
- package/src/views/components/advanced/listbox/demo1/index.vue +11 -11
- package/src/views/components/base/box/_index/index.vue +22 -28
- package/src/views/components/base/box/demo1/index.vue +11 -11
- package/src/views/components/base/box/demo2/index.vue +11 -11
- package/src/views/components/base/box/demo3/demo.vue +15 -15
- package/src/views/components/base/box/demo3/index.vue +11 -11
- package/src/views/components/base/box/demo4/demo.vue +18 -24
- package/src/views/components/base/box/demo4/index.vue +11 -11
- package/src/views/components/base/box-col/_index/index.vue +17 -17
- package/src/views/components/base/box-col/demo1/index.vue +11 -11
- package/src/views/components/base/box-row/_index/index.vue +17 -17
- package/src/views/components/base/box-row/demo1/index.vue +11 -11
- package/src/views/components/base/box-small/_index/index.vue +17 -17
- package/src/views/components/base/box-small/demo1/demo.vue +30 -30
- package/src/views/components/base/box-small/demo1/index.vue +11 -11
- package/src/views/components/base/button/_index/index.vue +18 -18
- package/src/views/components/base/button/demo1/index.vue +11 -11
- package/src/views/components/base/button/demo2/demo.vue +53 -48
- package/src/views/components/base/button/demo2/index.vue +11 -11
- package/src/views/components/base/container/_index/index.vue +15 -15
- package/src/views/components/base/dialog/_index/index.vue +20 -20
- package/src/views/components/base/dialog/demo1/demo.vue +37 -37
- package/src/views/components/base/dialog/demo1/index.vue +11 -11
- package/src/views/components/base/drawer/_index/index.vue +18 -18
- package/src/views/components/base/drawer/demo1/demo.vue +8 -8
- package/src/views/components/base/drawer/demo1/index.vue +11 -11
- package/src/views/components/base/flex/_index/index.vue +17 -17
- package/src/views/components/base/flex/demo1/demo.vue +6 -6
- package/src/views/components/base/flex/demo1/index.vue +14 -14
- package/src/views/components/base/label/_index/index.vue +17 -17
- package/src/views/components/base/label/demo1/index.vue +14 -14
- package/src/views/components/base/scrollbar/_index/index.vue +17 -17
- package/src/views/components/base/scrollbar/demo1/demo.vue +47 -47
- package/src/views/components/base/scrollbar/demo1/index.vue +11 -11
- package/src/views/components/base/split/_index/index.vue +17 -17
- package/src/views/components/base/split/demo1/demo.vue +6 -6
- package/src/views/components/base/split/demo1/index.vue +11 -11
- package/src/views/components/base/tabs/_index/index.vue +21 -21
- package/src/views/components/base/tabs/demo1/demo.vue +47 -47
- package/src/views/components/base/tabs/demo1/index.vue +14 -14
- package/src/views/components/base/txt/_index/index.vue +17 -17
- package/src/views/components/base/txt/demo1/index.vue +14 -14
- package/src/views/components/form/checkbox-group/_index/index.vue +20 -20
- package/src/views/components/form/checkbox-group/demo1/demo.vue +35 -35
- package/src/views/components/form/checkbox-group/demo1/index.vue +11 -11
- package/src/views/components/form/color-picker/_index/index.vue +16 -16
- package/src/views/components/form/color-picker/demo1/demo.vue +10 -10
- package/src/views/components/form/color-picker/demo1/index.vue +11 -11
- package/src/views/components/form/date-range-picker/_index/index.vue +17 -17
- package/src/views/components/form/date-range-picker/demo1/demo.vue +21 -21
- package/src/views/components/form/date-range-picker/demo1/index.vue +11 -11
- package/src/views/components/form/form/_index/index.vue +18 -18
- package/src/views/components/form/form/demo1/demo.vue +33 -33
- package/src/views/components/form/form/demo1/index.vue +11 -11
- package/src/views/components/form/form-dialog/_index/index.vue +18 -18
- package/src/views/components/form/form-dialog/demo1/demo.vue +39 -39
- package/src/views/components/form/form-dialog/demo1/index.vue +14 -14
- package/src/views/components/form/form-page/_index/index.vue +18 -18
- package/src/views/components/form/form-page/demo1/demo.vue +19 -19
- package/src/views/components/form/form-page/demo1/index.vue +11 -11
- package/src/views/components/form/icon-picker/_index/index.vue +18 -17
- package/src/views/components/form/icon-picker/demo1/demo.vue +20 -20
- package/src/views/components/form/icon-picker/demo1/index.vue +11 -11
- package/src/views/components/form/select/_index/index.vue +19 -19
- package/src/views/components/form/select/demo1/demo.vue +39 -39
- package/src/views/components/form/select/demo1/index.vue +11 -11
- package/src/views/components/form/select/demo2/index.vue +6 -6
- package/src/views/components/map/map-coord-picking/_index/index.vue +22 -22
- package/src/views/components/map/map-coord-picking/demo1/demo.vue +23 -23
- package/src/views/components/map/map-coord-picking/demo1/index.vue +11 -11
- package/src/views/run/index.vue +37 -37
- package/vue.config.js +1 -1
package/.prettierrc
CHANGED
package/README.md
CHANGED
|
@@ -1,23 +1,107 @@
|
|
|
1
1
|
# HaiWei.UI
|
|
2
2
|
|
|
3
|
-
HaiWei.UI
|
|
3
|
+
HaiWei.UI 是一个基于 Vue2 + ElementUI 的业务模块化前端快速开发框架,提供丰富的组件库和灵活的模块化架构,帮助开发者快速构建企业级应用。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 主要特性
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### 🎯 核心架构
|
|
8
|
+
- **模块化设计** - 支持业务模块的独立开发和集成
|
|
9
|
+
- **组件化开发** - 基于 Vue2 的组件化开发模式
|
|
10
|
+
- **统一状态管理** - 使用 Vuex 进行全局状态管理
|
|
11
|
+
- **路由管理** - 支持动态路由和权限控制
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
### 🎨 UI 组件库
|
|
14
|
+
- **基础组件** - 丰富的表单、表格、弹窗等基础组件
|
|
15
|
+
- **业务组件** - 针对常见业务场景封装的专用组件
|
|
16
|
+
- **布局组件** - 灵活的页面布局和导航组件
|
|
17
|
+
- **图表组件** - 数据可视化图表组件
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
### 🔧 开发工具
|
|
20
|
+
- **开发服务器** - 内置开发服务器,支持热重载
|
|
21
|
+
- **构建工具** - 基于 Vue CLI 的现代化构建流程
|
|
22
|
+
- **代码规范** - 集成 ESLint 和 Prettier 代码规范
|
|
23
|
+
- **TypeScript 支持** - 可选 TypeScript 支持
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
### 🛠️ 功能模块
|
|
26
|
+
- **权限管理** - 基于角色的权限控制系统
|
|
27
|
+
- **皮肤主题** - 支持自定义皮肤和主题切换
|
|
28
|
+
- **登录页面** - 可定制的登录页面组件
|
|
29
|
+
- **数据管理** - 统一的数据请求和状态管理
|
|
16
30
|
|
|
17
|
-
|
|
31
|
+
### 📦 部署与发布
|
|
32
|
+
- **npm 发布** - 支持作为 npm 包发布和分发
|
|
33
|
+
- **模块集成** - 模块化的集成和依赖管理
|
|
34
|
+
- **构建优化** - 生产环境构建优化和代码压缩
|
|
18
35
|
|
|
19
|
-
|
|
20
|
-
npm i
|
|
36
|
+
## 快速开始
|
|
21
37
|
|
|
38
|
+
### 环境要求
|
|
39
|
+
- Node.js >= 12.0.0
|
|
40
|
+
- npm >= 6.0.0
|
|
41
|
+
|
|
42
|
+
### 安装依赖
|
|
43
|
+
```bash
|
|
44
|
+
npm install
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 开发模式
|
|
48
|
+
```bash
|
|
22
49
|
npm run serve
|
|
23
50
|
```
|
|
51
|
+
|
|
52
|
+
### 构建生产版本
|
|
53
|
+
```bash
|
|
54
|
+
npm run build
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 代码检查
|
|
58
|
+
```bash
|
|
59
|
+
npm run lint
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 项目结构
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
haiwei-ui/
|
|
66
|
+
├── packages/ # 核心包目录
|
|
67
|
+
│ ├── components/ # 组件库
|
|
68
|
+
│ ├── router/ # 路由配置
|
|
69
|
+
│ ├── store/ # 状态管理
|
|
70
|
+
│ ├── styles/ # 样式文件
|
|
71
|
+
│ └── utils/ # 工具函数
|
|
72
|
+
├── src/ # 源码目录
|
|
73
|
+
├── public/ # 静态资源
|
|
74
|
+
└── script/ # 构建脚本
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 可用脚本
|
|
78
|
+
|
|
79
|
+
- `npm run serve` - 启动开发服务器
|
|
80
|
+
- `npm run build` - 构建生产版本
|
|
81
|
+
- `npm run lint` - 代码规范检查
|
|
82
|
+
- `npm run i` - 使用淘宝镜像安装依赖
|
|
83
|
+
- `npm run up` - 使用淘宝镜像更新依赖
|
|
84
|
+
- `npm run pub` - 发布到 npm
|
|
85
|
+
- `npm run cm` - 清理 node_modules 和 dist 目录
|
|
86
|
+
- `npm run cc` - 清理 npm 缓存
|
|
87
|
+
|
|
88
|
+
## 技术栈
|
|
89
|
+
|
|
90
|
+
- **前端框架**: Vue 2.x
|
|
91
|
+
- **UI 组件库**: Element UI
|
|
92
|
+
- **状态管理**: Vuex
|
|
93
|
+
- **路由管理**: Vue Router
|
|
94
|
+
- **构建工具**: Vue CLI
|
|
95
|
+
- **包管理**: npm
|
|
96
|
+
|
|
97
|
+
## 浏览器支持
|
|
98
|
+
|
|
99
|
+
支持现代浏览器和 IE11+。
|
|
100
|
+
|
|
101
|
+
## 许可证
|
|
102
|
+
|
|
103
|
+
ISC License
|
|
104
|
+
|
|
105
|
+
## 贡献
|
|
106
|
+
|
|
107
|
+
欢迎提交 Issue 和 Pull Request!
|
package/package.json
CHANGED
|
@@ -64,7 +64,9 @@ export default {
|
|
|
64
64
|
data() {
|
|
65
65
|
return {
|
|
66
66
|
// 是否显示高级查询
|
|
67
|
-
showAdvanced: false
|
|
67
|
+
showAdvanced: false,
|
|
68
|
+
// 动态计算的高度
|
|
69
|
+
dynamicHeight: ''
|
|
68
70
|
}
|
|
69
71
|
},
|
|
70
72
|
props: {
|
|
@@ -104,17 +106,23 @@ export default {
|
|
|
104
106
|
advancedStyle() {
|
|
105
107
|
return {
|
|
106
108
|
width: this.advanced_.width,
|
|
107
|
-
height: this.advanced_.height
|
|
109
|
+
height: this.advanced_.height || this.dynamicHeight
|
|
108
110
|
}
|
|
109
111
|
}
|
|
110
112
|
},
|
|
111
113
|
methods: {
|
|
112
|
-
query() {
|
|
114
|
+
query() {
|
|
113
115
|
this.$parent.page.index = 1
|
|
114
116
|
this.$parent.query()
|
|
117
|
+
// 如果高级查询框显示,重新计算高度
|
|
118
|
+
if (this.showAdvanced && !this.advanced_.height) {
|
|
119
|
+
this.$nextTick(() => {
|
|
120
|
+
this.calculateAdvancedHeight()
|
|
121
|
+
})
|
|
122
|
+
}
|
|
115
123
|
},
|
|
116
124
|
/** 表单重置 */
|
|
117
|
-
reset() {
|
|
125
|
+
reset() {
|
|
118
126
|
if (this.$refs.normalForm) {
|
|
119
127
|
this.$refs.normalForm.reset()
|
|
120
128
|
}
|
|
@@ -126,6 +134,25 @@ export default {
|
|
|
126
134
|
validate(action) {
|
|
127
135
|
return this.$refs.normalForm.validate(action)
|
|
128
136
|
},
|
|
137
|
+
/** 计算高级查询框高度 */
|
|
138
|
+
calculateAdvancedHeight() {
|
|
139
|
+
if (!this.$refs.advancedBox) return
|
|
140
|
+
|
|
141
|
+
const $box = this.$refs.advancedBox
|
|
142
|
+
const boxHeader = $box.querySelector('.nm-box-header')?.offsetHeight || 0
|
|
143
|
+
const boxFooter = $box.querySelector('.nm-box-footer')?.offsetHeight || 0
|
|
144
|
+
const form = $box.querySelector('.nm-form')
|
|
145
|
+
if (!form) return
|
|
146
|
+
|
|
147
|
+
let boxHeight = form.offsetHeight + boxHeader + boxFooter + 20
|
|
148
|
+
if (!this.advanced_.inline) {
|
|
149
|
+
boxHeight += 20
|
|
150
|
+
}
|
|
151
|
+
$box.style.height = boxHeight + 'px'
|
|
152
|
+
// 保存动态计算的高度,避免后续样式被覆盖
|
|
153
|
+
this.dynamicHeight = boxHeight + 'px'
|
|
154
|
+
},
|
|
155
|
+
|
|
129
156
|
/** 高级查询按钮点击事件 */
|
|
130
157
|
onAdvancedClick() {
|
|
131
158
|
this.showAdvanced = !this.showAdvanced
|
|
@@ -152,13 +179,7 @@ export default {
|
|
|
152
179
|
|
|
153
180
|
// 设置高度
|
|
154
181
|
if (!this.advanced_.height) {
|
|
155
|
-
|
|
156
|
-
const boxFooter = $box.querySelector('.nm-box-footer').offsetHeight
|
|
157
|
-
let boxHeight = $box.querySelector('.nm-form').offsetHeight + boxHeader + boxFooter + 20
|
|
158
|
-
if (!this.advanced_.inline) {
|
|
159
|
-
boxHeight += 20
|
|
160
|
-
}
|
|
161
|
-
$box.style.height = boxHeight + 'px'
|
|
182
|
+
this.calculateAdvancedHeight()
|
|
162
183
|
}
|
|
163
184
|
})
|
|
164
185
|
}
|
|
@@ -260,7 +260,7 @@ export default {
|
|
|
260
260
|
/**合计行文本 */
|
|
261
261
|
sumText: String,
|
|
262
262
|
/**合计行自定义逻辑方法 */
|
|
263
|
-
summaryMethod: Function
|
|
263
|
+
summaryMethod: Function
|
|
264
264
|
},
|
|
265
265
|
computed: {
|
|
266
266
|
...mapState('app/loading', { loadingText_: 'text', loadingBackground: 'background', loadingSpinner: 'spinner' }),
|
|
@@ -280,7 +280,7 @@ export default {
|
|
|
280
280
|
},
|
|
281
281
|
methods: {
|
|
282
282
|
/** 查询方法 */
|
|
283
|
-
query() {
|
|
283
|
+
query() {
|
|
284
284
|
if (this.$refs.querybar) {
|
|
285
285
|
this.$refs.querybar.validate(() => {
|
|
286
286
|
this.doQuery()
|
|
@@ -292,26 +292,21 @@ export default {
|
|
|
292
292
|
doQuery() {
|
|
293
293
|
if (this.loading_) {
|
|
294
294
|
return
|
|
295
|
-
}
|
|
296
|
-
|
|
295
|
+
}
|
|
297
296
|
this.loading_ = true
|
|
298
|
-
let fullModel = Object.assign({}, this.model)
|
|
299
|
-
|
|
297
|
+
let fullModel = Object.assign({}, this.model)
|
|
300
298
|
// 设置分页
|
|
301
|
-
fullModel.page = this.page
|
|
302
|
-
|
|
299
|
+
fullModel.page = this.page
|
|
303
300
|
this.action(fullModel)
|
|
304
|
-
.then(data => {
|
|
305
|
-
this.rows = data.rows
|
|
301
|
+
.then(data => {
|
|
302
|
+
this.rows = data.rows
|
|
306
303
|
this.total = data.total
|
|
307
|
-
this.data = data.data
|
|
308
|
-
|
|
304
|
+
this.data = data.data
|
|
309
305
|
// 回到顶部
|
|
310
306
|
this.$refs.table.scrollTop()
|
|
311
307
|
// 重新绘制布局
|
|
312
308
|
this.$refs.table.doLayout()
|
|
313
|
-
this.loading_ = false
|
|
314
|
-
|
|
309
|
+
this.loading_ = false
|
|
315
310
|
if (this.noClearSelection) {
|
|
316
311
|
this.$nextTick(() => {
|
|
317
312
|
this.rows.forEach(m => {
|
package/src/api/config.js
CHANGED
|
@@ -10,68 +10,68 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
<script>
|
|
13
|
-
export default {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
props: ['code'],
|
|
28
|
-
methods: {
|
|
29
|
-
onCBtnlick() {
|
|
30
|
-
this.visible = !this.visible
|
|
31
|
-
},
|
|
32
|
-
run() {
|
|
33
|
-
window.addEventListener('message', this.receiveMessage, false)
|
|
34
|
-
const runUrl = window.location.href.split('#')[0] + '#/run'
|
|
35
|
-
const runWindow = window.open(runUrl, '_blank')
|
|
36
|
-
this.timer = setInterval(() => {
|
|
37
|
-
runWindow.postMessage(this.code, runUrl)
|
|
38
|
-
}, 300)
|
|
13
|
+
export default {
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
visible: false,
|
|
17
|
+
drawer: {
|
|
18
|
+
header: true,
|
|
19
|
+
title: '代码预览',
|
|
20
|
+
icon: 'preview',
|
|
21
|
+
width: '50%',
|
|
22
|
+
draggable: true
|
|
23
|
+
},
|
|
24
|
+
timer: null
|
|
25
|
+
}
|
|
39
26
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
props: ['code'],
|
|
28
|
+
methods: {
|
|
29
|
+
onCBtnlick() {
|
|
30
|
+
this.visible = !this.visible
|
|
31
|
+
},
|
|
32
|
+
run() {
|
|
33
|
+
window.addEventListener('message', this.receiveMessage, false)
|
|
34
|
+
const runUrl = window.location.href.split('#')[0] + '#/run'
|
|
35
|
+
const runWindow = window.open(runUrl, '_blank')
|
|
36
|
+
this.timer = setInterval(() => {
|
|
37
|
+
runWindow.postMessage(this.code, runUrl)
|
|
38
|
+
}, 300)
|
|
39
|
+
},
|
|
40
|
+
receiveMessage(event) {
|
|
41
|
+
if (this.timer && event.origin === window.location.origin) {
|
|
42
|
+
clearInterval(this.timer)
|
|
43
|
+
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
}
|
|
47
47
|
</script>
|
|
48
48
|
<style lang="scss">
|
|
49
|
-
.nm-code-preview {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
.nm-code-preview-drawer {
|
|
66
|
-
.nm-drawer-modal,
|
|
67
|
-
.nm-drawer-dialog {
|
|
68
|
-
z-index: 9998;
|
|
69
|
-
}
|
|
70
|
-
.el-scrollbar__wrap {
|
|
71
|
-
background: #2b2b2b;
|
|
49
|
+
.nm-code-preview {
|
|
50
|
+
&-btn {
|
|
51
|
+
padding: 0;
|
|
52
|
+
position: absolute;
|
|
53
|
+
right: 5px;
|
|
54
|
+
bottom: 5px;
|
|
55
|
+
width: 44px;
|
|
56
|
+
height: 44px;
|
|
57
|
+
line-height: 44px;
|
|
58
|
+
border-radius: 22px;
|
|
59
|
+
font-size: 1.5rem;
|
|
60
|
+
text-align: center;
|
|
61
|
+
z-index: 9999;
|
|
62
|
+
transition: all 0.3s ease-in-out;
|
|
63
|
+
}
|
|
72
64
|
}
|
|
73
|
-
.
|
|
74
|
-
|
|
65
|
+
.nm-code-preview-drawer {
|
|
66
|
+
.nm-drawer-modal,
|
|
67
|
+
.nm-drawer-dialog {
|
|
68
|
+
z-index: 9998;
|
|
69
|
+
}
|
|
70
|
+
.el-scrollbar__wrap {
|
|
71
|
+
background: #2b2b2b;
|
|
72
|
+
}
|
|
73
|
+
.el-scrollbar__view {
|
|
74
|
+
padding: 0;
|
|
75
|
+
}
|
|
75
76
|
}
|
|
76
|
-
}
|
|
77
77
|
</style>
|
|
@@ -24,54 +24,54 @@
|
|
|
24
24
|
</nm-container>
|
|
25
25
|
</template>
|
|
26
26
|
<script>
|
|
27
|
-
import NmAttributes from './components/attributes'
|
|
28
|
-
import NmMethods from './components/methods'
|
|
29
|
-
import NmEvents from './components/events'
|
|
30
|
-
import NmSlots from './components/slots'
|
|
31
|
-
export default {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
27
|
+
import NmAttributes from './components/attributes'
|
|
28
|
+
import NmMethods from './components/methods'
|
|
29
|
+
import NmEvents from './components/events'
|
|
30
|
+
import NmSlots from './components/slots'
|
|
31
|
+
export default {
|
|
32
|
+
name: 'Tmpl',
|
|
33
|
+
components: { NmAttributes, NmMethods, NmEvents, NmSlots },
|
|
34
|
+
props: {
|
|
35
|
+
title: {
|
|
36
|
+
type: String
|
|
37
|
+
},
|
|
38
|
+
icon: {
|
|
39
|
+
type: String
|
|
40
|
+
},
|
|
41
|
+
attrs: {
|
|
42
|
+
type: Array
|
|
43
|
+
},
|
|
44
|
+
slots: {
|
|
45
|
+
type: Array
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
type: Array
|
|
49
|
+
},
|
|
50
|
+
events: {
|
|
51
|
+
type: Array
|
|
52
|
+
}
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
}
|
|
55
55
|
</script>
|
|
56
56
|
<style lang="scss">
|
|
57
|
-
.nm-tmpl {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
.nm-tmpl {
|
|
58
|
+
&-box {
|
|
59
|
+
margin-bottom: 30px;
|
|
60
|
+
&-title {
|
|
61
|
+
margin: 10px 0;
|
|
62
|
+
font-size: 25px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
.el-alert__title {
|
|
66
|
+
font-size: 17px;
|
|
63
67
|
}
|
|
64
|
-
}
|
|
65
|
-
.el-alert__title {
|
|
66
|
-
font-size: 17px;
|
|
67
|
-
}
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
.el-alert__description {
|
|
70
|
+
margin-top: 10px;
|
|
71
|
+
font-size: 15px;
|
|
72
|
+
p {
|
|
73
|
+
margin-bottom: 10px;
|
|
74
|
+
}
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
|
-
}
|
|
77
77
|
</style>
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
<nm-tmpl v-bind="tmpl"></nm-tmpl>
|
|
3
3
|
</template>
|
|
4
4
|
<script>
|
|
5
|
-
import page from './page.js'
|
|
6
|
-
import attrs from './data/attrs.js'
|
|
7
|
-
import slots from './data/slots.js'
|
|
8
|
-
export default {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
import page from './page.js'
|
|
6
|
+
import attrs from './data/attrs.js'
|
|
7
|
+
import slots from './data/slots.js'
|
|
8
|
+
export default {
|
|
9
|
+
name: page.name,
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
tmpl: {
|
|
13
|
+
title: '详情页(nm-details)',
|
|
14
|
+
icon: 'detail',
|
|
15
|
+
attrs,
|
|
16
|
+
slots
|
|
17
|
+
}
|
|
17
18
|
}
|
|
19
|
+
},
|
|
20
|
+
created() {
|
|
21
|
+
this.setTabName(this.tmpl.title)
|
|
18
22
|
}
|
|
19
|
-
},
|
|
20
|
-
created() {
|
|
21
|
-
this.setTabName(this.tmpl.title)
|
|
22
23
|
}
|
|
23
|
-
}
|
|
24
24
|
</script>
|