Files
Sub-Store/web/src/components/SortOperator.vue
2020-09-01 16:18:59 +08:00

77 lines
1.7 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>
<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>
<v-btn icon @click="$emit('deleteProcess', idx)">
<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>
<v-radio label="正序" value="asc"/>
</v-col>
<v-col>
<v-radio label="逆序" value="desc"/>
</v-col>
<v-col>
<v-radio label="随机" value="random"/>
</v-col>
</v-row>
</v-radio-group>
</v-card-text>
</v-card>
</template>
<script>
export default {
props: ["args"],
data: function () {
return {
idx: this.$vnode.key,
mode: "asc"
}
},
created() {
this.mode = this.args;
},
watch: {
mode() {
this.$emit("dataChanged", {
idx: this.idx,
args: this.mode
})
}
}
}
</script>
<style scoped>
</style>