Skip to content

Commit

Permalink
build v2.9.9
Browse files Browse the repository at this point in the history
  • Loading branch information
smallweis committed Jun 2, 2022
1 parent a5c090f commit 4d82d33
Show file tree
Hide file tree
Showing 39 changed files with 1,105 additions and 346 deletions.
54 changes: 33 additions & 21 deletions examples/element-ui/form/bind.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

<body>
<div id="app">
{{form}}
<el-button type="primary" size="small" @click="form.deep.deep.deep.test1='1.1'">
改变1</el-button>
<el-button type="primary" size="small" @click="form.deep.deep.deep.test2='1.2'">改变2</el-button>
<avue-form :option="option" v-model="form"> </avue-form>
</div>
</body>
Expand All @@ -32,28 +28,44 @@
data() {
return {
form: {
text1: 0,
deep: {
deep: {
deep: {
test1: 1,
test2: 2
}
}
deep: 0
}
},
option: {
labelWidth: 120,
column: [
{
label: '我是深结构1',
prop: 'test1',
bind: 'deep.deep.deep.test1'
column: [{
label: '内容1',
prop: 'text1',
bind: 'deep.deep',
type: 'radio',
control: (val, form) => {
if (val === 0) {
return {
text2: {
display: true
}
}
} else {
return {
text2: {
display: false
}
}
}
},
dicData: [{
label: '显示',
value: 0
}, {
label: '我是深结构2',
prop: 'test2',
bind: 'deep.deep.deep.test2'
}
]
label: '隐藏',
value: 1,
}]
}, {
label: '内容2',
prop: 'text2',
display: true
}]
}
}
}
Expand Down
1 change: 1 addition & 0 deletions examples/element-ui/form/dynamic.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
},
option: {
labelWidth: 110,
detail: true,
column: [{
label: '树型',
prop: "tree",
Expand Down
1 change: 0 additions & 1 deletion examples/element-ui/form/group.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
},
cascader: ['city'],
dicUrl: `${baseUrl}/getProvince`,
dicData: 'province',
rules: [
{
required: true,
Expand Down
12 changes: 7 additions & 5 deletions examples/element-ui/form/upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
{{form}}
<avue-form :option="option" v-model="form" :upload-error="uploadError" :upload-delete="uploadDelete"
:upload-before="uploadBefore" :upload-exceed="uploadExceed" :upload-after="uploadAfter">
<template slot="imgUrlType" slot-scope="{file}">
{{file}}
</template>
</avue-form>
</div>
</body>
Expand All @@ -35,10 +32,10 @@
data() {
return {
form: {
imgUrl: [{ "label": "avue@226d5c1a_logo.png", "value": "https://avuejs.com/images/logo-bg.jpg" }],
imgUrl: [{ "label": "video", "value": "https://www.w3school.com.cn/i/movie.ogg" }, { "label": "avue@226d5c1a_logo.png", "value": "https://avuejs.com/images/logo-bg.jpg" }],
imgUrl3: 'https://www.w3school.com.cn/i/movie.ogg',
string: 'https://avuejs.com/images/logo-bg.jpg,/images/logo-bg.jpg',
img: ['https://avuejs.com/images/logo-bg.jpg', 'https://avuejs.com/images/logo-bg.jpg']
img: ['https://www.w3school.com.cn/i/movie.ogg', 'https://avuejs.com/images/logo-bg.jpg']
},
option: {
labelWidth: 120,
Expand Down Expand Up @@ -69,6 +66,11 @@
propsHttp: {
res: 'data'
},
cropperOption: {
outputType: 'jpeg',
fixed: true,
fixedNumber: [346, 148]
},
canvasOption: {
text: 'avue',
ratio: 0.1
Expand Down
73 changes: 73 additions & 0 deletions examples/element-ui/lang/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
const en = {
common: {
condition: 'condition',
display: 'display',
hide: 'hide'
},
tip: {
select: 'Please select',
input: 'Please input'
},
upload: {
upload: 'upload',
tip: 'Drag files here,/'
},
date: {
start: 'Start date',
end: 'End date',
t: 'today',
y: 'yesterday',
n: 'nearly 7',
a: 'whole'
},
form: {
printBtn: 'print',
mockBtn: 'mock',
submitBtn: 'submit',
emptyBtn: 'empty'
},
crud: {
filter: {
addBtn: 'add',
clearBtn: 'clear',
resetBtn: 'reset',
cancelBtn: 'cancel',
submitBtn: 'submit'
},
column: {
name: 'name',
hide: 'hide',
fixed: 'fixed',
filters: 'filters',
sortable: 'sortable',
index: 'index',
width: 'width'
},
tipStartTitle: 'Currently selected',
tipEndTitle: 'items',
editTitle: 'edit',
copyTitle: 'copy',
addTitle: 'add',
viewTitle: 'view',
filterTitle: 'filter',
showTitle: 'showTitle',
menu: 'menu',
addBtn: 'add',
show: 'show',
hide: 'hide',
open: 'open',
shrink: 'shrink',
printBtn: 'print',
excelBtn: 'excel',
updateBtn: 'update',
cancelBtn: 'cancel',
searchBtn: 'search',
emptyBtn: 'empty',
menuBtn: 'menu',
saveBtn: 'save',
viewBtn: 'view',
editBtn: 'edit',
copyBtn: 'copy',
delBtn: 'delete'
}
};
4 changes: 3 additions & 1 deletion examples/element-ui/lang/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<script src="https://cdn.staticfile.org/vue/2.5.17/vue.js"></script>
<!-- 导入表格需要的包 -->

<script src="./en.js"></script>
<script src="./zh.js"></script>
<script src="https://cdn.staticfile.org/FileSaver.js/2014-11-29/FileSaver.min.js"></script>
<script src="https://cdn.staticfile.org/xlsx/0.18.2/xlsx.full.min.js"></script>
<link rel="stylesheet" href="../../cdn/element-ui/theme-chalk/index.css" />
Expand All @@ -30,7 +32,7 @@

<script>
Vue.use(AVUE, {
locale: 'en',
locale: en,
})
</script>
<script>
Expand Down
73 changes: 73 additions & 0 deletions examples/element-ui/lang/zh.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
const zh = {
common: {
condition: '条件',
display: '显示',
hide: '隐藏'
},
tip: {
select: '请选择',
input: '请输入'
},
upload: {
upload: '点击上传',
tip: '将文件拖到此处,或'
},
date: {
start: '开始日期',
end: '结束日期',
t: '今日',
y: '昨日',
n: '近7天',
a: '全部'
},
form: {
printBtn: '打 印',
mockBtn: '模 拟',
submitBtn: '提 交',
emptyBtn: '清 空'
},
crud: {
filter: {
addBtn: '新增条件',
clearBtn: '清空数据',
resetBtn: '清空条件',
cancelBtn: '取 消',
submitBtn: '确 定'
},
column: {
name: '列名',
hide: '隐藏',
fixed: '冻结',
filters: '过滤',
sortable: '排序',
index: '顺序',
width: '宽度'
},
tipStartTitle: '当前表格已选择',
tipEndTitle: '项',
editTitle: '编 辑',
copyTitle: '复 制',
addTitle: '新 增',
viewTitle: '查 看',
filterTitle: '过滤条件',
showTitle: '列显隐',
menu: '操作',
addBtn: '新 增',
show: '显 示',
hide: '隐 藏',
open: '展 开',
shrink: '收 缩',
printBtn: '打 印',
excelBtn: '导 出',
updateBtn: '修 改',
cancelBtn: '取 消',
searchBtn: '搜 索',
emptyBtn: '清 空',
menuBtn: '功 能',
saveBtn: '保 存',
viewBtn: '查 看',
editBtn: '编 辑',
copyBtn: '复 制',
delBtn: '删 除'
}
};
2 changes: 1 addition & 1 deletion examples/element-ui/tree/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
labelWidth: 100,
column: [{
label: '自定义项',
prop: 'test'
prop: 'label'
}],
},
props: {
Expand Down
25 changes: 19 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ const webpack = require("webpack");
const webpackConf = require("./build/build.js");

// 构建webpack配置
gulp.task("webpack", async function() {
await webpack(webpackConf, function(err, stats) {
gulp.task("webpack", async function () {
await webpack(webpackConf, function (err, stats) {
if (err) {
console.log(err);
}
});
});

// 处理样式的配置
gulp.task("compile", function() {
gulp.task("compile", function () {
return gulp
.src("./styles/index.scss")
.pipe(sass.sync())
Expand All @@ -28,12 +28,25 @@ gulp.task("compile", function() {
.pipe(cssmin())
.pipe(gulp.dest("./lib/"));
});
// 处理国际化相关
gulp.task("locale", function () {
return gulp
.src("./src/locale/**")
.pipe(gulp.dest("./lib/locale"));
});

// 打包文件
gulp.task("build", gulp.series(["webpack", "compile"]));
gulp.task("build", gulp.series(["locale", "compile", "webpack"]));

// 监听文件变化
gulp.task("watch", async function() {
gulp.watch(["./src/**", "./packages/**"], gulp.series(["webpack"]));
gulp.task("listen", async function () {
gulp.watch(["./styles/**"], gulp.series(["compile"]));
gulp.watch(["./src/**", "./packages/**"], gulp.series(["webpack"]));
});

gulp.task("watch", gulp.series(["compile", "webpack", "listen"]));





Loading

0 comments on commit 4d82d33

Please sign in to comment.