GithubHelp home page GithubHelp logo

hooray / vue-sku-form Goto Github PK

View Code? Open in Web Editor NEW
125.0 2.0 46.0 3.3 MB

基于 Vue & ElementUI 的电商 SKU 表单配置组件

Home Page: https://hooray.github.io/vue-sku-form/

JavaScript 9.07% HTML 0.97% Vue 89.97%
vue element element-ui sku form

vue-sku-form's Introduction

vue-sku-form

基于 Vue & ElementUI 的电商 SKU 表单配置组件

文档

你或许感兴趣

Fantastic-admin

一款开箱即用的 Vue 中后台管理系统框架

vue-sku-form's People

Contributors

hooray avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vue-sku-form's Issues

功能建议

希望可以增加删除属性 和 删除属性值的这种操作

想提一条建议0.0

组件做的很好用,就是发现没有删除规格功能,希望作者有空能添加一下。

一些小建议:structure增加hidden类型、动态增加的attribute子项item,是否可以自动合并到sourceAttribute中

首先非常感谢作者提供的组件,非常好用。
使用中遇到一些小问题:

1、structure增加hidden类型。 场景:后台需要封面图的id
2、动态增加的attribute子项item,是否可以自动合并到sourceAttribute中。场景,动态增加了一个规格,然后增加了一些子项,sourceAttribute,并未同步。(不知道是不是我的使用姿势有问题)

UMD有用吗?以下代码发现没反应

<title>SkuForm demo</title>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.min.js"></script>



<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="./SkuForm.umd.js"></script>
		<el-col>
			<el-divider content-position="left">attribute 数据</el-divider>
			<pre><code>{{ attribute }}</code></pre>
		</el-col>
		<el-col>
			<el-divider content-position="left">sku 数据</el-divider>
			<pre><code>{{ sku }}</code></pre>
		</el-col>
	</el-row>
<script> Vue.use(SkuForm); new Vue({ el:'#app', data() { return { sourceAttribute: [ { name: '颜色', item: ['黑', '金', '白'] }, { name: '内存', item: ['16G', '32G'] } ], attribute: [], sku: [] } } }); </script>

怎么拿到table的index栏 右边那项的值

emitAttribute() {
		let attribute = []
		this.myAttribute.forEach(v1 => {
			const obj = {
				name: v1.name,
				item: [],
				id: v1.id
			}
			v1.item.forEach(v2 => {
				if (v2.checked) {

// 如果修改了这行的值(假设已经每项v2都有自己的id值)

					obj.item.push(v2.name)

// 改成了 ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
obj.item.push( { name : v2.name , id : v2.id })

				}
			})
			console.log('obj', obj)
			if (obj.item.length !== 0) {
				attribute.push(obj)
			}
		})
		console.log(attribute)
		return attribute
	}

改完后 table里选择完 更新的数据第二项 会变成undefined 这点该去哪里改啊 该怎么让列表还是显示name的值

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.