mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-16 07:36:30 +08:00
feat: 支持文本模板,系统命令
This commit is contained in:
28
static/plugins/doc/doc.js
Normal file
28
static/plugins/doc/doc.js
Normal file
@@ -0,0 +1,28 @@
|
||||
export default {
|
||||
template: `
|
||||
<div class="doc-container">
|
||||
<div class="menu">
|
||||
<div @click="active = index" :class="active === index ? 'active item' : 'item'" v-for="(item, index) in menu">
|
||||
<div class="title">{{item.t}}</div>
|
||||
<div class="desc">{{item.d}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<iframe class="frame" :src="path" />
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
query: this.$route.query,
|
||||
menu: [],
|
||||
active: 0,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.menu = JSON.parse(this.query.args).indexes || [];
|
||||
},
|
||||
computed: {
|
||||
path() {
|
||||
return decodeURIComponent(this.query.rootPath) + (this.menu[this.active] || {}).p
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user