use element-ui with some config

Overview

confism-element

write HTML with javascript in vue

install

npm install confism-element -S

U can register confism-element component in main.js

// main.js
import Vue from 'vue';
import CfElement from 'confism-element';
import App from './App.vue';

Vue.use(CfElement);

new Vue({
  el: '#app',
  render: h => h(App)
});

Or u can register confism-element component in a local component

<template>
  <div id="app">
    <cf-element v-bind="el">
      aaa
    </cf-element>
  </div>
</template>

<script>
import CfElement from 'confism-element';

export default {
  name: 'App',
  components: {
    CfElement,
  },
  data () {
    return {
      el: {
        component: 'el-button', 
        props: {
          type: 'danger',
          size: 'small',
        },
        events: {
          click () {
            console.log('hello');
          },
        },
        children: [
          {
            component: 'i',
            innerText: 'bbb',
          },
        ],
      },
    };
  },
  mounted () {
    setInterval(() => {
      this.el.props.type = this.el.props.type === 'danger' ? 'primary' : 'danger';
    }, 1000);
  },
}
</script>

Props

  • component: string (component/tag name)
  • props?: object (props what your component needs)
  • events?: object (events what your component needs)
  • children?: Props[]
  • childrenKeyField: string (just like key for "v-for")
  • innerText: string (text in tag)
  • innerHTML: string (rich text just like v-html)
You might also like...

This Repo Contains projects that demonstrate some concepts / algorithms / implemetation in some form of digital visualisation

This Repo Contains projects that demonstrate some concepts / algorithms / implemetation in some form of digital visualisation

Hacktoberfest 2022 OPEN FIRST Pull Request - GET STARTED WITH OPENSOURCE AND WIN SOME AWWSOME SWAGS 🎉 Contributors of Hacktoberfest 2022 This project

Nov 7, 2022

Create sticky element in flexbox sidebars. it can use in Vanilla JS and frameworks like Vue and React

Create sticky element in flexbox sidebars. it can use in Vanilla JS and frameworks like Vue and React

js sticky side simple sticky side with js that can use in frameworks like vue and react. notes it can be used just in flexbox grids. target element sh

Mar 3, 2022

Easy to use, Element Printing Plugin for jQuery

jQuery Print Plugin jQuery.print is a plugin for printing specific parts of a page Usage Include it in your HTML after importing jQuery, like: scrip

Nov 25, 2022

An easy-to-use jQuery plugin that allows the user to pick an icon from a responsive icon browser and shows the corresponding icon class in an input element.

Font Awesome Browser An easy-to-use jQuery plugin that allows the user to pick an icon from a responsive icon browser and shows the corresponding icon

May 1, 2021

⚡ Zero config GUI for Jest

⚡ Zero config GUI for Jest

Majestic is a GUI for Jest ✅ Run all the tests or a single file ⏱ Toggle watch mode 📸 Update snapshots ❌ Examine test failures as they happen ⏲ Conso

Jan 2, 2023

⚡A zero-config bundler for JavaScript applications.

⚡A zero-config bundler for JavaScript applications.

Poi is a bundler built on the top of webpack, trying to make developing and bundling apps with webpack as easy as possible. The Poi project is support

Jan 4, 2023

Simple config handling for your app or module

conf Simple config handling for your app or module All you have to care about is what to persist. This module will handle all the dull details like wh

Jan 7, 2023

Config-based action debouncing made easy

Pinia Debounce Debounce any action in your pinia 🍍 store! This is also a very good example of how to create a pinia plugin and how to type it. Instal

Dec 5, 2022

A Zero config CLI to quick-start your web projects.

Quick-strapper A Zero-config cli to help you bootstrap web projects with best templates. Quick-strapper Usage Templates Commands Usage You can start u

Jun 14, 2022

The standard shareable Vue config for Stylelint.

stylelint-config-standard-vue The standard shareable Vue config for Stylelint. This config: extends the stylelint-config-standard shared config and co

Dec 13, 2022

A new zero-config test runner for the true minimalists

Why User-friendly - zero-config, no API to learn, simple conventions Extremely lighweight - only 40 lines of code and no dependencies Super fast - wit

Dec 20, 2022

Tools for Dump NUXT JS Environment Config Through Browser Window Object

Tools for Dump NUXT JS Environment Config Through Browser Window Object

Introduction Nuxt JS is an open source javascript framework making web development simple and powerful. This tool is used to get environment configura

Sep 5, 2022

✨ An Eslint config to improve your code

eslint-config-descartes ✨ An Eslint config to improve your code by Descartes Team How to use? 1 - Install Eslint npm instal eslint-config-descartes es

Dec 21, 2022

⭐️ Auto create alias map for vite config

vite-plugin-tspaths2alias This plugin is create alias map for vite config, default use project root tsconfig.json file compilerOptions.paths value Ins

Mar 26, 2022

📦 🍣 Zero-config JS bundler for ESM, CommonJS, and .d.ts outputs

pkgroll Write your code in ESM & TypeScript and bundle it to get ESM, CommonJS, and type declaration outputs with a single command! Features Zero conf

Dec 23, 2022

A zero-config toolkit for creating fine Forge apps

A zero-config toolkit for creating fine Forge apps

A zero-config toolkit for creating fine Forge apps. Background The Forge Dev Kit (FDK) is a preconfigured set of libraries and frameworks for developi

Aug 10, 2022

Easiest way to build documentation for your project. No config or build required, hosted on @netlify.

Easiest way to build documentation for your project. No config or build required, hosted on @netlify.

Hyperdocs is the simplest way you can create documentation for your project. It blends the best of all the other documentation tools in one. Hyperdocs

Dec 22, 2022

LukeZhu's ESLint config presets

@luke358/eslint-config eslint monorepo Usage Install pnpm add -D eslint @luke358/eslint-config Config .eslintrc { "extends": "@luke358" } You don't

Jun 13, 2022

CLI tool to update caniuse-lite to refresh target browsers from Browserslist config

Update Browserslist DB CLI tool to update caniuse-lite with browsers DB from Browserslist config. Some queries like last 2 version or 1% depends on a

Dec 30, 2022
Owner
null
Give your JS App some Backbone with Models, Views, Collections, and Events

____ __ __ /\ _`\ /\ \ /\ \ __ \ \ \ \ \ __ ___\ \ \/'\\ \ \_

Jeremy Ashkenas 28k Dec 27, 2022
null 3.9k Dec 30, 2022
基于vue3.0-ts-Element集成的简洁/实用后台模板!《带预览地址》vue-admin;vue+admin;vue-element;vue+element;vue后台管理;vue3.0-admin;vue3.0-element。

一、基于vue3.0+ts+Element通用后台admin模板 二、在线预览地址:http://admin.yknba.cn/ 三、下载使用: 1、克隆代码 通过git将代码克隆到本地;或者使用下载安装包模式进行下载。 2、进入目录 进入项目的根目录:vue3.0-ts-admin 3、安装依

null 64 Dec 16, 2022
A web interface to edit TP-Link Router Config export files (typically named config.bin).

TP-Link Router Config Editor A web interface to edit TP-Link Router Config export files (typically named config.bin). Visit the website. Tested on an

Jahed 10 Nov 17, 2022
🎉 基于 vite 2.0 + vue 3.0 + vue-router 4.0 + vuex 4.0 + element-plus 的后台管理系统vue3-element-admin

vue3-element-admin ?? 基于 Vite 2.0 + Vue3.0 + Vue-Router 4.0 + Vuex 4.0 + element-plus 的后台管理系统 简介 vue3-element-admin 是一个后台前端解决方案,它基于 vue3 和 element-plu

雪月欧巴 84 Nov 28, 2022
JavaScript micro-library: pass in an element and a callback and this will trigger when you click anywhere other than the element

Add a click listener to fire a callback for everywhere on the window except your chosen element. Installation run npm install @lukeboyle/when-clicked-

Boyleing Point 5 May 13, 2021
Storybook Addon Root Attributes to switch html, body or some element attributes (multiple) at runtime for you story

Storybook Addon Root Attributes What is this This project was inspired by le0pard/storybook-addon-root-attribute The existing library received only on

정현수 5 Sep 6, 2022
A K6 Multi Scenario template applying some best practices along some examples

K6-Multi-Scenario-Template It is a performance testing template that shows how to use K6 to implement a Multi Scenario template applying some best pra

Swiss Life OSS 33 Nov 27, 2022
A simple react project that contain a single page application (SPA) And a simple caculator to make some calculation and there is a section you can see some Math quotes. Ⓜ💯

A simple react project that contain a single page application (SPA) And a simple caculator to make some calculation and there is a section you can see some Math quotes. Ⓜ??

Reem janina 7 May 31, 2022