Files
Sub-Store/web/src/components/SortOperator.vue

77 lines
1.7 KiB
Vue
Raw Normal View History

2020-08-28 15:00:45 +08:00
<template>
<v-card class="ml-1 mr-1 mb-1 mt-1">
<v-card-title>
<v-icon left color="primary">sort_by_alpha</v-icon>
节点排序
<v-spacer></v-spacer>
2020-09-01 10:11:02 +08:00
<v-btn icon @click="$emit('up', idx)">
<v-icon>keyboard_arrow_up</v-icon>
</v-btn>
<v-btn icon @click="$emit('down', idx)">
<v-icon>keyboard_arrow_down</v-icon>
</v-btn>
2020-09-01 16:18:59 +08:00
<v-btn icon @click="$emit('deleteProcess', idx)">
2020-08-28 15:00:45 +08:00
<v-icon color="error">mdi-delete</v-icon>
</v-btn>
<v-dialog>
<template #activator="{on}">
<v-btn icon v-on="on">
<v-icon>help</v-icon>
</v-btn>
</template>
<v-card>
<v-card-title class="headline">
节点排序
</v-card-title>
<v-card-text>
根据节点名排序一共有正序逆序随机三种模式
</v-card-text>
</v-card>
</v-dialog>
</v-card-title>
<v-card-text>
模式
<v-radio-group v-model="mode">
<v-row>
<v-col>
2020-09-01 10:11:02 +08:00
<v-radio label="正序" value="asc"/>
2020-08-28 15:00:45 +08:00
</v-col>
<v-col>
2020-09-01 10:11:02 +08:00
<v-radio label="逆序" value="desc"/>
2020-08-28 15:00:45 +08:00
</v-col>
<v-col>
2020-09-01 10:11:02 +08:00
<v-radio label="随机" value="random"/>
2020-08-28 15:00:45 +08:00
</v-col>
</v-row>
</v-radio-group>
</v-card-text>
</v-card>
</template>
<script>
export default {
2020-09-01 10:11:02 +08:00
props: ["args"],
2020-08-28 15:00:45 +08:00
data: function () {
return {
2020-09-01 10:11:02 +08:00
idx: this.$vnode.key,
mode: "asc"
}
},
created() {
this.mode = this.args;
},
watch: {
mode() {
this.$emit("dataChanged", {
idx: this.idx,
args: this.mode
})
2020-08-28 15:00:45 +08:00
}
}
2020-09-01 10:11:02 +08:00
2020-08-28 15:00:45 +08:00
}
</script>
<style scoped>
</style>