vue iview 之使用

1 篇文章 0 订阅

注意 以前1.0时候的iview   只适用vue 1.x 的;

2.0官网:

https://www.iviewui.com/components/cascader

 

安装

npm install iview@1.0.1 --save  这个是安装1.0的。。。现在vue2.0 了 用不了!

npm install view-design --save    使用这个安装 2.0的。。。
npm WARN notsup Unsupported engine for v-click-outside-x@3.7.1: wanted: {"node":">=8.11.4","npm":"6.4.1"} (current: {"node":"10.15.3","npm":"6.12.0"})
npm WARN notsup Not compatible with your version of node/npm: v-click-outside-x@3.7.1
npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN iview@1.0.1 requires a peer of vue@^1.0.17 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ view-design@4.0.2
added 10 packages from 12 contributors in 11.878s
 

 cascader 之使用 

  首先 其数据格式要严格按照官网的  label  value  children;等等 ; 要不然会出错

先写这些 以后再补充;

<Cascader
  :data="clients"
  trigger="hover"
  change-on-select
  :not-found-text="conName"
  size="small"
  @on-change="handleClientChange">
  <div style="width: 100%;min-height: 60px; display:inline-flex;flex-direction: row;justify-content:space-between;">

  <a style="padding: 13px 13px 0 0;text-align: right;display: inline-block;width: 170px;"href="javascript:void(0)" >选择客户:</a>
  
  </div>
  </div>

</Cascader>

 友好的一点是添加了插槽。。随便给里面加东西//完美的。 比element ui 更自由;

 

vue 快要正式使用3.0了。。。最好 最自由的是自己写组件。。弄自己项目需要的,,,,现在项目紧,偷懒下 先用iview 的

good good study dayday up

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值