<div class="main" id="main">
    <el-form ref="form" label-width="100px" label-position="left">
        <el-form-item label="接收邮箱">
            <el-input v-model="email" v-validate="{data:email,dataType:'email',nullMsg:'请填写接收邮箱！',errorMsg:'邮箱格式错误！'}"></el-input>
            <span class="help-block validate-tips-box">请修改为您的接受邮箱地址</span>
        </el-form-item>
        <el-form-item label="邮件标题">
            <el-input v-model="title" v-validate="{dataType:'*'}"></el-input>
            <span class="help-block validate-tips-box"></span>
        </el-form-item>
        <el-form-item label="邮件内容">
            <el-input v-model="content" v-validate="{dataType:'*'}"></el-input>
            <span class="help-block validate-tips-box"></span>
        </el-form-item>

    </el-form>
    <div class="footer-submit-bar" style="padding-left:100px">
        <el-button type="primary" v-on:click="postSubmit">发送</el-button>
        <el-button onclick="closeSelf()">关闭</el-button>
    </div>
</div>
<script type="text/javascript">
    var formData = { email: "", title: "pageadmin网站管理系统测试邮件", content:"您好，欢迎使用pageadmin网站管理系统。" };
    var vue= new Vue({
        el: "#main",
        data: formData,
        methods: {
            postSubmit: function () {
                var validated = this.validateForm({ tipsStyle: 1});//jquery表单验证
                if (validated)
                {
                    this.submit({ url: "@Url.ActionUrl()", data: formData, successMsg: '发送成功!'});
                }
            },
        },
    });
</script>