0.6.3-2 • Published 5 months ago

crawlab-ui v0.6.3-2

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
5 months ago

Crawlab-UI

This is the UI components and modules to support the frontend development for Crawlab.

How to Install

Use npm or yarn to install crawlab-ui.

# npm
npm install crawlab-ui -S

# or use yarn
yarn add crawlab-ui -S

How to Use

It is similar to Element-Plus, you can import components from Crawlab-UI. Crawlab-UI is built based on Element-Plus so that you can comfortably use it with Element-Plus.

Use Globally Installed Components

Below is an example of entry file (main.ts) using Crawlab-UI globally.

import {createApp} from 'vue';
import CrawlabUI from 'crawlab-ui';

const app = createApp(App);
app
  .use(CrawlabUI)  // install globally
  .mount('#app');

Below is an example of using globally installed Crawlab-UI in a Vue 3 component.

<template>
  <cl-form :model="form">
    <cl-form-item :span="2" label="Key" prop="key" required>
      <el-input v-model="form.key"/>
    </cl-form-item>
    <cl-form-item :span="2" label="Value" prop="value" required>
      <el-input v-model="form.value"/>
    </cl-form-item>
  </cl-form>
</template>

<script lang="ts">
import {defineComponent, ref} from 'vue';

export default defineComponent({
  setup() {
    const form = ref({
      key: 'test-key',
      value: 'test-value',
    });
    return {
      form,
    };
  },
});
</script>

Use Standalone Components

Below is an example of using standalone components in a Vue 3 component.

<template>
  <cl-form :model="form">
    <cl-form-item :span="2" label="Key" prop="key" required>
      <el-input v-model="form.key"/>
    </cl-form-item>
    <cl-form-item :span="2" label="Value" prop="value" required>
      <el-input v-model="form.value"/>
    </cl-form-item>
  </cl-form>
</template>

<script lang="ts">
import {defineComponent, ref} from 'vue';
import {ClForm, ClFormItem} from 'crawlab-ui';

export default defineComponent({
  components: {
    ClForm,
    ClFormItem,
  },
  setup() {
    const form = ref({
      key: 'test-key',
      value: 'test-value',
    });
    return {
      form,
    };
  },
});
</script>

Use Web Application

Crawlab-UI has a built-in web application for Crawlab frontend. You can simply use it to start Crawlab frontend Vue 3 SPA.

// index.ts or index.js or other entry file
import {createApp} from 'crawlab-ui';

createApp();

And that's it! After you build or start serving it, you can view the Crawlab frontend web application in the browser.

Development

Add a new model

Related directories:

  • src/views
  • src/components
  • src/store
  • src/router
  • src/i18n
  • src/services
  • src/interfaces/i18n
0.6.2-8

10 months ago

0.6.2-9

10 months ago

0.6.3-2

5 months ago

0.6.3-1

5 months ago

0.6.2-11

9 months ago

0.6.2-10

10 months ago

0.6.3

7 months ago

0.6.2-7

10 months ago

0.6.2-6

10 months ago

0.6.2-5

10 months ago

0.6.2-4

10 months ago

0.6.2-3

10 months ago

0.6.2-2

10 months ago

0.6.2-1

11 months ago

0.6.1-7

11 months ago

0.6.2

11 months ago

0.6.1-6

11 months ago

0.6.1-5

1 year ago

0.6.1-4

1 year ago

0.6.1-3

1 year ago

0.6.1-2

1 year ago

0.6.0-25

1 year ago

0.6.0-26

1 year ago

0.6.0-27

1 year ago

0.6.0-28

1 year ago

0.6.0-29

1 year ago

0.6.0-40

1 year ago

0.6.0-41

1 year ago

0.6.0-34

1 year ago

0.6.0-35

1 year ago

0.6.0-36

1 year ago

0.6.0-37

1 year ago

0.6.0-30

1 year ago

0.6.0-31

1 year ago

0.6.0-32

1 year ago

0.6.0-33

1 year ago

0.6.0-38

1 year ago

0.6.0-39

1 year ago

0.6.1

1 year ago

0.6.0-23

1 year ago

0.6.0-20

1 year ago

0.6.0-21

1 year ago

0.6.0-22

1 year ago

0.6.0-13

2 years ago

0.6.0-14

2 years ago

0.6.0-15

2 years ago

0.6.0-16

2 years ago

0.6.0-17

2 years ago

0.6.0-18

1 year ago

0.6.0-9

2 years ago

0.6.0-8

2 years ago

0.6.0-12

2 years ago

0.6.0-10

2 years ago

0.6.0-11

2 years ago

0.6.0-2

2 years ago

0.6.0-7

2 years ago

0.6.0-6

2 years ago

0.6.0-5

2 years ago

0.6.0-4

2 years ago

0.6.0-3

2 years ago

0.6.0-1

2 years ago

0.6.0

2 years ago