2022-06-28

单词换行

```

兼容 IE 和 FF 的换行 CSS 推荐样式

  最好的方式是word-wrap:break-word; overflow:hidden;

  而不是word-wrap:break-word; word-break:break-all;

  也不是word-wrap:break-word; overflow:auto;

```

slot

```

在template的table中

<template slot-scope="{ row }" slot="effectiveTime">

    <span>{{ row.effectiveTime }}</span>

    <span style="margin: 0 5px">至</span>

    <span>{{ row.expireTime }}</span>

</template>


在data的column中

{

    title: "有效期",

    key: "effectiveTime",

    align: "center",

    slot: "effectiveTime",

},

```

表格渲染

```

render: (h, params) => {

            return h("div",

            [h( "Button",{style:{},props:{},on:{click:()=>{}}},xxx)]

            )

        }

```

打电话

```

<a class="phone-text" href='tel:4000057995'>4000057995</a>

```

Unicode

```

&#32; == 普通的英文半角空格

&#160; == &nbsp; == &#xA0; == no-break space (普通的英文半角空格但不换行)

&#12288; == 中文全角空格 (一个中文宽度)

&#8194; == &ensp; == en空格 (半个中文宽度)

&#8195; == &emsp; == em空格 (一个中文宽度)

&#8197; == 四分之一em空格 (四分之一中文宽度)

```

滚动条样式

```

::-webkit-scrollbar {

  width: 4px;

}

::-webkit-scrollbar-thumb {

  border-radius: 100px;

  background: #c4c9d3;

}

::-webkit-scrollbar-track {

  background: transparent;

}

::-webkit-scrollbar-corner {

  background: transparent;

}

```

class

```

:class="{ 'order_status': true, 'cancel': item.transactionStatus == '12'}"

```

省略号显示

```

overflow: hidden;

white-space: nowrap;

text-overflow: ellipsis;

```

iView 的Select组件点击时 向上开启

```

placement="top"

```

视图都被渲染之后才运行

```

mounted() {

  this.$nextTick(function () {

    // 仅在整个视图都被渲染之后才会运行的代码

  })

}

```

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容