Skip to content

Commit

Permalink
初步导入基础组件,调整开发页面布局
Browse files Browse the repository at this point in the history
  • Loading branch information
dingcang committed Oct 15, 2019
1 parent 93cf247 commit fa895b7
Show file tree
Hide file tree
Showing 37 changed files with 1,448 additions and 1,052 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"VueRouter": "readonly",
"Vuex": "readonly",
"VueI18n": "readonly",
"echarts": "readonly"
"echarts": "readonly",
"AMap": "readonly",
"UE": "readonly"
}
}
51 changes: 47 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,51 @@
<!-- <p align="center">
<img src=""/>
</p> -->
<p align="center">
<a href="https://sm.ms/image/dhjbI64lBYgPMiA" target="_blank"><img src="https://i.loli.net/2019/10/15/dhjbI64lBYgPMiA.png" ></a>
</p>

<p align="center">
<img src="https://img.shields.io/badge/npm-0.1.1_alpha.1-green"/>
<img src="https://img.shields.io/badge/npm-0.2.0_alpha-green"/>
<img src="https://img.shields.io/badge/license-MIT-green"/>
</p>

## Install

```shell
npm install evsmc-base-ui -S
```

## Quick Start

``` javascript
import Vue from 'vue'
import EvsmcBaseUi from 'evsmc-base-ui'

Vue.use(EvsmcBaseUi)

// or
import {
Add,
BatchButton
// ...
} from 'element-ui'

Vue.use(Add)
Vue.use(BatchButton)
```

For more information, please wait our documentation.

## Browser Support

Modern browsers and Internet Explorer 10+.

<!-- ## Development
Skip this part if you just want to use Element. -->

## Changelog

Detailed changes for each release are documented in the [release notes](https://github.com/dingcang/evsmc-base-ui/releases).

## LICENSE

[MIT](LICENSE)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "evsmc-base-ui",
"version": "0.1.1-alpha.5",
"version": "0.2.0-alpha",
"description": "A Components Library For Bitnei's evsmc-ui",
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
5 changes: 4 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<template>
<div id="app">
<el-scrollbar>
<img src="/logo.png">
<left-menu class="menu" />
</el-scrollbar>
<router-view />
<main>
<router-view />
</main>
</div>
</template>

Expand Down
17 changes: 15 additions & 2 deletions src/assets/css/app.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
html,body {
html {
height: 100%;
}
body {
height: 100%;
margin: 0;
padding: 30px 0 20px;
box-sizing: border-box;
}


#app {
height: 100%;
width: 80%;
min-width: 1000px;
margin: 0 auto;
display: flex;
.menu {
width: 200px;
width: 220px;
height: 100%;
margin-right: 60px;
}
main {
flex: 1;
padding-left: 20px;
}
}
5 changes: 5 additions & 0 deletions src/components/BatchButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,8 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.inline-style{
display:inline-block
}
</style>
23 changes: 10 additions & 13 deletions src/components/ChooseTableRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<el-select
v-model="queryValue[item.id]"
:placeholder="item.placeholder"
:clearable="!item.unClearAble"
>
<el-option
v-for="option in item.data"
Expand Down Expand Up @@ -105,7 +104,7 @@
</template>

<script>
// import _ from 'underscore'
import _ from 'underscore'
import Grid from '@/components/Grid'
export default {
Expand Down Expand Up @@ -199,24 +198,22 @@ export default {
},
// 添加默认值属性
addDefault (params) {
// _.each(params, (value, key) => {
// // 添加默认属性
// this.$set(this.queryValue, key, value)
// })
this.queryValue = Object.assign(this.queryValue, params)
_.each(params, (value, key) => {
// 添加默认属性
this.$set(this.queryValue, key, value)
})
},
// 查询方法回调
query (params) {
let conditions = { start: 0, conditions: [] }
// _.each(this.hiddenQueryDefault, (value, key) => {
// conditions.conditions.push({ name: key, value: value })
// })
conditions.conditions.push(...this.hiddenQueryDefault.map((value, key) => ({ name: key, value: value })))
let conditions = { conditions: [] }
_.each(this.hiddenQueryDefault, (value, key) => {
conditions.conditions.push({ name: key, value: value })
})
// 分页
if (this.$method.isNotEmpty(params)) {
Object.assign(conditions, params)
}
this.queryOptions.columns.map(item => {
_.each(this.queryOptions.columns, item => {
let value = this.queryValue[item.id]
if (this.$method.isNotEmpty(value) || typeof value === 'number' || typeof value === 'boolean') {
// 特殊处理年类型的日期
Expand Down
46 changes: 25 additions & 21 deletions src/components/Coordinate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
>
<el-col :span="12">
<el-input
:placeholder="$t('common.searchText')"
v-model="searchText"
:placeholder="$t('common.searchText')"
:maxlength="64"
size="mini"
prefix-icon="el-icon-search"
Expand All @@ -28,7 +28,9 @@
type="primary"
size="small"
@click="searchMap"
>{{ $t('common.lookFor') }}</el-button>
>
{{ $t('common.lookFor') }}
</el-button>
</el-col>
</el-row>
<div class="margin-bottom20" />
Expand Down Expand Up @@ -62,7 +64,9 @@
size="small"
style="display: block; margin: 43px auto 0"
@click="save"
>{{ $t('common.confirm') }}</el-button>
>
{{ $t('common.confirm') }}
</el-button>
</el-col>
</el-row>
</div>
Expand All @@ -89,7 +93,7 @@ export default {
},
coordinateData: {
type: Object,
default: () => {}
default: () => { }
}
},
data () {
Expand Down Expand Up @@ -159,7 +163,7 @@ export default {
}
}.bind(this))
// eslint-disable-next-line
}.bind(this))
}.bind(this))
.on('complete', function () {
this.mapMarker = new AMap.Marker({
visible: false,
Expand Down Expand Up @@ -253,20 +257,20 @@ export default {
</script>

<style scoped>
.content {
max-height: 520px;
height: 50vh;
}
.coordinate-container {
width: 100%;
height: 350px;
overflow: hidden;
}
#coordinate {
width: 100%;
height: 367px;
}
.el-dialog__wrapper >>> .text-align-center.margin-top20.margin-bottom20 {
margin: 0;
}
.content {
max-height: 520px;
height: 50vh;
}
.coordinate-container {
width: 100%;
height: 350px;
overflow: hidden;
}
#coordinate {
width: 100%;
height: 367px;
}
.el-dialog__wrapper >>> .text-align-center.margin-top20.margin-bottom20 {
margin: 0;
}
</style>
4 changes: 2 additions & 2 deletions src/components/Copy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</template>

<script>
// import _ from 'underscore'
import _ from 'underscore'
export default {
props: {
// 描述
Expand All @@ -35,7 +35,7 @@ export default {
// 拷贝,不设置回调方法
copy (text) {
let that = this
if (text) this.value = text
if (!_.isUndefined(text)) this.value = text
this.$method.copyToClipboard(this.value)
this.copyTip = this.$t('common.copied')
setTimeout(function () {
Expand Down
Loading

0 comments on commit fa895b7

Please sign in to comment.