1// 妿æ³åæ¢è½®ææ¹å¼çï¼è¿é¶çè¯ï¼å¯ä»¥çè¿ä¸ª https://github.surmon.me/vue-awesome-swiper/ 2// å½ç¶ä½ ä¹å¯ä»¥å¼å ¥jqueryæä»¶ï¼é½å¯ä»¥ç, ä¸åªæ¯è½®æå¾ï¼å ¶ä»ç¹æä¹å¯ä»¥ 3new Vue({ 4 el: "#myHistorySwiper", // elä¸è¦æ¯æå¤é¢çid_nameï¼åºè¯¥æ¯html: ''éçdivçid 5 data: function () { 6 return { 7 swiperOption: { 8 effect: "cube", // è½®æç¹æ 9 loop: true, // å¾ªç¯ 10 autoplay: { 11 delay: 2500, 12 disableOnInteraction: false, 13 }, 14 }, 15 content: [], 16 }; 17 }, 18 computed: { 19 swiper() { 20 return this.$refs.myhistoryswiper.$swiper; 21 }, 22 }, 23 created() { 24 this.getHistoryList(); 25 }, 26 methods: { 27 // é¼ æ ç§»å ¥åæ¢è½®æ 28 stopAutoPlay() { 29 this.swiperOption.autoplay && this.swiper.autoplay.stop(); 30 }, 31 // é¼ æ ç§»åºå¼å§è½®æ 32 startAutoPlay() { 33 this.swiperOption.autoplay && this.swiper.autoplay.start(); 34 }, 35 // 请æ±å¼æºapi, è·ååå²ä¸çä»å¤©æ°æ® 36 getHistoryList() { 37 fetch("https://tenapi.cn/v2/history", { 38 method: "GET", // *GET, POST, PUT, DELETE, etc. 39 }) 40 .then((res) => { 41 return res.json(); 42 }) 43 .then((data) => { 44 this.content = data.data.list; 45 }) 46 .catch((err) => { 47 console.log("err", err); 48 }); 49 }, 50 }, 51});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.