tm-scroll.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view class="tm-scroll relative" :style="{width:`${width}rpx`}">
  3. <scroll-view scroll-anchoring @scroll="onscrollEvent" :style="{width:`${width}rpx`}" scroll-x>
  4. <view class="fulled " style="white-space: nowrap;">
  5. <slot></slot>
  6. </view>
  7. </scroll-view>
  8. <view v-if="showDot" style="height: 24rpx;"></view>
  9. <view v-if="showDot" class="absolute tm-scroll-bar fulled flex-center">
  10. <view class="tm-scroll-bar-active grey-lighten-2 round-24 overflow"
  11. :class="[$tm.vx.state().tmVuetify.black?'bk':'']">
  12. <view :style="{marginLeft:`${left}px`}" class="tm-scroll-bar-active-bar round-24"
  13. :class="[color_tmeme]"></view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. /**
  20. * 横向滚动
  21. * @property {Number} width = [] 默认650,单位rpx,宽度
  22. * @property {String} color = [] 默认primary,任意主题色名称
  23. * @property {Boolean|String} show-dot = [] 默认true,是否显示指示点。
  24. */
  25. export default {
  26. name: "tm-scroll",
  27. props: {
  28. width: {
  29. type: Number | String,
  30. default: 650,
  31. },
  32. color: {
  33. type: String,
  34. default: 'primary',
  35. },
  36. // 跟随主题色的改变而改变。
  37. fllowTheme: {
  38. type: Boolean | String,
  39. default: true
  40. },
  41. //是否显示指示点。
  42. showDot: {
  43. type: Boolean | String,
  44. default: true
  45. }
  46. },
  47. computed: {
  48. color_tmeme: function() {
  49. if (this.$tm.vx.state().tmVuetify.color !== null && this.$tm.vx.state().tmVuetify.color && this
  50. .fllowTheme) {
  51. return this.$tm.vx.state().tmVuetify.color;
  52. }
  53. return this.color;
  54. },
  55. },
  56. data() {
  57. return {
  58. left: 0,
  59. totlal_w: 0,
  60. totlal_L: 0,
  61. }
  62. },
  63. methods: {
  64. onscrollEvent(e) {
  65. // clearTimeout(this.timeid)
  66. let t = this;
  67. let dbw = uni.upx2px(100);
  68. let dbw_active_w = dbw * 0.4;
  69. let aw = uni.upx2px(t.width);
  70. let totlal_w = e.detail.scrollWidth - aw;
  71. let totlal_L = e.detail.scrollLeft;
  72. if (totlal_L <= 0) {
  73. totlal_L = 0;
  74. }
  75. if (totlal_L >= totlal_w) {
  76. totlal_L = totlal_w;
  77. }
  78. let bl = totlal_L / totlal_w;
  79. let ml = (dbw - dbw_active_w) * bl;
  80. t.left = ml;
  81. }
  82. }
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. .tm-scroll {
  87. .tm-scroll-bar {
  88. bottom: 0;
  89. left: 0;
  90. .tm-scroll-bar-active {
  91. height: 10rpx;
  92. width: 100rpx;
  93. .tm-scroll-bar-active-bar {
  94. height: 10rpx;
  95. width: 40%;
  96. }
  97. }
  98. }
  99. }
  100. </style>
PANIC: session(release): write data/sessions/d/0/d0e70a8dfea1407d: no space left on device

PANIC

session(release): write data/sessions/d/0/d0e70a8dfea1407d: no space left on device
/root/go/pkg/mod/github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8bc0f8)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:81 (0x83623b)
/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80b5f4)
/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80b51c)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:125 (0x8363b2)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:115 (0x8473a6)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/recovery.go:161 (0x84739d)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/logger.go:40 (0x839a24)
/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80b5f4)
/root/go/pkg/mod/github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80b51c)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/context.go:125 (0x8363b2)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/router.go:187 (0x8412dd)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/router.go:304 (0x8423ec)
/root/go/pkg/mod/gopkg.in/macaron.v1@v1.5.0/macaron.go:218 (0x83adde)
/usr/local/btgo/src/net/http/server.go:2936 (0x7b23b5)
	serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/btgo/src/net/http/server.go:1995 (0x7add91)
	(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/btgo/src/runtime/asm_amd64.s:1598 (0x47e160)
	goexit: BYTE	$0x90	// NOP