github airyland/vux v2.7.0

latest releases: v2.11.2, v2.11.1, v2.9.6...
6 years ago

变化

popup-picker 使用 popup-header 组件作为头部

头部使用 PopupHeader 组件来替代原来的代码(也是支持了 popupTitle属性),意味着如果你原来使用类名来覆盖样式会失效(这不是推荐的方式,但在这里提示一下)。Popup 样式在整个应用中应该是统一的,使用 PopupHeader 的变量配置更方便实现整体样式一致。

image

影响到的类名包括:

  • vux-popup-picker-header
  • vux-popup-picker-header-menu
  • vux-popup-picker-header-menu-right
  • vux-popup-picker-cancel

这些类名对应的 less 变量也会失效

@popup-picker-header-text-color: @theme-color;
@popup-picker-header-bg-color: #fbf9fe;
@popup-picker-header-font-size: 16px;
@popup-picker-header-cancel-text-color: #828282;

后面将使用以下变量进行配置:

@popup-header-height: 44px;
@popup-header-bg-color: #fbf9fe;
@popup-header-font-size: 16px;
@popup-header-left-text-color: #828282;
@popup-header-right-text-color: @theme-color;
@popup-header-title-text-color: #222;
@popup-header-left-text-padding: 15px;
@popup-header-right-text-padding: 15px;

qrcode 使用 style 设置宽高

旧版本下宽高为 size * dpr,考虑到不同设备的表现一致性,使用 ${size}px 作为宽高。

Picker 移动距离不再遵从 html 属性 data-dpr

影响到所有依赖 picker 的组件,包括 picker, popup-picker, datetime

从这一版本开始,如果需要使用 data-dpr 作为默认移动距离的倍数,应该使用 ConfigPlugin 作全局配置。

相关 issue #1979 #2082

import { ConfigPlugin } from 'vux'

Vue.use(ConfigPlugin, {
  $picker: {
    respectHtmlDataDpr: true
  }
})

完整更新

Calendar

  • [fix] fix top border #2104

Cell

  • [fix] fix ssr rendering issue

Checklist

  • [fix] fix default selected item missing issue #2122

Datetime

  • [fix] fix ssr i18n bug
  • [fix] fix datetime still shows when prop:readonly is true #2079

Flow

  • [feature] add slot:title for flow-state #2010

InlineCalendar

  • [enhance] call render function on created hook instead of mounted(ssr)
  • [feature] add prop:disable-weekend #2105
  • [feature] add prop:disable-date-function #2105
  • [fix] remove useless re-render function #2066

Picker

  • [change] picker move distance do not respect html[data-dpr] by default #2082 #1979

PopupPicker

  • [feature] add prop:popup-title(use component:popup-header) #1866

PopupRadio

  • [fix] fix vue@2.5.0 scope issue #2076

Qrcode

  • [fix] fix errors when value is undefined #2070
  • [change] use style to set width and height #2075

Selector

  • [fix] fix ssr rendering issue
  • [fix] fix placeholder not show when value is null #2101

Swiper

  • [enhance] set shorter distance for first and last item for better experience
  • [feature] add event:on-get-height #2112
  • [enhance] stop interval if auto is set to false #2027

XAddress

  • [fix] fix vue@2.5.0 scope issue #2076
  • [feature] add prop:popup-title(use component:popup-header) #1866

XDialog

  • [feature] add event:on-click-mask #2102

XSwitch

  • [feature] support prop:value-map #2104

Calendar

  • [fix] 修复上边框 #2104

Cell

  • [fix] 修复 ssr 渲染问题

Checklist

  • [fix] 修复默认选中项缺失问题 #2122

Datetime

  • [fix] 修复服务端渲染多语言 bug
  • [fix] 修复 readonly 为 true 时点击还会显示弹窗的问题 #2079

Flow

  • [feature] 为 flow-state 添加 slot:title #2010

InlineCalendar

  • [enhance] 在 created hook 执行渲染而不是 mounted(ssr)
  • [feature] 添加属性 prop:disable-weekend 来禁用周末 #2105
  • [feature] 添加属性 prop:disable-date-function 自定义标记禁用日期 #2105
  • [fix] 移除重复的多次重复渲染 #2066

Picker

  • [change] picker 移动距离不再遵从 html[data-dpr],需使用 ConfigPlugin 配置 #2082 #1979

PopupPicker

  • [feature] 增加属性 popup-title(使用 popup-header 组件) #1866

PopupRadio

  • [fix] 兼容 vue@2.5.0 scope 更名为 slot-scope 的问题 #2076

Qrcode

  • [fix] 修复 value 为 undefined 时报错的问题 #2070
  • [change] 使用 style 样式设置宽高 #2075

Selector

  • [fix] 兼容服务端渲染
  • [fix] 修复值为 null 时 placeholder 没有显示的问题 #2101

Swiper

  • [enhance] 非循环模式下对第一张和最后一张使用更短的拖动距离
  • [feature] 添加事件 event:on-get-height #2112
  • [enhance] auto 支持动态设置 #2027

XAddress

  • [fix] 兼容 vue@2.5.0 scope 更名为 slot-scope 的问题 #2076
  • [feature] 增加属性 popup-title(使用 popup-header 组件) #1866

XDialog

  • [feature] 添加事件 on-click-mask #2102

XSwitch

  • [feature] 支持 prop:value-map 自定义值映射,比如 [0, 1] ["0", "1"] 等接口可能返回的非 boolean 值 #2104

Don't miss a new vux release

NewReleases is sending notifications on new releases.