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] 日期时间选择控件的标签字体颜色被固定为#000,且不受.weui-label的影响 #3259

Open
Haixing-Hu opened this issue Nov 25, 2018 · 0 comments

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">
    <x-input title="姓&emsp;&emsp;名" v-model="name"
             placeholder="请填写姓名">
    </x-input>
    <datetime title="出生日期" v-model="birthday"
              placeholder="请选择出生日期" value-text-align="left"
               format="YYYY-MM-DD">
    </datetime>
  </group>
</template>

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

export default {
  name: 'test-form',
  components: {
    Group,
    XInput,
    Datetime,
  },
  data() {
    return {
      name: '',
      birthday: '',
    };
  },
};
</script>
<style>
.weui-label {
  color: red;
}
</style>

Steps to reproduce

  1. 创建一个简单的Vue项目;
  2. 使用上述代码实现一个简单的表单,包含一个XInput和一个Datetime控件;
  3. .weui-label的字体颜色设置为红色;
  4. 表单上的XInput控件的标题字体为红色,但Datetime控件的标题字体颜色永远固定为黑色;
  5. 从源码上来看,这是因为 .datetime的字体被设置为固定的#000,且DateTime控件的标题元素<p>没有css类.weui-label

What is Expected?

表单上的XInput控件的标题字体为红色,Datetime控件的标题字体颜色也应该是红色;

What is actually happening?

表单上的XInput控件的标题字体为红色,但Datetime控件的标题字体颜色永远固定为黑色;

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

No branches or pull requests

1 participant