選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Attribution.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * @Author: Caven
  3. * @Date: 2020-02-11 21:08:01
  4. * @Last Modified by: Caven
  5. * @Last Modified time: 2020-03-15 18:47:07
  6. */
  7. import Widget from './Widget'
  8. class Attribution extends Widget {
  9. constructor() {
  10. super()
  11. this._wapper = DC.DomUtil.create('div', 'dc-attribution')
  12. this._wapper.style.cssText = `
  13. position: absolute;
  14. left: 2px;
  15. bottom: 2px;
  16. font-size: 14px;
  17. color: rgb(255, 255, 255);
  18. background: rgba(0,0,0,0.6);
  19. padding: 2px 5px;
  20. border-radius: 2px;
  21. user-select: none;
  22. box-shadow: 2px 2px 3px #2b2b2b;
  23. `
  24. this._config = undefined
  25. this.type = DC.WidgetType.ATTRIBUTION
  26. }
  27. _installHook() {
  28. let span = DC.DomUtil.create('span', '', this._wapper)
  29. span.innerHTML = '数字视觉'
  30. span.style.cssText = `margin-right:5px;`
  31. let a = DC.DomUtil.create('a', '', this._wapper)
  32. a.innerHTML = 'Digital Visual'
  33. a.href = 'javascirpt:void(0)'
  34. a.onclick = () => {
  35. window.open('http://dc.cavencj.cn')
  36. }
  37. a.style.cssText = `color:#0078A8;`
  38. this.enable = true
  39. }
  40. }
  41. DC.WidgetType.ATTRIBUTION = 'attribution'
  42. export default Attribution