Skip to content

Commit

Permalink
v0.18.4
Browse files Browse the repository at this point in the history
v0.18.4
  • Loading branch information
w3cmark authored Oct 14, 2019
2 parents 0cf864f + b5c71b9 commit a436026
Show file tree
Hide file tree
Showing 180 changed files with 4,912 additions and 447 deletions.
11 changes: 10 additions & 1 deletion build/bin/prebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

let fs = require('fs');
let path = require('path');
let readlineSync = require('readline-sync');
const { execSync } = require('child_process');

let indexPath = path.resolve(__dirname, '../../src/index.js');
let indexFile = fs.readFileSync(indexPath, 'utf8');
let pkg = require('../../package.json');

fs.writeFileSync(indexPath, indexFile.replace(/ams.version = '\d+\.\d+\.\d+';/, `ams.version = '${pkg.version}';`), 'utf8');

console.log('update version success');
console.log(`update version success, version is ${version}`);

// 打包 theme-vipshop
try {
execSync('cd ./packages/theme-vipshop && npm i && npm run build && cd ../../');
} catch (error) {
console.error('打包 theme-vipshop 失败:' + error);
}
2 changes: 1 addition & 1 deletion build/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const webpack = require('webpack');
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const { VueLoaderPlugin } = require('vue-loader');
const vueLoaderConfig = require('./vue-loader.conf');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

const config = require('./config');

Expand Down
12 changes: 12 additions & 0 deletions build/webpack.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ module.exports = {
'./lib/theme-default'
),
destination: './dist/theme-default'
}, {
source: path.join(
process.cwd(),
'./packages/theme-vipshop/lib'
),
destination: './lib/theme-vipshop'
}, {
source: path.join(
process.cwd(),
'./packages/theme-vipshop/lib'
),
destination: './dist/theme-vipshop@' + pkg.version
}],
archive: [ // 将dist文件夹打包成ams.zip并放在dist目录
{
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"private": true,
"dependencies": {
"@ams-team/ams": "latest",
"@ams-team/ams": "^0.15.11",
"@ams-team/block-ams-config": "latest",
"@ams-team/block-chart": "latest",
"@ams-team/json-stringify": "latest",
Expand Down
47 changes: 47 additions & 0 deletions docs/zh-CN/.vuepress/components/block/list/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,53 @@ export default {
}
}
},
suffixInfoList: {
type: 'list',
resource: {
api: {
prefix,
list: 'list-pagination'
},
fields: {
'id': {
'type': 'text',
'label': 'ID'
},
'title': {
'type': 'text',
'label': '标题',
props: {
// 'suffix-info': '我是提示', // 后缀提示
// 'suffix-info-warning': '我是提示warning', // 后缀警告提示
// 'suffix-info-danger': '我是提示danger' // 后缀错误提示
},
changeConfig(field, context) {
if (context) {
if (context.id === 2) {
field.props['suffix-info-warning'] = '我是提示warning';
} else if (context.id === 3) {
field.props['suffix-info-danger'] = '我是提示danger';
} else {
field.props['suffix-info'] = '我是提示';
}
}
return field;
}
},
'content': {
'type': 'textarea',
'label': '内容'
}
}
},
events: {
init: '@list'
},
pageSize: 10,
props: {
pagination: 'simulate' // 模拟分页
}
},
editList: {
type: 'list',
ctx: 'edit',
Expand Down
Loading

0 comments on commit a436026

Please sign in to comment.