|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
-
-
-
- var selector = '#app-setting-admin';
- if($(selector).length) {
- var app = new Vue({
- el: selector,
- data() {
- return Object.assign({
- currentSection: null,
- sectionsArray: []
- }, window.appInitValues);
- },
- methods: {
- changeSection: function (section) {
- this.currentSection = section.name;
- },
- getInitialSection: function () {
- var hash = window.location.hash.substring(1);
- if (hash && hash.length) {
- return hash;
- }
- return this.sectionsArray[0].name;
- }
- },
- mounted: function () {
- this.currentSection = this.getInitialSection();
- }
- });
- }
|