Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form: fix label style #14969

Merged
merged 2 commits into from
Apr 3, 2019
Merged

Form: fix label style #14969

merged 2 commits into from
Apr 3, 2019

Conversation

ziyoung
Copy link
Contributor

@ziyoung ziyoung commented Apr 3, 2019

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow Element's contributing guide (中文 | English | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

@ziyoung
Copy link
Contributor Author

ziyoung commented Apr 3, 2019

涵盖了复杂场景的测试 demo

<template>
  <div style="margin: 20px;">
    <el-form label-width="auto" size="small">
      <el-form-item label="活动时间">
        <el-col :span="11">
          <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
        </el-col>
        <el-col class="line" :span="2">-</el-col>
        <el-col :span="11">
          <el-time-picker placeholder="选择时间" v-model="form.date2" style="width: 100%;"></el-time-picker>
        </el-col>
      </el-form-item>
      <el-form-item label="即时配送">
        <el-switch v-model="form.delivery"></el-switch>
      </el-form-item>
      <el-form-item v-if="x">
        <div slot="label">
          这是一段 label <i class="el-icon-edit" v-if="y"></i>
        </div>
        <el-button @click="y = !y">改变 label slot 内容</el-button>
      </el-form-item>
    </el-form>
    <el-button @click="x = !x">toggle</el-button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      x: true,
      y: false,
      form: {
        date1: '',
        date2: '',
        delivery: false
      }
    };
  }
};
</script>

@ziyoung ziyoung requested a review from iamkun April 3, 2019 11:11
@element-bot
Copy link
Member

element-bot commented Apr 3, 2019

Deploy preview for element ready!

Built with commit eb45606

https://deploy-preview-14969--element.netlify.com

@iamkun iamkun merged commit 7b24f82 into ElemeFE:dev Apr 3, 2019
weisiren168 pushed a commit to weisiren168/element that referenced this pull request Jun 20, 2019
lzq4047 pushed a commit to lzq4047/element that referenced this pull request May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants