Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.15.6 #8

Merged
merged 2 commits into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p align="center"><img width="140" src="https://h5rsc.vipstatic.com/ams/ams-logo.png" alt="AMS logo"></p>
<p align="center"><a href="https://vipshop.github.io/ams/" target="_blank" rel="noopener noreferrer"><img width="140" src="https://h5rsc.vipstatic.com/ams/ams-logo.png" alt="AMS logo"></a></p>

## AMS

> AMS (Admin Materials System),管理后台物料系统。
> AMS (admin materiel system),管理后台物料系统。

AMS是基于 [Vue.js](https://github.com/vuejs/vue) 和 [Element组件库](https://github.com/ElemeFE/element)、通过JSON配置来快速搭建管理后台的一整套解决方案

Expand Down
11 changes: 5 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
"name": "ams-docs",
"scripts": {
"dev": "npm i && vuepress dev zh-CN",
"build": "npm i && vuepress build zh-CN"
"build": "npm i && npm update @ams-team/ams && vuepress build zh-CN"
},
"private": true,
"dependencies": {
"@ams-team/ams": "latest",
"@ams/block-ams-config": "latest",
"@ams/block-calendar": "latest",
"@ams/block-chart": "latest",
"@ams/json-stringify": "latest",
"@ams-team/ams": "^0.15.6",
"@ams-team/block-ams-config": "latest",
"@ams-team/block-chart": "latest",
"@ams-team/json-stringify": "latest",
"element-ui": "^2.11.1",
"highlight.js": "^9.15.9",
"js-beautify": "^1.10.0",
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/card/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/collapse/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/component/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/dialog/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/dropdown/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/error/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/form/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/grid/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
30 changes: 30 additions & 0 deletions docs/zh-CN/.vuepress/components/block/list/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,36 @@ export default {
init: '@list'
}
},
simulatePagesList: {
type: 'list',
resource: {
api: {
prefix: 'https://easy-mock.com/mock/5a0023effbbb09615044cb82/',
list: 'list-pagination'
},
fields: {
'id': {
'type': 'text',
'label': 'ID'
},
'title': {
'type': 'text',
'label': '标题'
},
'content': {
'type': 'textarea',
'label': '内容'
}
}
},
events: {
init: '@list'
},
pageSize: 10,
props: {
pagination: 'simulate' // 模拟分页
}
},
filtersList: {
type: 'list',
resource: {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/list/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/router/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/steps/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/table/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/tabs/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/block/title/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
10 changes: 10 additions & 0 deletions docs/zh-CN/.vuepress/components/changelog/logs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
// 更新日志
export default [
{
version: '0.14.x',
date: '2019.08.29',
log: [
'feat: field-image 在 view 状态增加大图预览',
'feat: block-list 增加前端分页 pagination: "simulate"',
'fix: field-image 默认图片列表内容比较多时加上滚动条',
'fix: block-form 在校验失败时弹出失败信息'
]
},
{
version: '0.13.0',
date: '2019.08.21',
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/demo/start.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<script>
import demoMixins from './demo-mixin'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
16 changes: 8 additions & 8 deletions docs/zh-CN/.vuepress/components/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import javascript from 'highlight.js/lib/languages/javascript';
import 'highlight.js/styles/tomorrow-night-eighties.css';

// 定制field
// import editor from '@ams/field-editor';
// import markdown from '@ams/field-markdown';
// import editor from '@ams-team/field-editor';
// import markdown from '@ams-team/field-markdown';

// 定制block
// import tag from '@ams/field-tag';
import calendar from '@ams/block-calendar';
// import card from '@ams/block-card';
import chart from '@ams/block-chart';
import amsConfig from '@ams/block-ams-config';
// import tag from '@ams-team/field-tag';
// import calendar from '@ams-team/block-calendar';
// import card from '@ams-team/block-card';
import chart from '@ams-team/block-chart';
import amsConfig from '@ams-team/block-ams-config';

Vue.use(ElementUI);
Vue.use(ams);
Expand All @@ -38,7 +38,7 @@ console.log('ams init config');

// 定制block
// Vue.use(tag);
Vue.use(calendar);
// Vue.use(calendar);
// Vue.use(card);
Vue.use(chart);
Vue.use(amsConfig);
Expand Down
34 changes: 29 additions & 5 deletions docs/zh-CN/.vuepress/components/field/image/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ export default {
type: 'image',
tip: '范围240-640',
successUrlKey: 'url',
// check: { maxSizeInKB, imgMaxWidth, imgMaxHeight, imgMinWidth, imgMinHeight, imgWidth, imgHeight },
check: {
imgMaxWidth: 640,
imgMaxHeight: 640,
imgMinWidth: 240,
imgMinHeight: 240,
},
default: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
props: {
action: 'https://easy-mock.com/mock/5a0023effbbb09615044cb82/upload-image'
}
Expand All @@ -75,8 +75,7 @@ export default {
imgHeight: 640
},
props: {
action:
'https://easy-mock.com/mock/5a0023effbbb09615044cb82/upload-image'
action: 'https://easy-mock.com/mock/5a0023effbbb09615044cb82/upload-image'
}
},
image5: {
Expand All @@ -86,8 +85,7 @@ export default {
successUrlKey: 'url',
props: {
accept: 'image/png',
action:
'https://easy-mock.com/mock/5a0023effbbb09615044cb82/upload-image'
action: 'https://easy-mock.com/mock/5a0023effbbb09615044cb82/upload-image'
}
}
}
Expand Down Expand Up @@ -170,5 +168,31 @@ export default {
}
},
ctx: 'edit'
},
imageField5: {
type: 'form',
resource: {
fields: {
image1: {
label: '大图预览',
type: 'image'
},
image2: {
label: '预览列表',
type: 'image',
props: {
'preview-src-list': [
'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100',
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
]
}
}
}
},
ctx: 'view',
data: {
image1: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100',
image2: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
}
}
};
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/field/image/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
export default {
Expand Down
8 changes: 4 additions & 4 deletions docs/zh-CN/.vuepress/components/try/demo-spa/demo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<el-card shadow="hover" class="demo demo-card">
<el-card shadow="hover" class="demo demo-card demo-spa">
<ams-block v-if="init" :name="blockName" class="demo-card-preview"/>
<div :class="`demo-card-config ${showConfig ? 'open': ''}`">
<highlight-code lang="javascript">
Expand All @@ -16,7 +16,7 @@
<script>
import demoMixins from '../../demo/demo-mixin'
import block from './block'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'

export default {
Expand All @@ -41,10 +41,10 @@ export default {
}
</script>
<style>
div.demo:nth-last-of-type(1) {
div.demo-spa:nth-last-of-type(1) {
z-index: 1;
}
div.demo:nth-last-of-type(2) {
div.demo-spa:nth-last-of-type(2) {
z-index: 2;
}
.ams-block-router .sidebar-container {
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/try/demo-try.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<script>
import ams from '@ams-team/ams'
import '../entry'
import stringify from '@ams/json-stringify'
import stringify from '@ams-team/json-stringify'
import beautify from 'js-beautify'
import _ from 'lodash'
import templates from './config.js'
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/.vuepress/components/utils/convert/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default {
})
})
const res = await this.$ams.request({
url: 'http://w3cmark.com/getBayes',
url: 'http://vip.com/getBayes',
method: 'post',
data: { data: JSON.stringify(arr) },
withCredentials: false
Expand Down
9 changes: 1 addition & 8 deletions docs/zh-CN/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ module.exports = {
plugins: [
'flowchart'
],
configureWebpack: {
resolve: {
alias: {
"@ams/ams": "@ams-team/ams"
}
}
}, //设置别名
themeConfig: {
// lastUpdated: '最后更新',
nav: [
Expand All @@ -27,7 +20,7 @@ module.exports = {
{ text: '区块', link: '/block/' },
{ text: '市场', link: '/market/' },
{
text: '0.13.0',
text: '0.14.0',
items: [
{
text: '更新日志',
Expand Down
Loading