antd-vue(1.7.8版本)常见组件的样式修改

一、antd-vue(1.7.8版本)常见组件

Button

<template>
  <div class="mybutton">
    <a-button> ceshiwenbenzheshiyiduan </a-button>
  </div>
</template>

<script>
export default {
  name: 'test'
}
</script>

<style scoped>
/* 默认字体和背景色 */
.mybutton >>> .ant-btn {
  color: red;
  background-color: skyblue;
  border: 1px solid red;
  border-radius: 4px;
  padding: 0 15px;
  height: 32px;
  line-height: 32px;
  font-weight: 400;
  font-size: 14px;
}
/* 鼠标移入后样式 */
.mybutton >>> .ant-btn:hover {
  color: #40a9ff;
  background-color: #fff;
  border: 1px solid #40a9ff;
}
</style>

Table

<template>
  <div class="mytable">
    <a-table>
      <template slot="operation" class="action">
        <span><a-button>Edit</a-button></span>
      </template>
    </a-table>
  </div>
</template>

<script>
export default {
  name: 'test',
  data () {
    return {
    }
  }
}
</script>

<style scoped>
/* --------------表格-------------- */
/* 最外层的table */
.mytable >>> .ant-table {
  width: 1500px;
  height: 500px;
  overflow-y: auto;
}
/* table的表头 */
.mytable >>> .ant-table-thead > tr > th {
  height: 50px;
  padding: 0px 0px;
  color: rgba(255, 0, 0, 0.85);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  background: blue;
  border-bottom: 3px solid red;
}
/* table的表内容 */
.mytable >>> .ant-table-tbody > tr > td {
  height: 50px;
  padding: 0px 0px;
  color: rgba(255, 0, 0, 0.85);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  background: skyblue;
  border-bottom: 3px solid green;
}
/* table 鼠标移动,变动背景色 */
.mytable
  >>> .ant-table-tbody
  > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
  > td {
  background: green;
}
/* table 嵌套的button修改样式(例如:action) */
/* 原button样式 */
.mytable >>> .ant-btn {
  color: red;
  background-color: skyblue;
  border: 1px solid red;
  border-radius: 4px;
  padding: 0 15px;
  height: 32px;
  line-height: 32px;
  font-weight: 400;
  font-size: 14px;
}
/* 鼠标移入后样式 */
.mytable >>> .ant-btn:hover {
  color: #40a9ff;
  background-color: #fff;
  border: 1px solid #40a9ff;
}
/* --------------分页器-------------- */
/* 分页器位置 */
.mytable >>> .ant-pagination {
  /* 原始 */
  float: right;
  margin: 16px 0;
  font-size: 14px;
}
/* 上一页 */
.mytable >>> .ant-pagination-prev {
  min-width: 40px;
  height: 40px;
  line-height: 40px;
  margin-right: 15px;
}
.mytable >>> .ant-pagination-prev > a {
  font-size: 16px;
  text-align: center;
  background-color: skyblue;
  border: 1px solid red;
  border-radius: 9px;
}
.mytable >>> .ant-pagination-prev > .ant-pagination-item-link:hover {
  color: #fff;
  border-color: #fff;
  background-color: #000;
}
/* 下一页 */
.mytable >>> .ant-pagination-next {
  min-width: 40px;
  height: 40px;
  line-height: 40px;
  margin-right: 15px;
}
.mytable >>> .ant-pagination-next > a {
  font-size: 16px;
  text-align: center;
  background-color: skyblue;
  border: 1px solid red;
  border-radius: 9px;
}
.mytable >>> .ant-pagination-next > .ant-pagination-item-link:hover {
  color: #fff;
  border-color: #fff;
  background-color: #000;
}
/* 后5页 */
.mytable >>> .ant-pagination-jump-next {
  min-width: 40px;
  height: 40px;
  line-height: 40px;
  margin-right: 15px;
}
.mytable >>> .ant-pagination-item-container > i {
  color: red;
}
/* 页码 */
.mytable >>> .ant-pagination-item {
  min-width: 32px;
  height: 32px;
  margin-right: 8px;
  line-height: 30px;
  background-color: skyblue;
  border: 2px solid green;
  border-radius: 4px;
}
.mytable >>> .ant-pagination-item a {
  padding: 0 6px;
  color: red;
}
.mytable >>> .ant-pagination-item-active {
  background-color: #fff;
  border: 2px solid red;
}
.mytable >>> .ant-pagination-item-active a {
  color: yellowgreen;
}
.mytable >>> .ant-pagination-item:hover {
  background-color: #fff;
  border: 2px solid red;
}
.mytable >>> .ant-pagination-item:hover a {
  color: yellowgreen;
}
</style>

Input

<template>
  <div class="myinput">
    <a-input-search placeholder="input search text" enter-button />
  </div>
</template>

<script>
export default {
  name: 'test',
  data () {
    return {
      data: [],
      columns: []
    }
  }
}
</script>

<style scoped>
.myinput >>> .ant-input {
  border: 1px solid red;
  background-color: transparent;
  height: 32px;
  padding: 4px 11px;
  font-size: 18px;
}
.myinput >>> .ant-input:hover {
  border-color: blue;
}
.myinput >>> .ant-input:focus {
  border-color: blue;
}
.myinput >>> .ant-btn {
  color: #f5222d;
  background-color: #022e07;
  border-color: #f5222d;
  margin-left: 10px;
}
</style>

Tabs 标签页

<template>
  <div class="mytabs">
    <a-tabs>
      <a-tab-pane key="1" tab="Tab 1"> Content of tab 1 </a-tab-pane>
      <a-tab-pane key="2" tab="Tab 2"> Content of tab 2 </a-tab-pane>
      <a-tab-pane key="3" tab="Tab 3"> Content of tab 3 </a-tab-pane>
    </a-tabs>
  </div>
