0.1.8 • Published 4 months ago

@nicky-chen/consistent-graph v0.1.8

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

consistent-graph

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Usage

<template>
  <div id="app">
    <HelloWorld msg="Welcome to Your Vue.js App"/>
    <StoryBoard :data="data" ref = "story"/>
    <button @click = "onSave">save</button>
    <!-- <Test2 /> -->
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
// import StoryBoard from './components/StoryBoard.vue';
// import Test from './components/Test.vue'
// import Test2 from './components/Test2.vue'
import { StoryBoard } from '../packages/';
import Vue from 'vue';
// Vue.use(StoryBoard)

export default {
  name: 'App',
  components: {
    HelloWorld,
    StoryBoard
    // Test,
    // Test2
  },

  methods: {
    onSave() {
      this.$refs.story.getData();
    }
  },
  data() {
    return {
      data: {}
    }
  },
  mounted () {
    console.log('mounted', StoryBoard)
    this.data = { node: [
        {
          "id": 1,
          "consistencyJudgeId": "1",
          "meterChildId": 756,
          "del": false,
          "cts": "2023-11-17T19:16:42.000+0800",
          "meterChildName": "B"
        },
        {
          "id": 2,
          "consistencyJudgeId": "1",
          "meterChildId": 1363,
          "del": false,
          "cts": "2023-11-17T19:24:46.000+0800",
          "meterChildName": "0"
        },
        {
          "id": 3,
          "consistencyJudgeId": "1",
          "meterChildId": 1364,
          "del": false,
          "cts": "2023-11-17T19:24:46.000+0800",
          "meterChildName": "I"
        },
        {
          "id": 4,
          "consistencyJudgeId": "1",
          "meterChildId": 1367,
          "del": false,
          "cts": "2023-11-17T19:24:46.000+0800",
          "meterChildName": "开关"
        }
      ], relation: [
        {
          "consistencyRuleId": 1,
          "ruleStringList": [
              "#756",
              ">",
              "#1363"
          ],
          "type": 0
        },
        {
          "consistencyRuleId": 2,
          "ruleStringList": [
            "#1363",
            "==",
            "0",
            "||",
            "#1363",
            "==",
            "1"
        ],
        "type": 1
      },
      {
        "consistencyRuleId": 3,
        "ruleStringList": [
            "#1364",
            "==",
            "1"
        ],
        "type": 2
      },
      {
        "consistencyRuleId": 4,
        "ruleStringList": [
            "#1367",
            "==",
            "0"
        ],
        "type": 2
      }
    ]};
  },
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>

更新日志

给ruleStringList里面的ID前面加上#

Customize configuration

See Configuration Reference.

0.1.8

4 months ago

0.1.7

4 months ago

0.1.6

4 months ago

0.1.5

4 months ago

0.1.4

4 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.3

5 months ago

0.1.0

5 months ago