特易招,招聘小程序
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.

58 lines
887 B

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