血透系统PC前端

option_check_box.vue 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <label class="option_panel">
  3. <span class="check_box_panel">
  4. <span class="check_box" :class="{ 'did_checked': checked, }"></span>
  5. </span>
  6. <span>{{ text }}</span>
  7. </label>
  8. </template>
  9. <script>
  10. export default {
  11. name: "OptionCheckBox",
  12. props: {
  13. text: {
  14. type: String,
  15. },
  16. checked: {
  17. type: Boolean,
  18. default: false,
  19. }
  20. }
  21. }
  22. </script>
  23. <style scoped>
  24. .option_panel {
  25. margin: 0 5px 0 0;
  26. /* font-size: 16px; */
  27. }
  28. .option_panel .check_box_panel {
  29. white-space: nowrap;
  30. outline: none;
  31. display: inline-block;
  32. line-height: 1;
  33. position: relative;
  34. vertical-align: middle;
  35. }
  36. .option_panel .check_box_panel .check_box {
  37. display: inline-block;
  38. position: relative;
  39. border: 1px solid #000;
  40. box-sizing: border-box;
  41. width: 14px;
  42. height: 14px;
  43. background-color: #fff;
  44. }
  45. .check_box_panel .did_checked::after {
  46. content: "√";
  47. font-size: 15px;
  48. }
  49. </style>