特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
943 B

6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
  1. <template>
  2. <uv-swipe-action>
  3. <view
  4. v-for="(item, index) in list"
  5. class="item"
  6. :key="index"
  7. >
  8. <uv-swipe-action-item
  9. @click="e => clickSwipeAction(e, item)"
  10. :options="options">
  11. <userItem :item="keyName ? item[keyName] : item"
  12. :createTime="item.createTime"/>
  13. </uv-swipe-action-item>
  14. </view>
  15. </uv-swipe-action>
  16. </template>
  17. <script>
  18. import userItem from './userItem.vue'
  19. export default {
  20. components : {
  21. userItem
  22. },
  23. props : {
  24. options : {
  25. default : [
  26. {
  27. text: '删除',
  28. style: {
  29. backgroundColor: '#FA5A0A'
  30. }
  31. },
  32. ],
  33. },
  34. list : {
  35. default : []
  36. },
  37. keyName : {
  38. default : ''
  39. },
  40. },
  41. data() {
  42. return {
  43. }
  44. },
  45. methods: {
  46. clickSwipeAction(e, item){
  47. this.$emit('clickSwipeAction', {e, item})
  48. },
  49. }
  50. }
  51. </script>
  52. <style scoped lang="scss">
  53. .item{
  54. margin: 20rpx;
  55. border-radius: 20rpx;
  56. overflow: hidden;
  57. }
  58. </style>