WazeWrap Beta

A base library for WME script writers

当前为 2016-11-16 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/24870/158076/WazeWrap%20Beta.js

  1. // ==UserScript==
  2. // @name WazeWrap Beta
  3. // @namespace https://gf.qytechs.cn/users/30701-justins83-waze
  4. // @version 0.1.3
  5. // @description A base library for WME script writers
  6. // @author JustinS83/MapOMatic
  7. // @include https://beta.waze.com/*editor/*
  8. // @include https://www.waze.com/*editor/*
  9. // @exclude https://www.waze.com/*user/editor/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. /* global W */
  14. /* global WazeWrap */
  15.  
  16. (function() {
  17.  
  18. function bootstrap(tries) {
  19. tries = tries || 1;
  20. if (window.W &&
  21. window.W.map &&
  22. window.W.model &&
  23. window.W.loginManager &&
  24. $) {
  25. init();
  26. } else if (tries < 1000) {
  27. setTimeout(function () { bootstrap(tries++); }, 200);
  28. } else {
  29. console.log('WazeWrap failed to load');
  30. }
  31. }
  32.  
  33. bootstrap();
  34.  
  35. function init(){
  36. //extendModel();
  37. //extendGeometry();
  38.  
  39. var oldLib = window.WazeWrap;
  40.  
  41. var root = this;
  42. var WazeWrap = {};
  43.  
  44. WazeWrap.Version = "0.1.3";
  45.  
  46. SetUpRequire();
  47.  
  48. WazeWrap.isBetaEditor = /beta/.test(location.href);
  49. WazeWrap.test = "test";
  50. WazeWrap.Geometry = new Geometry;
  51. WazeWrap.Model = new Model;
  52. WazeWrap.Interface = new Interface;
  53. WazeWrap.User = new User;
  54. WazeWrap.Util = new Util;
  55. root.WazeWrap = WazeWrap;
  56.  
  57. console.log('WazeWrap Loaded');
  58. };
  59.  
  60.  
  61. function SetUpRequire(){
  62. // setup one global var and put all in
  63. var WMEAPI = {};
  64.  
  65. // detect URL of WME source code
  66. WMEAPI.scripts = document.getElementsByTagName('script');
  67. WMEAPI.url=null;
  68. for (i=0;i<WMEAPI.scripts.length;i++){
  69. if (WMEAPI.scripts[i].src.indexOf('/assets-editor/js/app')!=-1)
  70. {
  71. WMEAPI.url=WMEAPI.scripts[i].src;
  72. break;
  73. }
  74. }
  75. if (WMEAPI.url==null)
  76. throw new Error("WME Hack: can't detect WME main JS");
  77.  
  78.  
  79. // setup a fake require and require.define
  80. WMEAPI.require=function (e) {
  81. if (WMEAPI.require.define.modules.hasOwnProperty(e))
  82. return WMEAPI.require.define.modules[e];
  83. else
  84. console.error('Require failed on ' + e, WMEAPI.require.define.modules);
  85. return null;
  86. };
  87.  
  88. WMEAPI.require.define=function (m) {
  89. if (WMEAPI.require.define.hasOwnProperty('modules')==false)
  90. WMEAPI.require.define.modules={};
  91. for (var p in m){
  92. WMEAPI.require.define.modules[p]=m[p];
  93. }
  94. };
  95.  
  96. // save the original webpackJsonp function
  97. WMEAPI.tmp = window.webpackJsonp;
  98.  
  99. // taken from WME code: this function is a wrapper that setup the API and may call recursively other functions
  100. WMEAPI.t = function (n) {
  101. if (WMEAPI.s[n]) return WMEAPI.s[n].exports;
  102. var r = WMEAPI.s[n] = {
  103. exports: {},
  104. id: n,
  105. loaded: !1
  106. };
  107. return WMEAPI.e[n].call(r.exports, r, r.exports, WMEAPI.t), r.loaded = !0, r.exports;
  108. };
  109.  
  110. // e is a copy of all WME funcs because function t need to access to this list
  111. WMEAPI.e=[];
  112.  
  113. // the patch
  114. window.webpackJsonp = function(a, i) {
  115. // our API but we will use it only to build the require stuffs
  116. var api={};
  117. // taken from WME code. a is [1], so...
  118. for (var o, d, u = 0, l = []; u < a.length; u++) d = a[u], WMEAPI.r[d] && l.push.apply(l, WMEAPI.r[d]), WMEAPI.r[d] = 0;
  119. var unknownCount=0;
  120. var classname, funcStr;
  121. // copy i in e and keep a link from classname to index in e
  122. for (o in i){
  123. WMEAPI.e[o] = i[o];
  124. funcStr = i[o].toString();
  125. classname = funcStr.match(/CLASS_NAME:\"([^\"]*)\"/);
  126. if (classname){
  127. // keep the link.
  128. api[classname[1].replace(/\./g,'/').replace(/^W\//, 'Waze/')]={index: o, func: WMEAPI.e[o]};
  129. }
  130. else{
  131. api['Waze/Unknown/' + unknownCount]={index: o, func: WMEAPI.e[o]};
  132. unknownCount++;
  133. }
  134. }
  135. // taken from WME code: it calls the original webpackJsonp and do something else, but I don't really know what.
  136. // removed the call to the original webpackJsonp: still works...
  137. //for (tmp && tmp(a, i); l.length;) l.shift().call(null, t);
  138. for (; l.length;) l.shift().call(null, WMEAPI.t);
  139. WMEAPI.s[0] = 0;
  140. // run the first func of WME. This first func will call recusrsively all funcs needed to setup the API.
  141. // After this call, s will contain all instanciables classes.
  142. //var ret = WMEAPI.t(0);
  143. // now, build the requires thanks to the link we've built in var api.
  144. var module={};
  145. var apiFuncName;
  146. unknownCount=0;
  147. for (o in i){
  148. funcStr = i[o].toString();
  149. classname = funcStr.match(/CLASS_NAME:\"([^\"]*)\"/);
  150. if (classname){
  151. module={};
  152. apiFuncName = classname[1].replace(/\./g,'/').replace(/^W\//, 'Waze/');
  153. module[apiFuncName]=WMEAPI.t(api[apiFuncName].index);
  154. WMEAPI.require.define(module);
  155. }
  156. else{
  157. var matches = funcStr.match(/SEGMENT:"segment",/);
  158. if (matches){
  159. module={};
  160. apiFuncName='Waze/Model/ObjectType';
  161. module[apiFuncName]=WMEAPI.t(api['Waze/Unknown/' + unknownCount].index);
  162. WMEAPI.require.define(module);
  163. }
  164. unknownCount++;
  165. }
  166. }
  167.  
  168. // restore the original func
  169. window.webpackJsonp=WMEAPI.tmp;
  170.  
  171. // set the require public if needed
  172. // if so: others scripts must wait for the window.require to be available before using it.
  173. window.require = WMEAPI.require;
  174. // all available functions are in WMEAPI.require.define.modules
  175. // console.debug this variable to read it:
  176. // console.debug('Modules: ', WMEAPI.require.define.modules);
  177. // run your script here:
  178. // setTimeout(yourscript);
  179. // again taken from WME code. Not sure about what it does.
  180. //if (i[0]) return ret;
  181. };
  182.  
  183. // some kind of global vars and init
  184. WMEAPI.s = {};
  185. WMEAPI.r = {
  186. 0: 0
  187. };
  188.  
  189. // hacking finished
  190.  
  191. // load again WME through our patched func
  192. WMEAPI.WMEHACK_Injected_script = document.createElement("script");
  193. WMEAPI.WMEHACK_Injected_script.setAttribute("type", "application/javascript");
  194. WMEAPI.WMEHACK_Injected_script.src = WMEAPI.url;
  195. document.body.appendChild(WMEAPI.WMEHACK_Injected_script);
  196. }
  197.  
  198. function Geometry(){
  199. //var geometry = WazeWrap.Geometry;
  200.  
  201. //Converts to "normal" GPS coordinates
  202. this.ConvertTo4326 = function (long, lat){
  203. var projI=new OpenLayers.Projection("EPSG:900913");
  204. var projE=new OpenLayers.Projection("EPSG:4326");
  205. return (new OpenLayers.LonLat(long, lat)).transform(projI,projE);
  206. };
  207. this.ConvertTo900913 = function (long, lat){
  208. var projI=new OpenLayers.Projection("EPSG:900913");
  209. var projE=new OpenLayers.Projection("EPSG:4326");
  210. return (new OpenLayers.LonLat(long, lat)).transform(projE,projI);
  211. };
  212.  
  213. //Converts the Longitudinal offset to an offset in 4326 gps coordinates
  214. this.CalculateLongOffsetGPS = function(longMetersOffset, long, lat)
  215. {
  216. var R= 6378137; //Earth's radius
  217. var dLon = longMetersOffset / (R * Math.cos(Math.PI * lat / 180)); //offset in radians
  218. var lon0 = dLon * (180 / Math.PI); //offset degrees
  219.  
  220. return lon0;
  221. };
  222.  
  223. //Converts the Latitudinal offset to an offset in 4326 gps coordinates
  224. this.CalculateLatOffsetGPS = function(latMetersOffset, lat)
  225. {
  226. var R= 6378137; //Earth's radius
  227. var dLat = latMetersOffset/R;
  228. var lat0 = dLat * (180 /Math.PI); //offset degrees
  229.  
  230. return lat0;
  231. };
  232. this.isLonLatInMapExtent = function (lonLat) {
  233. 'use strict';
  234. return lonLat && W.map.getExtent().containsLonLat(lonLat);
  235. };
  236. this.isGeometryInMapExtent = function (geometry) {
  237. 'use strict';
  238. return geometry && geometry.getBounds &&
  239. W.map.getExtent().intersectsBounds(geometry.getBounds());
  240. };
  241. };
  242.  
  243. function Model(){
  244. //var model = WazeWrap.Model;
  245.  
  246. this.getPrimaryStreetID = function(segmentID){
  247. return W.model.segments.get(segmentID).attributes.primaryStreetID;
  248. };
  249.  
  250. this.getStreetName = function(primaryStreetID){
  251. return W.model.streets.get(PrimaryStreetID).name;
  252. };
  253.  
  254. this.getCityID = function(primaryStreetID){
  255. return W.model.streets.get(primaryStreetID).cityID;
  256. };
  257.  
  258. this.getCityName = function(primaryStreetID){
  259. return W.model.cities.get(this.getCityID(primaryStreetID)).attributes.Name;
  260. };
  261.  
  262. this.getStateName = function(primaryStreetID){
  263. return W.model.states.get(getStateID(primaryStreetID)).Name;
  264. };
  265.  
  266. this.getStateID = function(primaryStreetID){
  267. return W.model.cities.get(primaryStreetID).attributes.stateID;
  268. };
  269.  
  270. this.getCountryID = function(primaryStreetID){
  271. return W.model.cities.get(this.getCityID(primaryStreetID)).attributes.CountryID;
  272. };
  273.  
  274. this.getCountryName = function(primaryStreetID){
  275. return W.model.countries.get(getCountryID(primaryStreetID)).name;
  276. };
  277.  
  278. this.getCityNameFromSegmentObj = function(segObj){
  279. return this.getCityName(segObj.attributes.primaryStreetID);
  280. };
  281.  
  282. this.getStateNameFromSegmentObj = function(segObj){
  283. return this.getStateName(segObj.attributes.primaryStreetID);
  284. };
  285.  
  286. //returns an array of segmentIDs for all segments that are part of the same roundabout as the passed segment
  287. this.getAllRoundaboutSegmentsFromObj = function(segObj){
  288. if(segObj.model.attributes.junctionID === null)
  289. return null;
  290.  
  291. return W.model.junctions.objects[segObj.model.attributes.junctionID].segIDs;
  292. };
  293.  
  294. this.getAllRoundaboutJunctionNodesFromObj = function(segObj){
  295. var RASegs = this.getAllRoundaboutSegmentsFromObj(segObj);
  296. var RAJunctionNodes = [];
  297. for(i=0; i< RASegs.length; i++){
  298. RAJunctionNodes.push(W.model.nodes.objects[W.model.segments.get(RASegs[i]).attributes.toNodeID]);
  299.  
  300. }
  301. return RAJunctionNodes;
  302. };
  303.  
  304. this.isRoundaboutSegmentID = function(segmentID){
  305. if(W.model.segments.get(segmentID).attributes.junctionID === null)
  306. return false;
  307. else
  308. return true;
  309. };
  310.  
  311. this.isRoundaboutSegmentObj = function(segObj){
  312. if(segObj.model.attributes.junctionID === null)
  313. return false;
  314. else
  315. return true;
  316. };
  317.  
  318. /**
  319. * Defers execution of a callback function until the WME map and data
  320. * model are ready. Call this function before calling a function that
  321. * causes a map and model reload, such as W.map.moveTo(). After the
  322. * move is completed the callback function will be executed.
  323. * @function WazeWrap.Model.onModelReady
  324. * @param {Function} callback The callback function to be executed.
  325. * @param {Boolean} now Whether or not to call the callback now if the
  326. * model is currently ready.
  327. * @param {Object} context The context in which to call the callback.
  328. */
  329. this.onModelReady = function (callback, now, context) {
  330. var deferModelReady = function () {
  331. return $.Deferred(function (dfd) {
  332. var resolve = function () {
  333. dfd.resolve();
  334. W.model.events.unregister('mergeend', null, resolve);
  335. };
  336. W.model.events.register('mergeend', null, resolve);
  337. }).promise();
  338. };
  339. var deferMapReady = function () {
  340. return $.Deferred(function (dfd) {
  341. var resolve = function () {
  342. dfd.resolve();
  343. W.vent.off('operationDone', resolve);
  344. };
  345. W.vent.on('operationDone', resolve);
  346. }).promise();
  347. };
  348.  
  349. if (typeof callback === 'function') {
  350. context = context || callback;
  351. if (now && WazeWrap.Util.mapReady() && WazeWrap.Util.modelReady()) {
  352. callback.call(context);
  353. } else {
  354. $.when(deferMapReady() && deferModelReady()).
  355. then(function () {
  356. callback.call(context);
  357. });
  358. }
  359. }
  360. };
  361. };
  362. function User(){
  363. this.Rank = function(){
  364. return W.loginManager.user.normalizedLevel;
  365. };
  366.  
  367. this.Username = function(){
  368. return W.loginManager.user.userName;
  369. };
  370.  
  371. this.isCM = function(){
  372. if(W.loginManager.user.editableCountryIDs.length > 0)
  373. return true;
  374. else
  375. return false;
  376. };
  377. this.isAM = function(){
  378. return W.loginManager.user.isAreaManager;
  379. };
  380. };
  381. function Util(){
  382. /**
  383. * Function to defer function execution until an element is present on
  384. * the page.
  385. * @function WazeWrap.Util.waitForElement
  386. * @param {String} selector The CSS selector string or a jQuery object
  387. * to find before executing the callback.
  388. * @param {Function} callback The function to call when the page
  389. * element is detected.
  390. * @param {Object} [context] The context in which to call the callback.
  391. */
  392. this.waitForElement = function (selector, callback, context) {
  393. var jqObj;
  394.  
  395. if (!selector || typeof callback !== 'function') {
  396. return;
  397. }
  398.  
  399. jqObj = typeof selector === 'string' ?
  400. $(selector) : selector instanceof $ ? selector : null;
  401.  
  402. if (!jqObj.size()) {
  403. window.requestAnimationFrame(function () {
  404. WazeWrap.Util.waitForElement(selector, callback, context);
  405. });
  406. } else {
  407. callback.call(context || callback);
  408. }
  409. };
  410.  
  411. /**
  412. * Function to track the ready state of the map.
  413. * @function WazeWrap.Util.mapReady
  414. * @return {Boolean} Whether or not a map operation is pending or
  415. * undefined if the function has not yet seen a map ready event fired.
  416. */
  417. this.mapReady = function () {
  418. var mapReady = true;
  419. W.vent.on('operationPending', function () {
  420. mapReady = false;
  421. });
  422. W.vent.on('operationDone', function () {
  423. mapReady = true;
  424. });
  425. return function () {
  426. return mapReady;
  427. };
  428. } ();
  429. };
  430.  
  431. function Interface() {
  432. /**
  433. * Generates id for message bars.
  434. * @private
  435. */
  436. var getNextID = function () {
  437. var id = 1;
  438. return function () {
  439. return id++;
  440. };
  441. } ();
  442. this.Shortcut = OL.Class(this, /** @lends WazeWrap.Interface.Shortcut.prototype */ {
  443. name: null,
  444. group: null,
  445. shortcut: {},
  446. callback: null,
  447. scope: null,
  448. groupExists: false,
  449. actionExists: false,
  450. eventExists: false,
  451. defaults: {
  452. group: 'default'
  453. },
  454. /**
  455. * Creates a new {WazeWrap.Interface.Shortcut}.
  456. * @class
  457. * @name WazeWrap.Interface.Shortcut
  458. * @param name {String} The name of the shortcut.
  459. * @param group {String} The name of the shortcut group.
  460. * @param shortcut {String} The shortcut key(s). The shortcut
  461. * should be of the form 'i' where i is the keyboard shortuct or
  462. * include modifier keys such as 'CSA+i', where C = the control
  463. * key, S = the shift key, A = the alt key, and i = the desired
  464. * keyboard shortcut. The modifier keys are optional.
  465. * @param callback {Function} The function to be called by the
  466. * shortcut.
  467. * @param scope {Object} The object to be used as this by the
  468. * callback.
  469. * @return {WazeWrap.Interface.Shortcut} The new shortcut object.
  470. * @example //Creates new shortcut and adds it to the map.
  471. * shortcut = new WazeWrap.Interface.Shortcut('myName', 'myGroup', 'C+p', callbackFunc, null).add();
  472. */
  473. initialize: function (name, group, shortcut, callback, scope) {
  474. if ('string' === typeof name && name.length > 0 &&
  475. 'string' === typeof shortcut && shortcut.length > 0 &&
  476. 'function' === typeof callback) {
  477. this.name = name;
  478. this.group = group || this.defaults.group;
  479. this.callback = callback;
  480. this.shortcut[shortcut] = name;
  481. if ('object' !== typeof scope) {
  482. this.scope = null;
  483. } else {
  484. this.scope = scope;
  485. }
  486. return this;
  487. }
  488. },
  489. /**
  490. * Determines if the shortcut's group already exists.
  491. * @private
  492. */
  493. doesGroupExist: function () {
  494. this.groupExists = 'undefined' !== typeof W.accelerators.Groups[this.group] &&
  495. undefined !== typeof W.accelerators.Groups[this.group].members &&
  496. W.accelerators.Groups[this.group].length > 0;
  497. return this.groupExists;
  498. },
  499. /**
  500. * Determines if the shortcut's action already exists.
  501. * @private
  502. */
  503. doesActionExist: function () {
  504. this.actionExists = 'undefined' !== typeof W.accelerators.Actions[this.name];
  505. return this.actionExists;
  506. },
  507. /**
  508. * Determines if the shortcut's event already exists.
  509. * @private
  510. */
  511. doesEventExist: function () {
  512. this.eventExists = 'undefined' !== typeof W.accelerators.events.listeners[this.name] &&
  513. W.accelerators.events.listeners[this.name].length > 0 &&
  514. this.callback === W.accelerators.events.listeners[this.name][0].func &&
  515. this.scope === W.accelerators.events.listeners[this.name][0].obj;
  516. return this.eventExists;
  517. },
  518. /**
  519. * Creates the shortcut's group.
  520. * @private
  521. */
  522. createGroup: function () {
  523. W.accelerators.Groups[this.group] = [];
  524. W.accelerators.Groups[this.group].members = [];
  525. },
  526. /**
  527. * Registers the shortcut's action.
  528. * @private
  529. */
  530. addAction: function () {
  531. W.accelerators.addAction(this.name, { group: this.group });
  532. },
  533. /**
  534. * Registers the shortcut's event.
  535. * @private
  536. */
  537. addEvent: function () {
  538. W.accelerators.events.register(this.name, this.scope, this.callback);
  539. },
  540. /**
  541. * Registers the shortcut's keyboard shortcut.
  542. * @private
  543. */
  544. registerShortcut: function () {
  545. W.accelerators._registerShortcuts(this.shortcut);
  546. },
  547. /**
  548. * Adds the keyboard shortcut to the map.
  549. * @return {WazeWrap.Interface.Shortcut} The keyboard shortcut.
  550. */
  551. add: function () {
  552. /* If the group is not already defined, initialize the group. */
  553. if (!this.doesGroupExist()) {
  554. this.createGroup();
  555. }
  556.  
  557. /* Clear existing actions with same name */
  558. if (this.doesActionExist()) {
  559. W.accelerators.Actions[this.name] = null;
  560. }
  561. this.addAction();
  562.  
  563. /* Register event only if it's not already registered */
  564. if (!this.doesEventExist()) {
  565. this.addEvent();
  566. }
  567.  
  568. /* Finally, register the shortcut. */
  569. this.registerShortcut();
  570. return this;
  571. },
  572. /**
  573. * Removes the keyboard shortcut from the map.
  574. * @return {WazeWrap.Interface.Shortcut} The keyboard shortcut.
  575. */
  576. remove: function () {
  577. if (this.doesEventExist()) {
  578. W.accelerators.events.unregister(this.name, this.scope, this.callback);
  579. }
  580. if (this.doesActionExist()) {
  581. delete W.accelerators.Actions[this.name];
  582. }
  583. //remove shortcut?
  584. return this;
  585. },
  586. /**
  587. * Changes the keyboard shortcut and applies changes to the map.
  588. * @return {WazeWrap.Interface.Shortcut} The keyboard shortcut.
  589. */
  590. change: function (shortcut) {
  591. if (shortcut) {
  592. this.shortcut = {};
  593. this.shortcut[shortcut] = this.name;
  594. this.registerShortcut();
  595. }
  596. return this;
  597. }
  598. }),
  599.  
  600. this.Tab = OL.Class(this, {
  601. /** @lends WazeWrap.Interface.Tab */
  602. TAB_SELECTOR: '#user-tabs ul.nav-tabs',
  603. CONTENT_SELECTOR: '#user-info div.tab-content',
  604. callback: null,
  605. $content: null,
  606. context: null,
  607. $tab: null,
  608. /**
  609. * Creates a new WazeWrap.Interface.Tab. The tab is appended to the WME
  610. * editor sidebar and contains the passed HTML content.
  611. * @class
  612. * @name WazeWrap.Interface.Tab
  613. * @param {String} name The name of the tab. Should not contain any
  614. * special characters.
  615. * @param {String} content The HTML content of the tab.
  616. * @param {Function} [callback] A function to call upon successfully
  617. * appending the tab.
  618. * @param {Object} [context] The context in which to call the callback
  619. * function.
  620. * @return {WazeWrap.Interface.Tab} The new tab object.
  621. * @example //Creates new tab and adds it to the page.
  622. * new WazeWrap.Interface.Tab('thebestscriptever', '<div>Hello World!</div>');
  623. */
  624. initialize: function (name, content, callback, context) {
  625. var idName, i = 0;
  626. if (name && 'string' === typeof name &&
  627. content && 'string' === typeof content) {
  628. if (callback && 'function' === typeof callback) {
  629. this.callback = callback;
  630. this.context = context || callback;
  631. }
  632. /* Sanitize name for html id attribute */
  633. idName = name.toLowerCase().replace(/[^a-z-_]/g, '');
  634. /* Make sure id will be unique on page */
  635. while (
  636. $('#sidepanel-' + (i ? idName + i : idName)).length > 0) {
  637. i++;
  638. }
  639. if (i) {
  640. idName = idName + i;
  641. }
  642. /* Create tab and content */
  643. this.$tab = $('<li/>')
  644. .append($('<a/>')
  645. .attr({
  646. 'href': '#sidepanel-' + idName,
  647. 'data-toggle': 'tab',
  648. })
  649. .text(name));
  650. this.$content = $('<div/>')
  651. .addClass('tab-pane')
  652. .attr('id', 'sidepanel-' + idName)
  653. .html(content);
  654.  
  655. this.appendTab();
  656. }
  657. },
  658.  
  659. append: function (content) {
  660. this.$content.append(content);
  661. },
  662.  
  663. appendTab: function () {
  664. WazeWrap.Util.waitForElement(
  665. this.TAB_SELECTOR + ',' + this.CONTENT_SELECTOR,
  666. function () {
  667. $(this.TAB_SELECTOR).append(this.$tab);
  668. $(this.CONTENT_SELECTOR).first().append(this.$content);
  669. if (this.callback) {
  670. this.callback.call(this.context);
  671. }
  672. }, this);
  673. },
  674.  
  675. clearContent: function () {
  676. this.$content.empty();
  677. },
  678.  
  679. destroy: function () {
  680. this.$tab.remove();
  681. this.$content.remove();
  682. }
  683. });
  684. };
  685.  
  686. }.call(this));

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址