console
vm = new Vue({
el: "#app",
data: {
rule: [formCreate.maker.frame('素材1', 'fodder1', ["http://img1.touxiang.cn/uploads/20131030/30-075657_191.jpg"]).props({
src: "https://jsrun.net/jehKp",
maxLength: 2,
type: "image"
}).validate([{
required: true,
type: 'array',
min: 2,
message: '请选择2张图片',
trigger: 'change'
}]), {
type: "frame",
title: "素材2",
field: "fodder2",
value: ["http://img1.touxiang.cn/uploads/20131030/30-075657_191.jpg"],
props: {
type: "image",
src: "https://jsrun.net/jehKp",
maxLength: 2,
},
validate: [{
required: true,
type: 'array',
min: 2,
message: '请选择2张图片',
trigger: 'change'
}],
}]
},
mounted(){
window.$f = vm.$refs.fc.$f;
}
})
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.min.js">
</script>
<script src="https://cdn.jsdelivr.net/npm/iview/dist/iview.min.js">
</script>
<script src="https://cdn.jsdelivr.net/npm/form-create/dist/form-create.min.js">
</script>
<script src="https://cdn.jsdelivr.net/npm/form-create@1.4.4/district/province_city_area.js">
</script>
<div id="app">
<form-create :rule="rule" ref="fc" />
</div>
@import url("//cdn.jsdelivr.net/npm/iview/dist/styles/iview.css");
#app {
padding: 32px;
}