基于 Vue & ElementUI 的电商 SKU 表单配置组件
一款开箱即用的 Vue 中后台管理系统框架
基于 Vue & ElementUI 的电商 SKU 表单配置组件
Home Page: https://hooray.github.io/vue-sku-form/
增加一个类似addShow属性,可以通过该属性控制是否出现‘添加’按钮。
能增加SKU及子项的拖动排序功能吗?
调整起来挺麻烦的
如果我设置了颜色-红,蓝,并在输入框写了信息,之后再添加一个属性,input全部清空了
希望可以增加删除属性 和 删除属性值的这种操作
获取sku 数据时 可否拼接上每一项的name
譬如
[
{
"name": "颜色",
"item": [
"黑"
]
}
]
sku拼接后
[
{
"sku": "颜色,黑",
"price": 80,
"stock": 100
}
]
能否增加对规格组的操作(增加、删除)
能不能支持任一规格上传图片,前台需要显示图片区分,比如颜色。
组件做的很好用,就是发现没有删除规格功能,希望作者有空能添加一下。
首先非常感谢作者提供的组件,非常好用。
使用中遇到一些小问题:
1、structure增加hidden类型。 场景:后台需要封面图的id
2、动态增加的attribute子项item,是否可以自动合并到sourceAttribute中。场景,动态增加了一个规格,然后增加了一些子项,sourceAttribute,并未同步。(不知道是不是我的使用姿势有问题)
<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><script> Vue.use(SkuForm); new Vue({ el:'#app', data() { return { sourceAttribute: [ { name: '颜色', item: ['黑', '金', '白'] }, { name: '内存', item: ['16G', '32G'] } ], attribute: [], sku: [] } } }); </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>
图片放大功能失效
sku里面的第一个属性不显示
怎么拿到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的值
当没有任何SKU属性的时候SKU里是保存了库存和单价
但是这个SKU里有值调用skuform.init也没法赋值上去,至少必须有一个SKU属性才会赋值上去吗?是不是空的SKU就是不赋值的?
有ant vue 版本吗
有ant vue 版本吗
sku数据为空 其他字段有值 显示不出来
新增规格值这个事件没有在文档中看到,需要新增的时候调接口,数组中找的话数据太多了。。。。
sku 规格 编辑时候 规格置为不可勾选状态 这个要怎么实现啊
vue3.0 安装插件后提示
Recommend Projects
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
TensorFlow
An Open Source Machine Learning Framework for Everyone
Django
The Web framework for perfectionists with deadlines.
Laravel
A PHP framework for web artisans
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.
Visualization
Some thing interesting about visualization, use data art
Game
Some thing interesting about game, make everyone happy.
Recommend Org
We are working to build community through open source technology. NB: members must have two-factor auth.
Microsoft
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba
Alibaba Open Source for everyone
D3
Data-Driven Documents codes.
Tencent
China tencent open source team.
Jobs
Jooble