index.vue 1.85 KB
Newer Older
weijiguang committed
1 2 3 4 5
<template>
  <div>
    <Button icon="ios-add" type="primary" @click="visible = true">添加帐号</Button>
    <Modal width="400" v-model="visible" title="帐号信息">
      <div>
1  
weijiguang committed
6
        <Form ref="accountForm" :model="accountForm" :rules="accountFormRule" :label-width="60" label-colon>
weijiguang committed
7 8
          <Row>
            <Col span="24">
1  
weijiguang committed
9 10 11 12
              <FormItem label="帐号" prop="username">
                <Input v-model.trim="accountForm.username" type="text" placeholder="长度至少4位">
                  <span slot="append">{{ companyAbbr }}</span>
                </Input>
weijiguang committed
13 14 15 16 17
              </FormItem>
            </Col>
          </Row>
          <Row>
            <Col span="24">
1  
weijiguang committed
18 19
              <FormItem label="密码" prop="password">
                <Input v-model.trim="accountForm.password" type="password" placeholder="长度至少6位" />
weijiguang committed
20 21 22 23 24
              </FormItem>
            </Col>
          </Row>
          <Row>
            <Col span="24">
1  
weijiguang committed
25
              <FormItem label="姓名" prop="realName">
weijiguang committed
26 27 28 29 30 31
                <Input v-model.trim="accountForm.realName" type="text" />
              </FormItem>
            </Col>
          </Row>
          <Row>
            <Col span="24">
1  
weijiguang committed
32
              <FormItem label="电话" prop="phone">
weijiguang committed
33 34 35 36 37 38
                <Input v-model.trim="accountForm.phone" type="text" />
              </FormItem>
            </Col>
          </Row>
          <Row>
            <Col span="24">
1  
weijiguang committed
39
              <FormItem label="地址" prop="address">
weijiguang committed
40 41 42 43 44 45 46 47 48 49 50 51 52 53
                <Input v-model.trim="accountForm.address" type="text" />
              </FormItem>
            </Col>
          </Row>
        </Form>
      </div>
      <div slot="footer">
        <Button @click="visible = false">取消</Button>
        <Button @click="saveAccount" :loading="submitLoading" type="primary">确定</Button>
      </div>
    </Modal>
  </div>
</template>
<script src="./index.js"/>