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

[Bug Report] 日期时间选择控件的显示样式会受到<a>的样式的影响 #3255

Closed
Haixing-Hu opened this issue Nov 25, 2018 · 1 comment

Comments

@Haixing-Hu
Copy link
Contributor

VUX version

2.9.2

OS/Browsers version

All operating system / All browser

Vue version

2.5.17

Code

<template>
  <group label-width="4.5em" label-margin-right="1em" label-align="right">
    <datetime title="出生日期" v-model="birthday"
              placeholder="请选择出生日期" value-text-align="left"
               format="YYYY-MM-DD">
    </datetime>
  </group>
</template>

<script>
import {
  Group,
  Datetime,
} from 'vux';

export default {
  name: 'test-form',
  components: {
    Group,
    Datetime,
  },
  data() {
    return {
      birthday: '',
    };
  },
};
</script>
<style>
a {
  text-decoration: underline;
}
</style>

Steps to reproduce

  1. 创建一个简单的Vue项目;
  2. 使用上述代码实现一个简单的表单,包含一个Datetime控件;
  3. <a>的样式设置为带下滑线;
  4. 表单上的Datetime控件的标题和内容也会带上下滑线;
  5. 从源码上来看,这是因为 DateTime 控件渲染的html整体包含在一个<a>中;

What is Expected?

日期选择控件的标题和内容不应该带下划线

What is actually happening?

日期选择控件的标题和内容带下划线

Haixing-Hu pushed a commit to Haixing-Hu/vux that referenced this issue Nov 25, 2018
@Haixing-Hu Haixing-Hu mentioned this issue Nov 25, 2018
3 tasks
@Haixing-Hu
Copy link
Contributor Author

补充一个截图

2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants