当前环境:vue2.0 + uniapp + uview1.8.8
效果:类似这种
<template>
<view>
<uni-tooltip :content="content" placement="left">
{{ content.length > 9 ? content.substring(0, 9) + ".." : content }}
</uni-tooltip>
</view>
</template>
<script>
export default {
data() {
return {
content: "我是测试内容我是测试内容我是测试内容我是测试内容",
};
},
methods: {},
};
</script>
<style lang="scss" scoped></style>