</template>

<script>
export default {
  name: 'test',
  data () {
    return {
    }
  }
}
</script>

<style scoped>
/* 位置(默认居中) */
.mytabs >>> .ant-tabs-nav-scroll {
  position: relative;
  height: 50px;
  background-color: pink;
}
.mytabs >>> .ant-tabs-nav {
  position: absolute;
  display: block;
  top: 0px;
  left: 0px;
}
/* tabs样式 */
.mytabs >>> .ant-tabs-tab {
  margin: 0px;
  padding: 12px 26px;
  color: #fff;
}
.mytabs >>> .ant-tabs-tab:hover {
  color: red;
}
.mytabs >>> .ant-tabs-tab-active {
  color: red;
  border: 2px solid red;
  background-color: blue;
}
/* tabs 取消默认下划线样式 */
.mytabs >>> .ant-tabs-ink-bar {
  background-color: transparent;
  height: 0px;
}
</style>

Menu 样式


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: antd-mobile-vue是一个基于Vue.js框架的移动端组件库,它提供了一系列UI组件,用于开发高质量的移动端应用。 与其它UI组件库相比,antd-mobile-vue具有以下优势和特点: 1. 高质量的组件:antd-mobile-vue提供了丰富的移动端UI组件,如按钮、表单、弹窗、导航等,这些组件都经过了精心设计和开发,具有统一的风格和良好的用户体验。 2. 灵活的布局:antd-mobile-vue提供了灵活的布局组件,如栅格布局、Flex布局,可帮助开发者快速搭建页面结构,并自适应不同的屏幕尺寸。 3. 易于使用和扩展:antd-mobile-vue的组件使用简单,开发者可以通过简单的配置和参数就可以实现复杂的交互效果。而且,antd-mobile-vue的组件提供了丰富的扩展能力,可以根据项目需求进行个性化的定制。 4. 生态丰富:antd-mobile-vue拥有庞大的开发者社区和活跃的维护团队,开发者可以通过官方文档和社区资源获取帮助和支持。此外,antd-mobile-vue还与其它Vue.js生态工具和库良好地兼容,如Vue Router、Vue CLI等。 5. 支持国际化:antd-mobile-vue提供了多语言支持,开发者可以根据项目需求灵活地切换多种语言环境。 总之,antd-mobile-vue是一个功能强大、易于使用和扩展的移动端组件库,它可以帮助开发者快速构建高质量的移动端应用,提高开发效率和用户体验。 ### 回答2: antd-mobile-vue是一种基于Vue.js框架的移动端UI库。它是对Ant Design Mobile的Vue组件实现的封装和扩展,旨在为开发者提供高质量、易用性的移动端组件库,帮助快速开发移动应用程序。 antd-mobile-vue提供了丰富的移动端UI组件,如按钮、导航栏、标签栏、列表、表单等,可以满足日常开发中绝大部分的界面需求。这些组件都经过精心设计和优化,在视觉和交互上都符合当前移动端的设计原则和用户体验。而且,它还提供了灵活的定制和扩展能力,允许开发者根据具体需求进行个性化定制,提高开发效率和用户体验。 除了UI组件外,antd-mobile-vue还提供了一些实用的工具和功能,如样式工具库、语言国际化、路由管理等。这些工具和功能都是为了让开发者更方便地进行移动应用开发,减少重复性的工作,提高开发效率。 antd-mobile-vue拥有广泛的社区支持和文档资料,开发者可以从社区中获取帮助和解决问题,学习和掌握使用该库的技巧和最佳实践。同时,antd-mobile-vue还提供了详细的官方文档和示例代码,方便开发者快速入手和上手该库。 总之,antd-mobile-vue是一款功能强大、易用性强的移动端UI库,适用于各种移动应用的开发。无论是个人开发者还是团队开发,都可以通过使用antd-mobile-vue来快速构建高质量的移动应用程序。 ### 回答3: antd-mobile-vue 是一个基于 Vue.js 的移动端 UI 组件库,它提供了丰富的移动端组件样式风格,可以帮助开发者快速构建优雅的移动端应用。 antd-mobile-vue 的特点有以下几个方面: 1. 高度可定制:antd-mobile-vue 提供了大量的组件,涵盖了移动端常见的UI元素,如按钮、导航栏、表单等,这些组件样式和交互行为都可以通过配置进行定制,满足不同项目的需求。 2. 兼容性强:antd-mobile-vue 提供了对不同移动端浏览器和操作系统的支持,保证组件在不同环境下的正常运行和展示,同时也保证了用户的使用体验。 3. 特色设计:antd-mobile-vue 的设计风格简洁、现代,符合移动端用户的审美要求,同时也遵循了 Material Design 和 iOS Human Interface Guidelines 等设计准则,保证了用户的熟悉感和易用性。 4. 文档丰富:antd-mobile-vue 提供了详细的文档和示例代码,开发者可以根据文档了解组件的使用方法和配置参数,快速上手使用。 5. 生态丰富:antd-mobile-vue 是基于 Ant Design Mobile(antd-mobile)的 Vue 实现,可以与其它 Vue 生态工具和插件无缝集成,如 Vue Router、Vuex 等,方便开发者构建复杂的移动应用。 总之,antd-mobile-vue 是一个强大而灵活的移动端 UI 组件库,它可以帮助开发者节省时间和精力,快速开发出高质量的移动应用。无论是个人项目还是企业应用,都可以考虑使用这个库来提升开发效率和用户体验。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值