0.7.0-rc5 • Published 8 months ago

crawlab-ui v0.7.0-rc5

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
8 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.7.0-rc4

8 months ago

0.7.0-rc5

8 months ago

0.7.0-rc

8 months ago

0.7.0-rc2

8 months ago

0.7.0-rc3

8 months ago

0.6.3-7

12 months ago

0.6.3-6

12 months ago

0.6.3-5

12 months ago

0.6.3-4

12 months ago

0.6.3-9

12 months ago

0.6.3-8

12 months ago

0.6.3-10

12 months ago

0.6.3-13

12 months ago

0.6.3-12

12 months ago

0.6.3-11

12 months ago

0.6.3-18

12 months ago

0.6.3-17

12 months ago

0.6.3-16

12 months ago

0.6.3-15

12 months ago

0.6.3-19

12 months ago

0.6.3-3

1 year ago

0.6.2-8

2 years ago

0.6.2-9

2 years ago

0.6.3-2

2 years ago

0.6.3-1

2 years ago

0.6.2-11

2 years ago

0.6.2-10

2 years ago

0.6.3

2 years ago

0.6.2-7

2 years ago

0.6.2-6

2 years ago

0.6.2-5

2 years ago

0.6.2-4

2 years ago

0.6.2-3

2 years ago

0.6.2-2

2 years ago

0.6.2-1

2 years ago

0.6.1-7

2 years ago

0.6.2

2 years ago

0.6.1-6

2 years ago

0.6.1-5

2 years ago

0.6.1-4

2 years ago

0.6.1-3

2 years ago

0.6.1-2

2 years ago

0.6.0-25

3 years ago

0.6.0-26

3 years ago

0.6.0-27

3 years ago

0.6.0-28

3 years ago

0.6.0-29

3 years ago

0.6.0-40

2 years ago

0.6.0-41

2 years ago

0.6.0-34

2 years ago

0.6.0-35

2 years ago

0.6.0-36

2 years ago

0.6.0-37

2 years ago

0.6.0-30

3 years ago

0.6.0-31

3 years ago

0.6.0-32

2 years ago

0.6.0-33

2 years ago

0.6.0-38

2 years ago

0.6.0-39

2 years ago

0.6.1

2 years ago

0.6.0-23

3 years ago

0.6.0-20

3 years ago

0.6.0-21

3 years ago

0.6.0-22

3 years ago

0.6.0-13

3 years ago

0.6.0-14

3 years ago

0.6.0-15

3 years ago

0.6.0-16

3 years ago

0.6.0-17

3 years ago

0.6.0-18

3 years ago

0.6.0-9

3 years ago

0.6.0-8

3 years ago

0.6.0-12

3 years ago

0.6.0-10

3 years ago

0.6.0-11

3 years ago

0.6.0-2

3 years ago

0.6.0-7

3 years ago

0.6.0-6

3 years ago

0.6.0-5

3 years ago

0.6.0-4

3 years ago

0.6.0-3

3 years ago

0.6.0-1

3 years ago

0.6.0

3 years ago